0

I have the following situation:

There is a domain with offers different services like a blog, a forum and a wiki whic are reachable via different URI paths all at e.g. IP 123.123.123.123:

www.example.com/blog
www.example.com/forum
... etc.

Now, e.g. the forum should be hosted by a different server from the one the domain itself relates to. In case the domain uses subdomains like , etc. are easy since I can assign a different IP to each subdomain. However how may this be achieved with different paths? Do I have to do some rewrite rules in the vhost of the apache webserver? Something else? An example will be cool.

Cheers and thank you for any hint or pointer

kghbln
  • 371
  • 1
  • 9
  • 19

1 Answers1

0

Thanks for the pointer. So a proxy is indeed the way to go. So from what I have read I have to do the following:

1. Create a subdomain at example.com, e.g. blog.example.com

2. Create the vhost on the remote server and do the redirect rules and other stuff so that content is emitted like http://blog.example.com/blog. The regular stuff as if no proxying is involved.

3. Add the following to the local server's vhost for www.example.com (mod_proxy_html version older than 3.1):

ProxyRequests Off SetOutputFilter proxy-html ProxyHTMLExtended On ProxyPass /blog/ http://blog.example.com/ ProxyHTMLURLMap http://blog.example.com /blog <Location /blog/> ProxyPassReverse / ProxyHTMLURLMap / /blog/ ProxyHTMLURLMap /blog /blog RequestHeader unset Accept-Encoding </Location>

4. Point blog.example.com to the remote server by adding its IP to the A-Record of the subdomain.

5. Done.

kghbln
  • 371
  • 1
  • 9
  • 19