Mobile app version of vmapp.org
Login or Join
Shakeerah822

: How can I make a webmail URL available from any hosted domain? I run Roundcube webmail on my VPS. At the moment, it is only accessible from one virtual server hosted on the server, unless

@Shakeerah822

Posted in: #Apache #Linux #Vps #Webserver

I run Roundcube webmail on my VPS. At the moment, it is only accessible from one virtual server hosted on the server, unless a separate Roundcube installation is created for other virtual servers. I would like to be able to make webmail available from any domain/ virtual server that I host, just by adding /webmail to the end.

I'm sure Apache must allow me to do this - only problem is, I don't know how!

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Shakeerah822

2 Comments

Sorted by latest first Latest Oldest Best

 

@Tiffany637

Put the following into your /etc/apache2/httpd.conf, or wherever user configuration for the main host goes:

Alias /webmail /path/to/your/roundcube


As we put this not into a ... section, it applies to all virtual hosts at the same time. See Apache Alias directive.

Note that it is not possible to use the ServerAlias directive for a solution, as that is for hostnames only, not applicable to directories.

10% popularity Vote Up Vote Down


 

@Margaret670

It's just a simple 301 redirect. Like so:

RewriteRule www.somedomain.com/webmail$ www.actualdomain.com/webmail/ [R=301,L]


This goes on the server that has these hosted domains. Then it'll route that traffic to the actual VPS that hosts the webmail client.

By the way, well done in picking Roundcube. I'm using it on my VPS, literally is one of the best webmail clients I've come across!

EDIT
Another way is to include it in your vhosts file with code similar to this:

<VirtualHost *:80>
ServerName theirdomain.com/webmail
ServerAlias theirdomain.com/webmail DocumentRoot "whereyourfolderis"
<Directory "whereyourfolderis">
IndexOptions +FancyIndexing NameWidth=*
Options Includes FollowSymLinks Indexes
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>


I know the .htaccess method would work, I'm not entirely sure if the above vhost code would work as well though as I've never tested it.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme