1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

nginx automated installer

Discussion in 'Workarounds and Optimization' started by blargman, Feb 17, 2010.

Thread Status:
Not open for further replies.
  1. mediagenerator

    mediagenerator New Member

    Joined:
    Mar 16, 2010
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    Apache Status not showing

    After installing, the "Apache Status" page in WHM doesn't work anymore:

    Failed to receive status information from Apache.
    Unable to connect to local httpd server.

    @icodex: latest version, "no cache"
     
    #221 mediagenerator, Aug 23, 2010
    Last edited: Aug 23, 2010
  2. cix

    cix Member

    Joined:
    Nov 6, 2003
    Messages:
    75
    Likes Received:
    0
    Trophy Points:
    6
    I think I'm running the latest version.

    Two doubts:
    1. How can I fix apache server status ( I tried everything you recommended here).

    2. How can I see nginx server status?
     
  3. fazaha

    fazaha New Member

    Joined:
    Mar 9, 2009
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    i get this message and nginx will ot start :(
    [emerg]: bind() to 0.0.0.0:80 failed (98: Address already in use)
    [emerg]: bind() to 0.0.0.0:80 failed (98: Address already in use)
    [emerg]: bind() to 0.0.0.0:80 failed (98: Address already in use)
    [emerg]: bind() to 0.0.0.0:80 failed (98: Address already in use)
    [emerg]: bind() to 0.0.0.0:80 failed (98: Address already in use)
    [emerg]: still could not bind()
     
  4. conacci

    conacci New Member

    Joined:
    Mar 28, 2004
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Try, reboot server and see again ! :)
     
  5. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,558
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    Please refer to the following forums thread: Apache status not working after customizing port - cPanel Forums
     
  6. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,558
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    Try the following commands to find out what processes may be using port 80:
    Code:
    # netstat -eelnpA inet | sort -nk4 | egrep "^[A-Z]|:80"
    # lsof +c0 -nPi:80
     
  7. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,558
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    If you wish to run nginx on HTTP port 80 then you will need to modify the Apache configuration so that it no longer uses port 80. Restarting Apache may only be necessary if you wish to change the ports that Apache will listen on, such as if you wanted to have nginx listen on port 80 instead of Apache. It is safer to modify the Apache port numbers using WebHost Manager instead of directly modifying the Apache/httpd configuration file.

    The default ports used by Apache, that of non-SSL (HTTP) port 80 and SSL (HTTPS) port 443, can be modified using WebHost Manager (WHM) via the following menu path (with linked documentation):
    WHM: Main >> Server Configuration >> Tweak Settings >> System
    • Apache non-SSL IP/port [?] The port (e.g. 80) on which Apache listens for HTTP connections. An IP address may precede the port number, separated by a colon (“:”). Specifying a specific IP will prevent Apache from listening on all other IPs.
      • 0.0.0.0:80 default
    • Apache SSL port [?] The port (e.g. 443) on which Apache listens for HTTPS connections. An IP address may precede the port number, separated by a colon (“:”). Specifying a specific IP will prevent Apache from listening on all other IPs.
      • 0.0.0.0:443 default
     
  8. fazaha

    fazaha New Member

    Joined:
    Mar 9, 2009
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    No i see 502 bad gate way!
     
  9. mediagenerator

    mediagenerator New Member

    Joined:
    Mar 16, 2010
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    Error after cPanel Upgrade

    Autoupgrade to 11.26 this night, now I get

    Code:
    httpd failed @ Tue Aug 31 09:28:32 2010. A restart was attempted automagically.
    Service Check Method:  [tcp connect] 
    
    Failure Reason: Unable to connect to port 80 
    every 5 minutes.

    Tried to reinstall "public_nocache.tar" nginx:

    Code:
    Please upgrade to version 11.25
    nginx is still up and running, so is Apache. But now, Apache is being restarted every 5 minutes which is rather unpleasant. Changelog says something about "Case 42069: Try port 2089 before 80". Now I have no idea wether that's the problem or the overwritten status check files during autoupdate.

    SOLUTION: You'll need to update the Apache port in /etc/chkserv.d/httpd again and restart chksrvd.
     
    #229 mediagenerator, Aug 31, 2010
    Last edited: Aug 31, 2010
  10. imagize

    imagize New Member

    Joined:
    Oct 8, 2007
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    Using the default vhost templates that this automated installer sets up. What is the best way forward all 404 requests to apache as well?

    I would rather have 404 handled by apache instead of the default nginx not found page. This also makes migration easier as you don't have to convert rewrite rules either.
     
  11. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,558
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    The change log entry for case 42069 is referring to egress, that is, outbound, communication unrelated to Apache/httpd.
     
  12. mediagenerator

    mediagenerator New Member

    Joined:
    Mar 16, 2010
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    Thanks for the clarification.
     
  13. mediagenerator

    mediagenerator New Member

    Joined:
    Mar 16, 2010
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    Is there any plans to update the nginx installer provided here to work with 11.26 and fix the apache status in WHM? Pls :)
     
  14. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,558
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
  15. mediagenerator

    mediagenerator New Member

    Joined:
    Mar 16, 2010
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
  16. Shadowized

    Shadowized New Member

    Joined:
    Sep 8, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    for those having trouble when running the install and getting the "Please upgrade to version 11.25", goto where the publicnginx folder is, open nginxinstaller with whatever editor you want, goto line 102

    you should see...

    Code:
    if cvstring == "11.25":
    
    change to

    Code:
    if cvstring == "11.26":
    
    then run ./nginxinstaller install and you're done, been using the base of this script for a while on a couple of dedi's and it works well, hope this helps somebody. :)
     
    #236 Shadowized, Sep 8, 2010
    Last edited: Sep 8, 2010
  17. PGZ09

    PGZ09 New Member

    Joined:
    Sep 9, 2010
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Is any of the versions here updated and running proplery (without any errors) on last CPanel version?
     
  18. mega023

    mega023 New Member

    Joined:
    May 20, 2005
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    #238 mega023, Sep 19, 2010
    Last edited: Sep 19, 2010
  19. duranduran

    duranduran Member

    Joined:
    Apr 30, 2004
    Messages:
    198
    Likes Received:
    0
    Trophy Points:
    16
  20. dmmcintyre3

    dmmcintyre3 New Member

    Joined:
    Aug 26, 2010
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    What about https sites? It works fine for non ssl sites, but my highest traffic site on the server is the one that most of the requests go https.

    Also, the rewrite rules that make the request end with .html return 404 now.
     
    #240 dmmcintyre3, Sep 20, 2010
    Last edited: Sep 20, 2010
Thread Status:
Not open for further replies.

Share This Page