Do I need to restart httpd after changes in the httpd.conf file for changes to take effect?
Restart httpd after changes in the httpd.conf
Asked Answered
@svisstack true, but apache and apache-config is not related to programming either. –
Gingerly
this 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. –
Crassulaceous
Yes. HTTPD.conf is read on apache start-up, so for any changes to take affect you need to restart it.
You can do
service httpd reload
, so apache will not be down. –
Curse @narkoz service does not exist so useing /etc/init.d/httpd status/restart –
Gingerly
I did a redirect, but restarting also does not solve the issue...what could be wrong. I have logged in as root. –
Gingerly
If your changes are not taking effect after restart, it is possible that your httpd.conf is incorrect. –
Hoyt
Jean,
/etc/init.d/httpd reload
–
Curse Are the certificate changes in ssl.conf also picked up by reload of httpd ? –
Maladjusted
@vishnu Yes, it should be. –
Hoyt
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.
You can do a graceful restart which does not require "restart the server" @Raghunandan J –
Dumuzi
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.
© 2022 - 2024 — McMap. All rights reserved.