0
我已经将大部分PHP网站复制到我的本地计算机进行调试和开发。原始远程网站上有大量图像无法传输。同样的图像是由同一服务器上的两个不同的域名服务,所以我想在/etc/hosts
通过映射first_domain.com
去127.0.0.1
和配置Apache(最新,最好的版本)拉/images/*/*
从second_domain.com/images/*/*
如何让Apache传递一些URL到不同的服务器
配置/etc/hosts
很容易。但是我不知道我在配置Apache时做了什么错误。
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule rewrite_module modules/mod_rewrite.so
#...
# Configure mod_proxy_html to understand HTML4/XHTML1
<IfModule proxy_html_module>
Include conf/extra/proxy-html.conf
</IfModule>
在conf/extra/proxy-html.conf
,除了默认设置:
ProxyRequests Off
ProxyPass /properties/ http://newhawaiiproperties.com/properties/
<Location /properties/>
ProxyPassReverse/
ProxyHTMLEnable On
ProxyHTMLURLMap http://newhawaiiproperties.com/properties/ /properties/
ProxyHTMLURLMap//properties/
</Location>
我应该改变ProxyRequests Off
到ProxyRequests On
?
更新:我意识到我不需要更改HTML文件,它们都是jpgs,所以我应该能够摆脱ProxyHTML...
的东西。