Restart httpd after changes in the httpd.conf

后端 未结 3 842
耶瑟儿~
耶瑟儿~ 2021-02-03 17:55

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

3条回答
  •  夕颜
    夕颜 (楼主)
    2021-02-03 18:34

    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.

提交回复
热议问题