richardk wrote:Yes but I want to to this for https, so there is only one VirtualHost possible.
Why does https make it not possible?
Hi, Thanks for your reply.
Only one virtualhost for an ip allowed
richardk wrote:I'm not sure you can change the document root unless you remove the DocumentRoot from the <VirtualHost> or at all. Try
- Code: Select all
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTP_HOST} ^webmail2?\. [NC]
RewriteRule ^(/.*)$ /var/www/webmailclient$1 [PT,L]
I want it for the subdomains webmail and webmail2
all other subdomains (including www) -> /var/www/default
richardk wrote:What is your current <VirtualHost> like?
- Code: Select all
<VirtualHost myip:443>
ServerName webmail
ServerAlias webmail.*
DocumentRoot /var/www/webmailclient
DirectoryIndex index.html index.php
AddType application/x-httpd-php .php .php3 .php4 .php5
UseCanonicalName Off
SSLEngine on
SSLCertificateFile /etc/apache2/apache.pem
</VirtualHost>
but now every request is redirected to my webmailclient
so
www.domain.co = webmail.domain.co
thats why I want to rewrite the dir