You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Vanga <Pi...@vdh.virginia.gov> on 2005/04/12 17:10:04 UTC

[users@httpd] Proxy server set-up problem

I have three servers, an application server, an authentication server
and apache 2 server which should act as reverse proxy.
When a resource on app server is accessed, the app server calls the auth 
server
to authenticate. I am trying to configure a proxy server so that users 
access the
application and authetication urls through the proxy without ever seeing 
the
urls of the backend servers (app server and auth server).
I used
ProxyPass and
ProxyPassReverse directives as shown below.


ProxyPass     /application1/    http://appserver.com:7777/application1/
ProxyPassReverse     /application1/    
http://appserver.com:7777/application1/

ProxyPass     /auth/    http://authserver.com:7777/auth/
ProxyPassReverse /auth/    http://authserver.com:7777/auth/


When I access https://proxyserver.com:4444/application1/display.do
I am getting redirected to
http://appserver.com:7777/application1/display.do which in turn is 
invoking authserver
http://authserver.com:7777/auth/auth.jsp

However, I am gaining access to authserver and appserver directly. 
ProxyPassReverse do not
seem to work. How do I go about this? Your solution is greatly appreciated.

Thanks

Vanga


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Proxy server set-up problem

Posted by Joshua Slive <js...@gmail.com>.
On Apr 12, 2005 3:00 PM, Vanga <Pi...@vdh.virginia.gov> wrote: 
> I am not using JavaScript at all.  It is a vanilla struts app. I am
> suspecting that appserver is redirecting to authserver.
> But I do not know how proxy is getting bypassed. Come to think of it,
> probably I should take your cue
> and run the browser in debug/trace mode and dump all the info. and see
> what is happening between browser and web server.
> I do not know how I can do this with Internet Explorer. Do you know of
> any browser that can do this?

I would ordinarily use a simple network sniffer to dump all the
traffic.  Or, if the requests are simple enough and don't involve a
bunch of cookies, just construct requests by hand using telnet.

But you could also use mod_dumpio on the proxy:
http://httpd.apache.org/docs-2.0/mod/mod_dumpio.html

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Proxy server set-up problem

Posted by Vanga <Pi...@vdh.virginia.gov>.
Vanga wrote:

> Jeff White wrote:
>
>>
>> From: "Vanga"
>>
>>> Come to think of it, probably I should take your cue and run the 
>>> browser in debug/trace mode and dump all the info. and see what is 
>>> happening between browser and web server. I do not know how I can do 
>>> this with Internet Explorer. 
>>
>>
>>
>> A _must_ read for _all_ OS web server admins
>> (since Microsoft's Windows
>> Shell browser, Internet Explorer,
>> is the most used on the Internet)!
>>
>> A "how to" use Microsoft's free Fiddler debugger (in Internet 
>> Explorer) to see Internet and Internet Explorer HTTP actions.
>>
>> <quote>
>>
>> Snip
>>
>> I fired up my trusty HTTP
>> debugger, Microsoft Fiddler.
>> Some developers in the
>> audience might be scratching
>> their heads-- I've got the
>> full source for IE on my
>> computer, so why start by
>> looking at the traffic?
>>
>> Simple-it's usually the
>> clearest way to see what's
>> really going on.  HTTP is
>> beautiful that way- if you
>> can see both the traffic of
>> a working scenario and the
>> traffic from a broken scenario,
>> you can resolve most problems
>> of this nature.
>>
>> </quote>
>>
>> A HTTP Detective Story by Eric Lawrence
>> http://blogs.msdn.com/ie/archive/2005/03/12/394526.aspx
>>
>> Jeff
>>
>
> I just installed Fiddler and looks great. I will post the results 
> tomorrow.
>
> Thanks
>
> Vanga
>
It turns out to be a myriad of redirects and embedded links (pointing to 
the backend servers) causing the ProxyPass directives
to fail. I fixed all that and proxy  is working seamlessly. Thanks 
Joshua for pointing  out  the redirect problem.
Jeff, Microsoft  Fiddler helped me a lot.

Many Thanks

Vanga

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Proxy server set-up problem

Posted by Vanga <Pi...@vdh.virginia.gov>.
Jeff White wrote:

>
> From: "Vanga"
>
>> Come to think of it, probably I should take your cue and run the 
>> browser in debug/trace mode and dump all the info. and see what is 
>> happening between browser and web server. I do not know how I can do 
>> this with Internet Explorer. 
>
>
> A _must_ read for _all_ OS web server admins
> (since Microsoft's Windows
> Shell browser, Internet Explorer,
> is the most used on the Internet)!
>
> A "how to" use Microsoft's free Fiddler debugger (in Internet 
> Explorer) to see Internet and Internet Explorer HTTP actions.
>
> <quote>
>
> Snip
>
> I fired up my trusty HTTP
> debugger, Microsoft Fiddler.
> Some developers in the
> audience might be scratching
> their heads-- I've got the
> full source for IE on my
> computer, so why start by
> looking at the traffic?
>
> Simple-it's usually the
> clearest way to see what's
> really going on.  HTTP is
> beautiful that way- if you
> can see both the traffic of
> a working scenario and the
> traffic from a broken scenario,
> you can resolve most problems
> of this nature.
>
> </quote>
>
> A HTTP Detective Story by Eric Lawrence
> http://blogs.msdn.com/ie/archive/2005/03/12/394526.aspx
>
> Jeff
>

I just installed Fiddler and looks great. I will post the results tomorrow.

Thanks

Vanga

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Proxy server set-up problem

Posted by Jeff White <jl...@earthlink.net>.
From: "Vanga" 

> Come to think of it, probably I should 
> take your cue and run the browser in 
> debug/trace mode and dump all the info. 
> and see what is happening between 
> browser and web server. I do not know 
> how I can do this with Internet Explorer. 

A _must_ read for _all_ 
OS web server admins
(since Microsoft's Windows
Shell browser, Internet Explorer,
is the most used on the Internet)!

A "how to" use Microsoft's free 
Fiddler debugger (in Internet 
Explorer) to see Internet and 
Internet Explorer HTTP actions.

<quote>

Snip

I fired up my trusty HTTP
debugger, Microsoft Fiddler.
Some developers in the
audience might be scratching
their heads-- I've got the
full source for IE on my
computer, so why start by
looking at the traffic?

Simple-it's usually the
clearest way to see what's
really going on.  HTTP is
beautiful that way- if you
can see both the traffic of
a working scenario and the
traffic from a broken scenario,
you can resolve most problems
of this nature.

</quote>

A HTTP Detective Story by Eric Lawrence
http://blogs.msdn.com/ie/archive/2005/03/12/394526.aspx

Jeff




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Proxy server set-up problem

Posted by Vanga <Pi...@vdh.virginia.gov>.
Joshua Slive wrote:

>On Apr 12, 2005 1:23 PM, Vanga <Pi...@vdh.virginia.gov> wrote:
>  
>
>>This is a J2EE application. Normally the jsp pages, servlets or EJBs are
>>secured by declaring security constraints.
>>display.do is one of them. The auth server is a single sign-on server
>>(which is also a J2EE app server with an apache 
>>    
>>
>[......]
>
>I understand all that.
>
>But you say that the browser eventually bypasses the proxy and goes
>directly to the back-end.  Exactly what is the trigger for the browser
>to do that?  Is it following a link that references the backend
>server?  Is there some funky javascript?  Is a redirect being sent
>pointing at the back-end server?  If so, what exactly does the
>redirect look like.
>
>Joshua.
>

I am not using JavaScript at all.  It is a vanilla struts app. I am 
suspecting that appserver is redirecting to authserver.
But I do not know how proxy is getting bypassed. Come to think of it, 
probably I should take your cue
and run the browser in debug/trace mode and dump all the info. and see 
what is happening between browser and web server.
I do not know how I can do this with Internet Explorer. Do you know of 
any browser that can do this?

Thanks

Vanga

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Proxy server set-up problem

Posted by Joshua Slive <js...@gmail.com>.
On Apr 12, 2005 1:23 PM, Vanga <Pi...@vdh.virginia.gov> wrote:
> This is a J2EE application. Normally the jsp pages, servlets or EJBs are
> secured by declaring security constraints.
> display.do is one of them. The auth server is a single sign-on server
> (which is also a J2EE app server with an apache 
[......]

I understand all that.

But you say that the browser eventually bypasses the proxy and goes
directly to the back-end.  Exactly what is the trigger for the browser
to do that?  Is it following a link that references the backend
server?  Is there some funky javascript?  Is a redirect being sent
pointing at the back-end server?  If so, what exactly does the
redirect look like.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Proxy server set-up problem

Posted by Vanga <Pi...@vdh.virginia.gov>.
This is a J2EE application. Normally the jsp pages, servlets or EJBs are 
secured by declaring security constraints.
display.do is one of them. The auth server is a single sign-on server 
(which is also a J2EE app server with an apache
instance fronting the app server). The application server is accessed 
through a web
server (apache 2 and this is different from proxy server. This J2EE 
container and web server are stringed together through
AJP protocol).   There is a  custom single sign-on apache module 
(mod_osso from Oracle)  that is running inside this
(app server) apache instance. This module uses a config file that has 
authserver url and I can change this if required. When a user requests
a secure resource like display.do, the control is passed to the 
authserver. Once authenticated, the control is passed back to the
appserver. The control passes to authserver during logout too. All this 
is happening. The first proxy pass is also happening and
then  proxy server disappears.  I think this is what's happening.

       _______________________________
      |                                                             |
    (5)                                                           v
User (1)----> Proxy Server (2)-----> App Server (3) -----> Auth Server
       ^                                                                 
                            (4)
       |                                                                
                                |                                      
                                                     
       |________________________________________________|

Proxy Server :         Apache 2 web server

App Server   :          Apache 2 web server<----AJP--------> J2EE 
container (Oracle OC4J)

Auth Server  :          Apache 2 web server<----AJP--------> J2EE 
container (Oracle OC4J)<------------> LDAP

Thanks

Vanga

Joshua Slive wrote:

>On Apr 12, 2005 11:10 AM, Vanga <Pi...@vdh.virginia.gov> wrote:
>  
>
>>When I access https://proxyserver.com:4444/application1/display.do
>>I am getting redirected to
>>http://appserver.com:7777/application1/display.do
>>    
>>
>
>Exactly how are you getting redirected?  What is display.do doing that
>is causing the redirect?
>
>Joshua.
>
>---------------------------------------------------------------------
>The official User-To-User support forum of the Apache HTTP Server Project.
>See <URL:http://httpd.apache.org/userslist.html> for more info.
>To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
>For additional commands, e-mail: users-help@httpd.apache.org
>
>  
>


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Proxy server set-up problem

Posted by Joshua Slive <js...@gmail.com>.
On Apr 12, 2005 11:10 AM, Vanga <Pi...@vdh.virginia.gov> wrote:
> When I access https://proxyserver.com:4444/application1/display.do
> I am getting redirected to
> http://appserver.com:7777/application1/display.do

Exactly how are you getting redirected?  What is display.do doing that
is causing the redirect?

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org