2

Im trying to enable SSL in my app but it does not work. Here is my sites-enabled config for my app.

<VirtualHost *:443>
                ServerName app1
                ServerAdmin admin@mywebsite.com

                ErrorLog ${APACHE_LOG_DIR}/error.log
                LogLevel warn
                CustomLog ${APACHE_LOG_DIR}/access.log combined
                DocumentRoot /var/www/app1
                #SSLEngine on
                SSLVerifyClient require
                SSLVerifyDepth 10
                #SetEnv proxy-initial-not-pooled

                #SSLCertificateFile /path/to/your_domain_name.crt
                #SSLCertificateKeyFile /path/to/your_private.key
                #SSLCertificateChainFile /path/to/DigiCertCA.crt
                #SSLCertificateFile /root/ca/intermediate/certs/www.example.com.cert.pem
                SSLCACertificateFile /root/ca/intermediate/certs/www.example.com.cert.pem
                #SSLCertificateKeyFile /root/ca/intermediate/private/www.example.com.key.pem
                #SSLCertificateChainFile /root/ca/intermediate/certs/ca-chain.cert.pem
</VirtualHost>

Im trying to enable client authentication(not server authentication) but whenever I restart the server, I get the following error.

[Fri Jun 23 21:25:18.965139 2017] [ssl:emerg] [pid 3334:tid 139960286734208] AH02311: Fatal error initialising mod_ssl, exiting. See /var/log/apache2/error.log for more information
[Fri Jun 23 21:26:24.843268 2017] [ssl:emerg] [pid 3385:tid 139981882820480] AH02240: Server should be SSL-aware but has no certificate configured [Hint: SSLCertificateFile] (/etc/apache2/sites-enabled/app1.conf:1)
user1050619
  • 629
  • 4
  • 13
  • 20
  • What exactly *it does not work* means? – pa4080 Jun 23 '17 at 21:00
  • @ps4080: provided all the info needed. – user1050619 Jun 23 '17 at 21:28
  • The directive `SSLEngine on` must be un-commented, also you need to provide `SSLCertificateKeyFile` and `SSLCertificateChainFile`. Please check [**this answer**](https://askubuntu.com/a/900433/566421), and maybe [this one](https://askubuntu.com/a/811416/566421) too. – pa4080 Jun 24 '17 at 06:47

0 Answers0