Multiple Domains in Jelastic

Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInEmail this to someone

Jelastic’s new Public IPv4 feature gives you a lot of cool new options. Today we’ll show you how to use multiple domains in Jelastic with the help of a Public IP address.

The Benefits of Having Multiple Domains


One of the main benefits of having multiple domains names, aside from the fact that you may actually have completely different sites, is that it gives you multiple points of entry: this can be good if, for example, you want different domains to lead to differently themed sites for different marketing campaigns or user experiences.

Cost Saving

Another benefit that you can take advantage of because of Jelastic is the ability to have more than one domain running on a single environment. For example, you could have two different applications, on two different domains, running on a single Tomcat instance.

Efficiency and Scalability

Though you may not need this feature, it’s nice to have if and you ever do need it. Startups in particular can benefit from this cost-saving and efficient feature by only having to run a single environment for their applications until they have the need to scale up.

Setting Up Multiple Domains

In order to use a domain name for your application/s, you need to have registered it or have administrative access to it.

1. Go to and sign up if you haven’t done it yet or log in with your Jelastic credentials by clicking the Sign In link on the page.

2. While in Jelastic dashboard, click the Create environment button:

3. In the Environment Topology dialog, pick your application server (for example, Tomcat 6), switch on Public IPv4 for your server and type your environment name, for example, multibinding.

In a minute your environment with Tomcat 6 will be successfully created.

4. Bind your domain names to the Tomcat’s Public IP address, which you can find in the dropdown list on the right of the server’s icon. The binding procedure depends on the hosting company, where you bought domains.

5. Upload your war files/file to the Deployment manager and deploy them to different contexts.

6. Click on config button for Tomcat.

7. Navigate to server.xml file (server directory) and set the configuration for host multiple domains (add Host tags for each domain you want to bind).

For example:

<Host name="" appBase="webapps/firstdomain">
<Context path="" docBase="."/>

<Host name="" appBase="webapps/seconddomain">
<Context path="" docBase="."/>

<Host name="" appBase="webapps/thirddomain">
<Context path="" docBase="."/>

8. Save the changes and restart Tomcat.

9. Now you can check the results. Your application/s will be available through the specified domain names.

Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInEmail this to someone


Leave a Reply

Subscribe to get the latest updates