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 17:49:05 UTC
[users@httpd] RE: Proxy & virtual host information [was: Status page: reading state]
Hi Olivier,
Thanks for your VERY INTERESTING question :-)
Here's more:
I activated debug logging and it really seems when proxying the request,
nothing happens until the whole app server response is received by the
reverse proxy.
Here's the log when accessing a page that just waits 10 seconds. The
mod_proxy sees that we are working with this specific virtual host, but
not "the rest of apache"...
[Wed Feb 07 17:36:18 2007] [debug] proxy_http.c(67): proxy: HTTP:
canonicalising URL //internalappserver/veryslowpage
[Wed Feb 07 17:36:18 2007] [debug] mod_proxy.c(454): Trying to run
scheme_handler
[Wed Feb 07 17:36:18 2007] [debug] proxy_http.c(1697): proxy: HTTP:
serving URL http://internalappserver/veryslowpage
[Wed Feb 07 17:36:18 2007] [debug] proxy_http.c(186): proxy: HTTP
connecting http://internalappserver/veryslowpage to internalappserver:80
[Wed Feb 07 17:36:18 2007] [debug] proxy_util.c(1139): proxy: HTTP: fam
2 socket created to connect to internalappserver
[Wed Feb 07 17:36:18 2007] [debug] proxy_http.c(336): proxy: socket is
connected
[Wed Feb 07 17:36:18 2007] [debug] proxy_http.c(370): proxy: connection
complete to internalappserver:80 (internalappserver)
[Wed Feb 07 17:36:18 2007] [debug] proxy_http.c(1531): proxy: start body
send
[Wed Feb 07 17:36:28 2007] [debug] proxy_http.c(1591): proxy: end body
send
It's only after 10 seconds that the virtual host name appears in the
status page.
I'm starting to understand this is a normal behaviour of "handlers" (one
and then the other, then the next one...).
But I keep thinking something's wrong...
Or is it possible to change the order of handlers??
Olivier
> -----Original Message-----
> From: Chirouze Olivier
> Sent: 07 February 2007 16:07
> To: 'users@httpd.apache.org'
> Subject: 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