如何解决运行 WordPress 时在 Apache 中关闭“AH00169:捕获 SIGTERM”的问题

scr*_*apy 6 wordpress apache-httpd

环境:debian9+LAMP+wordpress4.9.3,搭建在本地PC上,自己用。

cat /var/log/apache2/error.log
[Mon Feb 05 09:42:09.965635 2018] [mpm_prefork:notice] [pid 1083] AH00163: Apache/2.4.25 (Debian) configured -- resuming normal operations
[Mon Feb 05 09:42:09.965658 2018] [core:notice] [pid 1083] AH00094: Command line: '/usr/sbin/apache2'
[Mon Feb 05 14:41:47.057389 2018] [mpm_prefork:notice] [pid 1083] AH00169: caught SIGTERM, shutting down
Run Code Online (Sandbox Code Playgroud)

错误日志中有很多 AH00169 和 AH00163 以及一些 AH00094。每天几乎有 40 行错误信息。

它被一个人使用,我!

使用 apachectl 检查所有配置。

sudo apachectl configtest
Syntax OK
Run Code Online (Sandbox Code Playgroud)

一些重要的配置文件:

  1. 文件 000-default.conf

    cat /etc/apache2/sites-available/000-default.conf
    <VirtualHost *:80>
        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
    </VirtualHost>
    
    Run Code Online (Sandbox Code Playgroud)
  2. 文件 apache2.conf

    cat /etc/apache2/apache2.conf
    DefaultRuntimeDir ${APACHE_RUN_DIR}
    PidFile ${APACHE_PID_FILE}
    Timeout 300
    KeepAlive On
    MaxKeepAliveRequests 100
    KeepAliveTimeout 5
    User ${APACHE_RUN_USER}
    Group ${APACHE_RUN_GROUP}
    HostnameLookups Off
    ErrorLog ${APACHE_LOG_DIR}/error.log
    LogLevel warn
    IncludeOptional mods-enabled/*.load
    IncludeOptional mods-enabled/*.conf
    Include ports.conf
    <Directory />
        Options FollowSymLinks
        AllowOverride None
        Require all denied
    </Directory>
    <Directory /usr/share>
        AllowOverride None
        Require all granted
    </Directory>
    <Directory /var/www/>
        Options Indexes FollowSymLinks
        AllowOverride None
        Require all granted
    </Directory>
    AccessFileName .htaccess
    <FilesMatch "^\.ht">
        Require all denied
    </FilesMatch>
    LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
    LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
    LogFormat "%h %l %u %t \"%r\" %>s %O" common
    LogFormat "%{Referer}i -> %U" referer
    LogFormat "%{User-agent}i" agent
    IncludeOptional conf-enabled/*.conf
    IncludeOptional sites-enabled/*.conf
    
    Run Code Online (Sandbox Code Playgroud)
  3. 文件“ports.conf”

    cat /etc/apache2/ports.conf
    Listen 80
    <IfModule ssl_module>
        Listen 443
    </IfModule>
    <IfModule mod_gnutls.c>
        Listen 443
    </IfModule>
    
    Run Code Online (Sandbox Code Playgroud)

M0DD9.png

Mon Feb 05 15Mon Feb 05 16,而不是有多少错误信息!它会自动重新启动。

我使用 WordPress 大约三年了,我基于 WordPress 的网站上只有 1500 篇文章。只有一个用户——我,未在 Internet 上打开。

现在经常有这样的问题。

2v9Pu.png