Re: Fw: Apache2 Proxy and Domino Http Server Webmail Redirect

[email protected] Fri, 7 Jan 2005 12:21:20 -0600
Newsgroups gmane.comp.apache.mod-proxy
Message-ID <OF4585C3BF.53F0D9E5-ON86256F82.00649E37-86256F82.0064D453@weirwarman.com>
This is a multipart message in MIME format.
--=_alternative 0064D45086256F82_=
Content-Type: text/plain; charset="US-ASCII"
Content-Transfer-Encoding: quoted-printable

Hi,

I found out that the Domino Webmailredirect was at fault!
If anyone ever configures this solution, remember to use the "fixed" 
server setting instead of "dynamic", unless you have multiple servers with 
your proxy!
Talked to IBM Lotus Support and they helped out...phew.
Sorry for any wasted thoughts on this post...

Regards,

Scott Pichelman
Systems Administrator
Weir Slurry TM
North America
2701 S Stoughton Rd
Madison WI 53716  USA

T: +001 608 226 5615
F: +001 608 221 5807
M: +001 608 346 2784
E: [email protected]
W: http://weirslurry.com



[email protected] 
01/07/2005 10:12 AM
Please respond to
[email protected]


To
[email protected]
cc

Subject
Fw: Apache2 Proxy and Domino Http Server Webmail Redirect







Hi, 

I have been trying to get apache's modproxy(ProxyPass/Reverse) or even 
Modrewrite(RewriteCond/Rules) to work properly with Domino's 
WebmailRedirect.nsf file. 

Here is a Notes forum Post that hopefully explains the problem I am having 
in a nutshell: 
http://www-10.lotus.com/ldd/nd6forum.nsf/55c38d716d632d9b8525689b005ba1c0/17=
5d0edd0639071485256e5c000915d4=3FOpenDocument 


An explaination of my scenario below: 
All behind our Firewall - PIX515: 

        User(Internet) --> FW --> Apache2 WebServer(DMZ) --> Domino Http 
Server(COMM-different network) 

Starting from the backend first... 
The domino Web server is running on  port 81 and it's Home URL is "
/DominoWe.nsf". ( I believe this file has code or references the Webmail 
redirect db/code) 
We are using an IBM/Lotus supplied Domino Webmail "redirect" called 
"WebAccessRedirect650.ntf". 
If I use the Domino webserver address & port to access webmail it works 
fine. 
A single sign-on and we are redirected to our mail file without any 
problems.(The redirect takes the info given with username/pwd from 
names.nsf and any other files & directs the browser to the mail/*.nsf and 
loads up webmail interface/template) 

However, it's get's more complex as you know when we add Apache2 and its 
Reverse Proxy into the mix. 
I have tried using modrewrite w/ rewriterules and I get the same result. ( 
I tried your method and many others as well) 

RewriteEngine on 
RewriteLog "/var/log/httpd/rewrite.log" 
RewriteLogLevel 2 
RewriteCond %{REQUEST=5FURI} ^/ 
RewriteRule /(.*) http://203.57.228.7:81/$1 [P] 

And with a Pound Proxy added to the configuration, just these two Proxy 
directives worked for me! 

ProxyPass / http://203.57.228.7:81/ 
ProxyPassReverse / http://203.57.228.7:81/ 

The IP's listed above are of course the backend Domino Server. 
So, as you can see I didn't need modrewrite w/ rewriterules or 
rewriteconditions. 
The reason why is because a used another reverse proxy called "Pound". 
URL located below: 
http://www.apsis.ch/pound/ 

Then, for the above ProxyPass/Reverse directives I had the IP and port of 
the Pound Proxy and the Pound Proxy had the values of the Domino server: 

Apache: 
ProxyPass / https://webmail.weirslurry.com:8080/ 
ProxyPassReverse / http://webmail.weirslurry.com:8080/ 

Pound: 
ListenHTTPS 66.170.10.6,8080 
BackEnd 203.57.228.7,81,1 

Another rudimentary  diagram below: 
User(Internet) --> FW --> Apache Web Server/Proxy & Pound Proxy on same 
machine(DMZ - behind FW) --> Domino Http Server(COMM-another different 
network behind FW) 

So, somehow the addition of the Pound Proxy helped the Http 
headers/URI/URL's,etc understand teh DominoWEbmailRedirect in Domino Http 
so it would ask for our username and pwd "only" once and not reveal the IP 
address of the backend Domino server after serving up the webmail 
redirect!=3F! 
I know it sounds strange, but it works. 

In conclusion, my issue is with the Domino Redirect. 
If I could write  home-grown html, php, perl, jsp or =3F script/code with my=
 
own "redirect" I would think that apache would behave better=3F 
I found some examples of creating a work-around or a homegrown solution in 
the Notes forums where others have had the same problem but the 
explanations & answers weren't clear for me. 
Here are some examples: 
http://www-10.lotus.com/ldd/nd6forum.nsf/55c38d716d632d9b8525689b005ba1c0/87=
423972d7b74bca85256dec0059a08d=3FOpenDocument 

http://www.notestips.com/80256B3A007F2692/1/NAMO5RX3PX 
None of which seem to work for me!=3F! 

And this last one I would like to try but haven't given it any thought or 
know how to start w/ Lotus forms/agents... 
http://www-10.lotus.com/ldd/nd6forum.nsf/55c38d716d632d9b8525689b005ba1c0/df=
d6abb19c3c699585256e5f00334932=3FOpenDocument 


Should I be using vhosts and then add some rewriterules together in order 
to remedy my problem=3F 
  
If you are still confused I can allow you access the Domino Web server 
Webmail front-end I am working on from the net. 
I appreciate any feedback, thanks! 

Regards, 

Scott Pichelman
Systems Administrator
Weir Slurry TM
North America
2701 S Stoughton Rd
Madison WI 53716  USA

T: +001 608 226 5615
F: +001 608 221 5807
M: +001 608 346 2784
E: [email protected]
W: http://weirslurry.com 

The information contained in this email (including any attachments) is 
confidential, subject to copyright and for the use of the intended 
recipient only. If you are not the intended recipient please delete this 
message after notifying the sender. Unauthorised retention, alteration or 
distribution of this email is forbidden and may be actionable.

Attachments are opened at your own risk and you are advised to scan 
incoming email for viruses before opening any attached files. We give no 
guarantee that any communication is virus-free and accept no 
responsibility for virus contamination or other system loss or damage of 
any kind.



The information contained in this email (including any attachments) is confi=
dential, subject to copyright and for the use of the intended recipient only=
. If you are not the intended recipient please delete this message after not=
ifying the sender. Unauthorised retention, alteration or distribution of thi=
s email is forbidden and may be actionable.

Attachments are opened at your own risk and you are advised to scan incoming=
 email for viruses before opening any attached files. We give no guarantee t=
hat any communication is virus-free and accept no responsibility for virus c=
ontamination or other system loss or damage of any kind.

--=_alternative 0064D45086256F82_=
Content-Type: text/html; charset="US-ASCII"
Content-Transfer-Encoding: quoted-printable


<br><font size=3D2 face=3D"sans-serif">Hi,</font>
<br>
<br><font size=3D2 face=3D"sans-serif">I found out that the Domino Webmailre=
direct
was at fault!</font>
<br><font size=3D2 face=3D"sans-serif">If anyone ever configures this soluti=
on,
remember to use the &quot;fixed&quot; server setting instead of &quot;dynami=
c&quot;,
unless you have multiple servers with your proxy!</font>
<br><font size=3D2 face=3D"sans-serif">Talked to IBM Lotus Support and they
helped out...phew.</font>
<br><font size=3D2 face=3D"sans-serif">Sorry for any wasted thoughts on this=

post...</font>
<br>
<br><font size=3D2 face=3D"sans-serif">Regards,</font>
<br>
<br><font size=3D2 face=3D"sans-serif">Scott Pichelman<br>
Systems Administrator<br>
Weir Slurry TM<br>
North America<br>
2701 S Stoughton Rd<br>
Madison WI 53716 &nbsp;USA<br>
<br>
T: +001 608 226 5615<br>
F: +001 608 221 5807<br>
M: +001 608 346 2784<br>
E: [email protected]<br>
W: http://weirslurry.com</font>
<br>
<br>
<br>
<table width=3D100%>
<tr valign=3Dtop>
<td width=3D40%><font size=3D1 face=3D"sans-serif"><b>scott.pichelman@weirsl=
urry.com</b>
</font>
<p><font size=3D1 face=3D"sans-serif">01/07/2005 10:12 AM</font>
<table border>
<tr valign=3Dtop>
<td bgcolor=3Dwhite>
<div align=3Dcenter><font size=3D1 face=3D"sans-serif">Please respond to<br>=

[email protected]</font></div></table>
<br>
<td width=3D59%>
<table width=3D100%>
<tr valign=3Dtop>
<td>
<div align=3Dright><font size=3D1 face=3D"sans-serif">To</font></div>
<td><font size=3D1 face=3D"sans-serif">[email protected]</font>
<tr valign=3Dtop>
<td>
<div align=3Dright><font size=3D1 face=3D"sans-serif">cc</font></div>
<td>
<tr valign=3Dtop>
<td>
<div align=3Dright><font size=3D1 face=3D"sans-serif">Subject</font></div>
<td><font size=3D1 face=3D"sans-serif">Fw: Apache2 Proxy and Domino Http Ser=
ver
Webmail Redirect</font></table>
<br>
<table>
<tr valign=3Dtop>
<td>
<td></table>
<br></table>
<br>
<br>
<br><font size=3D2 face=3D"sans-serif"><br>
Hi,</font><font size=3D3> <br>
</font><font size=3D2 face=3D"sans-serif"><br>
I have been trying to get apache's modproxy(ProxyPass/Reverse) or even
Modrewrite(RewriteCond/Rules) to work properly with Domino's WebmailRedirect=
.nsf
file.</font><font size=3D3> <br>
</font><font size=3D2 face=3D"sans-serif"><br>
Here is a Notes forum Post that hopefully explains the problem I am having
in a nutshell:</font><font size=3D3> </font><font size=3D2 face=3D"sans-seri=
f"><br>
http://www-10.lotus.com/ldd/nd6forum.nsf/55c38d716d632d9b8525689b005ba1c0/17=
5d0edd0639071485256e5c000915d4=3FOpenDocument</font><font size=3D3>
<br>
</font><font size=3D2 face=3D"sans-serif"><br>
An explaination of my scenario below:</font><font size=3D3> </font><font siz=
e=3D2 face=3D"sans-serif"><br>
All behind our Firewall - PIX515:</font><font size=3D3> <br>
</font><font size=3D2 face=3D"sans-serif"><br>
 &nbsp; &nbsp; &nbsp; &nbsp;User(Internet) --&gt; FW --&gt; Apache2 WebServe=
r(DMZ)
--&gt; Domino Http Server(COMM-different network) </font><font size=3D3><br>=

</font><font size=3D2 face=3D"sans-serif"><br>
Starting from the backend first...</font><font size=3D3> </font><font size=3D=
2 face=3D"sans-serif"><br>
The domino Web server is running on &nbsp;port 81 and it's Home URL is
&quot;</font><font size=3D1 face=3D"sans-serif">/DominoWe.nsf</font><font si=
ze=3D2 face=3D"sans-serif">&quot;.
( I believe this file has code or references the Webmail redirect db/code)</=
font><font size=3D3>
</font><font size=3D2 face=3D"sans-serif"><br>
We are using an IBM/Lotus supplied Domino Webmail &quot;redirect&quot;
called &quot;WebAccessRedirect650.ntf&quot;.</font><font size=3D3> </font><f=
ont size=3D2 face=3D"sans-serif"><br>
If I use the Domino webserver address &amp; port to access webmail it works
fine.</font><font size=3D3> </font><font size=3D2 face=3D"sans-serif"><br>
A single sign-on and we are redirected to our mail file without any problems=
.(The
redirect takes the info given with username/pwd from names.nsf and any
other files &amp; directs the browser to the mail/*.nsf and loads up webmail=

interface/template)</font><font size=3D3> <br>
</font><font size=3D2 face=3D"sans-serif"><br>
However, it's get's more complex as you know when we add Apache2 and its
Reverse Proxy into the mix.</font><font size=3D3> </font><font size=3D2 face=
=3D"sans-serif"><br>
I have tried using modrewrite w/ rewriterules and I get the same result.
( I tried your method and many others as well)</font><font size=3D3> <br>
</font><font size=3D2 face=3D"sans-serif"><br>
RewriteEngine on</font><font size=3D3> </font><font size=3D2 face=3D"sans-se=
rif"><br>
RewriteLog &quot;/var/log/httpd/rewrite.log&quot;</font><font size=3D3> </fo=
nt><font size=3D2 face=3D"sans-serif"><br>
RewriteLogLevel 2</font><font size=3D3> </font><font size=3D2 face=3D"sans-s=
erif"><br>
RewriteCond %{REQUEST=5FURI} ^/</font><font size=3D3> </font><font size=3D2 =
face=3D"sans-serif"><br>
RewriteRule /(.*) http://203.57.228.7:81/$1 [P]</font><font size=3D3> <br>
</font><font size=3D2 face=3D"sans-serif"><br>
And with a Pound Proxy added to the configuration, just these two Proxy
directives worked for me!</font><font size=3D3> <br>
</font><font size=3D2 face=3D"sans-serif"><br>
ProxyPass / http://203.57.228.7:81/</font><font size=3D3> </font><font size=3D=
2 face=3D"sans-serif"><br>
ProxyPassReverse / http://203.57.228.7:81/</font><font size=3D3> <br>
</font><font size=3D2 face=3D"sans-serif"><br>
The IP's listed above are of course the backend Domino Server.</font><font s=
ize=3D3>
</font><font size=3D2 face=3D"sans-serif"><br>
So, as you can see I didn't need modrewrite w/ rewriterules or rewritecondit=
ions.</font><font size=3D3>
</font><font size=3D2 face=3D"sans-serif"><br>
The reason why is because a used another reverse proxy called &quot;Pound&qu=
ot;.</font><font size=3D3>
</font><font size=3D2 face=3D"sans-serif"><br>
URL located below:</font><font size=3D3> </font><font size=3D2 face=3D"sans-=
serif"><br>
http://www.apsis.ch/pound/</font><font size=3D3> <br>
</font><font size=3D2 face=3D"sans-serif"><br>
Then, for the above ProxyPass/Reverse directives I had the IP and port
of the Pound Proxy and the Pound Proxy had the values of the Domino server:<=
/font><font size=3D3>
<br>
</font><font size=3D2 face=3D"sans-serif"><br>
Apache:</font><font size=3D3> </font><font size=3D2 face=3D"sans-serif"><br>=

ProxyPass / https://webmail.weirslurry.com:8080/</font><font size=3D3> </fon=
t><font size=3D2 face=3D"sans-serif"><br>
ProxyPassReverse / http://webmail.weirslurry.com:8080/</font><font size=3D3>=

<br>
</font><font size=3D2 face=3D"sans-serif"><br>
Pound:</font><font size=3D3> </font><font size=3D2 face=3D"sans-serif"><br>
ListenHTTPS 66.170.10.6,8080</font><font size=3D3> </font><font size=3D2 fac=
e=3D"sans-serif"><br>
BackEnd 203.57.228.7,81,1</font><font size=3D3> <br>
</font><font size=3D2 face=3D"sans-serif"><br>
Another rudimentary &nbsp;diagram below:</font><font size=3D3> </font><font =
size=3D2 face=3D"sans-serif"><br>
User(Internet) --&gt; FW --&gt; Apache Web Server/Proxy &amp; Pound Proxy
on same machine(DMZ - behind FW) --&gt; Domino Http Server(COMM-another
different network behind FW) </font><font size=3D3><br>
</font><font size=3D2 face=3D"sans-serif"><br>
So, somehow the addition of the Pound Proxy helped the Http headers/URI/URL'=
s,etc
understand teh DominoWEbmailRedirect in Domino Http so it would ask for
our username and pwd &quot;only&quot; once and not reveal the IP address
of the backend Domino server after serving up the webmail redirect!=3F!</fon=
t><font size=3D3>
</font><font size=3D2 face=3D"sans-serif"><br>
I know it sounds strange, but it works.</font><font size=3D3> <br>
</font><font size=3D2 face=3D"sans-serif"><br>
In conclusion, my issue is with the Domino Redirect.</font><font size=3D3>
</font><font size=3D2 face=3D"sans-serif"><br>
If I could write &nbsp;home-grown html, php, perl, jsp or =3F script/code
with my own &quot;redirect&quot; I would think that apache would behave
better=3F</font><font size=3D3> </font><font size=3D2 face=3D"sans-serif"><b=
r>
I found some examples of creating a work-around or a homegrown solution
in the Notes forums where others have had the same problem but the explanati=
ons
&amp; answers weren't clear for me.</font><font size=3D3> </font><font size=3D=
2 face=3D"sans-serif"><br>
Here are some examples:</font><font size=3D3> </font><font size=3D2 face=3D"=
sans-serif"><br>
http://www-10.lotus.com/ldd/nd6forum.nsf/55c38d716d632d9b8525689b005ba1c0/87=
423972d7b74bca85256dec0059a08d=3FOpenDocument</font><font size=3D3>
</font><font size=3D2 face=3D"sans-serif"><br>
http://www.notestips.com/80256B3A007F2692/1/NAMO5RX3PX</font><font size=3D3>=

</font><font size=3D2 face=3D"sans-serif"><br>
None of which seem to work for me!=3F!</font><font size=3D3> <br>
</font><font size=3D2 face=3D"sans-serif"><br>
And this last one I would like to try but haven't given it any thought
or know how to start w/ Lotus forms/agents...</font><font size=3D3> </font><=
font size=3D2 face=3D"sans-serif"><br>
http://www-10.lotus.com/ldd/nd6forum.nsf/55c38d716d632d9b8525689b005ba1c0/df=
d6abb19c3c699585256e5f00334932=3FOpenDocument</font><font size=3D3>
<br>
</font><font size=3D2 face=3D"sans-serif"><br>
Should I be using vhosts and then add some rewriterules together in order
to remedy my problem=3F</font><font size=3D3> </font><font size=3D2 face=3D"=
sans-serif"><br>
 </font><font size=3D3>&nbsp;</font><font size=3D2 face=3D"sans-serif"><br>
If you are still confused I can allow you access the Domino Web server
Webmail front-end I am working on from the net.</font><font size=3D3> </font=
><font size=3D2 face=3D"sans-serif"><br>
I appreciate any feedback, thanks!</font><font size=3D3> <br>
</font><font size=3D2 face=3D"sans-serif"><br>
Regards,</font><font size=3D3> <br>
</font><font size=3D2 face=3D"sans-serif"><br>
Scott Pichelman<br>
Systems Administrator<br>
Weir Slurry TM<br>
North America<br>
2701 S Stoughton Rd<br>
Madison WI 53716 &nbsp;USA<br>
<br>
T: +001 608 226 5615<br>
F: +001 608 221 5807<br>
M: +001 608 346 2784<br>
E: [email protected]<br>
W: http://weirslurry.com</font><font size=3D3> <br>
<br>
The information contained in this email (including any attachments) is
confidential, subject to copyright and for the use of the intended recipient=

only. If you are not the intended recipient please delete this message
after notifying the sender. Unauthorised retention, alteration or distributi=
on
of this email is forbidden and may be actionable.<br>
<br>
Attachments are opened at your own risk and you are advised to scan incoming=

email for viruses before opening any attached files. We give no guarantee
that any communication is virus-free and accept no responsibility for virus
contamination or other system loss or damage of any kind.</font>
<br>
<font face=3D"Helv" size=3D3 color=3D#000000 ></font><br><font face=3D"Helv"=
 size=3D3 color=3D#000000 ></font><br><font face=3D"Helv" size=3D3 color=3D#=
000000 >The information contained in this email (including any attachments) =
is confidential, subject to copyright and for the use of the intended recipi=
ent only. If you are not the intended recipient please delete this message a=
fter notifying the sender. Unauthorised retention, alteration or distributio=
n of this email is forbidden and may be actionable.</font><br><font face=3D"=
Helv" size=3D3 color=3D#000000 ></font><br><font face=3D"Helv" size=3D3 colo=
r=3D#000000 >Attachments are opened at your own risk and you are advised to =
scan incoming email for viruses before opening any attached files. We give n=
o guarantee that any communication is virus-free and accept no responsibilit=
y for virus contamination or other system loss or damage of any kind.</font>=
<br>
--=_alternative 0064D45086256F82_=--