The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

ServerAlias has lost www on all domains after upgrade

Discussion in 'General Discussion' started by anton_latvia, Feb 8, 2008.

  1. anton_latvia

    anton_latvia Well-Known Member
    PartnerNOC

    Joined:
    May 11, 2004
    Messages:
    348
    Likes Received:
    3
    Trophy Points:
    18
    Location:
    Latvia
    cPanel Access Level:
    Root Administrator
    We had server which was not updated for some time (but it already was cpanel11). Now we decided to upgrade whm and apache/php. Everything worked fine with update, but then suddenly all clients (more than 1000) started to complain, that their website stopped working.
    In apache's config there was the following situation:

    ServerName domain.com
    ServerAlias domain.com

    No www.! Of course we easily searched and replaced with www, but guys... That's the thing we've been worried before the upgrade - something will be screwed.. And that happened. I have executed distiller to save changes, I hope www. will stay where it is, but may be someone could look into this issue to fix it? By the way, WHM had been upgraded to the latest currnet version.
    WHM 11.15.0 cPanel 11.18.0-C20595

    Regards,
    Anton.
     
  2. handsonhosting

    handsonhosting Well-Known Member

    Joined:
    Feb 17, 2002
    Messages:
    151
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Omaha, NE
    cPanel Access Level:
    Root Administrator
    Just to comment,

    We ran an upgrade on one of our serves also, and the ServerAlias tags no longer function :(

    I've tried the rebuildhttpdconf command - no luck.

    We were on the CURRENT build also - I'm now upgrading to EDGE to see if there's any difference.

    how did you get around the issue if the ServerAlias has multiple domains on it? So far, if it has more than one it's not resolving at all (from what I've tried here).
     
  3. Ralph9110

    Ralph9110 Member

    Joined:
    Dec 7, 2006
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    Happened here as well. Did an upgrade on a server hosting 1000 sites.
     
  4. handsonhosting

    handsonhosting Well-Known Member

    Joined:
    Feb 17, 2002
    Messages:
    151
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Omaha, NE
    cPanel Access Level:
    Root Administrator
    Going back to a STABLE release does not resolve either...

    cPanel 11.18.0-S20595

    From what I"m seeing, the /var/cpanel/userdata/username fodlers are getting updated and the "www" is being stripped n there.
     
  5. cPanelNick

    cPanelNick Administrator
    Staff Member

    Joined:
    Mar 9, 2015
    Messages:
    3,426
    Likes Received:
    2
    Trophy Points:
    38
    cPanel Access Level:
    DataCenter Provider
  6. BenThomas

    BenThomas Well-Known Member

    Joined:
    Feb 12, 2004
    Messages:
    598
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Houston, Texas USA
    cPanel Access Level:
    Root Administrator
    You can resolve this issue by running the following commands:

    /usr/local/cpanel/bin/userdata_update (This restores the missing alias in the userdata and merges it with your existing data)
    /scripts/rebuildhttpdconf (This builds the httpd.conf against the merged userdata )

    We're still investigating how this could happen. I've only been able to reproduce the issue by manually removing the www.domain server alias from the userdata and rebuilding the httpd.conf immediately afterwards. This can also be reproduced by manually removing the www.domain server alias from httpd.conf and running "/usr/local/cpanel/bin/apache_conf_distiller --update" to update the userdata with the missing server alias. There's no code that I can think of that would remove the server alias from either point (only code to ensure that it is there).
     
  7. handsonhosting

    handsonhosting Well-Known Member

    Joined:
    Feb 17, 2002
    Messages:
    151
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Omaha, NE
    cPanel Access Level:
    Root Administrator
    Thanks Nick,

    Ticket 236371 was submitted.
     
  8. BenThomas

    BenThomas Well-Known Member

    Joined:
    Feb 12, 2004
    Messages:
    598
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Houston, Texas USA
    cPanel Access Level:
    Root Administrator
    I'll be looking over the ticket now and will report back any findings. Additional tickets regarding this issue would be appreciated, just make the subject:

    ATTN: cpanelben Missing www serveralias

    So that it will be sent to me. Please submit a ticket even if you were able to quickly resolve the issue.
     
  9. oulzac

    oulzac Well-Known Member

    Joined:
    Aug 7, 2005
    Messages:
    131
    Likes Received:
    0
    Trophy Points:
    16
    I also have this issue, but can not open a ticket directly as I rent the server.
    the fix listed in this ticket did not work for me.
     
  10. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    You can open a ticket even if your licensing is through one of our resellers. Simply use the option to submit a ticket without logging in at the bottom of: http://tickets.cpanel.net/submit
     
  11. oulzac

    oulzac Well-Known Member

    Joined:
    Aug 7, 2005
    Messages:
    131
    Likes Received:
    0
    Trophy Points:
    16
    thank you, I have submitted a ticket.
     
  12. BenThomas

    BenThomas Well-Known Member

    Joined:
    Feb 12, 2004
    Messages:
    598
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Houston, Texas USA
    cPanel Access Level:
    Root Administrator
    I should mention after running userdata_update and rebuildhttpdconf, you need to restart Apache in order for your changes to take effect.

    I've determined that the issue was related to how ServerName and ServerAlias were implemented in older builds and have updated our code to address the issue.

    This change will be available in builds with and ID of 20607+.
     
  13. oshs

    oshs Well-Known Member
    PartnerNOC

    Joined:
    Sep 5, 2004
    Messages:
    146
    Likes Received:
    0
    Trophy Points:
    16
    Hi all,

    Had this problem on all servers which just had SuPHP implemented, and had to run the scripts you mentioned.

    However upon doing so, this "no 'main_domain' key" error is being thrown up shown below - what does this indicate?

    Regards,
    Suhail.


    root@server12 [~]# /usr/local/cpanel/bin/userdata_update
    root@server12 [~]# /scripts/rebuildhttpdconf
    [Cpanel::AdvConfig::apache]: User 'webaudio' data set has no 'main_domain' key.
    [Cpanel::AdvConfig::apache]: User 'keywordr' data set has no 'main_domain' key.
    [Cpanel::AdvConfig::apache]: User 'animeser' data set has no 'main_domain' key.
    [Cpanel::AdvConfig::apache]: User 'searchen' data set has no 'main_domain' key.
    [Cpanel::AdvConfig::apache]: User 'paypercl' data set has no 'main_domain' key.
    [Cpanel::AdvConfig::apache]: User 'russellc' data set has no 'main_domain' key.
    [Cpanel::AdvConfig::apache]: User 'linkbuil' data set has no 'main_domain' key.
    [Cpanel::AdvConfig::apache]: User 'ebidtra' data set has no 'main_domain' key.
    [Cpanel::AdvConfig::apache]: User 'experien' data set has no 'main_domain' key.
    Succeeded
     
  14. Rubas

    Rubas Well-Known Member

    Joined:
    Sep 15, 2003
    Messages:
    125
    Likes Received:
    0
    Trophy Points:
    16
    What does this mean for an updated system where this www are removed from /var/cpanel/userdata/username but the httpd.conf actually is okay?

    I updated a system from cPanel 11.15.0-R18373 to cPanel 11.18.0-R20595 ..
     
    #14 Rubas, Feb 11, 2008
    Last edited: Feb 11, 2008
  15. BenThomas

    BenThomas Well-Known Member

    Joined:
    Feb 12, 2004
    Messages:
    598
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Houston, Texas USA
    cPanel Access Level:
    Root Administrator
    This occurs when the primary domain is not set in the /var/cpanel/users/username file. It's the entry for "DNS=userdomain.com". It's important for various parts of cPanel for this domain to be set. Correct the entry in /var/cpanel/users/username file and re-run /usr/local/cpanel/bin/userdata_update to resolve the issue.
     
  16. BenThomas

    BenThomas Well-Known Member

    Joined:
    Feb 12, 2004
    Messages:
    598
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Houston, Texas USA
    cPanel Access Level:
    Root Administrator
    In builds less than 20607, it will mean that the "www" ServerAlias entry for the domain may be missing (in some circumstances). We're pushing out the changes from 20607 this week to all trees.
     
  17. BenThomas

    BenThomas Well-Known Member

    Joined:
    Feb 12, 2004
    Messages:
    598
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Houston, Texas USA
    cPanel Access Level:
    Root Administrator
    You'll have to update, rebuild the httpd.conf, and restart Apache.
     
  18. Rubas

    Rubas Well-Known Member

    Joined:
    Sep 15, 2003
    Messages:
    125
    Likes Received:
    0
    Trophy Points:
    16
    Atm the entries are missing in the userdata but not in the httpd.conf (over 1000 accounts on this server) .. will an update to 20607 fix the problem if the entries are already deleted?
     
    #18 Rubas, Feb 11, 2008
    Last edited: Feb 11, 2008
  19. Rubas

    Rubas Well-Known Member

    Joined:
    Sep 15, 2003
    Messages:
    125
    Likes Received:
    0
    Trophy Points:
    16
    I tried this and it looks liked it worked to fix the userdata ...
    /usr/local/cpanel/bin/userdata_update (This restores the missing alias in the userdata and merges it with your existing data)
     
  20. nariman

    nariman Registered

    Joined:
    Mar 4, 2007
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    I have been having a problem accessing www on my domain since the update that rolled out on Friday the 8th. I have since updated to the lastes edge update and still no fix. I have rebuilt my httpd.conf file a number of times and restarted apache.

    The weird thing is that it seems to go in an out. It will work for a couple of minutes and then die again for a while.

    Any help is much appreciated.
     
Loading...

Share This Page