You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Chirouze Olivier <ol...@volvo.com> on 2007/02/07 16:07:01 UTC

[users@httpd] Proxy & virtual host information [was: Status page: reading state]

Hi

This is the following of an existing thread I originaly posted, but I
have more details. I will describe the problem more precisely, hopping
this time, someone will give some help ;-)

Let say you have a very complicated page (or just a buggy app :-)
published on an app server (on local network).

You access the app server through Apache running as a reverse proxy,
using a virtual host.

Here's how my test config looks like:

------------------------------------------------------------------------
-------
<VirtualHost ip:80>
ServerName      externalservername.com

RewriteEngine   on

RewriteRule     ^/(.*)$ http://internalappserver/veryslowpage

ProxyRequests   off

</VirtualHost>
------------------------------------------------------------------------
-------

With this configuration, a call to http://externalservername.com will
work as expected, as the request will be forwarded to
http://internalappserver/veryslowpage and you'll see a process with
"externalservername.com" as virtual host on the status page, handled in
less than a second (the connection becomes free as soon as it has been
forwarded to the app server).

The thing is, the request will be _redirected_ to
http://internalappserver/veryslowpage (the user sees
http://internalappserver/veryslowpage in his address bar), which is
something we don't want for a "proper" reverse proxy: we want the user
to see only the reverse proxy.

For that, you'll need to add the [P] flag at the end of the RewriteRule
line:
------------------------------------------------------------------------
-------
RewriteRule     ^/(.*)$ http://internalappserver/verybigdownload [P]
------------------------------------------------------------------------
-------

As far as I know that's what makes it being "proxied", hidding the
address of the actual app server.

As soon as you activate this, Apache will keep a connection open until
the app server has finished sending response. This seems perfectly
normal to me. What I don't understand is: why the hell is this
connection on state "..reading..", with no virtual host associated, all
this time (until the app server is done)?

This is not just something I'm wondering about, it something that makes
all modules working at the virtual host level become useless :-(

I'd love to find the "bug" and fix it myself... But I'd need someone to
point me to the right place...

Olivier

Olivier CHIROUZE
I&0 Infrastructure
Volvo Information Technology

---------------------------------------------------------------------
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