Portal Home > Knowledgebase > Articles Database > Disable Apache Automatic Startup on WHM


Disable Apache Automatic Startup on WHM




Posted by sandeepsankaran, 01-19-2016, 12:18 PM
Hi, We have a VPS with CentOS 6 + cPanel (WHM). We have disabled the default httpd services in the server and also set the restart off ( chkconfig --level 35 httpd off ) then installed LAMPP services. This default httpd service sometimes starts automatically and chkconfig is changed to on which we do not know why? once it starts then httpd in LAMPP stops and so is our application. Whenever default httpd service starts we do the below steps. Stop the service /etc/init.d/httpd stop Set it off chkconfig --level 35 httpd off Start httpd service in LAMPP /opt/lampp/xampp start I would like to know how to permanently stop the default httpd service and make sure that it does not start automatically. Thanks, Sandeep

Posted by neutrall, 01-19-2016, 05:08 PM
Did you disabled the service manager in WHM, could be that they are the one restarting Apache.

Posted by sandeepsankaran, 01-20-2016, 01:36 AM
Dear Neutrall, Thanks for your response. I have attached a screen shot where there is httpd service under service manager under service configuration, kindly let me know whether you meant this in your response. Attached Thumbnails  

Posted by HWH-Jessica, 01-20-2016, 02:00 AM
Yes, check if the service and its monitoring is disabled in WHM service manager. If it is, and again the problem persists, then you need to dig deeper and find out the actual cause. IF you are on a managed VPS, then your support team can help you.

Posted by sandeepsankaran, 01-20-2016, 03:52 AM
Hi Jessica, Thanks for your response. Okay, we will do it. I have a doubt which is about the command /etc/init.d/httpd stop, will this command not disable the httpd service in WHM service manager? and the command chkconfig --level 35 httpd off, will this command not disable the monitoring of httpd service in WHM service manager? If it does not stop the WHM then where it is getting affected. Thanks, Sandeep.

Posted by neutrall, 01-20-2016, 09:50 AM
Hi, On your screenshot, the monitoring is disabled, therefore cPanel shouldn't try to restart the httpd service automaticly. If the problem occurs only upon rebooting the server, write a small bash script with the command you mentionned earlier on and have it run on the server startup.

Posted by HWH-Jessica, 01-21-2016, 12:08 AM
In your screenshot, I see that you have disabled the service and monitoring, and hence it should not start the services through WHM. With chkconfig you have disabled the service again, and hence it should not revert itself. You need to check if there are any other applications causing the service to start.

Posted by DionDesigns, 01-21-2016, 01:40 PM
Your problem is this command: That is turning off Apache only at runlevels 3 and 5, which means Apache will still start up on reboot. You must either completely disable Apache in chkconfig using the following command: or even better, remove Apache from chkconfig with the following command: These two commands should only be run once, and then the VPS should be rebooted. If Apache starts up on reboot after running either of these commands, then one of your other startup scripts is starting up Apache.

Posted by superuser_root, 01-21-2016, 09:27 PM
Hi, Has the upcp cron disabled in the server? I suppose the upcp is restarting apache service in the server. Try to disable the cron and give a manual cPanel update when you wants to update cPanel.

Posted by sandeepsankaran, 01-28-2016, 09:16 AM
Hi , Thanks for every one. Sandeep.

Posted by mellow-h, 01-28-2016, 09:30 AM
Indeed! It is cpanel update that is reverting the changes. cPanel doesn't want to think you are using cPanel without httpd service. It would revert all the chkconfig that is related with cPanel services automatically on each update.



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read


Language:

LoadingRetrieving latest tweet...

Back to Top Copyright © 2018 DC International LLC. - All Rights Reserved.