geerlingguy/ansible-role-apache

SSL vhost is throwing error when starting Apache

ronalddemneri opened this issue · 2 comments

Got the role using ansible-galaxy and I added the ssl vhost with a very basic setup, just for testing:

        apache_vhosts_ssl:
          - servername: "www.eaxmple.com"
            documentroot: "/var/www/html"
            extra_parameters: |
                ProxyPassMatch ^/(.*\.php(/.*)?)$ "fcgi://127.0.0.1:9000/var/www/html"
            certificate_file: "/etc/ssl/certs/ssl-cert-snakeoil.pem"
            certificate_key_file: "/etc/ssl/private/ssl-cert-snakeoil.key" 

but when trying to start apache, I received the error about directive SSLEngine on (don't remember exactly the error message I got).
When checking the configuration, I noticed that the SSL vhost in the target server was missing the <ifModule mod_ssl.so>...</ifModule> directives. Once I added that to the configuration file, apache was able to start.

As a matter of fact, the default-ssl.conf file was in place, even though I had the apache_remove_default_vhost set to true.

stale commented

This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark issues as stale.

stale commented

This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details.