Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. crt.sh | example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.
My domain is:
I ran this command:
It produced this output:
My web server is (include version): Apache 2.4
The operating system my web server runs on is (include version): Ubuntu 20.04
My hosting provider, if applicable, is:
I can login to a root shell on my machine (yes or no, or I don't know): yes
I'm using a control panel to manage my site (no, or provide the name and version of the control panel): no
The version of my client is (e.g. output of certbot --version
or certbot-auto --version
if you're using Certbot): 1.14.0
I ran certbot --apache
on my server and successfully installed certificates. However, I cannot enable SSL for my site. Accessing http://www.mysite.com loads the page successfully as non-SSL, but trying https://www.mysite.com redirects to http://www.mysite.com and loads that instead.
I have two enabled config files, one for non-SSL requests and one (generated from it by certbot) for SSL requests. The two config files are
# Non-SSL configuration
<VirtualHost IP:80>
ServerName mysite.com
ServerAlias www.mysite.com
DocumentRoot "/var/www/html"
<Directory />
Options FollowSymLinks
AllowOverride None
Require all denied
</Directory>
<Directory /var/www/html/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
# If I enable this, I get "page isn't redirecting properly" error
#RewriteEngine on
#RewriteCond %{SERVER_NAME} =mysite.com [OR]
#RewriteCond %{SERVER_NAME} =www.mysite.com
#RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
# SSL configuration
<IfModule mod_ssl.c>
<VirtualHost IP:443>
ServerName mysite.com
ServerAlias www.mysite.com
DocumentRoot "/var/www/html"
<Directory />
Options FollowSymLinks
AllowOverride None
Require all denied
</Directory>
<Directory /var/www/html/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
SSLCertificateFile /etc/letsencrypt/live/mysite.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/mysite.com/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
</IfModule>
I assume certbot added the Rewrite stuff at the bottom of the non-SSL config, but there's no clue. If I enable it, all access to the website causes a "page isn't redirecting properly" error, so I removed it.
What do I need to change to enable the certificates?