I created a new subdomain on a WordPress network and I have new certificate that sometimes works, sometime it grabs a certificate for another domain on the network. And I can see the “This certificate is not valid (host name mismatch)”
The domain is https://ontarioadvanced.scafacilitywebsites.com/
If I get the error I see a certifcate for https://aksurgery.com/
https://aksurgery.com/ has several domains under it, when I first started setting up the network certificates I was doing them in 10s.
For OntarioAdvanced.sc
Going forward, since initial setup, I found it’s better to do 1 site at time, so the process is usually a subdomain gets created with a certificate, we work on the subdomain, then when it’s ready to be live, I update the vHosts, have the live domain name pointed at the Server’s IP, then create the final certificate for the new site. And most of the time it’s smooth. Every once and a while I run into this kind of ‘crossing of wires’ for a lack of a better way to describe it, where that aksurgery.com cert gets loaded with a domain.
I’m running Server version:
Ubuntu 14.04.5 LTS (GNU/Linux 4.4.0-31-generic x86_64)
Apache/2.4.25 (Ubuntu)
certbot 0.22.2
Is the new subdomain not loading and the server looks for the first certificate in the list of certificates, being ‘ak…’
Any advice would be very helpful. I have 100+ sites running on the network and want to be careful about messing with the certificates, otherwise I’ll be seeing many emails from angry people.
My 80 vHost looks like this, except the redirect gets put in after by certbot
<VirtualHost *:80>
ServerAdmin dave.kaplan@mysite.com
ServerName ontarioadvanced.scafacilitywebsites.com
DocumentRoot /var/www/html/scafacilitywebsites/public_html
<Directory /var/www/html/scafacilitywebsites/public_html>
# Don't show directory index
Options -Indexes +FollowSymLinks +MultiViews
# Allow .htaccess files
AllowOverride All
# Allow web access to this directory
Require all granted
</Directory>
# Error and access logs
ErrorLog ${APACHE_LOG_DIR}/ontarioadvanced/error.log
CustomLog ${APACHE_LOG_DIR}/ontarioadvanced/access.log combined
# Possible values include: debug, info, notice, warn, error, crit, alert, emerg.
LogLevel warn
# PHP-FPM
<FilesMatch \.php$>
SetHandler "proxy:unix:/var/run/php7-fpm-ontarioadvanced.sock|fcgi://ontarioadvanced.scafacilitywebsites.com"
</FilesMatch>
RewriteEngine on
RewriteCond %{SERVER_NAME} =ontarioadvanced.scafacilitywebsites.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]