Cratylus
Cratylus

Reputation: 54084

Apache vs Tomcat configuration question

I was searching in Google and found that Apache can be configured via mod_access directives in the httpd.conf file to block a web site from a particular IP.
Is there anything equivalent in Tomcat?
I am not sure I understand what are the corresponding configuration files.

Thanks

Upvotes: 2

Views: 197

Answers (2)

Try the Remote Address Filter. http://tomcat.apache.org/tomcat-5.5-doc/config/valve.html

Upvotes: 3

slushi
slushi

Reputation: 1434

See the Request filters section of this doc. Doing this via tomcat configuration is pretty static, you need to restart to edit configuration. If you need something dynamic, it's probably best to implement a custom servlet filter.

Upvotes: 1

Related Questions