To setup Let's Encrypt I’m following a guide on DigitalOcean called, “How To Secure Apache with Let's Encrypt on Ubuntu 18.04”.
My domain is: theinitiate.agency
Here is the corresponding output when running this command:
$ sudo certbot --apache -d theinitiate.agency -d www.theinitiate.agency
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Error while running apache2ctl configtest.
Action 'configtest' failed.
The Apache error log may have more information.
AH00526: Syntax error on line 49 of /etc/apache2/sites-enabled/theinitiate.agency-le-ssl.conf:
SSLCertificateFile: file '/etc/letsencrypt/live/theinitiate.agency/cert.pem' does not exist or is empty
The apache plugin is not working; there may be problems with your existing configuration.
The error was: MisconfigurationError("Error while running apache2ctl configtest.\nAction 'configtest' failed.\nThe Apache error log may have more information.\n\nAH00526: Syntax error on line 49 of /etc/apache2/sites-enabled/theinitiate.agency-le-ssl.conf:\nSSLCertificateFile: file '/etc/letsencrypt/live/theinitiate.agency/cert.pem' does not exist or is empty\n",)
$
Here are the relevant contents of my /var/log/letsencrypt/letsencrypt.log :
2018-05-25 14:10:04,517:DEBUG:certbot.plugins.selection:Single candidate plugin: * apache
Description: Apache Web Server plugin - Beta
Interfaces: IAuthenticator, IInstaller, IPlugin
Entry point: apache = certbot_apache.entrypoint:ENTRYPOINT
Initialized: <certbot_apache.override_debian.DebianConfigurator object at 0x7f79625066d8>
Prep: Error while running apache2ctl configtest.
Action 'configtest' failed.
The Apache error log may have more information.AH00526: Syntax error on line 49 of /etc/apache2/sites-enabled/theinitiate.agency-le-ssl.conf:
SSLCertificateFile: file '/etc/letsencrypt/live/theinitiate.agency/cert.pem' does not exist or is empty2018-05-25 14:10:04,521:DEBUG:certbot.plugins.selection:Selected authenticator None and installer None
The contents of the /etc/letsencrypt/live/ includes my other two domains. The contents of this directory are automatically generated. Not sure why theinitiate.agency isn't there:
#ls /etc/letsencrypt/live/
angeles4four.info summitministry.coffee
Inside that directory should be theinitiate.agency too, right? Why is it not auto generating?
I tried Googling sslcertificatefile does not exist or is empty
and certbot apache configuration cert.pem
. I sifted through the top search results there and can't find the answer I am looking for.
I feel like the answer I'll receive on this board will be trivial. I probably need to enter an obvious command which I am overlooking in the guide I shared above. But I have checked everything to the best of my ability and here I am gnashing at the teeth trying to get this right. Any help? I'm sorry for asking such a novice question.
I made sure to have invoked $ sudo a2ensite theinitiate.agency.conf
and $ sudo a2ensite theinitiate.agency-le-ssl.conf
.
My web server is (include version):
Server version: Apache/2.4.29 (Ubuntu)
Server built: 2018-04-25T11:38:24
Thanks for your attention.
The operating system my web server runs on is (include version): Ubuntu 18.04
My hosting provider is: DigitalOcean
I can login to a root shell on my machine (yes or no, or I don't know): yes
I'm using a control panel to manage my site (no, or provide the name and version of the control panel): no
edit: Add thanks