The translation is temporarily closed for contributions due to maintenance, please come back later.
English Spanish
This section describes how to start, stop, restart, and check the current status of the Apache HTTP Server. To be able to use the `httpd` service, make sure you have the [package]*httpd* installed. You can do so by using the following command:
#{nbsp}dnf install httpd
For more information on the concept of targets and how to manage system services in {MAJOROS} in general, see
xref:infrastructure-services/Services_and_Daemons.adoc#ch-Services_and_Daemons[Services and Daemons].
Starting the Service
indexterm:[Apache HTTP Server,starting] To run the `httpd` service, type the following at a shell prompt as `root`:
If you want the service to start automatically at boot time, use the following command:
#{nbsp}systemctl enable httpd.service
ln -s '/usr/lib/systemd/system/httpd.service' '/etc/systemd/system/multi-user.target.wants/httpd.service'
Using the secure server
If running the Apache HTTP Server as a secure server, a password may be required after the machine boots if using an encrypted private SSL key.
Stopping the Service
indexterm:[Apache HTTP Server,stopping] To stop the running `httpd` service, type the following at a shell prompt as `root`:
To prevent the service from starting automatically at boot time, type:
#{nbsp}systemctl disable httpd.service
rm '/etc/systemd/system/multi-user.target.wants/httpd.service'
Restarting the Service
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`:
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:
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`: