Multiple Domains Tutorial for our Tomcat Web Hosting

javapipe java hosting

This tutorial explains how you can host multiple domains with a private Tomcat web Hosting package at JavaPipe using a pointer domains.

Pointer domains are domains that mirror your existing domain. They do not come with their own folder structure. However, you can utilize this domain for a different webapp by configuring a host entry for this domain in your server.xml to point at tomcat/webapps/anotherwebapp.

Using Pointer Domains

  1. First thing you need to do is to create a pointer domain in you SiteWorx control panel.
  2. Then you need to add a Host entry in your server.xml (It is a very good idea to back up this server.xml file before editing it.) Be careful not to change any of the port information - doing so could get your site suspended.

Place following code just before the closing </engine> tag

<Host name="{pointerdomain.com}" debug="0"
     appBase="/home/{username}/{primarydomain.com}/tomcat/webapps/{webappname}"
       unpackWARs="true" autoDeploy="true">

<Alias>{www.pointerdomain.com}</Alias>

<Valve className="org.apache.catalina.valves.AccessLogValve"
     directory="/home/{username}/var/{primarydomain.com}/logs" 
       prefix="{pointerdomain.com}_log." suffix=".txt"
         pattern="common" resolveHosts="false"/>

<Context path="/"
     docBase="/home/{username}/{primarydomain.com}/tomcat/webapps/{webappname}"
       crossContext="false" reloadable="true">
</Context>

</Host>

Replace {username}, {domain.com}, {pointerdomain.com} and {webappname} with your own.

Set up the webapp or drop in a new WAR file of the new webappname in your webapps directory.

Restart tomcat.

Limitations for Pointer Domains.

  • There is no seperate email system for pointer domains. This email address is being protected from spambots. You need JavaScript enabled to view it. and This email address is being protected from spambots. You need JavaScript enabled to view it. are the same.