Re: efficient abuse page

Daniel Gruno <[email protected]>
Newsgroups gmane.comp.apache.user
Message-ID <[email protected]>
On 1/16/25 11:27, Marc wrote:
> I have currently some abuse page that notifies the ip is blocked. I am generating this page with php because I want to display the ip adres on this page. Is there a more efficient way to generate a page with one line of text and the blocked ip address?
> Maybe directly in apache without using php-fpm?

You can do just about anything you like with mod_lua, including rate 
limiting, custom block messages, and more.

If you already know that an IP is supposed to be blocked, you can use 
the LuaQuickHandler[1] to serve up a message before any other processing 
happens in httpd (a quick handler fires as soon as a request is mapped 
to a virtual host, but before any file-system/rewrite/auth/whatever runs).

If you'd rather do it as a filter on responses, you can use the 
LuaOutputFilter[2] directive and set up a filter.

We make use of both of those at the ASF itself for rate- and bandwidth- 
limiting on select services, and it works well.

[1] https://httpd.apache.org/docs/trunk/mod/mod_lua.html#luaquickhandler
[2] https://httpd.apache.org/docs/trunk/mod/mod_lua.html#luaoutputfilter

> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.