I've got a question about apache2 and Virtualhosts.
I declared some in my /apache2/sites-available/ownsites in order to get access via different domains and subdomains, for example:
<VirtualHost *:80>
ServerName www.domain1.de
ServerAlias domain1.de
DocumentRoot /var/www/domain1/
ServerAdmin myemailaddress.de
<Directory />
Order deny,allow
deny from all
</Directory>
<Directory /var/www/domain1>
Options -Indexes -FollowSymLinks
AllowOverride all
Order allow,deny
allow from all
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName www.domain2.de
ServerAlias domain2.de
DocumentRoot /var/www/domain1/
ServerAdmin myemailaddress.de
<Directory />
Order deny,allow
deny from all
</Directory>
<Directory /var/www/domain2>
Options -Indexes -FollowSymLinks
AllowOverride all
Order allow,deny
allow from all
</Directory>
</VirtualHost>
everything works fine, I can access to the different domains and subdomains. But the I enable ssl in order to get secure access to my mail-webaccess
<VirtualHost *:443>
SSLEngine On
SSLCertificateFile /etc/apache2/certs/zarafa-ssl.crt
SSLCertificateKeyFile /etc/apache2/certs/zarafa-ssl.key
ServerName www.webaccess.domain1.de
ServerAlias webaccess.domain1.de
DocumentRoot /path/to/zarafa-webaccess/
ServerAdmin myemailaddress.de
#rewrite rule for https access
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule (.*) https://webaccess.domain1.de [R]
<Directory />
Order deny,allow
deny from all
</Directory>
<Directory /path/to/zarafa-webaccess/>
Options -Indexes -FollowSymLinks
AllowOverride None
Order allow,deny
allow from all
</Directory>
</VirtualHost>
Also this access works fine, including the rewrite, if I try to access only with http
But the incomprehensible thing is, that now if I try to access to my main domain with https: https://www.domain1.de , I am redirected to the apache2-standard-index.html "It work's", even if I delete it. Further my other domain www.domain2.de is redirected to my first domain, if I try to access with https: https://www.domain2.de -> http://domain1.de
Maybe is there any other file from apache2 exits where former RewriteRules are saved, when I tried some RewriteRules out?
If I declare other rules in order to define an other behaviour, there is no difference.
Does anybody had the same problem or has an idea how to solve it?