I have a problem with my Apache2, I'm probably doing a misconfiguration, but I do not get what.
All my https traffic always redirects to a single page, I can't add different https pages.
This is my config :
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews ExecCGI
AllowOverride All
Order allow,deny
allow from all
AddHandler cgi-script .py
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot /var/www/www1/
ServerName www1.lucas.myurl.be
</VirtualHost>
<VirtualHost *:80>
DocumentRoot /var/www/www2/
ServerName www2.lucas.myurl.be
</VirtualHost>
<VirtualHost *:443>
DocumentRoot /usr/share/roundcube/
ServerName webmail.lucas.myurl.be
SSLEngine on
SSLCertificateFile PlaceOFMy1stCert
SSLCertificateKeyFile PlaceOfMy1stKey
</VirtualHost>
<VirtualHost *:80>
DocumentRoot /usr/share/roundcube/
ServerName webmail.lucas.myurl.be
Redirect / https://webmail.lucas.myurl.be/
</VirtualHost>
<VirtualHost *:443>
DocumentRoot /var/www
ServerName secure.lucas.myurl.be
SSLEngine on
SSLCertificateFile My2ndCert
SSLCertificateKeyFile My2ndKey
</VirtualHost>
<VirtualHost *:80>
DocumentRoot /var/www
ServerName secure.lucas.myurl.be
Redirect / https://secure.lucas.myurl.be/
</VirtualHost>
The problem is I get a default overwrite warning when I restart Apache2, but I do not understand where it is coming from.
[warn] _default_ VirtualHost overlap on port 443, the first has precedence
httpd not running, trying to start
So when I go to secure.lucas.myurl.be it goes to https://webmail.lucas.myurl.be, instead of going to https://secure.lucas.myurl.be
So what do I need to add to my configuration to make it redirect to the the proper SSL page instead of redirecting everything to the first 443 redirect ?