26.3. Starting and Stopping Apache

If configured with YaST (see Section 26.2.2, “Configuring Apache with YaST”), Apache is started at boot time in runlevels 3 and 5 and stopped in runlevels 0, 1, 2, and 6. You can change this behavior using YaST's runlevel editor or the command line tool chkconfig.

To start, stop, or manipulate Apache on a running system, use the init script /usr/sbin/rcapache2 (refer to Section 8.2.2, “Init Scripts” for a general information about init scripts.). The rcapache2 command takes the following parameters:


Starts Apache if it is not already running.


Starts Apache with SSL support if it is not already running. For more information about SSL support, refer to Section 26.6, “Setting Up a Secure Web Server with SSL”.


Stops then restarts Apache. Starts the Web server if it was not running before.


Stops then restarts Apache only if it has been running before.

reload or graceful

Stops the Web server by advising all forked Apache processes to first finish their requests before shutting down. As each process dies, it is replaced by a newly started one, resulting in complete “restart” of Apache.


rcapache2 reload is the preferred method of restarting Apache in production environments, for example, to activate a change in the configuration, because it allows all clients to be served without causing connection break-offs.


Checks the syntax of the configuration files without affecting a running Web server. Because this check is forced every time the server is started, reloaded, or restarted, it is usually not necessary to run the test explicitly (if a configuration error is found, the Web server is not started, reloaded, or restarted).


Probes for the necessity of a reload (checks whether the configuration has changed) and suggests the required arguments for the rcapache2 command.

server-status and full-server-status

Dumps a short or full status screen, respectively. Requires either lynx or w3m installed as well as the module mod_status enabled. In addition to that, status must be added to APACHE_SERVER_FLAGS in the file /etc/sysconfig/apache2.

[Tip]Additional Flags

If you specify additional flags to the rcapache2, these are passed through to the Web server.