I'm hosting a webpage with Apache on a Raspberry Pi (Debian), and can't seem to get the server to issue the current certificate. I generated a self-signed SSL certificate in
openssl req -new -sha256 -x509 -nodes -days 365 -out example.com.pem -keyout example.com.key
Apache looks up the
.key file pair from file
/etc/apache2/sites-enabled/owncloud.conf, which contains:
SSLCertificateFile /home/pi/ssl/example.com.pem SSLCertificateKeyFile /home/pi/ssl/example.com.key
When I delete these files and restart Apache I get error
[FAIL] Reloading web server config: apache2 failed!. This error doesn't happen when restarting after a new certificate file pair has been generated, so Apache does seem to be calling the certificate.
However the certificate that comes through in browsers (Chrome Incognito or FF/Safari private windows, and even a browser on a computer that surely never requested the domain before) is an old certificate I generated a month ago - see below:
Any ideas why this is happening?