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. https://crt.sh/?q=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:
soledadmining.com
I ran this command:
certbot
It produced this output:
allowed me to choose which domain
My web server is (include version):
Apache2
The operating system my web server runs on is (include version):
ubuntu 18.04
My hosting provider, if applicable, is:
digital ocean VPS
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): 0.31.0
I have two vhosts:
www.soledadmining.com (/var/www/html)
staging.soledadmining.com (/var/www/staging)
vhost for WWW is www.soledadmining.com.conf
vhost for staging is staging.soledadmining.com.conf
contents of www-conf:
<VirtualHost *:80>
ServerAdmin scott@scottplude.com
ServerName www.soledadmining.com
ServerAlias www.soledadmining.com
DocumentRoot /var/www/html
ErrorLog {APACHE_LOG_DIR}/error.log
CustomLog {APACHE_LOG_DIR}/access.log combined
contents of staging-conf:
<VirtualHost *:80>
ServerAdmin scott@scottplude.com
ServerName staging.soledadmining.com
ServerAlias staging.soledadmining.com
DocumentRoot /var/www/staging
ErrorLog {APACHE_LOG_DIR}/error.log
CustomLog {APACHE_LOG_DIR}/access.log combined
RewriteEngine on
RewriteCond %{SERVER_NAME} =soledadmining.com [OR]
RewriteCond %{SERVER_NAME} =staging.soledadmining.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
I run sudo certbot and 3 entries show up, the two vhosts and the root domain.
When I choose the www (and second, separate command choose staging) I have the option to redirect to HTTPS, I choose 2 for yes/redirect.
Everything redirects to the root domain. and I get a cert error in the browser.
Any thoughts?