Welcome! Log In Create A New Profile

Advanced

Redirect based on php-set cookies

February 18, 2010 05:04PM
Hi guys,

I am planning to use nginx as reserve proxy in front my Apache server. Our site is under heavy DoS attack, where attacker sends a lot of malformed HTTP request to flood Apache. I intend to filter out the attacker by:

- Setting up nginx as reserve proxy

- If user connect for the first time, redirect to a test.php page, where a captcha is used to detect if it is really human.

- If pass, a secret cookie is set to identify this user for a period of time. With this cookie, user will be able to go further into Apache.

As a result, I need to have some kind of rewrite rule based on checking cookie value (this is calculated by sha1 REMOTE_ADDR + REQUEST_DATE, for example, for each user). Could anyone suggest a easy way of implementing this with nginx?

Thanks!
Subject Author Posted

Redirect based on php-set cookies

tqvn2004 February 18, 2010 05:04PM

Re: Redirect based on php-set cookies

tqvn2004 February 22, 2010 04:11PM

Re: Redirect based on php-set cookies

tqvn2004 September 21, 2010 04:05PM

Re: Redirect based on php-set cookies

tqvn2004 February 10, 2011 07:11AM

Re: Redirect based on php-set cookies

tqvn2004 February 10, 2011 07:42AM

Re: Redirect based on php-set cookies

Kev December 10, 2011 11:21AM

Re: Redirect based on php-set cookies

tqvn2004 February 24, 2010 09:06AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 74
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready