Apache 2.2 配置反向代理

安装就不说了

1.找到Apache2.2\conf目录下的httpd.conf文件,将

#打开默认关闭的代理服务start
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule proxy_http_module modules/mod_proxy_http.so
#打开默认关闭的代理服务end
#LoadModule rewrite_module modules/mod_rewrite.so
LoadModule setenvif_module modules/mod_setenvif.so


2.httpd.conf文件后添加如下代码:

# Virtual hosts 打开虚拟主机的配置
#Include conf/extra/httpd-vhosts.conf
NameVirtualHost *:80

	ProxyPreserveHost On
	ServerAdmin [email protected]
	ServerName 192.168.4.103
	DocumentRoot C:\server\letsun
	DirectoryIndex homepage.htm index.jsp login.htm
	ProxyPass /trace/upload/ !
	ProxyPass /manage/upload/ !
	ProxyPass / http://127.0.0.1:8080/
	ProxyPassReverse / http://127.0.0.1:8080/

  
    Options Indexes FollowSymLinks
    AllowOverride None   
    Order allow,deny
    Allow from all




你可能感兴趣的:(Apache,2.2配置反向代理)