Ubuntu 上的 apache mod_proxy_html ProxyHTMLEnable 不起作用
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2444594/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
apache mod_proxy_html on Ubuntu ProxyHTMLEnable not working
提问by intargc
I'm trying to use mod_proxy_html on Ubuntu which I installed from apt-get. The module is loading properly and all ProxyHTML* directives work except for the one that matters the most. When I do "ProxyHTMLEnable on" in my apache2.conf or vhost conf files, apache complains that it's an invalid directive and I must have misspelled it. Is anyone else having this issue on Ubuntu and what can be done to fix it?
我正在尝试在从 apt-get 安装的 Ubuntu 上使用 mod_proxy_html。该模块正在正确加载,所有 ProxyHTML* 指令都可以工作,但最重要的指令除外。当我在我的 apache2.conf 或 vhost conf 文件中执行“ProxyHTMLEnable on”时,apache 抱怨它是一个无效指令,我一定是拼错了它。有没有其他人在 Ubuntu 上遇到这个问题,可以做些什么来解决它?
回答by
Have you tried leaving out "ProxyHTMLEnable on" entirely? I think that directive is new and not in the version in Ubuntu.
您是否尝试过完全忽略“ProxyHTMLEnable on”?我认为该指令是新的,并且不在 Ubuntu 版本中。
Do put "SetOutputFilter proxy-html" in its place
将“SetOutputFilter proxy-html”放在它的位置
回答by Tap
While this isn't necessarily specific to the question, I figured I'd throw this out there for anyone else getting here from the Google super-highway.
虽然这不一定是特定于问题的,但我想我会把它扔给其他从谷歌高速公路到达这里的人。
I tried just removing the ProxyHTMLEnable Onand adding SetOuputFilter proxy-html, but still wasn't working for me. The "gotcha" in my case was the content mod_proxy_html was trying to process was compressed.
我尝试删除ProxyHTMLEnable On并添加SetOuputFilter proxy-html,但仍然不适合我。在我的情况下,“问题”是 mod_proxy_html 试图处理的内容被压缩。
Adding SetOutputFilter INFLATE;proxy-html;DEFLATEinstead of SetOuputFilter proxy-htmldid it for me. (will obviously lead to more processing being done)
添加SetOutputFilter INFLATE;proxy-html;DEFLATE而不是SetOuputFilter proxy-html为我做。(显然会导致进行更多的处理)
This site explains it much better than I can: http://wiki.uniformserver.com/index.php/Reverse_Proxy_Server_2:_mod_proxy_html_2#Cause_and_Solution_3
这个网站比我能解释的更好:http: //wiki.uniformserver.com/index.php/Reverse_Proxy_Server_2: _mod_proxy_html_2#Cause_and_Solution_3

