Welcome! Log In Create A New Profile

Advanced

Re: dynamically block ips?

Ben Lancaster
July 27, 2011 12:40PM
On 27 Jul 2011, at 09:34, Ronald Johnson wrote:

> The only solution I can come up with is to have a cron job that runs
> every 5 minutes, check the datestamp on the blocked_ips file,
> and if it was modified, it will tell nginx to reload the config file.
> This is however sub-optimal, since I think that will give them enough
> time window to get what they want from my site.
>
> So, in short, my question:
> any ideas how to trigger nginx to reload config files from a php script?
> E.g. is there something that the nginx can check reguarly (the
> existence of a file or something), and upon that take action to reload
> its config files?
>
> Any suggestions for a different solution is also much appreciated,


You could use Beanstalkd (with Pheanstalk) to create PHP workers that do run as root. Then you can create a new "job" in the queue, which gets handled asynchronously by the Pheanstalk workers in the background..
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

dynamically block ips?

Roy July 27, 2011 04:36AM

Re: dynamically block ips?

Dick Middleton July 27, 2011 04:40AM

Re: dynamically block ips?

Keith Fernie July 27, 2011 04:56AM

Re: dynamically block ips?

Ben Lancaster July 27, 2011 12:40PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 141
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready