25.3. Starting and Stopping httpd
httpdpackage, review the Apache HTTP Server's documentation available online at http://httpd.apache.org/docs/2.2/.
httpdRPM installs the
/etc/init.d/httpdscript, which can be accessed using the
apachectlcontrol script sets the environmental variables in
httpd. You can also set the environment variables using the init script.
apachectlcontrol script as root type:
/sbin/service httpd start. This starts
httpdbut does not set the environment variables. If you are using the default
httpd.conf, which is port 80, you will need to have root privileges to start the apache server.
/sbin/service httpd stop. The
restartoption is a shorthand way of stopping and then starting the Apache HTTP Server.
service httpd restart
ErrorLogif it encounters an error while starting.
httpdservice does not start automatically at boot time. If you would wish to have Apache startup at boot time, you will need to add a call to
apachectlin your startup files within the
rc.Ndirectory. A typical file used is
rc.local. As this starts Apache as root, it is recommended to properly configure your security and authentication before adding this call.
httpdservice to start up at boot time, using an initscript utility, such as
/sbin/chkconfig, /usr/sbin/ntsysv, or the Services Configuration Tool program.
mod_statushowever needs to be enabled in your
httpd.confconfiguration file for this to work. For more details on
mod_statuscan be found on http://httpd.apache.org/docs/2.2/mod/mod_status.html.