This is tutorial Hotlink Protection in Nginx, hotlink protect images and other file types using a simple location directive in Nginx vhost configuration file :
# nano /etc/nginx/conf.d/yourvhost.conf
...
# Hotlink Protection with Nginx
location ~* \.(png|gif|jpg|jpeg|swf|ico)$ {
root /var/www/yourdomain.com/public_html;
valid_referers none blocked yourdomain.com www.yourdomain.com ~\.google\.
# nano /etc/nginx/conf.d/yourvhost.conf
...
# Hotlink Protection with Nginx
location ~* \.(png|gif|jpg|jpeg|swf|ico)$ {
root /var/www/yourdomain.com/public_html;
valid_referers none blocked yourdomain.com www.yourdomain.com ~\.google\.
Hotlink Protection with Nginx
4/
5
Oleh
Admin