After backing up my site on unbuntu, apache and a lamp stack, nginx was running when I didn’t install it. I stopped nginx and restarted apache and this is the message I’m getting:
/etc/init.d/apache2 restart
* Restarting web server apache2 [fail]
* The apache2 configtest failed.
Output of config test was:
AH00526: Syntax error on line 33 of /etc/apache2/sites-enabled/default-ssl.conf:
SSLCertificateFile: file '/etc/letsencrypt/live/www.signa.com/cert.pem' does not exist or is empty
Action 'configtest' failed.
The Apache error log may have more information.
/etc/letsencrypt/live/www.signa.com/cert.pem
is not empty, there is a certificate inside I’ve just verified
Any non-standard apache config changes you made to apache? What’s the output of ls -l /etc/letsencrypt/live/www.signa.com/ and openssl x509 -in /etc/letsencrypt/live/www.signa.com/cert.pem -noout -text?
$ ls -l
total 47032
-rwxrwxr-x 1 user user 44115 Jun 16 15:15 certbot-auto
-rw-rw-r-- 1 user user 0 Jul 6 09:46 example.com.key
-rw-r--r-- 1 root root 1 Jun 29 11:15 signa.com.conf
-rw-rw-r-- 1 user user 1139 Jul 6 09:48 signa.com.csr
-rw-rw-r-- 1 user user 1704 Jul 6 09:48 signa.com.key
-rw-r--r-- 1 user user 48089803 Jun 30 03:02 signa.sql
drwxr-xr-x 5 user user 4096 Jun 29 10:25 wordpress
-rw------- 1 user user 1675 Jul 1 04:15 x
-rw-r--r-- 1 user user 396 Jul 1 04:15 x.pub
user@server:~$ /etc/letsencrypt/live/www.signa.com/ and openssl x509 -in
-bash: /etc/letsencrypt/live/www.signa.com/: Permission denied
user@server:~$ /etc/letsencrypt/live/www.signa.com/cert.pem -noout -text
-bash: /etc/letsencrypt/live/www.signa.com/cert.pem: Permission denied
yes, I’ve got this error in file: /var/log/apache2/error.log.1
[Sun Jul 24 06:29:41.944613 2016] [mpm_prefork:notice] [pid 11543] AH00171: Graceful restart requested, doing restart
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
That doesn’t look like it’s related and wouldn’t prevent apache from starting.
Not sure what’s going on here, sorry. Anything worth mentioning regarding your apache configuration? Did you make any changes to how apache start, for example, changing it from the default of starting as root and then dropping privileges? What’s the output of:
This just copies the certificate to some other path (anything would work, somewhere in /etc/apache2 or /home/youruser) and then changes the permissions for that file to be readable by anyone (which is fine, as this is your certificate, which any visitor to your site would see. The stuff you need to keep private is in privkey.pem, which we’re not touching. If anyone ever tells you to chmod 0777 your private key, run. )
Then change the SSLCertificateFile path in /etc/apache2/sites-enabled/default-ssl.conf to /any/other/path/cert.pem and try restarting apache again. If the error changes or goes away, we’re probably looking at some kind of permission problem.