So far so good. The app does essentially what we want, hosts in Jetty under the context path /mysticpaste while offering it up on the root path via nginx and our users. Under this configuration you’ll see a slight problem however, in that the cookie path isn’t being properly set due to the proxy. In Apache we would just use ProxyPassReverseCookiePath, but this doesn’t appear to be an option in nginx anywhere I could find.

Next best thing, add a context-param to our web.xml and change the SessionPath that Jetty uses to be root instead of /mysticpaste.

org.mortbay.jetty.servlet.SessionPath/

All works as it did with Apache, and you get some nginx goodness mixed in.