English Spanish
indexterm:[Apache HTTP Server,restarting] There are three different ways to restart a running `httpd` service:
To restart the service completely, enter the following command as `root`:
#{nbsp}systemctl restart httpd.service
This stops the running `httpd` service and immediately starts it again. Use this command after installing or removing a dynamically loaded module such as PHP.
To only reload the configuration without interrupting active requests, as `root`, type:
#{nbsp}systemctl reload httpd.service
This causes the running `httpd` service to reload its configuration file. Any requests currently being processed will not be interrupted, so configuration changes will only take effect for new client connections.
To reload the configuration and immediately terminate any active connections, enter the following command as `root`:
#{nbsp}systemctl kill --kill-who=main --signal=HUP httpd
Verifying the Service Status
indexterm:[Apache HTTP Server,checking status] To verify that the `httpd` service is running, type the following at a shell prompt:
#{nbsp}systemctl is-active httpd.service
Editing the Configuration Files
When the `httpd` service is started, by default, it reads the configuration from locations that are listed in xref:Web_Servers.adoc#table-apache-editing-files[The httpd service configuration files].
The httpd service configuration files
|indexterm:[Apache HTTP Server,files,/etc/httpd/conf/httpd.conf]
`/etc/httpd/conf/httpd.conf`|The main configuration file.
|indexterm:[Apache HTTP Server,directories,/etc/httpd/conf.d/]
`/etc/httpd/conf.d/`|An auxiliary directory for configuration files that are included in the main configuration file.
Although the default configuration should be suitable for most situations, it is a good idea to become at least familiar with some of the more important configuration options. Note that for any changes to take effect, the web server has to be restarted first. See xref:Web_Servers.adoc#s3-apache-running-restarting[Restarting the Service] for more information on how to restart the `httpd` service. indexterm:[Apache HTTP Server,checking configuration] To check the configuration for possible errors, type the following at a shell prompt:
#{nbsp}apachectl configtest
Syntax OK
To make the recovery from mistakes easier, it is recommended that you make a copy of the original file before editing it.
Common httpd.conf Directives