I have a Ubuntu 16.04.3 LTS server running apache2. It is serving multiple sites. I am unable to connect to any of them. It is forcing a redirect to https:// and then giving a "Secure Connection Failed" error message. SSL is enabled with "a2enmod ssl"
Check:
http://magmaguy.com/ and
http://matecraft.org
I've checked the /etc/apache2/apache2.conf file. (#comments removed)
Code:
<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
The {apache2}/sites-enabled/ .conf files.
site1:
Code:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/matecraft.org/
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
ServerName matecraft.org
ServerAlias www.matecraft.org
</VirtualHost>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
site2:
Code:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/magmaguy.com/
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
ServerName magmaguy.com
ServerAlias www.magmaguy.com
RewriteEngine on
RewriteCond %{SERVER_NAME} =www.magmaguy.com [OR]
RewriteCond %{SERVER_NAME} =magmaguy.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
Site2 with SSL (yes it's enabled)
Code:
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/magmaguy.com/
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
ServerName magmaguy.com
ServerAlias www.magmaguy.com
Include /etc/letsencrypt/options-ssl-apache.conf
Include /etc/letsencrypt/options-ssl-apache.conf
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/magmaguy.com-0001/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/magmaguy.com-0001/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
</IfModule>
nmap from a remote computer shows port 80 and 443 open.
snipped
Code:
netstat -ntlp | grep LISTEN
tcp6 0 0 :::80 :::* LISTEN 1913/apache2
tcp6 0 0 :::443 :::* LISTEN 1913/apache2
there is no ipv4 entry there.
The SSL setup was done by following these:
Link1
Link2
using letsencrypt.
I'm not sure where else to look, what else to try.
-Brian