httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tapas Mishra <>
Subject Re: [users@httpd] 2 reverse proxy to serve an application
Date Fri, 16 Jul 2010 16:02:28 GMT

request from internet comes at A it forwards that to B and then B
 checks if it has to send that request to C or it can serve that from B itself.

I am posting the configurations.

these sites above are having domain names which have been registered.

Any request to any of them i.e. or

Comes at A

Following is vhost configuration at A

<VirtualHost *:80>

	ServerAdmin webmaster@localhost
	ProxyRequests off
        <Proxy *>
        Order deny,allow
        Allow from all

	ProxyPreserveHost On

	ProxyPass /application http://nirvana/
	ProxyPassReverse /application http://nirvana/

        ProxyPass / http://server2
        ProxyPassReverse / http://server2


Where server2 is B in above diagram.
and /application is forwarded to B which in turn forward to C.
In above configuration nirvana and server2 are both pointing to same server B.

Following is configuration of Server B

for a request that comes with a server name for nirvana

<VirtualHost *:80>
        ServerAdmin webmaster@localhost
        ServerName nirvana

        ProxyRequests Off

         <Proxy *>
        Order deny,allow
        Allow from all

        ProxyPreserveHost On
        ProxyPass / http://papaserver:9090/portal
        ProxyPassReverse / http://papaserver:9090/portal

Where papaserver is Server C which is a tomcat instance.Not apache and
on C I can access it by


Server B is serving a request which comes for a
ServerName nirvana and also

A request that comes for nirvana that has to be forwarded to C such that

on internet any one if types

he can see the same content which I see as
http://localhost:9090/portal on physically opening a browser at C.

My problem is if a request originally is coming for
and I have kept ProxyPreserveHost On then orginial hostname requested
is preserved in this process which is
but for a request for
I need to proxy it to Server B so that Server B can respond with a
different hostname than

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message