Hello,
i tried to use certbot with: certbot --apache -d kehrein.eu
This produced the following error:
Cannot find a cert or key directive in /files/etc/apache2/vhosts.d/kehrein-ssl.conf/IfDefine/IfDefine/VirtualHost. VirtualHost was not modified
Unable to find cert and/or key directives
IMPORTANT NOTES:
- Unable to install the certificate
my kehrein-ssl.conf is a copy of the template (only changed things like server name) and therefore has SSLEngine on, SSLCertificateFile and SSLCertificateKeyFile in it.
So i tried to create only the certificates using:
certbot-auto --apache certonly
which worked pretty well. Now i've got the certificates in /etc/letsencryt/live/kehrein.eu/*.
So i edited my kehrein-ssl.conf to
SSL Virtual Host Context
<VirtualHost *:443>
General setup for the virtual host
DocumentRoot "/srv/www/htdocs"
ServerName kehrein.eu
#ServerAdmin webmaster@example.com
ErrorLog /var/log/apache2/error_log
TransferLog /var/log/apache2/access_log
SSL Engine Switch:
Enable/Disable SSL for this virtual host.
SSLEngine on
You can use per vhost certificates if SNI is supported.
SSLCertificateFile /etc/letsencrypt/live/kehrein.eu/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/kehrein.eu/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/kehrein.eu/fullchain.pemPer-Server Logging:
The home of a custom SSL log file. Use this when you want a
compact non-error SSL logfile on a virtual host basis.
CustomLog /var/log/apache2/ssl_request_log ssl_combined
But when i try to open https://kehrein.eu in my browser (Safari) i get the Cant connect to server message
The software im using is apache 2.4.23 on opensuse 42.2 Leap