You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Roamer <ro...@yahoo.com.hk> on 2007/05/05 07:20:03 UTC

Tomcat manager restriction question

After reading and trying the setting from this page. I would like to ask some questions.
http://tomcat.apache.org/tomcat-5.5-doc/manager-howto.html

-------------------------
In {Tomcat Home}\conf\server.xml, if I added these tags:
<Host name="A" appBase="{path of A}" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false" reloadable="true">
<Context path="/manager" debug="0" privileged="true" docBase="${catalina.home}/server/webapps/manager">
<Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="201.33.158.124"/>
</Context>
</Host>
<Host name="B" appBase="{path of B}" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false" reloadable="true">
<Context path="/manager" debug="0" privileged="true" docBase="${catalina.home}/server/webapps/manager">
<Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="201.22.144.33"/>
</Context>
</Host>
Assume I gave them the same user name and password which came from my tomcat-users.xml file, if they came from different, fixed
IP address, I can use the 'RemoteAddrValve' in this way. My question is in some case if several users came from same IP or
same host name, how can I force them to access their own web apps manager page? Can I assign different user name and pass for different <Host>??

Thx for your suggestion if there is any.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Tomcat manager restriction question

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Roamer [mailto:roamerchan@yahoo.com.hk] 
> Subject: Tomcat manager restriction question
> 
> Can I assign different user name and pass for different <Host>??

Yes, you can configure an independent <Realm> element for each <Host>.
Look at the realm doc, especially here:
http://tomcat.apache.org/tomcat-5.5-doc/realm-howto.html#Configuring%20a
%20Realm

You'll need a separate .xml file or equivalent for each.

 - Chuck

P.S.  Putting <Context> elements inside server.xml is strongly
discouraged, since modifying them in any way requires restarting Tomcat.
A better location is conf/Catalina/[host]/manager.xml, one for each
<Host>.


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org