You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Marc <Ma...@f1-outsourcing.eu> on 2025/01/16 10:27:37 UTC
[users@httpd] efficient abuse page
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?
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] efficient abuse page
Posted by Rainer Canavan <ra...@avenga.com.INVALID>.
On Thu, Jan 16, 2025 at 11:28 AM Marc <Ma...@f1-outsourcing.eu> 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?
Check the documentation of mod_filter, mod_substitute and mod_sed. I
would assume that it should be possible to replace a placeholder in
your ErrorDocument as needed, but I haven't tried that myself.
Rainer
--
This email is confidential. If you are not the intended recipient, please
delete it and notify us immediately by telephoning or e-mailing the sender.
You should not copy it or use it for any purpose nor disclose its contents
to any other person.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] efficient abuse page
Posted by Daniel Gruno <hu...@apache.org>.
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: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org