Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
816 views
in Technique[技术] by (71.8m points)

apache - Sub Directory to a different server

Is it possible to for a domain e.g. www.myclient.com to have a sub directory hosted on a completly different (our) server?

They don't want to point subdomain.myclient.com to our servers so they want it as folder www.myclient/subdomain/

Thanks in advance.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...