How To Host Multiple Websites by using mod proxy
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>
