Page 1 of 1

Admin account DNS doesn't work on centOS7.3

Posted: Mon May 29, 2017 9:29 am
by viraladmin
Now granted someone is going to come along and tell me it works perfectly because it works perfectly for them - but it doesn't work perfectly for me.

As far as I can tell their are no logs, and how could their be - nothing is actually crashing.

However the main domain listed under the admin account - doesn't work.

All other sites work just fine, however the admin domain always returns "DNS address could not be found."

I have tried copying nginx.conf from a user account to the admin account and modifying - has no affect. Have done the same with httpd.conf - has no affect. I have tried copying DNS settings from another server admin account and modifying - has no affect.

I cannot get the domain to work no matter what.

DNS:

Code: Select all

$TTL 14400
@    IN    SOA    ns1.adsactly.com.    root.adsactly.com. (
                                            2017052902
                                            7200
                                            3600
                                            1209600
                                            180 )

@       14400   IN      NS              ns1.adsactly.com.
@       14400   IN      NS              ns2.adsactly.com.
@       14400   IN      A               198.23.211.154
mail    14400   IN      A               198.23.211.154
www     14400   IN      A               198.23.211.154
pop     14400   IN      A               198.23.211.154
ftp     14400   IN      A               198.23.211.154
@       14400   IN      MX      10      mail.adsactly.com.
@       14400   IN      TXT             "v=spf1 a mx ip4:198.23.211.154 ?all"
_dmarc  14400   IN      TXT             "v=DMARC1; p=none"
_domainkey      14400   IN      TXT             "t=y; o=~;"
mail._domainkey 14400   IN      TXT             "k=rsa; p=long_string_removed"
ns1     14400   IN      A               198.23.211.154
ns2     14400   IN      A               198.23.211.154
Nginx.conf

Code: Select all

server {
    listen      198.23.211.154:80;
    server_name adsactly.com www.adsactly.com;
    error_log  /var/log/httpd/domains/adsactly.com.error.log error;

    location / {
        proxy_pass      http://198.23.211.154:8080;

        proxy_cache adsactly.com;
        proxy_cache_valid 15m;
        proxy_cache_valid 404 1m;
        proxy_no_cache $no_cache;
        proxy_cache_bypass $no_cache;
        proxy_cache_bypass $cookie_session $http_x_update;

        location ~* ^.+\.(jpg|jpeg|gif|png|ico|svg|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|odt|ods|odp|odf|tar|wav|bmp|rtf|js|mp3|avi|mpeg|flv|html|htm)$ {
            proxy_cache    off;
            root           /home/admin/web/adsactly.com/public_html;
            access_log     /var/log/httpd/domains/adsactly.com.log combined;
            access_log     /var/log/httpd/domains/adsactly.com.bytes bytes;
            expires        max;
            try_files      $uri @fallback;
        }
    }

    location /error/ {
        alias   /home/admin/web/adsactly.com/document_errors/;
    }

    location @fallback {
        proxy_pass      http://198.23.211.154:8080;
    }

    location ~ /\.ht    {return 404;}
    location ~ /\.svn/  {return 404;}
    location ~ /\.git/  {return 404;}
    location ~ /\.hg/   {return 404;}
    location ~ /\.bzr/  {return 404;}

    include /home/admin/conf/web/nginx.adsactly.com.conf*;
}
httpd.conf

Code: Select all

<VirtualHost 198.23.211.154:8080>

    ServerName adsactly.com
    ServerAlias www.adsactly.com
    ServerAdmin [email protected]
    DocumentRoot /home/admin/web/adsactly.com/public_html
    ScriptAlias /cgi-bin/ /home/admin/web/adsactly.com/cgi-bin/
    Alias /vstats/ /home/admin/web/adsactly.com/stats/
    Alias /error/ /home/admin/web/adsactly.com/document_errors/
    #SuexecUserGroup admin admin
    CustomLog /var/log/httpd/domains/adsactly.com.bytes bytes
    CustomLog /var/log/httpd/domains/adsactly.com.log combined
    ErrorLog /var/log/httpd/domains/adsactly.com.error.log
    <Directory /home/admin/web/adsactly.com/public_html>
        AllowOverride All
        Options +Includes -Indexes +ExecCGI
        php_admin_value open_basedir /home/admin/web/adsactly.com/public_html:/home/admin/tmp
        php_admin_value upload_tmp_dir /home/admin/tmp
        php_admin_value session.save_path /home/admin/tmp
    </Directory>
    <Directory /home/admin/web/adsactly.com/stats>
        AllowOverride All
    </Directory>

    <IfModule mod_ruid2.c>
        RMode config
        RUidGid admin admin
        RGroups apache
    </IfModule>
    <IfModule itk.c>
        AssignUserID admin admin
    </IfModule>

    IncludeOptional /home/admin/conf/web/httpd.adsactly.com.conf*

</VirtualHost>

Re: Admin account DNS doesn't work on centOS7.3

Posted: Mon May 29, 2017 1:41 pm
by skurudo
Something not right here:

Code: Select all

 $ host NS1.ADSACTLY.COM
NS1.ADSACTLY.COM has address 198.23.211.154
Host NS1.ADSACTLY.COM not found: 2(SERVFAIL)
Host NS1.ADSACTLY.COM not found: 2(SERVFAIL)

Code: Select all

16:40:47 [root@mirajane:~ ] $ host NS2.ADSACTLY.COM
Host NS2.ADSACTLY.COM not found: 2(SERVFAIL)

Re: Admin account DNS doesn't work on centOS7.3

Posted: Mon May 29, 2017 5:30 pm
by viraladmin
Well yes that would be why I came asking for help - cause something isn't right.

I can issue host on other sites hosted on the same server using the same DNS.

Code: Select all

host biglipsbudgetmama.com
biglipsbudgetmama.com has address 198.23.211.154
biglipsbudgetmama.com mail is handled by 10 mail.biglipsbudgetmama.com.
So what is going on with the DNS? Why do some sites work and others not - why is it specific to the admin account... what exactly should I even look into to fix this!

Re: Admin account DNS doesn't work on centOS7.3

Posted: Mon May 29, 2017 6:36 pm
by viraladmin
Seems a simple rebuild of the DNS for admin account sorted the issue.

Code: Select all

./v-rebuild-dns-domains admin restart
[root@host bin]# host adsactly.com
adsactly.com has address 198.23.211.154
adsactly.com mail is handled by 10 mail.adsactly.com.
[root@host bin]# host ns1.adsactly.com
ns1.adsactly.com has address 198.23.211.154