Ok tried it again.. first some more information: I am using Tomcat 5.0.28 on Redhat Fedora Core 3, installed in /usr/local/tomcat
I created a XML file called <application>.xml in /usr/local/tomcat/conf/Catalina/localhost where <application> is the name of the webapp. That worked so far. The file consisted just of a few lines: <Context path="/NetAdmin" docBase="${catalina.home}/webapps/NetAdmin" debug="0" privileged="true"> <Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="192.100.46.*,172.16.*.*,194.25.29.*,127.0.0.1"/> </Context> I have to mention that I did neither write that app nor know much about it anyway.. it uses a JDBC connection to a mysql database to write data to that db. But after creating that config file mentioned above, the JDBC driver didn't work anymore... Anyone can help me with that? Regards, Jens > -----Ursprüngliche Nachricht----- > Von: Lutz Zetzsche [mailto:[EMAIL PROTECTED] > Gesendet: Dienstag, 10. Mai 2005 16:24 > An: Tomcat Users List > Betreff: Re: Restrict access to webapps for IPs > > > Hi Jens, > > Altrock, Jens schrieb: > > Hm... won't work :( > > > > I added to noe of the apps in > webapps/name_of_app/WEB-INF/web.xml the > > following: > > > > <Valve className="org.apache.catalina.valves.RemoteAddrValve" > > allow="192.100.46.*"/> > > > > right after the <web-app> tag in the xml file. > > But people can access that application from the internet anyway... > > You have put the Valve element into the wrong file resp. > place. It cannot > be nested into the <web-app> element and cannot be placed in > the web.xml. > You have to nest it into a <engine>, <host> oder <context> element. > > In your case, you have to nest it into the <context> element > because you > want to apply the filter rule to a web application which is > equivalent to > the <context> element in Tomcat terms. > > You should have a look at one of the links I mentioned to > find the right > place for the Valve element: > > http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/context.html > > Try one of these options offered on this page (refers to > Tomcat version 5.5): > > * in individual files (with a ".xml" extension) in the > $CATALINA_HOME/conf/[enginename]/[hostname]/ directory > * if the previous file was not found for this application, in > individual > file at /META-INF/context.xml inside the application files > > > Best wishes > > Lutz > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > ########################################### Diese Nachricht wurde von F-Secure Anti-Virus gescannt. This message has been scanned by F-Secure Anti-Virus. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]