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.

Chkserv.d - Can't change default httpd port

Discussion in 'General Discussion' started by Sys3X, Apr 21, 2009.

  1. Sys3X

    Sys3X Member

    Joined:
    Sep 26, 2007
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Hello!

    I use nginx server as frontend and apache as backend on port 80.
    I trying to change httpd monitoring script - /etc/chkserv.d/httpd

    After I change port 80 to port 3000, I restarted checkservd from WHM, but always if I restart this service from WHM all changes in /etc/chkserv.d/httpd restored by default (port 80).

    How to permanently change this settings?
     
  2. 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
    I recommend you let Apache continue to be monitored and instead add monitoring for nginx on port 3000.

    You can find information on how to do this beginning on slide 42 of the Customizing cPanel presentation from our 2007 cPanel Conference, which is available at: http://twiki.cpanel.net/twiki/pub/A...urces/TrainingSlides07/Customizing_cPanel.pdf
     
  3. Sys3X

    Sys3X Member

    Joined:
    Sep 26, 2007
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Thank you for link.
    Unfortunately I can't use nginx as frontend at port 3000, because this port
    maybe blocked at some ISP's.

    I can't find any information regarding my question...
    How to prevent "httpd" changes?
     
    #3 Sys3X, Apr 22, 2009
    Last edited: Apr 22, 2009
  4. 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
    I am confused. You are running Apache on port 80 as mentioned in the original post. You can have chkservd check anything on any port you want, it's not arbitrarily limited to only monitoring port 3000.
     
  5. Sys3X

    Sys3X Member

    Joined:
    Sep 26, 2007
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Sorry, typo.
    Apache running as backend on port 3000
    Nginx running on port 80 as frontend.

    I use "/etc/chkserv.d/httpd" file to Apache monitoring.
    Also, I create "/etc/chkserv.d/nginx" file to monitor nginx (on port 80).

    The problem is cpanel change "httpd" file..
    I need to prevent this changes because Apache running on non-default port 3000.

    I can't understand, why Cpanel rewrite this file. I specify in "Tweak Settings" that apache running on port 3000, but cpanel continues to monitoring Apache on port 80 and rewrite /etc/chkserv.d/httpd file.
     
    #5 Sys3X, Apr 22, 2009
    Last edited: Apr 22, 2009
  6. 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 will need to disable monitoring for HTTPD in the WHM interface by going to WHM -> Service Configuration -> Service Manager and unchecking HTTPD from the monitor column.

    You can then copy /etc/chkserv.d/httpd to something like /etc/chkserv.d/myapache then edit your myapache file to change port 80 to 3000.

    Further information about customizing the services chkservd monitors can be found in the 2008 cPanel Conference presentation on Troubleshooting which is available at: http://twiki.cpanel.net/twiki/pub/A...esources/TrainingSlides08/Troubleshooting.pdf

    I have advised our Quality Assurance team regarding your statement about being allowed to change the port Apache is running on but it not updating the monitoring for Apache to use that different port. As that file is not dynamically generated at this time, it will be a while before such a capability can become supported. In the meantime, you are welcome to file a feature request for this at:

    http://bugzilla.cPanel.net
     
Loading...

Share This Page