Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
824 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 Answer

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...