问题
I am using Cloudflare to set up a secure connection on Ubuntu 20 using Apache2. I used their Origin Server wizard to generate the following files:
example.com.pem (Origin Certificate)
example.com.key file (Private key)
I gave them the extensions suggested by Cloudflare.
I ran this:
sudo a2enmod ssl
sudo systemctl restart apache2
This is my setup:
<VirtualHost *:443>
....
SSLEngine on
SSLCertificateFile /path/example.com.pem
SSLCertificateKeyFile /path/example.com.key
The non-secure site works fine (I haven't pointed it to the secure yet), but I still get error 525 (SSL handshake failed) when I try to access the secure site. (I got a website down error before running the sudo a2enmod ssl command)
I tried to see if it was set up ok:
apachectl configtest
It just says "Syntax OK"
(Edit: I removed the wrong stuff I tried - which I now know is wrong - to simplify the question.)
来源:https://stackoverflow.com/questions/64863624/set-up-ubuntu-apache2-ssl-using-pem-and-key-from-cloudflare