Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

SOLVED Apache not using www server alias issue

Discussion in 'EasyApache' started by William Cross, May 2, 2018.

  1. William Cross

    William Cross Registered

    Joined:
    May 2, 2018
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    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.
     
    #1 William Cross, May 2, 2018
    Last edited by a moderator: May 2, 2018
  2. William Cross

    William Cross Registered

    Joined:
    May 2, 2018
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Daytona Beach
    cPanel Access Level:
    Website Owner
    Code:
    serveralias: mail.example.com www.example.com webmail.example.com webdisk.example.com cpanel.example.com
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,961
    Likes Received:
    1,821
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. William Cross

    William Cross Registered

    Joined:
    May 2, 2018
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Daytona Beach
    cPanel Access Level:
    Website Owner
    Hi Michael, The www.domain.tld does point to the tcorrect IP doing an nslookup from another server. No rewrites that affect www are in use.

    **The problem ended up being an old PHP version not having the function hash_equals() :( **
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,961
    Likes Received:
    1,821
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hi William,

    I'm glad to see you were able to solve the issue. Thank you for sharing the outcome.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice