tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Philipp Kraus <philipp.kr...@tu-clausthal.de>
Subject Re: install war with xml and define environment values
Date Mon, 02 Dec 2013 06:49:02 GMT
Hello,

Am 01.12.2013 um 23:40 schrieb Mark Eggers <its_toasted@yahoo.com>:

> Run Tomcat as an unprivileged user.
> 
> If you need to have Tomcat serve on port 80, use jsvc, iptables to map port 80 to port
8080, or place an Apache HTTPD server in front of Tomcat using mod_proxy_http, mod_proxy_ajp,
or mod_jk.
> 
> You could also unpack the WAR file, change the param value, and repackage the WAR file.
Of course, the user Tomcat is running under will need to have privileges to the directory
you change the param value to.

On my test system Tomcat 7 runs with root access, but on my production system it runs with
an unprivileged user on port 9090 and a Nginx works like a proxy for https. This works fine,
but
on the Tomcat runs Jenkins and a project planning system. 
My Jenkins installation is configures by a XML file in the /etc/tomcat7 directory with this
content:

<Context docBase="/usr/share/jenkins/jenkins.war" privileged="true" allowLinking="true"
crossContext="true" autoDeploy="true" >
    <Environment name="JENKINS_HOME" value="/home/jenkins/" type="java.lang.String"/>
</Context>

With the value JENKINS_HOME I can change the data directory of Jenkins.

The project planning system uses only ${user.home}, so I would like to redefine this environment
value for this war only (because the backup system runs over the /home dir). 
I'm working the first time with tomcat but not with java.

Thanks Phil
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message