tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Neville" <tj...@c8.com>
Subject Tomcat/Apache 2/JK 2 & Manager Webapp Config Question
Date Thu, 18 Dec 2003 11:29:50 GMT
I'm trying to get a install of tomcat with apache/jk2 running with the manager
webapp.

In fact, the install has been running smoothly for some time, except the
manager application was never put into place as it was superfluous to our
deployment requirements.

Now the deployment schedule has stepped up a bit we'd like to use the manager
app on a regular basis.

OK, so I can get it working without issue (I've had it running in my dev
environment for some time) but......

When I deploy a new war file using on the production setup, the manager webapp
will (i'm sure some of you can correct the real ins & outs, but for
simplicity..):-
1. Delete /home/tomcat/intranet.war
2. Delete /home/tomcat/intranet
3. Upload the war file to /home/tomcat/intranet.war.

This, in turn will then be:-
1. Unpacked at /home/tomcat/intranet by the 'intranet.eu.xxx.com' host &
deployed (unpackWARs="true" autoDeploy="true">)....
2. Deployed at tomcat.eu.xxx.com/babcockbrown....
(Making two instances of the same webapp available from different access points.)

My question is:
How can I setup the manager to deploy the intranet.war file on
intranet.eu./xxx.com without making it available on the other virtual host?

My current reasoning says it would make sense to create the manager context
inside the intranet.eu.xx.com host, but that doesn't seem possible, given that
 Apache's document root needs to point to /home/tomcat/intranet for this host
(ie making /home/tomcat/manager inaccessible).

As a real nasty option, i'd thought about merging the manager & intranet
web.xml files, and making the intranet webapp privileged, but i'm loathe to do
this from a security standpoint.

How does everyone else get round this problem? It shouldn't be uncommon, no?
Config snippets follow.....

Thanks in advance for any suggestions,

James.

*************************************************************************

----------- directory structures ---------
Tomcat Directory: /apps/pkg/tomcat
note: /apps/pkg/tomcat/webapps contains no webapps.

Webapps Directory: /home/tomcat 

----------- /apps/pkg/tomcat/conf/server.xml -------------------
<!-- note: edited for brevity -->
<Service name="Tomcat-Apache JK2">


        <Host name="intranet.eu.xxx.com"
        debug="0"
	appBase="/home/tomcat"
	privileged="true"
	unpackWARs="true"
	autoDeploy="true">

		<Context
		path=""
		docBase="intranet"
		debug="1"
		crossContext="false"
		reloadable="true"
		autoDeploy="true"
		>

	        </Context>

        </Host>

	<Host
	name="tomcat.eu.xxx.com"
	debug="0"
	appBase="/home/tomcat/manager"
	privileged="true"
	unpackWARs="false"
	autoDeploy="false">

		<Context
		path=""
		docBase=""
		debug="1"
		crossContext="true"
		>

<ResourceLink name="users" global="UserDatabase"
type="org.apache.catalina.UserDatabase"/>
<Realm className="org.apache.catalina.realm.MemoryRealm" debug="2"/>

		</Context>
        </Host>

----------- /apps/pkg/apache/conf/httpd.conf -------------------
<snip>

<VirtualHost 10.64.5.10:80>
    ServerName intranet.eu.xxx.com:80
    DocumentRoot /home/tomcat/intranet/

    ServerAdmin me@me.com

    ErrorLog /apps/pkg/apache/logs/intranet_http_error_log
    CustomLog /apps/pkg/apache/logs/intranet_http_access_log combined

        <Location "/*.jsp">
                JkUriSet worker ajp13:localhost:8009
        </Location>
        <Location "/*.jhtml">
                JkUriSet worker ajp13:localhost:8009
        </Location>

    <Location /WEB-INF>
    Options None
        AllowOverride None
        order deny,allow
        deny from all
    </Location>

</VirtualHost>

<VirtualHost 10.64.5.10:80>
    ServerName tomcat.eu.xxx.com:80
    DocumentRoot /home/tomcat/manager/

    ServerAdmin me@me.com


    ErrorLog /apps/pkg/apache2/logs/manager_http_error_log
    CustomLog /apps/pkg/apache2/logs/manager_http_access_log combined

        <Location "/html/*">
                JkUriSet worker ajp13:localhost:8009
        </Location>

    <Location /WEB-INF>
    Options None   
        AllowOverride None
        order deny,allow
        deny from all
    </Location>

</VirtualHost>



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message