Welcome! Log In Create A New Profile

Advanced

Re: valid_referers directive not working correctly

Valentin V. Bartenev
November 12, 2012 04:32AM
On Monday 12 November 2012 13:19:23 justin wrote:
> Ahh right, so basically I have to copy:
>
> valid_referers server_names not-my-domain.com;
> if ($invalid_referer) {
> return 403;
> }
>
> Into the php match block. Is there a way to do this without having the same
> exact code copied into both location blocks?
>

You can put it on the server level.

Basically there are two types of rewrite rules:
- "server" level
- "location" specific

For details, see:
http://nginx.org/en/docs/http/ngx_http_rewrite_module.html

wbr, Valentin V. Bartenev

--
http://nginx.com/support.html
http://nginx.org/en/donation.html

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

valid_referers directive not working correctly

Anonymous User November 12, 2012 04:03AM

Re: valid_referers directive not working correctly

VBart November 12, 2012 04:14AM

Re: valid_referers directive not working correctly

Anonymous User November 12, 2012 04:19AM

Re: valid_referers directive not working correctly

Igor Sysoev November 12, 2012 04:28AM

Re: valid_referers directive not working correctly

Valentin V. Bartenev November 12, 2012 04:32AM

Re: valid_referers directive not working correctly

Anonymous User November 12, 2012 04:46AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 58
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