Do I need to restart httpd after changes in the httpd.conf file for changes to take effect?
Asked
Active
Viewed 6.9k times
52
-
1@svisstack true, but apache and apache-config is not related to programming either. – X10nD Oct 31 '10 at 10:31
-
2this should be asked on serverfault.com not stackoverflow.com, on serverfault you will get better results, on stackoverflow is not for peoples who interesting with this things. – Svisstack Oct 31 '10 at 10:59
3 Answers
39
Yes. HTTPD.conf is read on apache start-up, so for any changes to take affect you need to restart it.

Codemwnci
- 54,176
- 10
- 96
- 129
-
31
-
@narkoz service does not exist so useing /etc/init.d/httpd status/restart – X10nD Oct 31 '10 at 10:28
-
I did a redirect, but restarting also does not solve the issue...what could be wrong. I have logged in as root. – X10nD Oct 31 '10 at 10:29
-
1If your changes are not taking effect after restart, it is possible that your httpd.conf is incorrect. – Codemwnci Oct 31 '10 at 10:30
-
3
-
Are the certificate changes in ssl.conf also picked up by reload of httpd ? – Vishnu Apr 18 '19 at 06:08
-
8
Yes you need to restart the server by
sudo service httpd restart
You can check errors in your config files by
apachectl -t
Changes may take some time to reflect.

Jens
- 69,818
- 15
- 125
- 179

Raghunandan J
- 584
- 1
- 6
- 22
-
You can do a graceful restart which does not require "restart the server" @Raghunandan J – FabricioG Nov 13 '18 at 20:58
3
You can have apache re-read its config files without restarting by
sudo apachectl graceful
(or apache2ctl
on debian).
From the Apache docs:
Gracefully restarts the Apache httpd daemon. If the daemon is not running, it is started. This differs from a normal restart in that currently open connections are not aborted. [...] This command automatically checks the configuration files as in configtest before initiating the restart to make sure Apache doesn't die.

Brian Minton
- 3,377
- 3
- 35
- 41