Nginx - hotlinking

Hi Igor S.,

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/
elestandard.com

Stop deep linking or hot linking

location /uploads/ {
valid_referers none blocked www.example.com example.com;
if ($invalid_referer) {
return 403;
}
}

But I’m always have an error.

I’ll appreciate your help.

thank you very much!

Try posting your full config, it must be matching another location
perhaps.
Otherwise it looks fine.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs