我有一个使用 mod_proxy_ajp 将请求转发到 tomcat 服务器的 apache 设置。当请求到达时,它似乎失去了我的价值观。当请求直接发送到 tomcat 时,这工作正常,所以看起来 apache 正在剥离这些值。
任何帮助,将不胜感激。
浏览器:
MyCookie
value=ID=12345
Path=/
Domain=mydomain.org
Tomcat:
MyCookie
值=ID
路径=null
域=null
配置:
LoadModule proxy_module /usr/lib64/apache2-prefork/mod_proxy.so
LoadModule proxy_ajp_module /usr/lib64/apache2-prefork/mod_proxy_ajp.so
LoadModule rewrite_module /usr/lib64/apache2-prefork/mod_rewrite.so
<VirtualHost *:80>
ServerName server.domain.org
ServerAlias server.domain.org
Header set Access-Control-Allow-Origin "*"
Header set Access-Control-Allow-Methods "GET,POST,OPTIONS"
Header set Access-Control-Allow-Headers "content-type,x-requested-with"
RewriteEngine on
RewriteRule ^/$ /vaultWeb [PT]
<Directory />
Options All
Order Deny,Allow
Allow from all
</Directory>
ProxyRequests off
<Proxy *>
Order Deny,Allow
Allow from all
</Proxy>
<Location />
Order Deny,Allow
Allow from all
</Location>
ProxyPass /app1 ajp://localhost:18009/app1
ProxyPass /app2 ajp://localhost:8009/app2
ProxyPass /app3 ajp://localhost:8009/app3
ProxyPass /app4 ajp://localhost:18009/app4
ProxyPass /app5 ajp://localhost:9008/app5
</VirtualHost>