ubuntu apache2 mod_proxy 替换内部 url
我已经按照我在谷歌上找到的所有指南进行了操作,但仍然无法解决这个问题!
我已成功设置 mod_proxy 来拉回内部网站,但该网站向菜单项添加了内部链接,这对外部用户不起作用,因此我尝试将它们从 .int
域重写为 < code>.com 域。
我有以下虚拟主机。
<VirtualHost *:80>
ServerName shop.itmanx.com
ProxyRequests Off
ProxyPreserveHost On
#ProxyHTMLInterp On #used to be ProxyHTMLEnable
#ProxyHTMLExtended On #will parse all scripts and css files as well [slow if on]
ProxyPass / http://shop.itmanx.int/
ProxyPassReverse / http://shop.itmanx.int/
#ProxyHTMLURLMap / /test/
ProxyHTMLURLMap (.*)itmanx.int(.*) $1itmanx.com$2 [Rin]
<Location />
Order allow,deny
Allow from all
</Location>
</VirtualHost>
我已确保组件已加载
[Sun Jan 29 14:59:46 2012] [warn] module proxy_module is already loaded, skipping
[Sun Jan 29 14:59:46 2012] [warn] module proxy_http_module is already loaded, skipping
[Sun Jan 29 14:59:46 2012] [warn] module proxy_html_module is already loaded, skipping
,但没有更改链接。那么我错过了什么?
服务器是Ubuntu Server 11.10
I've followed every guide I can find on Google and still cant solve this!
I've managed to set up mod_proxy to pull back an internal website, but the website adds internal links to menu items which wont work for external users, so Im trying to rewrite them from .int
domains to .com
domains.
I have the following virtual host.
<VirtualHost *:80>
ServerName shop.itmanx.com
ProxyRequests Off
ProxyPreserveHost On
#ProxyHTMLInterp On #used to be ProxyHTMLEnable
#ProxyHTMLExtended On #will parse all scripts and css files as well [slow if on]
ProxyPass / http://shop.itmanx.int/
ProxyPassReverse / http://shop.itmanx.int/
#ProxyHTMLURLMap / /test/
ProxyHTMLURLMap (.*)itmanx.int(.*) $1itmanx.com$2 [Rin]
<Location />
Order allow,deny
Allow from all
</Location>
</VirtualHost>
I have made sure the components are loaded
[Sun Jan 29 14:59:46 2012] [warn] module proxy_module is already loaded, skipping
[Sun Jan 29 14:59:46 2012] [warn] module proxy_http_module is already loaded, skipping
[Sun Jan 29 14:59:46 2012] [warn] module proxy_html_module is already loaded, skipping
but no links are altered. So what am i missing?
The server is Ubuntu Server 11.10
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
哈扎!!!感谢 Hudson 引用以下内容的人:
因为这一行,现在正在工作
Huzzah!!! Thanks to the guys at Hudson who quoted the following:
and because of this one line, it's now working