HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=16)
-   -   Redirect question {SERVERNAME} for webmail (http://www.howtoforge.com/forums/showthread.php?t=9630)

Herbert 7th January 2007 14:01

Redirect question {SERVERNAME} for webmail
 
In /root/ispconfig/isp/conf/vhost.conf.master i put this:
Redirect /webmail "https://{SERVERNAME}:81/webmail"

The problem is i get in my vhost.conf
Redirect /webmail "https://domainname.tld:80:81/webmail"

How can i get: Redirect /webmail "https://domainname.tld:81/webmail"

I don't know all the vrariables from ISPConfig, i try everything but no result.

martinfst 7th January 2007 15:15

You're editing the wrong configuration file. You should redirect your main web server to the ISPConfig server. I'm working on something similar, but still struggling with the rewrite rules, as I have a more complex setup. I require several different rewite rules, and currently they interfere.

But if someone has a good suggestion ......:rolleyes:

Herbert 7th January 2007 18:42

Ok, but i need it also for more than 50 differend domains, a redirect to the webmail for one domain is verry simple.
Every virtualhost must have a own rewrite rule or redirect.

Clogboy 8th January 2007 01:00

Why don't you put:

Redirect /webmail "https://domainname.tld:81/webmail"

in /etc/apache2/apache2.conf? That way one entry will work for all domains.

martinfst 8th January 2007 09:12

Redirect is, as is says, a redirect. It's not a proxy. It means, you need to be able to access port 81 on your client, which may well be blocked in a large corporate network..
Sometimes Internet access is restricted on such corporate networks and you want to access your webmail over a regular port 80, which is normally not closed down. Hence the reason to use rewrite/proxy and no redirect. This post still does not answer the OP :(

till 8th January 2007 10:02

To the original post from Herbert:

There is no such variable without the part appended. If you need this variable, you will have to create your own and add it to the make_vhost function in the file /root/ispconfig/scripts/lib/config.lib.php

Herbert 10th January 2007 00:27

Quote:

Originally Posted by till
To the original post from Herbert:

There is no such variable without the part appended. If you need this variable, you will have to create your own and add it to the make_vhost function in the file /root/ispconfig/scripts/lib/config.lib.php

Ok thanks, i have done..

// Variablen zuweisen
$mod->tpl->assign( array( SERVERNAME => $servername.$web_port,
IP => $web["web_ip"].$web_port,
SERVERNAME1 => $servername,
DOCUMENTROOT => $document_root,
SERVERALIAS => $serveralias,

I get with {SERVERNAME1} the domainname without :81
In the file vhost.conf.master i put:
Redirect /webmail "https://{SERVERNAME1}:81/webmail"
Its works..
But a redirect is not good, i need i Rewrite Rule
The rewrite rule must working from http to https and nothing works.

martinfst 10th January 2007 11:05

Quote:

Originally Posted by Herbert
But a redirect is not good, i need i Rewrite Rule
The rewrite rule must working from http to https and nothing works.

To rewrite http to https appears to be a bad idea. I have the same route investigated yesterday, but it has lead me nowhere. Also https --> https rewrite seems to be a bad idea according to several hits I got in Google. It may lead to middleman attacks. So I have decided to run ISPConfig on a dedicated IP and modify it to run on port 80. That will also run Squirrelmail/phpMyAdmin on port 80. But remember it is SSL over port 80 :).
ISPConfig will use the other IP addresses on my server. There's a thread in these forums somewhere, but it seems I'm unable to track that now.

martinfst 10th January 2007 11:11

Quote:

Originally Posted by martinfst
There's a thread in these forums somewhere, but it seems I'm unable to track that now.

A good suggestion is http://www.howtoforge.com/forums/showthread.php?t=157

richjam000 11th January 2007 01:13

I've had some success using http proxy stuff.

ie: say this is my URL for ispconfig: https://www.fred.com:81
I then setup a new SSL vhost ( https://www.bill.com) containing this:
SSLProxyEngine On
ProxyPreserveHost On
ProxyPass /ispconfig https://www.fred.com:81/
ProxyPassReverse /ispconfig https://www.fred.com:81/
ProxyPass /design https://www.fred.com:81/design/
ProxyPassReverse /design https://www.fred.com:81/design/
ProxyPass /squirrelmail https://www.fred.com:81/squirrelmail/
ProxyPassReverse /squirrelmail https://www.fred.com:81/squirrelmail/

Not really sure what Im doing ! - just copying something I did when setting
up ntop.

With the above set-up ispconfig seems to work just fine - ie: over port 80,
proxied to port 81. - via https://www.bill.com/ispconfig/

However the squirrelmail doesnt quite work - once I've logged in to
squirrelmail ( via https://www.bill.com/squirrelmail. ), I see my mail OK but
the URL , annoyingly , changes to :
https://www.bill.net:81/squirrelmail//src/webmail.php
ie: seems to go back to port 81.

Bit stuck now - maybe someone can take this forward ?


All times are GMT +2. The time now is 02:23.

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