Hosting

If you want to host multiple domains within a single Jease instance, you have to create a Folder on the root level with an id which equals the domain name and put your content into this folder.

So if you want to host a site with the domain "www.anothersite.com", you'll have to create a Folder with id="anothersite.com" ("www." gets automatically translated by Jease) and store all content of your site within this Folder.

The only problem with this solution is that you will get an additional path prefix in all of your URLs (like http://www.anothersite.com/anothersite.com/contact). Depending on your requirements and your environment this maybe no problem for you at all, so you're fine.

But if you're obsessed with nice and transparent URLs like me, you'll have to configure Apache as front end server to clean up the URLs. All you have to do is to enable mod_proxy_html for your Apache. Most Linux distributions provide mod_proxy_html in their repositories.

The configuration for a virtual host with mod_proxy_html enabled is straightforward:

ProxyRequests Off

<Proxy http://localhost:8080/>
Order Allow,Deny
Allow from all
</Proxy>

<VirtualHost *:80>
ServerName anothersite.com
ServerAlias www.anothersite.com
SetOutputFilter proxy-html
ProxyHTMLDoctype XHTML Legacy
ProxyPass /site http://localhost:8080/site
ProxyPass /zkau http://localhost:8080/zkau
ProxyPass /anothersite.com http://localhost:8080/anothersite.com
ProxyPass / http://localhost:8080/anothersite.com/
ProxyPassReverse / http://localhost:8080/anothersite.com/
ProxyHTMLURLMap ^(\./~)?/anothersite.com/? / [R]
</VirtualHost>

Last modified on 2011-07-04 by Maik Jablonski

Want to contribute?

Do you want to contribute to Jease? Writing documentation is a good place to get started and will help to get people becoming more familiar with Jease. Any contribution is appreciated.