Using a fairly typical/standard Apache installation on Ubuntu, with mod_ssl enabled, every "so often" (random time period) a website on the server stops responding.
When looking to see why, I noticed that /etc/apache2/mods-enabled/ssl.conf
and ssl.load
are missing. Using these two commands, I can immediately bring the website back up:
a2enmod ssl
service apache2 restart
It is infuriating! There must be a conflict somewhere, but I cannot figure out where.
Ubuntu 14.04 LTS Apache 2.4.7
Virtual Host Config File (/etc/apache2/sites-enabled/my-domain.org.conf)
<IfModule mod_ssl.c>
<VirtualHost xxx.xxx.xxx.xxx:443>
ServerName my-domain.org
ServerAlias www.my-domain.org
ServerAdmin null@foo.tld
DocumentRoot /var/www/my-domain.org
SSLEngine on
SSLCertificateKeyFile /etc/letsencrypt/live/my-domain.org/privkey.pem
SSLCertificateFile /etc/letsencrypt/live/my-domain.org/cert.pem
SSLCertificateChainFile /etc/letsencrypt/live/my-domain.org/chain.pem
CustomLog /var/log/apache2/my-domain.org/ssl_access_log vhost_combined
ErrorLog /var/log/apache2/my-domain.org/ssl_error_log
<Directory /var/www/my-domain.org>
Options -ExecCGI -Indexes -Includes +FollowSymLinks
AllowOverride FileInfo AuthConfig
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^/(.*)$ https://%1/$1 [R=301,L]
php_admin_flag engine on
php_admin_flag display_startup_errors on
php_admin_flag display_errors on
php_admin_flag html_errors on
php_admin_flag log_errors on
php_admin_flag ignore_repeated_errors off
php_admin_flag ignore_repeated_source off
php_admin_flag report_memleaks on
php_admin_flag track_errors on
php_value memory_limit 32M
</Directory>
</VirtualHost>
</IfModule>
Log output from /var/log/apache2/my-domain.org/ssl_error_log
:
[13:35:29.822335] [mpm_prefork:notice] [pid 2043] AH00169: caught SIGTERM, shutting down
[13:35:30.867258] [auth_digest:notice] [pid 2725] AH01757: generating secret for digest authentication ...
[13:35:30.896369] [mpm_prefork:notice] [pid 2725] AH00163: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.21 OpenSSL/1.0.1f configured -- resuming normal operations
[13:35:30.896406] [core:notice] [pid 2725] AH00094: Command line: '/usr/sbin/apache2'
There doesn't seem to be anything wrong there.