Sub Directory to a different server

后端 未结 3 1231
不思量自难忘°
不思量自难忘° 2020-12-15 21:22

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.myclie

3条回答
  •  南方客
    南方客 (楼主)
    2020-12-15 21:44

    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.

提交回复
热议问题