I use something like this:
Quote:
<VirtualHost 85.214.51.208:443>
ServerName webmail
ServerAlias mail.*
ServerAdmin postmaster@web-designerz.de
DocumentRoot /var/www/webmail/web
<VirtualHost 85.214.51.208:80>
ServerName webmail
ServerAlias mail.*
RewriteEngine On
RewriteRule (.*) https://%{SERVER_NAME}:443 [R]
</VirtualHost>
|
what it does is this: the first virtual host catches all domains that start with mail.whatever and redirects them to a single install of the webmailer of my choice (you could use roundcube).
The second virtualhost takes every request on port 80 and forwards it to port 443 so that my users can only use webmal via ssl.
Now here you have 2 possibilities to play around with, the one is a kind of a catchall for subdomains, you could use webmail.*, the other method works with a redirect, use whatever you like.
p.s. these virtualhosts go into /etc/apache2/apache.conf (if you are using debian)
justr some ideas to keep you going...
Recent comments
1 day 1 hour ago
1 day 4 hours ago
1 day 16 hours ago
1 day 18 hours ago
1 day 23 hours ago
2 days 5 hours ago
2 days 14 hours ago
2 days 16 hours ago
3 days 45 min ago
3 days 2 hours ago