Apache insists on starting on boot on CentOS

Posted on

Apache insists on starting on boot on CentOS – Managing your servers can streamline the performance of your team by allowing them to complete complex tasks faster. Plus, it can enable them to detect problems early on before they get out of hand and compromise your business. As a result, the risk of experiencing operational setbacks is drastically lower.

But the only way to make the most of your server management is to perform it correctly. And to help you do so, this article will share nine tips on improving your server management and fix some problem about apache-2.2, centos, boot, , .

I have a CentOS server that came installed with WHM and cPanel and the corresponding LAMP stack. I disabled Apache and MySQL and replaced them with nginx and PostgreSQL.

…Or at least I thought I did. Apache insists on starting up on boot, blocking the ports nginx needs. So every time the server goes down for maintenance or is restarted for some other reason, Apache starts serving an old “under construction” page we had put up. After being alerted to the issue via a few angry phone calls, I have to shutdown Apache and start up nginx.

chkconfig --list httpd returns:

httpd           0:off   1:off   2:off   3:off   4:off   5:off   6:off

So I don’t know what’s booting up Apache. Any thoughts on what could be happening?

Solution :

There are two things you could do to fix this.

  1. Track down what is pulling in httpd as a dependency and starting it.
  2. Remove httpd and mysql-server packages.

Ideally, you would do both. However, if due to time constraints or based on how much you care only one of those options is likely?

enter image description here

If you have completely replaced Apache and MySQL then you have no reason to keep them on your system, and all they’re doing is taking up space, increasing your attack surface, and increasing your risk of something untoward happening (as is going on right now).

Leave a Reply

Your email address will not be published.