A problem with
mike
mike503 at gmail.com
Sun Jun 15 23:25:26 MSD 2008
You're protecting your entire site right now.
You want something more specific like this:
location ~* ^.+\.(jpg|jpeg|gif)$ {
valid_referers none blocked foo.com;
if ($invalid_referer) {
return 403;
}
}
Right now you're protecting your entire location / :) You need to
specify what you want. Remember though that media files like wmv and
such that play using plugins don't send referrers typically, so the
majority of your protection will be for images and other assets which
properly send a Referer header.
Then programs like Norton Internet Security (puke) have a setting to
block sending referrers, it might be turned on by default. That got me
in the beginning, I had a lot of complaints... so that is why
"blocked" and "none" are good to be in there, due to all the variety
of browsers and "privacy" or "security" programs blocking HTTP
referrer information because the designer thinks that's a neat
feature...
On 6/15/08, baalchina <baalchina at gmail.com> wrote:
> Hello everyone, I have a problem with anti leech config
>
> my config file, like this:
>
>
> location / {
> valid_referers none blocked bbs.mysite.com *.mysite.com;
> if ($invalid_referer) {
> return 403;
> }
>
>
> It works good, but I have a problem. When I search my site in google, click
> the site url, the browser returns a 403 error. I must press refresh, then
> the site shows.
>
> I think the problem is with anti leech config, so, how can I change the
> setting? I just want to protect my images or mp3s.
>
> Thanks very much~
>
>
> --
> from:baalchina
More information about the nginx
mailing list