简体   繁体   English

Apache vs Tomcat配置问题

[英]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.我在 Google 中搜索,发现 Apache 可以通过httpd.conf文件中的mod_access指令进行配置,以阻止来自特定 IP 的 web 站点。
Is there anything equivalent in Tomcat? Tomcat 中是否有任何等价物?
I am not sure I understand what are the corresponding configuration files.我不确定我是否了解相应的配置文件。

Thanks谢谢

See the Request filters section of this doc .请参阅本文档的请求过滤器部分。 Doing this via tomcat configuration is pretty static, you need to restart to edit configuration.通过 tomcat 配置执行此操作非常 static,您需要重新启动才能编辑配置。 If you need something dynamic, it's probably best to implement a custom servlet filter.如果您需要动态的东西,最好实现自定义 servlet 过滤器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM