Chkserv.d - Can't change default httpd port

Sys3X

Member
Sep 26, 2007
9
0
51
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?
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,214
13
313
Houston, TX
cPanel Access Level
Root Administrator
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?
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
 

Sys3X

Member
Sep 26, 2007
9
0
51
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?
 
Last edited:

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,214
13
313
Houston, TX
cPanel Access Level
Root Administrator
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?
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.
 

Sys3X

Member
Sep 26, 2007
9
0
51
Hello!

I use nginx server as frontend and apache as backend on port 80.
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.
 
Last edited:

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,214
13
313
Houston, TX
cPanel Access Level
Root Administrator
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.
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