[BlueOnyx:04326] Re: How to deploy a .war into webroot

Christoph Schneeberger cschnee at box.telemedia.ch
Tue Apr 20 14:25:00 -05 2010


I've found a solution for my problem after spending some quality time in
the sources ;-)

Say the site where you are going to deploy the application is
www.example.tld and its siteID is site1 and you want to deploy
OpenBluedragon there, use the following steps to install it into the
webroot instead of a subdirectory:

1. Download the .war file to a temporary location (just about everywhere
will do, but avoid the webroot of www.example.tld !), i.e.
 $ cd /tmp
 $ wget http://www.openbluedragon.org/download/1.2/openbd.war

2. Rename the file to ROOT.war
 $ mv openbd.war ROOT.var
(combine 1.&2. with "wget -O /tmp/ROOT.war
http://www.openbluedragon.org/download/1.2/openbd.war" - the main point
being the file has to be named ROOT.war !)

3. Deploy the file manually with java_load_war.pl
 $ /usr/sausalito/sbin/java_load_war.pl -n siteadm-of-www.example.tld -g
site1 -f /tmp/ROOT.war
In the command above,
-Replace siteadm-of-www.example.tld with a username of a siteadmin of
www.example.tld, i.e. ftp_example
-Replace site1 with the site group, find it i.e. with
 $ basename $(ls -l /home/sites/| grep www.example.tld | awk '{ print $11}')

4. Fix apache config, open the sites apache config, i.e. if your
siteID/site group is site1, you'd have to open /etc/httpd/conf/vhost/site1
Remove one of the doubled slashes in:
JkMount //* ajp13
JkMount //*.jsp ajp13
JkMount //servlet/* ajp13

so that it looks like:
JkMount /* ajp13
JkMount /*.jsp ajp13
JkMount /servlet/* ajp13


5. Restart apache:
/etc/init.d/httpd restart

6. Fix permissions on WEB-INF folder
chown -R tomcat.site1 /home/sites/www.example.tld/web/WEB-INF
(again replace site1 with your siteID/site group


Hope this helps somebody along the way.

Cheers,
Christoph Schneeberger

Christoph Schneeberger wrote:
> Hi,
> 
> I've got a request to deploy a war archive into the webroot - meaning to
> / instead of /appName .
> The WebUI refuses an empty URL field and the only solution I came up
> with is redirecting requests into the application directory which is
> somehow unsatisfying. Actually there are howtos out there on how to
> achieve this manually with tomcat but I'd prefer to keep it the BlueOnyx
> way.
> 
> Has anybody done this and has some hints for me ?
> 
> Thanks in advance,
> 
> Christoph Schneeberger
> _______________________________________________
> Blueonyx mailing list
> Blueonyx at blueonyx.it
> http://www.blueonyx.it/mailman/listinfo/blueonyx




More information about the Blueonyx mailing list