[BlueOnyx:20317] Re: Roundcube Alias
Colin Jack
colin at mainline.co.uk
Mon Nov 28 12:42:22 -05 2016
Hi Michael,
> Should just be able to put it the conf.include ... but I just haven't got it quite right.
> Hopefully one of the apache gurus on here can give me a lead!
>
> Alias /mail /roundcube
Not quite. The righthand side of the Alias needs the full path to the
directory on the file-system. So try this:
Alias /mail /home/.sites/28/site1/web/roundcube/
That would go into the site1.include file.
Worked perfectly! Thank you.
If you generally want to redirect all /mail to the matching /roundcube,
then you'd need to put something in /etc/httpd/conf.d/webmail.conf for
example. There a RewriteRule would be better as it's not that stringent
about having to have the file-path as the target, but it can be an URL
or partial URL:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^([^:]+)
RewriteRule ^/mail/?$ /roundcube [L,R]
Or say all your Vsites have SSL certificates anyway and you sure want to
redirect all /mail to https://<site>/roundcube to make them secure, you
could use this instead:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^([^:]+)
RewriteRule ^/mail/?$ https://$1/roundcube [L,R]
Brilliant. That is really useful information.
Thanks for your expert input!
BTW, this is the VPS that I couldn’t get RC to work on (after having to ‘fix’ the databases).
Dumped the whole VPS and started again and now all working well.
Kind regards
Colin
More information about the Blueonyx
mailing list