делаю так
location ~* ^.+\.(svg|mp3|ogg|mpe?g|zip|gz|bz2?|rar|jpg|png|gif|jpeg|flv)$ {
root /path/to/site/;
valid_referers none blocked server_names ;
if ($invalid_referer) {
return 403;
}
}
nginx -V
nginx version: nginx/0.6.32
configure arguments: --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --pid-path=/var/run/nginx.pid --lock-path=/var/lock/nginx.lock --http-log-path=/var/log/nginx/access.log --http-client-body-temp-path=/var/lib/nginx/body --http-proxy-temp-path=/var/lib/nginx/proxy --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --with-debug --with-http_stub_status_module --with-http_flv_module --with-http_ssl_module --with-http_dav_module
не работает, хоть ты тресни
бекэнд apache2