在更改httpd.conf文件后,是否需要重新启动httpd才能使更改生效?
Yes. HTTPD.conf is read on apache start-up, so for any changes to take affect you need to restart it.
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 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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.