Forum OpenACS Q&A: Response to Multiple domains on same server/ip

Collapse
Posted by Ivan Histand on
One clarification on the Apache Reverse Proxy solution, it is possible to do this:

<blockquote>domain1.com resolves to domain1.com (the primary is just another instance of subsite)
</blockquote>

<blockquote>domain2.com resolves to domain1.com/subsite2/
</blockquote>

<blockquote>domain3.org resolves to domain1.com/subsite3/
</blockquote>

The ProxyPass directive in the httpd.conf file takes an url with a wildcard on the end, this can literally be any url, it doesn't have to be a base url. The only restriction is, of course, that you can't redirect to lower-level urls, for example if a page on a virtual domain  served by domain1.com/subsite2/  redirected or even linked to domain1.com/foo you'd have a problem. domain1.com/subsite2/ needs to be designed as if that was the root level.