Restart Services
For WHM version 11.38
(
Home >> Restart Services)
Using this feature, you can restart a service (usually a
daemon) on your web server. Daemons are small processes that run in the background of your server.
How to restart services
Take these steps to restart services on your server.
Restarting may be helpful if you have changed a service’s configuration or if the service is experiencing problems.
By default, you may restart the following services via WHM:
Restarting 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:
- On the main Restart Services screen, select the service you wish to restart.
- When asked whether you wish to restart the service, click Yes.
Troubleshooting (advanced users only)
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 using 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 $service |
Service 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 (SSH) daemon |
| 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 using 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 exim, named, proftpd, httpd, etc.
- Some distributions keep services in different locations. You may use the
ff, locate, 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) Name |
Error Log Location |
Notes |
| 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 (in FreeBSD: /var/db/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. |