10.4. Starting and Stopping httpd

10.4. Starting and Stopping httpd

The httpd RPM installs the /etc/init.d/httpd script, which can be accessed using the /sbin/service command.

To start the server, as root type:

         /sbin/service httpd start 
      

To stop the server, as root type:

         /sbin/service httpd stop 
      

The restart option is a shorthand way of stopping and then starting the Apache HTTP Server.

To restart the server, as root type:

         /sbin/service httpd restart 
      

Note

If running the Apache HTTP Server as a secure server, it may be necessary to type the server password whenever using the start or restart options.

After editing the httpd.conf file, however, it is not necessary to explicitly stop and start the server. Instead, use the reload option.

To reload the server configuration file, as root type:

         /sbin/service httpd reload 
      

Note

If running the Apache HTTP Server as a secure server, the server password is not required when using the reload option.

By default, the httpd service does not start automatically at boot time. To configure the httpd service to start up at boot time, use an initscript utility, such as /sbin/chkconfig, /usr/sbin/ntsysv, or the Services Configuration Tool program. Refer to the chapter titled Controlling Access to Services in Red Hat Enterprise Linux System Administration Guide for more information regarding these tools.

Note

If running the Apache HTTP Server as a secure server, the secure server's password is required after the machine boots when using an encrypted private SSL key.

For information about setting up an Apache HTTP Secure Server, refer to the chapter titled Apache HTTP Secure Server Configuration in the Red Hat Enterprise Linux System Administration Guide.


Note: This documentation is provided {and copyrighted} by Red Hat®, Inc. and is released via the Open Publication License. The copyright holder has added the further requirement that Distribution of substantively modified versions of this document is prohibited without the explicit permission of the copyright holder. The CentOS project redistributes these original works (in their unmodified form) as a reference for CentOS-4 because CentOS-4 is built from publicly available, open source SRPMS. The documentation is unmodified to be compliant with upstream distribution policy. Neither CentOS-4 nor the CentOS Project are in any way affiliated with or sponsored by Red Hat®, Inc.