问题原文
原帖链接 · Glenn Slaven · CC BY-SA 3.0
I have an apache2.2 server with mod_proxy and mod_headers installed. On a request running with a ProxyPass directive, none of the Header set directives work, ie the header's aren't set in the response.
However if I remove the ProxyPass directive the headers are set. Is there some configuration that disables setting headers when using mod_proxy?
已采纳解答
原帖链接 · aglassman · CC BY-SA 4.0
Despite the Apache mod_headers doc saying that it does not matter where the Header line goes, it apparently does. The only way I could get the header added was to put it in the same location scope as the proxy pass.
I initially had the proxy pass defined in the VirtualHost tag directly, but had to move it into the LocationMatch sub tag.
<LocationMatch "/myapp">
ProxyPass http://1.1.1.1:8080/myapp disablereuse=On
ProxyPassReverse http://1.1.1.1:8080/myapp
Header add X-UA-Compatible "IE=7"
</LocationMatch>
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
