Disabling services on a cPanel server via SSH

The usual method to disable services and prevent them from automatically restarting is via WHM --> Service Manager, however, if, for whatever reason, you do not have access to WHM, there is another way!

In this example, we'll be working with Apache/HTTP:

Firstly, stop Apache:
/etc/init.d/httpd stop

Secondly, disable it from starting on boot:
chkconfig httpd off

Next, we need to prevent cPanel's Chkservd feature from automatically restarting Apache:
Open /etc/chkserv.d/chkservd.conf with the text editor of your choice (e.g. nano, vi) and change httpd:1 to httpd:0


And that's it! Apache will now stay offline without being automatically restarted.

The available services are as follows:

cpdavd
cpgreylistd
cpsrvd
crond
dnsadmin
entropychat
exim
ftpd
httpd
imap
ipaliases
mailman
mysql
named
p0f
pop
spamd
sshd

  • 6 Users Found This Useful
Was this answer helpful?

Related Articles

Running a ClamAV and Maldet scan on cPanel servers

You may be familiar with ClamAV and Maldet (aka Linux Malware Detect). They're widely known as...

What is mysqluserstore?

On cPanel servers, you may come across the process...

Installing the LiteSpeed WHM Plugin

If your server is running cPanel/WHM, simply execute the below commands via SSH (as root):wget...

Changing the timezone

If you're like us, you'll want your server's timezone to match your local time to make log...

Finding the largest files and directories

This nifty command allows you to built up a list of the largest files and...