Tuesday, October 19, 2010

Migrating Apache-Tomcat virtual hosts

I made several changes at once, so it's possible some of these aren't needed.  However, the system seems to be working now and here's what I put.


First, a symbolic link for index home page...
ln -s /home/salesrocket/incentto.com/html/index.shtml /var/www/vhosts/incentto.com/httpdocs/index.html


This is because they moved me from cpanel typical file setup to plesk.  Fun.


--------------------------
Then, what probably got the setup to work was modifying the apache files.
The command vim /opt/tomcat/conf/server.xml allowed me to add some host tags.


        <Host name="preview.incentto.com" appBase="/opt/tomcat/webapps/IncenttoPRE">
                <Context path="" docBase="/opt/tomcat/webapps/IncenttoPRE"/>
        </Host>

        <Host name="incentto.com" appBase="/opt/tomcat/webapps/IncenttoPROD">
                <Context path="" docBase="/opt/tomcat/webapps/IncenttoPROD"/>
        </Host>



Not 100% sure that both docbase and appbase are needed, but it's working.

No comments: