Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Tips/Tricks/Mods

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 5th May 2009, 22:27
Ovidiu Ovidiu is offline
Senior Member
 
Join Date: Sep 2005
Posts: 1,257
Thanks: 75
Thanked 22 Times in 18 Posts
Default how to redirect mail.anydomain to the webmail vhost

I had this working in ispcfg2 but can't get it to work with ispcfg3.

basically I tried inserting this into /etc/apache2/apache.conf

Code:
<VirtualHost 85.214.146.68:80>
ServerName webmail
ServerAlias mail.*
ErrorLog /var/www/webmail/log/error.log
ServerAdmin postmaster@web-designerz.de
DocumentRoot /var/www/webmail
DirectoryIndex index.html index.htm index.php index.php5 index.php4 index.php3 $
AddType application/x-httpd-php .php .php3 .php4 .php5
</VirtualHost>#

# Include the virtual host configurations:
Include /etc/apache2/sites-enabled/
tried both including it before
Quote:
Include /etc/apache2/sites-enabled/
and after that statement but b0oth times it just goes wrong and redirects all sites/vhosts to the squirrelmail interface :-(

can someone point out what I am doing wrong here?
Reply With Quote
Sponsored Links
  #2  
Old 6th May 2009, 23:05
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,721 Times in 2,562 Posts
Default

Can you replace
Code:
</VirtualHost>#
with
Code:
</VirtualHost>
?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 7th May 2009, 13:48
Ovidiu Ovidiu is offline
Senior Member
 
Join Date: Sep 2005
Posts: 1,257
Thanks: 75
Thanked 22 Times in 18 Posts
Default

silly mistake, but it didn't change a thing, all vhosts get redirected to the webmail login :-(

anything else I might be doing wrong?
Reply With Quote
  #4  
Old 8th May 2009, 01:08
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,721 Times in 2,562 Posts
Default

Does this happen only if you use the webmail subdomain, or also for the mail subdomain?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 8th May 2009, 08:36
Ovidiu Ovidiu is offline
Senior Member
 
Join Date: Sep 2005
Posts: 1,257
Thanks: 75
Thanked 22 Times in 18 Posts
Default

I tried
Quote:
<VirtualHost 85.214.146.68:80>
ServerName mail
ServerAlias mail.*
ErrorLog /var/www/webmail/log/error.log
ServerAdmin postmaster@web-designerz.de
DocumentRoot /var/www/webmail
DirectoryIndex index.html index.htm index.php index.php5 index.php4 index.php3 $
AddType application/x-httpd-php .php .php3 .php4 .php5
</VirtualHost>

same result...

this is weird. here is the exact vhost settigns I was using in ispcfg3 and it worked and still works perfectly:
Quote:
<VirtualHost 85.214.51.208:443>
ServerName webmail
ServerAlias mail.*
ScriptAlias /cgi-bin/ /var/www/webmail/cgi-bin/
AddHandler cgi-script .cgi
AddHandler cgi-script .pl
ErrorLog /var/www/webmail/log/error.log
ServerAdmin postmaster@web-designerz.de
DocumentRoot /var/www/webmail/web
DirectoryIndex index.html index.htm index.php index.php5 index.php4 index.php3 $
SSLEngine on
SSLCertificateFile /etc/apache2/ssl/server.crt
SSLCertificateKeyFile /etc/apache2/ssl/server.key
SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0
AddType application/x-httpd-php .php .php3 .php4 .php5
</VirtualHost>

<VirtualHost 85.214.51.208:80>
ServerName webmail
ServerAlias mail.*
RewriteEngine On
RewriteRule (.*) https://%{SERVER_NAME}:443 [R]
</VirtualHost>
the only difference is that there I was using port 443 but I can't find a good howto generate those security certificates anymore, so I thought I'd settle for port 80
Reply With Quote
  #6  
Old 9th May 2009, 13:32
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,721 Times in 2,562 Posts
Default

No, I meant, does this happen only if you use the webmail subdomain, or also for the mail subdomain in the browser?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #7  
Old 9th May 2009, 14:22
Ovidiu Ovidiu is offline
Senior Member
 
Join Date: Sep 2005
Posts: 1,257
Thanks: 75
Thanked 22 Times in 18 Posts
Default

I am really not getting it !?

if I try opening in my browser any domain hsoted on my sever, they all lead to the squirrelmail login.

if I try mail.anydomain on my server they also lead there?

does this answer your question? am unsure how to understand your question :-)
Reply With Quote
  #8  
Old 10th May 2009, 17:57
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,721 Times in 2,562 Posts
Default

Hm, that's really strange. I have no idea why this is happening.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #9  
Old 15th May 2009, 11:18
tio289 tio289 is offline
Member
 
Join Date: Mar 2009
Posts: 70
Thanks: 2
Thanked 14 Times in 9 Posts
Default

you can try use only rewrite rules in all vhosts
Reply With Quote
  #10  
Old 10th June 2009, 10:12
fastgrav fastgrav is offline
Junior Member
 
Join Date: May 2009
Posts: 3
Thanks: 0
Thanked 4 Times in 1 Post
 
Default

Hi,

add the following lines in /etc/apache2/conf.d/apache2-doc

Alias /webmail /usr/share/squirrelmail/

<Directory "/usr/share/squirrelmail/">
Options Indexes FollowSymlinks
AllowOverride None
Order allow,deny
Allow from all
AddDefaultCharset off
</Directory>

and every virtual domain will have a www.virt-domain.com/webmail

Andrei
Reply With Quote
The Following 4 Users Say Thank You to fastgrav For This Useful Post:
dclardy (12th September 2009), faeroe (17th September 2009), spanish (1st January 2010), Tenaka (11th June 2009)
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Webmail on port 80, ISPConfig on port 81 wonka Installation/Configuration 5 3rd March 2007 15:46
Redirect question {SERVERNAME} for webmail Herbert Installation/Configuration 15 15th January 2007 14:05
Redirect webmail page alex916 Installation/Configuration 1 22nd February 2006 14:36
Trouble with Webmail users rodriglm Installation/Configuration 5 29th December 2005 09:18
Webmail alias aethiolas HOWTO-Related Questions 2 21st November 2005 18:21


All times are GMT +2. The time now is 10:26.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.