Hosting Multiple Websites using mod_proxy

nmaupu edited this page Jun 25, 2011 · 2 revisions

Using mod_proxy you can map a domain to a sub-directory of Radiant, this can be used to host multiple websites without having to modify Radiant. Your Radiant page tree should be set up like this:

Site Root
 |
 +- radiantpoweredwebsite.com
 |  |
 |  +- Home
 |     |
 |     +- Subpage 1
 |     |
 |     +- Subpage 2
 |
 +- billa.co.nr
    |
    +- Home
       |
       +- Subpage 1
       |
       +- Subpage 2

With Apache and mod_proxy, you would set up domains like:

<VirtualHost ServerIP:80>
  ServerName www.radiantpoweredwebsite.com
  ProxyPass / http://www.yourradiantinstall.com/radiant/radiantpoweredwebsite-com/home/
</VirtualHost>

<VirtualHost ServerIP:80>
  ServerName www.anotherwebsite.com
  ProxyPass / http://www.yourradiantinstall.com/radiant/anotherwebsite-com/home/
</VirtualHost>

Note: while the above approach can work, the urls for tags such as link will not be correct. An alternative approach is to use the virtual_domains extension. If using this extension, ProxyPass directly to the root of your radiant install, not the subdirectory. i.e.:

<VirtualHost ServerIP:80>
  ServerName www.anotherwebsite.com
  ProxyPass / http://www.yourradiantinstall.com/radiant
</VirtualHost>
Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.