Imomemo

色々とやっていきたい

「cert.pem does not exist or is empty」というエラーが出る【Let’s Encrypt + Apache】

Apache上でLet’s Encryptを使うために作業していたらタイトルのエラーが出た。

Syntax error on line XX of /path/to/ssl.conf:
SSLCertificateFile: file '/path/to/cert.pem' does not exist or is empty

適切にcert.pemを配置しているにも関わらず、無いことになっている。

原因:パーミッションの問題だった

パーミッションが許可されていないせいで、cert.pemのあるディレクトリにアクセス出来ず発見出来なかったらしい。

「/etc/letsencrypt/archive/」と「/etc/letsencrypt/live/」のパーミッションを755にしてやると解決した。

$ sudo chmod 755 /etc/letsencrypt/archive/
$ sudo chmod 755 /etc/letsencrypt/live/