You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Mauri <la...@gmail.com> on 2010/04/23 18:30:48 UTC
Re: [users@httpd] KeepAlive settings for reverse proxy (was: Apache
module that enables ActiveX)
Jonas, many thanks for your efforts to help me. Honestly I did not
understand what's the problem.
The anomaly I noticed is that:
Scenario A: client --> webserver application
The ActiveX (TeeChart) works. Sessions between client and WAS 2 are always
fixed (seeing the program TCPView on Windows)
Scenario B: client --> proxy --> webserver application
ActiveX (TeeChart) does not work. Sessions are many more as explained in
previous mail.
What I want is a test for setting the proxy between the client -> proxy ->
application only persistent sessions.
To do this I made these settings are correct?
ProxyPreserveHost On
MaxKeepAliveRequests 0
KeepAliveTimeout 60
KeepAlive On
ProxyRequests off
ProxyPass / http://10.173.90.171/
ProxyHTMLURLMap http://10.173.90.171 /
ProxyPassReverse http://10.173.90.171/ keepalive=On
ProxyHTMLEnable On
ProxyHTMLURLMap / /
RequestHeader unset Accept-Encoding
2010/4/23 Jonas Eckerman <jo...@frukt.org>
> On 2010-04-23 16:00, Mauri wrote:
>
> many thanks jonas for your suggest. This is a part of my conf. Is it
>> correct?
>>
>
> I'm not clear on exactly what you want, so I'm guessing that you wan't
> keepalive *on* both from browser to proxy and from proxy to server. I'm also
> suspecting that you might have problems with connections between proxy and
> server dropping out.
>
> If this is not what you want, please correct my mistakes.
>
> And I still have no idea why you think this has anything to do with
> ActiveX.
>
>
> [...]
>> KeepAlive On
>>
>
> That allows keepalive for the connections from browser to proxy. My guess
> is that this is what you want.
>
>
> ProxyPassReverse http://10.173.90.171/
>>
>
> If you have problems with connections between proxy and server dropping
> out, you could try using changing this to:
>
> ProxyPassReverse http://10.173.90.171/ keepalive=On
>
>
> SetEnv proxy-nokeepalive 1
>>
>
> That turns of keepalive *off* for conections from proxy to server. My
> *guess* is that this is not what you want.
>
> If you have problems with keeping connections alive between proxy and
> server and the keepalive parameter to the proxypass directive didn't help,
> this might help though.
>
>
> /Jonas
> --
> Jonas Eckerman
> Fruktträdet & Förbundet Sveriges Dövblinda
> http://www.fsdb.org/
> http://www.frukt.org/
> http://whatever.frukt.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] KeepAlive settings for reverse proxy
Posted by Jonas Eckerman <jo...@frukt.org>.
On 2010-04-23 18:30, Mauri wrote:
> Jonas, many thanks for your efforts to help me. Honestly I did not
> understand what's the problem.
I think you need to read a tutorial or a book explaining how HTTP works.
You seem to be confusing sessions with connections.
> The anomaly I noticed is that:
> Scenario A: client --> webserver application
> The ActiveX (TeeChart) works. Sessions between client and WAS 2 are
> always fixed (seeing the program TCPView on Windows)
Since HTTP is not a connection oriented protocol (even though it is
normally used on top of TCP), sessions are independent from connections.
Sessions in HTTP are usually handled by cookies, but can also be handled
though query or post parameters.
I have absolutely no idea how your ActiveX thingy handles sessions.
> Scenario B: client --> proxy --> webserver application
> ActiveX (TeeChart) does not work. Sessions are many more as explained in
> previous mail.
Sessions and connections are two very different things. One session can
be kept across multiple TCP connections, and it is possible (protocol
wise) to have multple sessions during one TCP connection.
> What I want is a test for setting the proxy between the client -> proxy
> -> application only persistent sessions.
You do not need persistent connections to have persistent sessions.
If your application uses cookies for sessions, you should check what the
cookies looks like. Especially you should check what (if any) host the
cookies are issued for. A host mismatch may make the browser ignore them.
> To do this I made these settings are correct?
Not entirely. But it's hard to know since I don't know your setup or
your application. How doid it work when you tried it out on your test setup?
> ProxyPassReverse http://10.173.90.171/ keepalive=On
As written outside of a container, this makes no sense. The
ProxyPassReverse directive needs to know what to change how.
Also, this is the wrong place to add the keepalive option. Sorry about
that. See more below.
Inside a suitable location container and without the keepalive=on, the
statement seems correct.
If your backend puts something else instead of http://10.173.90.171 in
headers handled by ProxyPassReverse, you'd need to add a
ProxyPassReverse for that. Please read the documentation at:
<http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypassreverse>
This does not take care of cookie based sessions though. If your
application issues session cookies with hostnames/domains you need
ProxyPassReverseCookieDomain as well. Please read:
<http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypassreversecookiedomain>
> MaxKeepAliveRequests 0
> KeepAliveTimeout 60
> KeepAlive On
These settings configure wether or not to allow a browser to use
persistent TCP connections to your proxy. This does not mean that the
browser actually uses persistent connections, though most modern
browsers are likely to do so.
It does not configure sessions.
> ProxyPassReverse http://10.173.90.171/ keepalive=On
This is wrong, and I apoligize for that. It was my mistake. (Of course,
if you had actually followed my advice and link and read the
documentation, and had read the rest of my replies, that should have
been clear.)
It should have been:
ProxyPass / http://10.173.90.171/ keepalive=On
Please note that this keepalive option means that the proxy tries keep
persistent connections to the backend from dropping out by regularly
sending a keepalive request. This only makes a difference if the backend
allows persintent connections, the server tries to use them, but for
some reason they are sometimes dropped.
Regards
/Jonas
--
Jonas Eckerman
Fruktträdet & Förbundet Sveriges Dövblinda
http://www.fsdb.org/
http://www.frukt.org/
http://whatever.frukt.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