在Apache里配一个<VirtualHost *:6049>,然后针对这个6049设置http。
一、apache安装
下载并安装apache_2.2.9-win32-x86-openssl-0.9.8h-r2.msi(见附件),找到apache安装目录(C:\Program Files (x86)\Apache Software Foundation\Apache2.2)
二、apache+http
需要修改httpd.conf 、httpd-vhosts.conf两个文件
1、修改httpd.conf 取消以下注释,使apache启动的时侯调用http相应的配置:
LoadModule proxy_module modules/mod_proxy.soLoadModule proxy_http_module modules/mod_proxy_http.soInclude conf/extra/httpd-vhosts.conf
2、根据需要修改httpd.conf中端口号默认为“80”,这里将80修改为“6049”
3、修改httpd-vhosts.conf添加6049对应的反向代理
NameVirtualHost *:6049ServerAdmin webmaster@dummy-host.epms.cwp DocumentRoot "C:/Program Files (x86)/Apache Software Foundation/Apache2.2/docs/" ServerName dummy-host.epms.cwp ServerAlias www.dummy-host.epms.cwp ErrorLog "logs/dummy-host.epms.cwp-error.log" CustomLog "logs/dummy-host.epms.cwp-access.log" common ProxyPass / http://................... ProxyPassReverse / http://...............
4、访问http://........:6049即可访问对应的页面