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:
service httpd start
To stop the server, as root type:
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:
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:
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 System Administrators 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 System Administrators Guide.
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.