Subdirectory on another host

I have a site www.example.com on one server. I would like to create www.example.com/blog on another server / host.

A) Can I do this? B) How can I do this?

I read a little about using Apache mod_proxy, proxypass and ProxyPassReverse, but I'm not gifted enough with Apache or the mgt server to find out if I am on the right path or not. Or, if there are other options to do what I want.

To be clear, I do not need a similar subdomain, for example blog.example.com. I know how to do this with DNS, but I do not believe that DNS is an option for subdirectories.

+3
source share
1 answer

. , -, .

, , , .

(.. www.domain.com/blog [ ] blog.otherhost.com) ?

, mod_proxy. - :

ProxyRequests Off

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

ProxyPass /foo http://foo.example.com/bar
ProxyPassReverse /foo http://foo.example.com/bar 
+6

Source: https://habr.com/ru/post/1754363/


All Articles