Page tree
Skip to end of metadata
Go to start of metadata

This document is for a previous release of cPanel & WHM. To view our latest documentation, visit our Home page.

For cPanel & WHM 11.40

(Home >> Restart Services)

Overview

You can use this interface to restart a service (usually a daemon) on your web server. Daemons are small processes that run in the background of your server.

Restart services in the Restart Services interface

It may be helpful to restart if you have changed a service’s configuration or if the service is experiencing problems.

By default, you may use the WHM interface to restart the following services:

  • DNS nameserver (named/BIND or NSD)
  • FTP Server (ProFTPd or Pure-FTPd)
  • HTTP web server (Apache/httpd)
  • POP3/IMAP email server (Courier or Dovecot)
  • POP3 server (cPPOP)
  • Mail server (Exim)
  • SQL server (MySQL)
  • SSH server (openSSH)

You cannot restart a service will not work if the service is stopped. If you wish to start or stop a service, refer to the Service Manager feature in WHM.

To restart a service:

  1. On the main Restart Services screen, select the service you wish to restart.
  2. When asked whether you wish to restart the service, click Yes.

Troubleshooting (advanced users only)

Important:

If you use IPv6, the service network restart command will remove the IPv6 addresses from the network device. To restart your IPv6 configuration, you must run the /etc/init.d/cpipv6 restart command after you restart the network service. For more information, read the cpipv6 script documentation.

Restart from the command line

If a service will not restart from WHM, you may want to try to restart it from the command line.

First, try to restart the service with the server’s restart script. Type: /usr/local/cpanel/scripts/restartsrv $service. Replace $service with one of the entries in the column on the left below:

Input Value for $serviceService Name/Type

exim

Exim mail transfer agent (MTA).

named

BIND nameserver daemon.

proftpd

ProFTP FTP server daemon.

pureftpd

Pure-FTP FTP server daemon.

httpd

Apache web server daemon.

courier

Courier mail server daemon.

dovecot

Dovecot mail server daemon.

syslogd

System logs daemon.

clamd

Clam Antivirus software daemon.

sshd

Secure shell (SSHdaemon

inetd

Common Unix superserver daemon responsible for managing Internet services.

cppop

cPanel’s version of POP3 mail downloading service. Similar to IMAP.

imapd

IMAP mail downloading service. Similar to POP3.

mysql

MySQL database server.

postgresql

PostgreSQL database server.

interchange

Interchange e-commerce server.

tomcat

Java servlet container and HTTP server.

entropychat

Chat service.

Restart directly from the command line

If this does not work, you can attempt to restart the service directly. The location of the service depends upon your operating system; however, for many distributions, services are located in the /etc/init.d/ directory.

To search for the init.d directory, try one of the following commands:

  • locate init.d
  • ff init.d
  • find / -name init.d

To restart with this method, type the path to the service followed by the restart command. For example: /etc/rc.d/init.d/$service restart

  • Replace $service with the name of the daemon, such as eximnamedproftpdhttpd, etc.
  • Some distributions keep services in different locations. You may use the fflocate, or find command to locate the service you would like to restart.

If the restart fails, you should check the service’s error log. It can be very useful for diagnosing problems.

Each service logs its errors differently, so you will need to check the service’s documentation to find the error log’s location. Following are some examples of useful error logs and their possible locations; of course, results will vary depending on your installation.

Service (Daemon) NameError Log LocationNotes

Apache web server (httpd)

/usr/local/apache/logs/error_log

Details errors encountered during Apache requests.

BIND nameserver (named)

/var/log/messages

 

ProFTP server (proftpd)

/var/log/messages

 

Pure-FTP server (pureftpd)

/var/log/messages

 

Exim mail transfer agent (exim)

/var/log/exim_mainlog

Details all Exim transactions.

Exim mail transfer agent (exim)

/var/log/exim_rejectlog

Details rejected messages and reasons.

Exim mail transfer agent (exim)

/var/log/exim_paniclog

Details configuration and similar errors.

Important

If this log has contents, Exim has serious problems and will not run on some distributions.

Courier POP3/IMAP service (imapd)

/var/log/maillog

 

Dovecot POP3/IMAP service (imapd)

/var/log/maillog

 

MySQL database server (mysqld)

/var/lib/mysql/hostname.err

Substitute hostname with your server's hostname.

OpenSSH secure shell service (sshd)

/var/log/messages,

/var/log/secure, or

/var/log/auth

Log location depends on the configuration of the syslog service.