Re: valid_referers dynamic hostname

2013-05-24 Thread vlad...@binkmail.com
Thanks alot! I made a logical error when writing your expression by thinking that it will negate the comparison. Also, I appreciate you have explained that http/https matching as I was confused. My best regards, Vlad Maxim Dounin Wrote: ---

Re: valid_referers dynamic hostname

2013-05-20 Thread Maxim Dounin
Hello! On Mon, May 20, 2013 at 02:14:02PM -0400, vlad...@binkmail.com wrote: > Hello, > > Thank you for your example Maxim. This is what I've wrote in my config: > > set $temp "$host:$http_referer"; > > valid_referers none blocked server_names ~\.google\. ~\.yahoo\. ~\.bing\. > ~\.ask\. ~\.liv

Re: valid_referers dynamic hostname

2013-05-20 Thread B.R.
I suggest you take a look at the order in which 'if' statements are evaluated. Consider reading the 'if' directive documentation . --- *B. R.* On Mon, May 20, 2013 at 2:14 PM, vlad...@binkmail.com wrote: > Hello, > > Thank you for yo

Re: valid_referers dynamic hostname

2013-05-20 Thread vlad...@binkmail.com
Hello, Thank you for your example Maxim. This is what I've wrote in my config: set $temp "$host:$http_referer"; valid_referers none blocked server_names ~\.google\. ~\.yahoo\. ~\.bing\. ~\.ask\. ~\.live\. ~\.googleusercontent.com\. ; if ($invalid_referer){ set $test A ; } if ($temp ~* "^(.

Re: valid_referers dynamic hostname

2013-05-20 Thread Maxim Dounin
Hello! On Sat, May 18, 2013 at 01:31:50PM -0400, vlad...@binkmail.com wrote: > Sorry for posting here - don't know for sure if it's the right place. > > I have an issue: > > 1) I use nginx as reverse proxy, but I don't always know the domain name for > which I'm serving, so my setup looks like

Re: valid_referers dynamic hostname

2013-05-20 Thread vlad...@binkmail.com
Also, Isn't this a bug since I have added server_names to valid_referers? And since server_names knows the domain, it should work... Any ideas? Posted at Nginx Forum: http://forum.nginx.org/read.php?2,239318,239343#msg-239343 ___ nginx mailing list

valid_referers dynamic hostname

2013-05-18 Thread vlad...@binkmail.com
Sorry for posting here - don't know for sure if it's the right place. I have an issue: 1) I use nginx as reverse proxy, but I don't always know the domain name for which I'm serving, so my setup looks like this: server_name _ $host 0.0.0.0; 2) I try to block invalid referers but when I try to