首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 服务器 > Apache >

Apache跳转配备

2013-03-06 
Apache跳转配置VirtualHost *:8090ServerName 172.24.2.61ProxyPreserveHost OnProxyRequests OffProxyP

Apache跳转配置
<VirtualHost *:8090>ServerName 172.24.2.61ProxyPreserveHost OnProxyRequests OffProxyPass /projectName http://172.24.2.22:8091/projectNameProxyPassReverse /projectName http://172.24.2.22:8091/projectNameErrorLog logs/8090_logCustomLog logs/8090_log common</VirtualHost>

?

4、重启apache

?

(一).ProxyPass 指令
说明: 将一个远端服务器映射到本地服务器的URL空间中?
语法: ProxyPass [路径] !|url?
上下文: 服务器配置, 虚拟主机?
状态: Extension?
模块: mod_proxy?
指令对于您不想对某个子目录进行反向代理时很有用。比如说:
ProxyPass /mirror/foo/i !
ProxyPass /mirror/foo?
http://foo.com

将会代理除对/mirror/foo/i请求之外的所有对 foo.com 的/mirror/foo请求。
注意:顺序很重要,您需要把特例情况放在一般代理通过指令
当在配置段中使用时,第一个参数会被忽略而是采用由指令指定的本地目录。
如果您需要一个更加灵活的反向代理配置,请参见使用[P]标记的RewriteRule指令。

?

(二).ProxyPassReverse 指令
说明: 调整由反向代理服务器发送的HTTP回应头中的URL?
语法: ProxyPassReverse [路径] url?
上下文: 服务器配置, 虚拟主机?
状态: Extension?
模块: mod_proxy?
此指令使 Apache 调整HTTP重定向回应中Location, Content-Location和URI头里的URL。 HTTP redirect responses. This is essential when Apache is used as a reverse proxy to avoid by-passing the reverse proxy because of HTTP redirects on the backend servers which stay behind the reverse proxy.
路径是本地虚拟路径的名称。
url远端服务器的部分URL。与ProxyPass指令中的使用方法相同。

热点排行