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.

Restarting Apache - apachectl vs WHM

Discussion in 'EasyApache' started by ChrisHasenpflug, Dec 14, 2006.

  1. ChrisHasenpflug

    Joined:
    Jan 27, 2005
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Hello all,

    I have made a change to my apache config file so that it will listen on only one IP address, instead of all 5 that I am given. The added code is "Listen xxx.xxx.xxx.130:80."

    If I restart apache from the command line using /etc/httpd/etc/apachectl restart, all goes as expected and Apache restarts. However, if I use WHM or the WHM restart script (/scripts/restartsrv httpd) Apache fails to start and the error returned is "httpd has failed, please contact the sysadmin."

    Well, I'm the sysadmin :D and I can make it start via apachectl, but not with the WHM script.

    Any ideas??
     
  2. adept2003

    adept2003 Well-Known Member

    Joined:
    Aug 11, 2003
    Messages:
    283
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    ~ "/(extra|special)/data"
    Just an idea, but the WHM apache restart might be using "apachectl restartssl" rather than simply "apachectl restart". Since you've only enabled port 80, that might explain the failure message.

    Try using the "restartssl" via SSH and see what happens...
     
  3. RandyO

    RandyO Well-Known Member

    Joined:
    Jun 17, 2003
    Messages:
    173
    Likes Received:
    0
    Trophy Points:
    16
    httpd startssl
     
  4. adept2003

    adept2003 Well-Known Member

    Joined:
    Aug 11, 2003
    Messages:
    283
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    ~ "/(extra|special)/data"
    ah yes, you're right. Just the way my brain works. :)

    Use "apachectl startssl" rather than "restartssl".
     
  5. ChrisHasenpflug

    Joined:
    Jan 27, 2005
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Good call guys. That seems to be the case.

    How can I setup WHM to just do start instead of startssl since we're not using SSL? I guess I could give the Listen an SSL port to make it happy, possibly?
     
  6. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    ON, Canada
    Pretty much have to because you can't change what the WHM functions do. Most of them are hard coded functions.
     
  7. ChrisHasenpflug

    Joined:
    Jan 27, 2005
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Have added "Listen xxx.xxx.xxx.130:443" and still no go for startssl. Ideas?
     
  8. ChrisHasenpflug

    Joined:
    Jan 27, 2005
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Any ideas out there as to why it still won't start if I give it the SSL port??

    If we hack the restartsrv_httpd script will it get overwritten in updates?? Will rebuilding Apache w/o mod_ssl keep it from doing startssl??
     
    #8 ChrisHasenpflug, Dec 15, 2006
    Last edited: Dec 15, 2006
Loading...

Share This Page