我有一个HTML服务器http://pp000c29784409.usask.ca/ ,我想使用ProxyPass,ProxyPassReverse和RewriteRule从Apache 2.4服务器反向代理。
这个想法是通过univers.mysite.org/repo(这是Apache服务器)显示来自http://pp000c29784409.mysite.org/的所有html内容。
为此,我已经在http.conf中设置了这个
<IfModule mod_proxy.c> RewriteEngine on RewriteRule ^/(images|javascripts|stylesheets)(.*) /repo/$1$2 SSLProxyEngine on ProxyVia On ProxyPass /repo http://pp000c29784409.mysite.org/ ProxyPassReverse /repo http://pp000c29784409.mysite.org/ </IfModule>
这工作除了在页面上的graphics
IIS Windows服务器
</head> <body> <div id="container"> <a href="./reports"><img src="iis-85.png" alt="IIS" width="960" height="600" /></a> </div> </body> </html>
在上面的图像试图从pp000c29784409.mysite.org/iis-85.png
它应该是
pp000c29784409.mysite.org/repo/iis-85.png
这是我正在尝试使用重写,什么是正确的forms来做到这一点?
根据你所说的正确的proxypass指令会是这样的:
ProxyPass /repo/ http://pp000c29784409.mysite.org/repo/ ProxyPassReverse /repo/ http://pp000c29784409.mysite.org/repo/
注意:总是匹配尾部的斜线