5

Environment: debian9+LAMP+wordpress4.9.3, build on my local PC, and used myself.

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

So many AH00169 and AH00163 and some AH00094 are in the error log. For every day there is almost 40 lines of error information.

It is used by one person, me!

Check all configure with apachectl.

sudo apachectl configtest
Syntax OK

Some of the important configuration files:

  1. File 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>
    
  2. File 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
    
  3. File "ports.conf"

    cat /etc/apache2/ports.conf
    Listen 80
    <IfModule ssl_module>
        Listen 443
    </IfModule>
    <IfModule mod_gnutls.c>
        Listen 443
    </IfModule>
    

M0DD9.png

From Mon Feb 05 15 till Mon Feb 05 16, not how much error info there is! It restarts automatically.

I have used WordPress for about three years, and there are only 1500 articles on my WordPress-based site. There is just one user - me, not open on the Internet.

Nowadays there are often an issue such as below.

2v9Pu.png

  • How is your Apache started? When this happens, does Apache restart automatically? – Gerard H. Pille Feb 6 '18 at 8:53
  • sudo systemctl enable apache2 make it automatically run at boot. – scrapy Feb 6 '18 at 8:55
  • I use my wordpress ----write some article ,edit and delete,had not shutdowned apache myself manually. – scrapy Feb 6 '18 at 8:56
  • Does it restart automatically? How often does this happen? – Gerard H. Pille Feb 6 '18 at 8:57
  • Sure that it restart automatically for about 2 times per hour. – scrapy Feb 6 '18 at 9:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.