apache - apachectl 和 apache2 之间的区别

标签 apache

我尝试重新启动我的 Apache 服务器,我对此很陌生。 我很想知道 apache2重启是做什么的? apachectl restart 是做什么的?

最佳答案

假设您使用的是 Ubuntu 或类似系统,man apache2 会指示以下内容:

In general, apache2 should not be invoked directly, but rather should be invoked via /etc/init.d/apache2 or apache2ctl.

仅供引用:apachectl 现在是 apache2ctl 的别名

作为最佳实践,建议发出 sudo apache2ctl Graceful

正如其含义所示,graceful 参数提供了一种更稳定的方式来重新启动 apache 进程,让其子进程在重新加载配置之前完成正在进行的任务。

cf man apache2ctl

重新启动:

Restarts the Apache daemon by sending it a SIGHUP.

优雅:

Gracefully restarts the Apache daemon by sending it a SIGUSR1. If the daemon is not running, it is started. This differs from a normal restart in that currently open connections are not aborted.

Here is a reference about signalling SIGUSR1 as opposed to SIGHUP.

关于apache - apachectl 和 apache2 之间的区别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16338313/

相关文章:

php - UTF-8贯穿始终

apache - Visual Studio Code 是否使用 .htaccess?

java - 请求不包含多部分/表单数据或多部分/混合流 apache 错误

Apache vhost 覆盖配置?

python - 为什么 Flask 没有给我一个交互式调试器?

apache - 为什么不应该总是使用 Apache 的事件 MPM 而不是工作 MPM?

php - composer.phar更新,然后解析错误: syntax error, unexpected $end

apache - windows7安装phonegap报错

php - DVWA 设置 PHP 函数 allow_url_include : Disabled

apache - 我在哪里可以找到 CentOS 服务器中的 ssl.conf 文件?