3

I have a web server running on a Raspberry Pi. I am running stunnel on port 443, so I have been working to move my web server to port 8443. I use Let's Encrypt (Certbot) for my SSL certificates, and previously they had been working perfectly.

I have learned how to obtain certificates using the DNS challenge, so having port 443 for authentication is no longer necessary. I believe that I have all of my configuration files set up properly, but I'll insert them below.

Apache is running, and nothing should conflict with it, but whenever I attempt to access my site over HTTPS, Chrome says that the site unexpectedly closed the connection, while Edge says that it uses outdated or unsafe TLS settings.

I've been trying to figure this out for myself but at this point I have no idea what to do.

# If you just change the port or add more ports here, you will likely also'
# have to change the VirtualHost statement in'
# /etc/apache2/sites-enabled/000-default.conf'
Listen 80
#<IfModule ssl_module>'
#       Listen 8443'
#</IfModule>'
#<IfModule mod_gnutls.c>'
#       Listen 8443'
#</IfModule>'
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet'
<IfModule mod_ssl.c>
Listen 8443
</Ifmodule>

Sample VHost Config

<IfModule mod_ssl.c>
<VirtualHost *:8443>
        ServerName mysite.tld
        ServerAdmin myemail@provider.com
        DocumentRoot /var/www/html
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
SSLCertificateFile /etc/letsencrypt/live/mysite.tld/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/mysite.tld/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
</IfModule>

Default HTTP Configuration, for reference

<VirtualHost *:80>
        ServerName mysite.tld
        ServerAdmin myemail@provider.com
        DocumentRoot /var/www/html
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
Redirect permanent / https://mysite.tld/
RewriteEngine on
RewriteCond %{SERVER_NAME} =mysite.tld
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,QSA,R=permanent]
</VirtualHost>

1 Answers1

3

Confirm that you are connecting with your browser to port 8443.

Confirm that it is actually handled by apache and not some other process listening on that port not providing SSL.

Confirm SSL is running and listening on port 8443.

I don't see SSLEngine On in your snippet. This could also be causing you problems.

Bill
  • 136