Apache ProxyPass and Sessions

前端 未结 2 1024
眼角桃花
眼角桃花 2021-01-17 21:33

So I\'m using Apache to proxy a specific folder to a Glassfish instance. The rules in my conf are:

ProxyPass /folder http://localhost:28083
ProxyPassReverse          


        
相关标签:
2条回答
  • 2021-01-17 22:04

    ProxyPassReverseCookiePath's 2nd parameter should just be a path, not a full URL. Apache can't properly fixup the path baked into the cookie w/ the current invalid usage.

    0 讨论(0)
  • 2021-01-17 22:16

    As covener already mentioned, the second parameter of ProxyPassReverseCookiePath should be a path. Be aware that the parameters are switched compared to the other directives, so in your case it would be:

    ProxyPassReverseCookiePath / /folder
    

    (Technically, this should not be necessary for it to work, as cookies from the path / are also available in /folder/, but it might cause them to interfere with the cookies of other web applications that you are running on the same domain.)

    In addition, you might want to transform the cookie domain as well (unless you access your application only through http://localhost/folder/):

    ProxyPassReverseCookieDomain localhost example.com
    

    example.com is the domain over which your web application is accessed.

    0 讨论(0)
提交回复
热议问题