PDA

View Full Version : How To - Create one package webmail.anysite.com for all sites without URL redirect


Xinil
2nd June 2007, 04:16
Basically, this little tutorial explains how to make it so when a visitor goes to a site on your domain through http://webmail.(ANY_SITE).com, they will be presented with a single install webmail package. I didn't want to use ISPConfig's package, nor did I want to have my users all log in to mydomain.com:81/webmail. This method allows you to create one site, and have all your clients use their own page to get their webmail.

Step 1:
Follow a tutorial to install a webmail package to your domain. I recommend RoundCube: http://www.howtoforge.com/roundcube_webmail_ispconfig

Once you have this installed and have verified that RoundCube works, move on to the next step.

Step 2:
Log in as root to your server

Choose an editor of your choice and edit: /etc/httpd/conf/httpd.conf

Scroll down to the bottom and add BEFORE the "Include /etc/httpd/conf/vhosts/Vhosts_ispconfig.conf"


<VirtualHost YOUR_IP_HERE:80>
ServerName webmail.*
DocumentRoot /var/www/PATH_TO_YOUR_WEBMAIL_INSTALL
DirectoryIndex index.html index.php
AddType application/x-httpd-php .php .php3 .php4 .php5
</VirtualHost>


Be sure to change the specified fields.

Type
/etc/init.d/httpd reload

Give it a minute or two and now when a user visits:

http://webmail.domain1.com
or
http://webmail.domain3.com
or
http://webmail.domain5.com

They will all be presented with one webmail package that you installed in the beginning. :)

Also (contributed by roadster). You will have to add in a new co-domain (Check the DNS box too) for each site you want this to work on, simply add the following to your co-domains area:

Host: webmail
domain: whatever.com

roadster
6th June 2007, 10:56
Excellent tip, Xinil. Always remembering to add webmail.(anysite).com to DNS, of course. I'd previously added the path to the preferred webmail package as an alias in Apache directives for each site, but this is much neater.

Xinil
6th June 2007, 15:57
Thanks for reminding me of that roadster.

I'd like to mention that this tutorial works on/off for me, lol. When I first wrote it, the redirection worked flawlessly for my domains. Now however, I seem to be having to create a Vhost for each domain.

I'm still looking into that problem.

jfruano
3rd August 2007, 12:08
Choose an editor of your choice and edit: /etc/httpd/conf/httpd.conf



I use Debian but not find the dir /etc/httpd/conf/
:confused:

H2SO4
3rd August 2007, 13:54
I use Debian but not find the dir /etc/httpd/conf/
:confused:
with apache 1.3.x /etc/apache/httpd.conf
with apache 2.x /etc/apache2/apache2.conf

and after you need to use the

/etc/init.d/apache reload

or

/etc/init.d/apache2 reload

command. :)

gabriel925fm
5th September 2007, 19:00
Hello all!!

I've tryed this but no luck. it still shows the (welcome to bla bla .com) Page.


I'm running isp on centOS 5.

Thanks

falko
6th September 2007, 23:07
Hello all!!

I've tryed this but no luck. it still shows the (welcome to bla bla .com) Page.


I'm running isp on centOS 5.

Thanks
What exactly is the problem?

gabriel925fm
6th September 2007, 23:51
I followed all the steps and after i created the webmail co domain it shows like if i have created a new domain but no webmail

falko
7th September 2007, 16:00
You must not create the webmail Co-Domain in ISPConfig. You must do this manually, as shown in the first post.

jfruano
8th September 2007, 17:49
Hi Xinil.

I have installed squirrelmail following their instructions on your howto and everything works well.
But before I installed squirrelmail in ispconfig and all the squirrelmail languages worked well. Now only recognizes two languages, English and Spanish. :confused:

Can help me so that selects all the languages has squirrelmail package content?

Thanks for your good work.

J.F. Ruano.