在Apache配置反向代理及实现输出内容替换(4)
时间:2012-09-24 04:57来源:未知 作者:最模板 点击:次
httpd-proxy.conf 配置文件代码 IfModuleproxy_module IfModuleproxy_http_module # #ReverseProxy # ProxyRequestsOff Proxy* Orderdeny,allow Allowfromall /Proxy ProxyPass/http://www.demo.com/ ProxyPas
httpd-proxy.conf
- <IfModule proxy_module>
- <IfModule proxy_http_module>
-
- #
- # Reverse Proxy
- #
- ProxyRequests Off
- <Proxy *>
- Order deny,allow
- Allow from all
- </Proxy>
- ProxyPass / http://www.demo.com/
- ProxyPassReverse / http://www.demo.com/
-
-
- </IfModule>
- </IfModule>
http-filter.conf (该文件是我自己加的)
- ## mod_ext_filter directive to define a filter which
- ## replaces text in the response
- ##
- ExtFilterDefine fixtext mode=output intype=text/html cmd="/xampp-win32-1.7.4/apache/bin/sed.exe s/厦门/上海/g"
- ExtFilterDefine fixtext1 mode=output intype=text/html cmd="/xampp-win32-1.7.4/apache/bin/sed.exe s/地税/财政/g"
-
- <Location />
- # core directive to cause the fixtext filter to
- # be run on output
- SetOutputFilter fixtext;fixtext1
- </Location>
(责任编辑:最模板) |
------分隔线----------------------------