SOLVED Apache not using www server alias issue

William Cross

Registered
May 2, 2018
3
0
1
Daytona Beach
cPanel Access Level
Website Owner
Ok, I have an issue where a serveralias is set for www. That said, it does not work at all. Going to
Code:
http://www.domain.com
gives a blank page. I have checked the
/var/cpanel/templates/apache2_4/vhost.default & ssl_vhost.default templates and the serveralias gets built properly, or so it seems. I have checked the actual files created at ls
/var/cpanel/userdata/example/example.com and example.com_SSL and they contain the serveralias.
Code:
serveralias: mail.example.comhttp://www.example.com' webmail.example.com webdisk.example.com cpanel.example.com
servername: example.com
ssl: 1
usecanonicalname: 'Off'
user: example
but going to
Code:
http://www.example.com or https://www.example.com
leads to white screen. Without www, it all works perfectly.
 
Last edited by a moderator:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,228
463
Hello William,

Can you use a remote server or workstation to verify that "www.domain.tld" resolves to the correct IP address? If it does, can you review the .htaccess file in the document root of this domain name to make sure there are no rewrite rules that could affect the use of the "www" prefix?

Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,228
463
Hi William,

I'm glad to see you were able to solve the issue. Thank you for sharing the outcome.