cPanel on AWS Change the root directory?

shrawaaan

Registered
May 13, 2018
3
0
1
India
cPanel Access Level
Root Administrator
I have installed cpanel on aws and now created a new domain within Cpanel. The folder where the domain is home/domainname

However, the web directory default in AWS is /var/www/html How do I change and make sure that the domain is available from browser, as everytime the default page inside /var/www/html is getting opened instead of home/domainname

The default is opening: domain.com/cgi-sys/defaultwebpage.cgi
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
Hello @shrawaaan,

Can you run the following commands on the affected system and let us know the output?

Code:
cat /etc/redhat-release
cat /usr/local/cpanel/version
Also, can you verify if the websites remain inaccessible upon restarting Apache using the /scripts/restartsrv_httpd command?

Thank you.
 

shrawaaan

Registered
May 13, 2018
3
0
1
India
cPanel Access Level
Root Administrator
CentOS Linux release 7.5.1804 (Core)
11.68.0.29

The problem is only those account which has been transferred. The one I create inside the cpanel is working fine

Yes, I restarted the httpd also and the site is still redirecting to /cgi-sys/defaultwebpage.cgi
 
Last edited by a moderator:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
Hello @shrawaaan,

The default document root of the primary domain name associated with new accounts or accounts transferred from another server is:

/home/$username/public_html/

Can you let us know the output from the following command for one of the accounts that you transferred over?

Code:
grep documentroot /var/cpanel/userdata/$username/$domain.com
Ensure to replace the actual username in the output with an example.

Thank you.