Author: kkolinko Date: Mon Jan 17 09:49:55 2011 New Revision: 1059836 URL: http://svn.apache.org/viewvc?rev=1059836&view=rev Log: Update examples of configurations of RemoteAddrValve, RemoteHostValve We are using java.util.regex, not Jakarta regexp. CTR (docs)
Modified: tomcat/tc5.5.x/trunk/container/webapps/admin/admin.xml tomcat/tc5.5.x/trunk/container/webapps/docs/config/context.xml tomcat/tc5.5.x/trunk/container/webapps/docs/config/engine.xml tomcat/tc5.5.x/trunk/container/webapps/docs/config/host.xml Modified: tomcat/tc5.5.x/trunk/container/webapps/admin/admin.xml URL: http://svn.apache.org/viewvc/tomcat/tc5.5.x/trunk/container/webapps/admin/admin.xml?rev=1059836&r1=1059835&r2=1059836&view=diff ============================================================================== --- tomcat/tc5.5.x/trunk/container/webapps/admin/admin.xml (original) +++ tomcat/tc5.5.x/trunk/container/webapps/admin/admin.xml Mon Jan 17 09:49:55 2011 @@ -28,10 +28,10 @@ antiResourceLocking="false" antiJARLocking="false"> <!-- Uncomment this Valve to limit access to the Admin app to localhost - for obvious security reasons. Allow may be a comma-separated list of - hosts (or even regular expressions). + for obvious security reasons. Allow is a comma-separated list of + regular expressions using java.util.regex syntax. <Valve className="org.apache.catalina.valves.RemoteAddrValve" - allow="127.0.0.1"/> + allow="127\.0\.0\.1"/> --> </Context> Modified: tomcat/tc5.5.x/trunk/container/webapps/docs/config/context.xml URL: http://svn.apache.org/viewvc/tomcat/tc5.5.x/trunk/container/webapps/docs/config/context.xml?rev=1059836&r1=1059835&r2=1059836&view=diff ============================================================================== --- tomcat/tc5.5.x/trunk/container/webapps/docs/config/context.xml (original) +++ tomcat/tc5.5.x/trunk/container/webapps/docs/config/context.xml Mon Jan 17 09:49:55 2011 @@ -665,9 +665,8 @@ <a href="engine.html">Engine</a>, <a href="host.html">Host</a>, or <a href="context.html">Context</a> element. The remote address or name will be checked against a configured list of "accept" and/or "deny" - filters, which are defined using the Regular Expression syntax supported - by the <a href="http://jakarta.apache.org/regexp/">Jakarta Regexp</a> - regular expression library. Requests that come from locations that are + filters, which are defined using <code>java.util.regex</code> Regular + Expression syntax. Requests that come from locations that are not accepted will be rejected with an HTTP "Forbidden" error. Example filter declarations:</p> @@ -675,9 +674,9 @@ <Context path="/examples" ...> ... <Valve className="org.apache.catalina.valves.RemoteHostValve" - allow="*.mycompany.com,www.yourcompany.com"/> + allow=".*\.mycompany\.com|www\.yourcompany\.com"/> <Valve className="org.apache.catalina.valves.RemoteAddrValve" - deny="192.168.1.*"/> + deny="192\.168\.1\.\d+"/> ... </Context> </source> Modified: tomcat/tc5.5.x/trunk/container/webapps/docs/config/engine.xml URL: http://svn.apache.org/viewvc/tomcat/tc5.5.x/trunk/container/webapps/docs/config/engine.xml?rev=1059836&r1=1059835&r2=1059836&view=diff ============================================================================== --- tomcat/tc5.5.x/trunk/container/webapps/docs/config/engine.xml (original) +++ tomcat/tc5.5.x/trunk/container/webapps/docs/config/engine.xml Mon Jan 17 09:49:55 2011 @@ -225,9 +225,8 @@ <a href="engine.html">Engine</a>, <a href="host.html">Host</a>, or <a href="context.html">Context</a> element. The remote address or name will be checked against a configured list of "accept" and/or "deny" - filters, which are defined using the Regular Expression syntax supported - by the <a href="http://jakarta.apache.org/regexp/">Jakarta Regexp</a> - regular expression library. Requests that come from locations that are + filters, which are defined using <code>java.util.regex</code> Regular + Expression syntax. Requests that come from locations that are not accepted will be rejected with an HTTP "Forbidden" error. Example filter declarations:</p> @@ -235,9 +234,9 @@ <Engine name="Standalone" ...> ... <Valve className="org.apache.catalina.valves.RemoteHostValve" - allow="*.mycompany.com,www.yourcompany.com"/> + allow=".*\.mycompany\.com|www\.yourcompany\.com"/> <Valve className="org.apache.catalina.valves.RemoteAddrValve" - deny="192.168.1.*"/> + deny="192\.168\.1\.\d+"/> ... </Engine> </source> Modified: tomcat/tc5.5.x/trunk/container/webapps/docs/config/host.xml URL: http://svn.apache.org/viewvc/tomcat/tc5.5.x/trunk/container/webapps/docs/config/host.xml?rev=1059836&r1=1059835&r2=1059836&view=diff ============================================================================== --- tomcat/tc5.5.x/trunk/container/webapps/docs/config/host.xml (original) +++ tomcat/tc5.5.x/trunk/container/webapps/docs/config/host.xml Mon Jan 17 09:49:55 2011 @@ -414,18 +414,18 @@ <a href="engine.html">Engine</a>, <a href="host.html">Host</a>, or <a href="context.html">Context</a> element. The remote address or name will be checked against a configured list of "accept" and/or "deny" - filters, which are defined using the Regular Expression syntax supported - by the standard Java <code>java.util.regex</code> regular expression library. Requests - that come from locations that are not accepted will be rejected with an HTTP "Forbidden" error. + filters, which are defined using <code>java.util.regex</code> Regular + Expression syntax. Requests that come from locations that are + not accepted will be rejected with an HTTP "Forbidden" error. Example filter declarations:</p> <source> <Host name="localhost" ...> ... <Valve className="org.apache.catalina.valves.RemoteHostValve" - allow="*.mycompany.com,www.yourcompany.com"/> + allow=".*\.mycompany\.com|www\.yourcompany\.com"/> <Valve className="org.apache.catalina.valves.RemoteAddrValve" - deny="192.168.1.*"/> + deny="192\.168\.1\.\d+"/> ... </Host> </source> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org