Hello,
Great stuff! I was able to get one of my virtual hosts working last night, but with a little bit of manual effort. I was hoping to ask a few questions, and see if I can learn about the process, how things might have failed, and maybe contribute some input to the people maintaining the certbot-auto code.
As a “post-mortem” I did some investigation, and maybe found a few reasons why the process failed … it was SO close!
I fully understand that I was warned at first that Amazon Linux (NOT Amazon Linux 2) was going to be a questionable install … I went ahead after reading other peoples posts, via Google, and did get things working. Again … my goal is to assist here, and understand what might have failed to maybe contribute a fix.
When I ran the command to get things going, I used:
sudo ./certbot-auto --apache -d {myDomain}.com -d www.{myDomain}.com --debug
Everything seemed to work perfectly, right up until the “certbot_apache.configurator” The errors began at this point.
2018-11-06 02:30:04,041:INFO:certbot_apache.configurator:Created an SSL vhost at /etc/httpd/conf.d/www.wovyn.com-le-ssl.conf
2018-11-06 02:30:04,051:DEBUG:certbot.reverter:Creating backup of /etc/httpd/conf.d/www.wovyn.com-le-ssl.conf
2018-11-06 02:30:04,206:DEBUG:certbot.reverter:Creating backup of /etc/httpd/conf/httpd.conf
2018-11-06 02:30:04,267:WARNING:certbot_apache.configurator:Cannot find an SSLCertificateFile directive in /files/etc/httpd/conf.d/www.wovyn.com-le-ssl.conf/IfModule/VirtualHost. VirtualHost was not modified
2018-11-06 02:30:04,268:DEBUG:certbot.error_handler:Encountered exception:
Traceback (most recent call last):
File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/client.py", line 497, in deploy_certificate
fullchain_path=fullchain_path)
File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot_apache/configurator.py", line 336, in deploy_cert
self._deploy_cert(vhost, cert_path, key_path, chain_path, fullchain_path)
File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot_apache/configurator.py", line 465, in _deploy_cert
"Unable to find an SSLCertificateFile directive")
PluginError: Unable to find an SSLCertificateFile directive
What I realized at this point is that mod24_ssl was NOT installed … I’m not sure if this was the issue or not. I discovered this after I manually created the /etc/httpd/conf.d/www.wovyn.com-le-ssl.conf file, and restarted Apache.
Once I had installed this module, then the restart of Apache worked.
My two questions are:
- Is there a check in the current code for the mod24_ssl module? If not, this might be a good thing to add.
- The INFO line is incorrect: 2018-11-06 02:30:04,041:INFO:certbot_apache.configurator:Created an SSL vhost at /etc/httpd/conf.d/www.wovyn.com-le-ssl.conf This file was never actually created, and I’m not sure why. Again, it seems there is a bug in the code that did not detect this fact, yet still printed the INFO message that it was created. Looking in the Python code is what led me to believe that maybe the “configurator” is actually using the template from mod24_ssl to create the file … but didn’t realize it failed?
Anyhow … just wanting to learn and understand the code a little more, and hopefully provide some insight into improvements that could be made to the error handling.
I’ll be trying with a few more virtual hosts, and now that mod24_ssl is installed maybe it will work better.
Thanks for all of the great work!