注:
如果不加LoadModule proxy_http_module modules/mod_proxy.so,则浏览器页面打不开,页面显示
Forbidden
You don't have permission to access / on this server.
日志acess_log里面显示
192.168.0.28 - - [03/Jun/2009:16:16:27 +0800] "GET /?sessionId=4293567494722637330&rand=1244014624405&CONTEXT=0&page=com.othe
r.AjaxWhoWhatUpdate&xrand=1244016991554&wwRandId=1244014624405&wwBugId=2341&wwType=View HTTP/1.1" 403 315
或者
192.168.0.28 - - [03/Jun/2009:17:10:32 +0800] "GET / HTTP/1.1" 403 315
即403错误
日志error_log里面显示
[Wed Jun 03 17:08:46 2009] [warn] proxy: No protocol handler was valid for the URL /. If you are using a DSO version of mod_p
roxy, make sure the proxy submodules are included in the configuration using LoadModule.
本文出自 “yahoon的小屋” 博客,请务必保留此出处http://yahoon.blog.51cto.com/13184/162922
Apache反向代理配置方法如下
1、打开Apache的配置文件httpd.conf,找到下面的内容,将注释去掉,以启动代理模块
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
2、在配置文件httpd.conf最后添加
<IfModule mod_proxy.c>
ProxyRequests off
<Proxy /ps>
Order deny,allow
Allow from all
</Proxy>
ProxyPass /ps http://127.0.0.1:8080/projects
ProxyPassReverse /ps http://127.0.0.1:8080/projects
</IfModule>