Background I have a simple server with only one site. I want to force ssl. I previously did this with a self signed certificate, but now I have got a letsencrypt cert. I have used the auto set up, but when I access my site it uses the old certificate.
I think my question is similar to: default apache index.html shows up even though i have a sites-enabled file
In this answer: https://serverfault.com/a/690668/226403 one of the options is "If you want this as your default/only host, then don't even bother with VirtualHost tags, and apply your configuration at the server level".
Question How do I change the server wide configuration? I think this server wide configuration is what is using the old certificate, but I cannot fathom how to change it?
Thanks! (My set-up is a Ubuntu VM using apache)
Edit: In /etc/apache2/ssl there are old .key and .pem files, if I move these everything breaks horribly and apache won't start!
Solution (For me at least). Apparently you can set things up in sites-available and in conf-available. Lets Encrypt automatically sets up sites-available for you, but not conf-available. I performed a recursive search (using https://stackoverflow.com/questions/16956810/finding-all-files-containing-a-text-string-on-linux):
$ grep -rnw '/etc/apache2/' -e 'SSLCertificateFile'. Found the incorrect files in conf-available and rebooted apache:
sudo service apache2 reload.