I have an ssl wildcard cert (letsencrypt) for example.de & *.example.com.
My 000-default.conf looks like:
<VirtualHost *:80>
ServerName example.de
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
Redirect permanent / https://example.de/
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
<VirtualHost *:80>
ServerName cloud.example.de
ServerAdmin info@example.de
DocumentRoot /var/www/cloud.example.de
Redirect permanent / https://cloud.example.de/
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
<VirtualHost *:80>
ServerName dev.example.de
ServerAdmin info@example.de
DocumentRoot /var/www/dev.example.de
Redirect permanent / https://dev.example.de/
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
default-ssl.conf:
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName example.de
SSLEngine On
SSLCertificateFile /etc/letsencrypt/live/example.de/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/example.de/privkey.pem
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
<VirtualHost _default_:443>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
SSLEngine on
SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
<FilesMatch "\.(cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
<Directory /usr/lib/cgi-bin>
SSLOptions +StdEnvVars
</Directory>
</VirtualHost>
</IfModule>
dev.example.de & cloud.example.de has the wildcard ssl certificate and redicts both to the html directory??
enter image description here
Same happend when I use this:
enter image description here