Yes. HTTPD.conf is read on apache start-up, so for any changes to take affect you need to restart it.
Answer from Codemwnci on Stack OverflownixCraft
cyberciti.biz › nixcraft › howto › apache › restart httpd server command
Restart Httpd Server Command - nixCraft
October 16, 2022 - How do I restart httpd service? You can use the service or systemctl command to restart httpd server. Another option is use /etc/init.d/httpd service script under Linux or Unix-like systems.
How do I make Apache start automatically after a reboot?
Run `sudo systemctl enable apache2` on Ubuntu/Debian or `sudo systemctl enable httpd` on RHEL-based systems. To confirm, run `sudo systemctl is-enabled apache2` — it should output `enabled`.
linuxize.com
linuxize.com › home › apache › how to start, stop, and restart apache on linux
How to Start, Stop, and Restart Apache on Linux | Linuxize
Where are the Apache log files?
On Ubuntu/Debian, logs are stored in `/var/log/apache2/` (`access.log` and `error.log`). On RHEL-based systems, logs are in `/var/log/httpd/`. Use `journalctl` to view systemd service logs: `sudo journalctl -u apache2`.
linuxize.com
linuxize.com › home › apache › how to start, stop, and restart apache on linux
How to Start, Stop, and Restart Apache on Linux | Linuxize
How do I check if Apache is running?
Run `sudo systemctl status apache2` on Ubuntu/Debian or `sudo systemctl status httpd` on RHEL-based systems. You can also run `curl -I http://localhost` to verify Apache is responding to HTTP requests.
linuxize.com
linuxize.com › home › apache › how to start, stop, and restart apache on linux
How to Start, Stop, and Restart Apache on Linux | Linuxize
Red Hat
docs.redhat.com › en › documentation › red_hat_enterprise_linux › 5 › html › deployment_guide › s1-apache-startstop
25.3. Starting and Stopping httpd | Deployment Guide | Red Hat Enterprise Linux | 5 | Red Hat Documentation
You can also stop httpd using /sbin/service httpd stop. The restart option is a shorthand way of stopping and then starting the Apache HTTP Server.
Apache Software Foundation
httpd.apache.org › docs › 2.4 › stopping.html
Stopping and Restarting Apache HTTP Server - Apache HTTP Server Version 2.4
The second method of signaling the httpd processes is to use the -k command line options: stop, restart, graceful and graceful-stop, as described below.
Linuxize
linuxize.com › home › apache › how to start, stop, and restart apache on linux
How to Start, Stop, and Restart Apache on Linux | Linuxize
March 3, 2026 - Use reload instead of restart when you only need to apply configuration changes on a production server with active clients. To check the current status of the Apache service, run: ... ● apache2.service - The Apache HTTP Server Loaded: loaded (/usr/lib/systemd/system/apache2.service; enabled; preset: enabled) Active: active (running) since Sun 2026-03-01 14:00:00 UTC; 2h ago Docs: https://httpd.apache.org/docs/2.4/ Main PID: 12346 (apache2) Tasks: 55 (limit: 4915) Memory: 12.4M CGroup: /system.slice/apache2.service ├─12346 /usr/sbin/apache2 -k start ├─12347 /usr/sbin/apache2 -k start └─12348 /usr/sbin/apache2 -k start
Red Hat
docs.redhat.com › en › documentation › red_hat_enterprise_linux › 4 › html › reference_guide › s1-apache-startstop
10.4. Starting and Stopping httpd | Reference Guide | Red Hat Enterprise Linux | 4 | Red Hat Documentation
The httpd RPM installs the /etc/init.d/httpd script, which can be accessed using the /sbin/service command. ... The restart option is a shorthand way of stopping and then starting the Apache HTTP Server.
Cam
mirror.apps.cam.ac.uk › pub › doc › redhat › redhat8 › rhl-rg-en-8.0 › s1-apache-startstop.html
Starting and Stopping httpd
Instead, you can use the reload command. The reload command looks like the following example: By default, the httpd process will not start automatically when your machine boots. You will need to configure the httpd service to start up at boot time using an initscript utility, such as ...
Wsldp
elearning.wsldp.com › pcmagazine › restart-apache-on-centos-7
How to Restart Apache on CentOS 7 - e Learning
Two Commands can be used to Restart Apache HTTPD Server on CentOS 7 Linux. Those Two Commands are systemctl command and apachectl command. You Can use either of the Two commands to Restart Apache on CentOS 7. The systemctl command use to start, stop and restart services in CentOS 7.
Top answer 1 of 2
3
Forget the [ giving:
if sudo service http restart; then
# stuff
if sudo service http restart; then
echo ok
else
# error handling for second service failure
fi
else
# error handling for first failure
fi
Commands are true if their return status is zero, false otherwise. Shell commands also must terminate before the next line is called.
It is possible, in principle, that service does stuff in the background and exits before completion. In practice, it doesn't because that would really screw things up.
2 of 2
0
Not sure if the command backgrounds. If so, you could check if your command is still to be found in the process list:
// ... your code ...
c=1
while [[ c -gt 0 ]]
do
c=`ps l | grep -c "service httpd restart"`
done
service httpd restart
Zebrahost
zebrahost.com › docs › centos › commands-to-starto-stop-restart-apache-server-on-centos
Commands to Start/Stop or Restart Apache Server on CentOS
May 19, 2021 - Commands to Start/Stop or Restart ... in CentOS · Resizing Disk in CentOS 7 · System Power Commands on CentOS · By: ZebraHost · Start: sytstemctl start httpd.service ·...
Server Fault
serverfault.com › questions › 1088121 › systemctl-restart-httpd-failed-to-start-the-apache-http-server-httpd-pid-already
centos7 - systemctl restart httpd Failed to start The Apache HTTP Server httpd pid already running - Server Fault
December 23, 2021 - # kill 4461 # systemctl restart httpd;systemctl status httpd; ● httpd.service - The Apache HTTP Server Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled) Active: active (running) since Thu 2021-12-23 ...