nginx - hotlinking

Thu Oct 6 17:34:44 UTC 2011

Hi Igor Sysoev,

Could you please help how to stop badguys from hotlinking my images.

I try a lot of code and nothing happens

I don't know which file to edit

I use this code   in  sudo nano /usr/local/nginx/sites-available/

# Stop deep linking or hot linking
location /uploads/ {
  valid_referers none blocked;
   if ($invalid_referer) {
     return   403;

But I'm always have an error.

I'll appreciate your help.

thank you very much!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list