All domains on new cPanel / CloudLinux server show 404

Judd Taylor

Member
Aug 4, 2014
11
0
1
Melbourne, Victoria, Australia, Australia
cPanel Access Level
Root Administrator
Hi,

Have created a new server on AWS based on a cPanel - CloudLinux AMI.

Have one show stopper which I've not yet been able to resolve.

Sites on the server can be viewed via temporary URL but not when using the site domains. this is consistent with 5 different accounts I've created on the server.

eg:

/http://54.79xx.xx/~domain/test.htm works fine

But...

/http://test123.domain.com.au/test.htm fails with a 404

Both URL's point to the same account etc. There is not htaccess file.

Any suggestions appreciated !
 

someB0dy

Member
May 24, 2010
22
2
53
cPanel Access Level
Root Administrator
Hi,

That really looks like some misconfiguration on the server, is DocumentRoot for test123.domain.com.au really leads to /home/domain/public_html/ (check /usr/local/apache/conf/httpd.conf for that domain)? Or could you please post here full VirtualHost section for it?

And what does /usr/local/apache/logs/error_log says ?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
Hello :)

What's the full error message in /usr/local/apache/logs/error_log when opening the website through the domain name? Is the content uploaded to the correct directory?

Thank you.
 

Infopro

Well-Known Member
May 20, 2003
17,075
524
613
Pennsylvania
cPanel Access Level
Root Administrator
Twitter
Here's an extract from the httpd.conf....

- Removed -
Please do not just simply cut and paste into a post on these forums.

Don't use the quick reply when making a post like that either.

Go to the full editor to post.
Use the CODE tags to wrap your content to add it here.
Below the reply editor there are 2 checkboxes:

Automatically parse links in text
Automatically retrieve titles from external links

Uncheck both.

Finally, modify any post you make to remove personal details like IP addresses, emails, or domain names.

Your post has been edited for these reasons.

Feel free to go again.
 

Judd Taylor

Member
Aug 4, 2014
11
0
1
Melbourne, Victoria, Australia, Australia
cPanel Access Level
Root Administrator
It is looking for a file in main apache folder, not in users directory. Really need a virtualhost section for that domain, could you please paste it properly?
Code:
<VirtualHost 54.79.xx.xx:80>
    ServerName test123.domain.com.au
    ServerAlias www.test123.domain.com.au
    DocumentRoot /home/domain/public_html
    ServerAdmin [email protected]
    UseCanonicalName Off
    CustomLog /usr/local/apache/domlogs/test123.domain.com.au combined
    CustomLog /usr/local/apache/domlogs/test123.domain.com.au-bytes_log "%{%s}t %I .\n%{%s}t %O ."
    ## User domain # Needed for Cpanel::ApacheConf
    UserDir enabled domain
    <IfModule mod_suphp.c>
        suPHP_UserGroup domain domain
    </IfModule>
    <IfModule concurrent_php.c>
        php4_admin_value open_basedir "/home/domain:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/tmp"
        php5_admin_value open_basedir "/home/domain:/usr/lib/php:/usr/local/lib/php:/tmp"
    </IfModule>
    <IfModule !concurrent_php.c>
        <IfModule mod_php4.c>
            php_admin_value open_basedir "/home/domain:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/tmp"
        </IfModule>
        <IfModule mod_php5.c>
            php_admin_value open_basedir "/home/domain:/usr/lib/php:/usr/local/lib/php:/tmp"
        </IfModule>
        <IfModule sapi_apache2.c>
            php_admin_value open_basedir "/home/domain:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/tmp"
        </IfModule>
    </IfModule>
    <IfModule !mod_disable_suexec.c>
        <IfModule !mod_ruid2.c>
            SuexecUserGroup domain domain
        </IfModule>
    </IfModule>
    <IfModule mod_ruid2.c>
        RMode config
        RUidGid domain domain
    </IfModule>
    <IfModule itk.c>
        # For more information on MPM ITK, please read:
        #   http://mpm-itk.sesse.net/
        AssignUserID domain domain
    </IfModule>

    ScriptAlias /cgi-bin/ /home/domain/public_html/cgi-bin/
    # To customize this VirtualHost use an include file at the following location
    # Include "/usr/local/apache/conf/userdata/std/2_2/domain/test123.domain.com.au/*.conf"

</VirtualHost>
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
You can open a support ticket so we can take a closer look. Post the ticket number here so we can update this thread with the outcome.

Thank you.
 

someB0dy

Member
May 24, 2010
22
2
53
cPanel Access Level
Root Administrator
well, everything really looks properly, it should works, so I agree support ticket would be the best way here

- - - Updated - - -

or, maybe something is wrong with apache configs so it failed to restart/apply your new virtualhost. Try to run syntax check:

httpd -t
 

Judd Taylor

Member
Aug 4, 2014
11
0
1
Melbourne, Victoria, Australia, Australia
cPanel Access Level
Root Administrator
I think my issue may be name server related. When initially setting up the server I entered incorrect name servers. I've now corrected them.

However, I notice a on an older cPanel server I manage, when I create a new account and tick the option "Use the nameservers specified at the Domain's Registrar", the server identifies the correct current namesevers for the new accounts domain.

On this new server when I tick the same option, the server appears unable to obtain the current nameservers for the domain and leaves them set to the default ns.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
You can use a website such as IntoDNS to review the DNS for a domain name if you are concerned it's not configured properly. Otherwise, please open a support ticket so we can take a closer look.

Thank you.