I ran this command: sudo service apache2 restart
It produced this output (after running apachectl configtest
):
[so:warn] [pid 2674:tid 1996386304] AH01574: module ssl_module is already loaded, skipping
AH00526: Syntax error on line 17 of /etc/apache2/sites-enabled/example.com.conf:
SSLCertificateFile: file '/etc/letsencrypt/live/example.com/cert.pem' does not exist or is empty
Action 'configtest' failed.
The file exists and is not empty, and the symlink seems correct.
My web server is: Apache 2.4.10 (Raspbian)
The operating system my web server runs on is: Raspbian (I am using the version from April 2017 I think)
I can login to a root shell on my machine: yes
I'm using a control panel to manage my site: I use a control panel to manage the domain name's records, the rest is managed on my server.
Other info: I also changed the directory names from example.com-0001 to example.com in live and archive folders in letsencrypt, but that didn't fix the problem (the symlinks are correct too).
My Apache config file (I'm not actually using example.com of course):
<VirtualHost *:80>
ServerName example.com
ServerAlias www.example.com *.example.com
DocumentRoot "/var/www/websites/example"
Redirect / https://example.com
</VirtualHost>
LoadModule ssl_module /usr/lib/apache2/modules/mod_ssl.so
Listen 443
<VirtualHost *:443>
ServerName example.com
ServerAlias www.example.com *.example.com
DocumentRoot "/var/www/websites/example"
SSLEngine on
SSLCertificateFile "/etc/letsencrypt/live/example.com/cert.pem"
SSLCertificateKeyFile "/etc/letsencrypt/live/example.com/privkey.pem"
SSLCertificateChainFile "/etc/letsencrypt/live/example.com/chain.pem"
</VirtualHost>
I also have another domain name which uses another config file but it looks the same as shown above but with the other domain name. That one works, but I don't know why this one doesn't.
I also used sudo /path/to/certbot-auto --apache certonly
to generate SSL certificate.