Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Jetty and Apache Reverse Proxy (session problem)


Stefan,

can you record the HTTP requests into and out of the apache server.

Jetty should be sending a set-cookie in the HTTP response, so either apache is not passing that on, or the resulting cookie set by the browser is not being passed back in.

Actually, it is probably related to the context path, and jetty is probably setting a path on the cookie of /jettyapp, while the browser sees a path of /myapp.
Have a look in the defaultweb.xml how to set the cookie path for sessions.  Alternately, just make the context path the same.

cheers



On 14 November 2010 01:38, Stefan Mietke <canada_stefan@xxxxxxxx> wrote:
Hi List,

I have a problem while configuring the Apache Server as a Reverse Proxy using Jetty as a Servlet Container. Writing the httpd.cong is quite easy, and everything worked fine ... at the first moment. But I use Sessions for Login in my Java WebApp and the Apache isn't setting any cookie header, so the Jetty thinks, that every request is a new client and generates a new JSESSIONID.

Here is some code:

httpd.conf

ProxyRequests Off
ProxyVia On
ProxyPreserveHost On
SetOutputFilter proxy-html
ProxyHTMLExtended On

<Proxy *>
  Order deny,allow
  Allow from all
</Proxy>

ProxyPass /myapp http://localhost:8081/jettyapp
ProxyPassReverse /myapp http://localhost:8081/jettyapp
ProxyHTMLURLMap /myapp http://localhost:8081/jettyapp

I read the tutorial http://wiki.eclipse.org/Jetty/Tutorial/Apache but I don't want to use a balancer cause I only have one Jetty to use ...

Any suggestions?

Kind regards,
Stefan


_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jetty-users



Back to the top