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.
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 Jelastic.com 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).
<Host name="firstdomain.com" appBase="webapps/firstdomain"> <Alias>firstdomain.com</Alias> <Context path="" docBase="."/> </Host> <Host name="seconddomain.com" appBase="webapps/seconddomain"> <Alias>seconddomain.com</Alias> <Context path="" docBase="."/> </Host> <Host name="thirddomain.com" appBase="webapps/thirddomain"> <Alias>thirddomain.com</Alias> <Context path="" docBase="."/> </Host> …
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.
- How to Point Multiple Domain Names to One Website: And How to Avoid Search Engine Problems When Doing So
- Remote Access to MySQL in Jelastic: Import/Export Dump Files in a Few Minutes (jelastic.com)
- Remote Access to MongoDB: Data Import & Export (jelastic.com)
- How to deploy Enonic CMS to Jelastic cloud (jelastic.com)