子目录到另一台服务器 [英] Sub Directory to a different server
问题描述
是否有可能一个域例如www.myclient.com有一个子目录举办了完全地不同(我们)的服务器上?
Is it possible to for a domain e.g. www.myclient.com to have a sub directory hosted on a completly different (our) server?
他们不想让他们想把它当作文件夹www.myclient指向subdomain.myclient.com我们的服务器/子/
They don't want to point subdomain.myclient.com to our servers so they want it as folder www.myclient/subdomain/
先谢谢了。
推荐答案
由于在评论中讨论的,你唯一的选择是代理。其他一切(像mod_rewrite的/别名)会做一个头重定向,以及暴露目标地址给用户。
As discussed in the comments, your only option is a Proxy. Everything else (Like mod_rewrite / Alias) will do a header redirect, and expose the target address to the user.
不过, Apache的代理似乎没有那么复杂。最基本的例子是
However, Apache's proxying doesn't seem to be that complicated. The most basic example is
ProxyPass /mirror/foo/ http://backend.example.com/
请注意,一个代理当然会增加一倍,你的流量,因为要求每个字节将不得不从远程计算机获取。
Note that a proxy will of course double your traffic, because every byte requested will have to be fetched from the remote machine.
这篇关于子目录到另一台服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!