0

How do i configure Railo on Jelastic (PAAS) to work with multiple domains using Jetty?

I found the configuration for Railo using Tomcat, but I would like to use Jetty because of the memory requirements

Thanks

Jeromy French
  • 11,812
  • 19
  • 76
  • 129
Adzcqe Mi
  • 21
  • 1

2 Answers2

2

In Jelastic there are at least 2 possible ways of binding your domain name.

Actually you can bind your domain by deploying your application to a specified context ROOT via Jelastic dashboard. Here is an article which explains how to manage it: http://jelastic.com/docs/custom-domains

The second way is to set DNS A Record. The given article explicitly shows how to do it: http://jelastic.com/docs/A-Records-domain-names

Daria
  • 169
  • 3
1

I am not sure on the Jelastic specific side, but with Jetty you can create an XML file in the contexts folder, and it should look something like this:

contexts/Localhost.xml:

<?xml version="1.0"  encoding="ISO-8859-1"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">
<Configure class="org.eclipse.jetty.webapp.WebAppContext">
  <Set name="contextPath">/</Set>
  <Set name="resourceBase"><SystemProperty name="jetty.home" default="."/>/webapps/railo/</Set>
  <Set name="defaultsDescriptor"><SystemProperty name="jetty.home" default="."/>/etc/webdefault.xml</Set>
  <!-- virtual hosts -->
  <Set name="virtualHosts">
    <Array type="String">
      <Item>localhost</Item>
      <Item>127.0.0.1</Item>
    </Array>
  </Set>
</Configure>

You can then create more files in there for each domain, making sure you add/edit the entries for the resourceBase (your file webroot) and in the Item for the virtual host.

I am not sure how Jelastic handles this stuff with Jetty specifically, but if you can edit the files you should be cool.

Mark D
  • 543
  • 2
  • 5
  • Just a note that you don't actually need the two SystemProperty tags there - just using `webapps/railo/` and `etc/webdefault.xml` will do the same thing, but with less noise. – Peter Boughton Feb 20 '13 at 11:58