dynamically block ips?
me at keithfernie.co.uk
Wed Jul 27 08:44:49 UTC 2011
You should be able to use incron instead of cron to reload your config
On Wed, 27 Jul 2011 09:34:08 +0100, Ronald Johnson
<rj.1970 at googlemail.com> wrote:
> Hi list,
> I have a problem;
> all my website code has been "copied"; those that took it has launched
> it pretty much the same; just changed the texts and the color scheme.
> That in itself is annoying, but the main problem is that they several
> times per day scrape my site for the content
> and copy that over to their website.
> They do it from a dial up connection, so the ip changes reguarly,
> however I have found ways to detect them (login names etc).
> What I would like to do is to block their IP:s instantly, my thinking so
> far is:
> detect them in my php scripts,
> write their IP to nginx blocked-ips config file,
> and tell nginx to reload the config files.
> However, since my web scripts is not running as root, it cannot
> restart nginx. (obviously)
> 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,
> nginx mailing list
> nginx at nginx.org
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
More information about the nginx