Site doens't work without "www." after having changed IPs

Azure_flux

Registered
May 26, 2012
1
0
51
cPanel Access Level
Root Administrator
I've recently had to change the IP of my site, and everything seems to be working with "www." before the domain.
However, for "domain.net", it takes me to a default website page, and if I try to load, say "domain.net/index.php", it retrieves a 404 error page.

The DNSs are well configured, but I'm not sure about the httpd.conf file. I'll drop a segment of it that is relevant to the situation.

Code:
# DO NOT EDIT. AUTOMATICALLY GENERATED.  IF YOU NEED TO MAKE A CHANGE PLEASE USE THE INCLUDE FILES.
NameVirtualHost 78.159.106.77:80
NameVirtualHost *
# DO NOT EDIT. AUTOMATICALLY GENERATED.  IF YOU NEED TO MAKE A CHANGE PLEASE USE THE INCLUDE FILES.


NameVirtualHost 78.159.106.77:80
<VirtualHost 78.159.106.77:80>
    ServerName server.vocaloidotaku.net
    DocumentRoot /usr/local/apache/htdocs
    ServerAdmin [email protected]
    <IfModule mod_suphp.c>
        suPHP_UserGroup nobody nobody
    </IfModule>
</VirtualHost>


# Default vhost for unbound IPs


NameVirtualHost 78.159.106.77:80
<VirtualHost 78.159.106.77:80>
    ServerName server.vocaloidotaku.net
    DocumentRoot /usr/local/apache/htdocs
    ServerAdmin [email protected]
    <IfModule mod_suphp.c>
        suPHP_UserGroup nobody nobody
    </IfModule>
</VirtualHost>

# DO NOT EDIT. AUTOMATICALLY GENERATED.  IF YOU NEED TO MAKE A CHANGE PLEASE USE THE INCLUDE FILES.


NameVirtualHost 78.159.106.77:80
<VirtualHost 78.159.106.77:80>
    ServerName server.vocaloidotaku.net
    ServerAlias www.vocaloidotaku.net
    DocumentRoot /home/vocaloid/public_html
    ServerAdmin [email protected]
    UseCanonicalName Off
    CustomLog /usr/local/apache/domlogs/vocaloidotaku.net combined
    CustomLog /usr/local/apache/domlogs/vocaloidotaku.net-bytes_log "%{%s}t %I .\n%{%s}t %O ."
    ## User vocaloid # Needed for Cpanel::ApacheConf
    <IfModule mod_suphp.c>
        suPHP_UserGroup vocaloid vocaloid
    </IfModule>
    <IfModule !mod_disable_suexec.c>
        <IfModule !mod_ruid2.c>
            SuexecUserGroup vocaloid vocaloid
        </IfModule>
    </IfModule>
    <IfModule mod_ruid2.c>
        RUidGid vocaloid vocaloid
    </IfModule>
    ScriptAlias /cgi-bin/ /home/vocaloid/public_html/cgi-bin/


    # To customize this VirtualHost use an include file at the following location
    # Include "/usr/local/apache/conf/userdata/std/2/vocaloid/vocaloidotaku.net/*.conf"

</VirtualHost>

# DO NOT EDIT. AUTOMATICALLY GENERATED.  IF YOU NEED TO MAKE A CHANGE PLEASE USE THE INCLUDE FILES.


# DO NOT EDIT. AUTOMATICALLY GENERATED.  IF YOU NEED TO MAKE A CHANGE PLEASE USE THE INCLUDE FILES.


NameVirtualHost 78.159.106.77:80
<VirtualHost 78.159.106.77:80>
    ServerName server.vocaloidotaku.net
    ServerAlias www.azurevisual.net azurevisual.net www.azurevisual.vocaloidotaku.net
    DocumentRoot /home/vocaloid/public_html/azurevisual
    ServerAdmin [email protected]
    UseCanonicalName Off
    CustomLog /usr/local/apache/domlogs/azurevisual.vocaloidotaku.net combined
    CustomLog /usr/local/apache/domlogs/azurevisual.vocaloidotaku.net-bytes_log "%{%s}t %I .\n%{%s}t %O ."
    ## User vocaloid # Needed for Cpanel::ApacheConf
    <IfModule mod_suphp.c>
        suPHP_UserGroup vocaloid vocaloid
    </IfModule>
    <IfModule !mod_disable_suexec.c>
        <IfModule !mod_ruid2.c>
            SuexecUserGroup vocaloid vocaloid
        </IfModule>
    </IfModule>
    <IfModule mod_ruid2.c>
        RUidGid vocaloid vocaloid
    </IfModule>
    ScriptAlias /cgi-bin/ /home/vocaloid/public_html/azurevisual/cgi-bin/


    # To customize this VirtualHost use an include file at the following location
    # Include "/usr/local/apache/conf/userdata/std/2/vocaloid/azurevisual.vocaloidotaku.net/*.conf"

</VirtualHost>

# DO NOT EDIT. AUTOMATICALLY GENERATED.  IF YOU NEED TO MAKE A CHANGE PLEASE USE THE INCLUDE FILES.


NameVirtualHost 78.159.106.77:80
<VirtualHost 78.159.106.77:80>
    ServerName server.vocaloidotaku.net
    ServerAlias www.content.vocaloidotaku.net
    DocumentRoot /home/vocaloid/public_html/content
    ServerAdmin [email protected]
    UseCanonicalName On
    CustomLog /usr/local/apache/domlogs/content.vocaloidotaku.net combined
    CustomLog /usr/local/apache/domlogs/content.vocaloidotaku.net-bytes_log "%{%s}t %I .\n%{%s}t %O ."
    ## User vocaloid # Needed for Cpanel::ApacheConf
    <IfModule mod_suphp.c>
        suPHP_UserGroup vocaloid vocaloid
    </IfModule>
    <IfModule !mod_disable_suexec.c>
        <IfModule !mod_ruid2.c>
            SuexecUserGroup vocaloid vocaloid
        </IfModule>
    </IfModule>
    <IfModule mod_ruid2.c>
        RUidGid vocaloid vocaloid
    </IfModule>
    ScriptAlias /cgi-bin/ /home/vocaloid/public_html/content/cgi-bin/


    # To customize this VirtualHost use an include file at the following location
    # Include "/usr/local/apache/conf/userdata/std/2/vocaloid/content.vocaloidotaku.net/*.conf"

</VirtualHost>

# DO NOT EDIT. AUTOMATICALLY GENERATED.  IF YOU NEED TO MAKE A CHANGE PLEASE USE THE INCLUDE FILES.


NameVirtualHost 78.159.106.77:80
<VirtualHost 78.159.106.77:80>
    ServerName server.vocaloidotaku.net
    ServerAlias www.my.vocaloidotaku.net
    DocumentRoot /home/vocaloid/public_html/my
    ServerAdmin [email protected]
    UseCanonicalName Off
    CustomLog /usr/local/apache/domlogs/my.vocaloidotaku.net combined
    CustomLog /usr/local/apache/domlogs/my.vocaloidotaku.net-bytes_log "%{%s}t %I .\n%{%s}t %O ."
    ## User vocaloid # Needed for Cpanel::ApacheConf
    <IfModule mod_suphp.c>
        suPHP_UserGroup vocaloid vocaloid
    </IfModule>
    <IfModule !mod_disable_suexec.c>
        <IfModule !mod_ruid2.c>
            SuexecUserGroup vocaloid vocaloid
        </IfModule>
    </IfModule>
    <IfModule mod_ruid2.c>
        RUidGid vocaloid vocaloid
    </IfModule>
    ScriptAlias /cgi-bin/ /home/vocaloid/public_html/my/cgi-bin/


    # To customize this VirtualHost use an include file at the following location
    # Include "/usr/local/apache/conf/userdata/std/2/vocaloid/my.vocaloidotaku.net/*.conf"

</VirtualHost>

# DO NOT EDIT. AUTOMATICALLY GENERATED.  IF YOU NEED TO MAKE A CHANGE PLEASE USE THE INCLUDE FILES.


NameVirtualHost 78.159.106.77:80
<VirtualHost 78.159.106.77:80>
    ServerName server.vocaloidotaku.net
    ServerAlias www.oekaki.vocaloidotaku.net
    DocumentRoot /home/vocaloid/public_html/oekaki
    ServerAdmin [email protected]
    UseCanonicalName Off
    CustomLog /usr/local/apache/domlogs/oekaki.vocaloidotaku.net combined
    CustomLog /usr/local/apache/domlogs/oekaki.vocaloidotaku.net-bytes_log "%{%s}t %I .\n%{%s}t %O ."
    ## User vocaloid # Needed for Cpanel::ApacheConf
    <IfModule mod_suphp.c>
        suPHP_UserGroup vocaloid vocaloid
    </IfModule>
    <IfModule !mod_disable_suexec.c>
        <IfModule !mod_ruid2.c>
            SuexecUserGroup vocaloid vocaloid
        </IfModule>
    </IfModule>
    <IfModule mod_ruid2.c>
        RUidGid vocaloid vocaloid
    </IfModule>
    ScriptAlias /cgi-bin/ /home/vocaloid/public_html/oekaki/cgi-bin/


    # To customize this VirtualHost use an include file at the following location
    # Include "/usr/local/apache/conf/userdata/std/2/vocaloid/oekaki.vocaloidotaku.net/*.conf"

</VirtualHost>

# DO NOT EDIT. AUTOMATICALLY GENERATED.  IF YOU NEED TO MAKE A CHANGE PLEASE USE THE INCLUDE FILES.


NameVirtualHost 78.159.106.77:80
<VirtualHost 78.159.106.77:80>
    ServerName server.vocaloidotaku.net
    ServerAlias www.shimmie.vocaloidotaku.net
    DocumentRoot /home/vocaloid/public_html/imgboard
    ServerAdmin [email protected]
    UseCanonicalName Off
    CustomLog /usr/local/apache/domlogs/shimmie.vocaloidotaku.net combined
    CustomLog /usr/local/apache/domlogs/shimmie.vocaloidotaku.net-bytes_log "%{%s}t %I .\n%{%s}t %O ."
    ## User vocaloid # Needed for Cpanel::ApacheConf
    <IfModule mod_suphp.c>
        suPHP_UserGroup vocaloid vocaloid
    </IfModule>
    <IfModule !mod_disable_suexec.c>
        <IfModule !mod_ruid2.c>
            SuexecUserGroup vocaloid vocaloid
        </IfModule>
    </IfModule>
    <IfModule mod_ruid2.c>
        RUidGid vocaloid vocaloid
    </IfModule>
    ScriptAlias /cgi-bin/ /home/vocaloid/public_html/imgboard/cgi-bin/


    # To customize this VirtualHost use an include file at the following location
    # Include "/usr/local/apache/conf/userdata/std/2/vocaloid/shimmie.vocaloidotaku.net/*.conf"

</VirtualHost>

# DO NOT EDIT. AUTOMATICALLY GENERATED.  IF YOU NEED TO MAKE A CHANGE PLEASE USE THE INCLUDE FILES.


NameVirtualHost 78.159.106.77:80
<VirtualHost 78.159.106.77:80>
    ServerName server.vocaloidotaku.net
    ServerAlias www.testflux.vocaloidotaku.net
    DocumentRoot /home/vocaloid/public_html/testflux
    ServerAdmin [email protected]
    UseCanonicalName Off
    CustomLog /usr/local/apache/domlogs/testflux.vocaloidotaku.net combined
    CustomLog /usr/local/apache/domlogs/testflux.vocaloidotaku.net-bytes_log "%{%s}t %I .\n%{%s}t %O ."
    ## User vocaloid # Needed for Cpanel::ApacheConf
    <IfModule mod_suphp.c>
        suPHP_UserGroup vocaloid vocaloid
    </IfModule>
    <IfModule !mod_disable_suexec.c>
        <IfModule !mod_ruid2.c>
            SuexecUserGroup vocaloid vocaloid
        </IfModule>
    </IfModule>
    <IfModule mod_ruid2.c>
        RUidGid vocaloid vocaloid
    </IfModule>
    ScriptAlias /cgi-bin/ /home/vocaloid/public_html/testflux/cgi-bin/


    # To customize this VirtualHost use an include file at the following location
    # Include "/usr/local/apache/conf/userdata/std/2/vocaloid/testflux.vocaloidotaku.net/*.conf"

</VirtualHost>

# DO NOT EDIT. AUTOMATICALLY GENERATED.  IF YOU NEED TO MAKE A CHANGE PLEASE USE THE INCLUDE FILES.

# SSL
            




# DO NOT EDIT. AUTOMATICALLY GENERATED.  IF YOU NEED TO MAKE A CHANGE PLEASE USE THE INCLUDE FILES.
# CPANEL/WHM/WEBMAIL/WEBDISK PROXY SUBDOMAINS

NameVirtualHost 78.159.106.77:80
<VirtualHost 78.159.106.77:80>
    ServerName server.vocaloidotaku.net
    ServerAlias cpanel.* whm.* webmail.* webdisk.*
    DocumentRoot /usr/local/apache/htdocs
    ServerAdmin [email protected]
    <IfModule mod_suphp.c>
        suPHP_UserGroup nobody nobody
    </IfModule>
    RewriteEngine On
    <IfModule core.c>
        SSLProxyEngine On
    </IfModule>
    RewriteCond %{HTTP_HOST} ^cpanel\.
    RewriteCond %{HTTPS} on
    RewriteRule ^/(.*) https://127.0.0.1:2083/$1 [P]
    RewriteCond %{HTTP_HOST} ^webmail\.
    RewriteCond %{HTTPS} on
    RewriteRule ^/(.*) https://127.0.0.1:2096/$1 [P]
    RewriteCond %{HTTP_HOST} ^whm\.
    RewriteCond %{HTTPS} on
    RewriteRule ^/(.*) https://127.0.0.1:2087/$1 [P]
    RewriteCond %{HTTP_HOST} ^webdisk\.
    RewriteCond %{HTTPS} on
    RewriteRule ^/(.*) https://127.0.0.1:2078/$1 [P]
    RewriteCond %{HTTP_HOST} ^cpanel\.
    RewriteRule ^/(.*) http://127.0.0.1:2082/$1 [P]
    RewriteCond %{HTTP_HOST} ^webmail\.
    RewriteRule ^/(.*) http://127.0.0.1:2095/$1 [P]
    RewriteCond %{HTTP_HOST} ^whm\.
    RewriteRule ^/(.*) http://127.0.0.1:2086/$1 [P]
    RewriteCond %{HTTP_HOST} ^webdisk\.
    RewriteRule ^/(.*) http://127.0.0.1:2077/$1 [P]
    UseCanonicalName Off
</VirtualHost>
I've already tried to remove:

Code:
# DO NOT EDIT. AUTOMATICALLY GENERATED.  IF YOU NEED TO MAKE A CHANGE PLEASE USE THE INCLUDE FILES.
NameVirtualHost 78.159.106.77:80
NameVirtualHost *
# DO NOT EDIT. AUTOMATICALLY GENERATED.  IF YOU NEED TO MAKE A CHANGE PLEASE USE THE INCLUDE FILES.


NameVirtualHost 78.159.106.77:80
<VirtualHost 78.159.106.77:80>
    ServerName server.vocaloidotaku.net
    DocumentRoot /usr/local/apache/htdocs
    ServerAdmin [email protected]
    <IfModule mod_suphp.c>
        suPHP_UserGroup nobody nobody
    </IfModule>
</VirtualHost>


# Default vhost for unbound IPs


NameVirtualHost 78.159.106.77:80
<VirtualHost 78.159.106.77:80>
    ServerName server.vocaloidotaku.net
    DocumentRoot /usr/local/apache/htdocs
    ServerAdmin [email protected]
    <IfModule mod_suphp.c>
        suPHP_UserGroup nobody nobody
    </IfModule>
</VirtualHost>
From the top. What it does is, the site is working, but the subdomains all go to the index in public_html. I've also added DirectoryIndex index.php under the subdomains but it doesn't work.

I'm out of ideas here, really don't know what to do. Please help me out?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,203
363
Hello :)

I suggest rebuilding the Apache configuration file via:

Code:
# /scripts/rebuildhttpdconf
Then, try clearing the DNS cache on your computer to ensure that's not the root cause of this issue:

Clearing your DNS Cache

Thank you.