Does /etc/letsencrypt stop apachectl -M?

I am trying to list all my running Apache modules with apachectl -M and get this error:

AH00526: Syntax error on line 35 of /etc/apache2/sites-enabled/000-default-ssl.conf:
SSLCertificateFile: file '/etc/letsencrypt/live/alice.hatters.org.uk/cert.pem' does not exist or is empty
Action '-M' failed.
The Apache error log may have more information.

The site in question seems to be running OK though. When I do

realpath /etc/letsencrypt/live/alice.hatters.org.uk/cert.pem

I see

/etc/letsencrypt/archive/alice.hatters.org.uk/cert61.pem

The permissions for /etc/letsencrypt/archive are root 700. Does tha mean apachectl can't read it or something to the command is failing?

If I change the permissions on /etc/letsencrypt/archive/ to 755 I assume that's bad. Does anyone know what to do?

Try: sudo apachectl -M

2 Likes

Doh! That gets me every time becasue some apachectl commands don't need root.

3 Likes