tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Delbecq <delbd+jaka...@oma.be>
Subject Re: IP Filters for subfolders
Date Wed, 30 Jan 2008 12:33:12 GMT
En l'instant précis du 30/01/08 13:31, Ray Allen s'exprimait en ces termes:
>> I'm trying to restrict http access to a given folder.  All the 
>> documentation
>> points to appending the /conf/server.xml entry with the following text:
>>
>>  <Context path="/restricted" ...>
>>   ...
>>     <Valve className="org.apache.catalina.valves.RemoteAddrValve"
>>     allow="192.168.*.*" />
>>   ...
>>   </Context>
>>
>>     
> That is restricting access to a context name restricted, it's not the
> same a resrticting access to a folder of a specific webapp.
> Also, the allow is a coma separated list of regular expression. You
> should probably use this for your allow:
> allow="192\.168\..*"
>
> ***Thanks for this advice.  I didn't realise about the need for backslash. 
> Given that I shouldn't be using a context path to define the folder, what 
> should I be doing?
> Ray 
>
>   
Either a custom valve that also inspect the requested folder, either use 
a servlet filter, mapped to restricted/* and which checks the IP. If you 
google for servlet ip filter, you should find plenty of existing filter 
ready for use.
> ---------------------------------------------------------------------
> 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
>   


-- 
http://www.devlog.be (a belgian developer's logs)



---------------------------------------------------------------------
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


Mime
View raw message