Restart httpd after changes in the httpd.conf

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-04 08:13:06

问题


Do I need to restart httpd after changes in the httpd.conf file for changes to take effect?


回答1:


Yes. HTTPD.conf is read on apache start-up, so for any changes to take affect you need to restart it.




回答2:


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.




回答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.



来源:https://stackoverflow.com/questions/4062723/restart-httpd-after-changes-in-the-httpd-conf

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!