Apache proxy files work only with the first application

freezes when configuring apache as a proxy for applications running on tomcat on different computers. Everything seems to be working on the first application - WebApp1. But in the left pane, ProxyPassReverseCookiePath does not work. ProxyPassReverseCookiePath only works with the first application. When other applications connect to the url, jsessionid is added. What did I miss and how to fix it on WebApp2 and WebApp3? Thanks

HTTPD-vhosts.con:

NameVirtualHost *:80
<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    ProxyRequests off
    ProxyPreserveHost on

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

    ProxyPass /WebApp1/ ajp://192.168.1.98:8009/WebApp1/
    ProxyPassReverse /WebApp1/ ajp://192.168.1.98:8009/WebApp1/
    ProxyPassReverse /WebApp1/ http://192.168.1.98:8080/WebApp1/
    ProxyPassReverseCookiePath /WebApp1 /WebApp1/

    ProxyPass /WebApp2/ ajp://192.168.1.98:8009/WebApp2/
    ProxyPassReverse /WebApp2/ ajp://192.168.1.98:8009/WebApp2/
    ProxyPassReverse /WebApp2/ http://192.168.1.98:8080/WebApp2/
    ProxyPassReverseCookiePath /WebApp2 /WebApp2/

    ProxyPass /WebApp3/ ajp://192.168.1.98:8009/WebApp3/
    ProxyPassReverse /WebApp3/ ajp://192.168.1.98:8009/WebApp3/
    ProxyPassReverse /WebApp3/ http://192.168.1.98:8080/WebApp3/
    ProxyPassReverseCookiePath /WebApp3 /WebApp3/
</VirtualHost>
+1
source share
2 answers

Solved by going to the cookie path location directory:

ProxyPassReverseCookiePath /WebApp1/ http://192.168.1.98:8080/WebApp1/
+2
source

ajp , URL- -. ProxyPassReverse ProxyPassReverseCookiePath , .

, ProxyPassReverseCookiePath path cookie, -. , , -, , , Apache, - cookie.

, , , , /WebApp1 /WebApp1/, cookie /WebApp1//, . ( , Apache .) , , , , Apache , . ( , Apache).

+1

Source: https://habr.com/ru/post/1525399/


All Articles