开发者

Reverse proxy not keeping the original domain name

I want to do something like this:

Domain1 = www.abc.com Domain 2 = www.xyz.com

When someone goes to www.abc.com it should go to www.xyz.com/directory/1

I have this configuration in my apache 2.2 ( yes it has mod_proxy )

<VirtualHost *:80>
    ServerName www.abc.com
    ProxyRequests Off
    ProxyPass / http://www.xyz.com/directory/1
    ProxyPassReverse / http://www.xyz.com/directory/1
</VirtualHost>

The thing is it is working but it shows http://www.x开发者_Go百科yz.com/directory/1 in the browser location bar, and i want to show abc.com.

I had it working and after i change the domain names from the test to the real one it stoped showing the correct domain, so can someone please tell me if i have something wrong there?


I just figure this out, when i put this:

<Proxy *>
    Order deny,allow
    Allow from all
</Proxy>

It all work as expected :)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜