[ASK] Restrict direct link file access
antituhan
dewanggaba at gmail.com
Thu Aug 19 07:53:53 MSD 2010
This is the error_log from my nginx :
2010/08/19 10:15:24 [error] 10941#0: *56 open()
"/usr/share/nginx/html/e107_files/downloads/OS/89xx/OFFICIAL_8900M_PBr5.0.0_rel1004_PL5.2.0.58_A5.0.0.592_Wind_Hellas.exe"
failed (2: No such file or directory), client: ip.ad.dr.es, server:
antituhan.com, request: "GET
/e107_files/downloads/OS/89xx/OFFICIAL_8900M_PBr5.0.0_rel1004_PL5.2.0.58_A5.0.0.592_Wind_Hellas.exe
HTTP/1.1", host: "antituhan.com"
I know why nginx shows 404's error code, the root path is changed from
/var/www/antituhan/
to
/usr/share/nginx/html/
And this is the latest configuration :
location ~ ^/.*(\.exe|\.rar)$ {
root /path/to/dir/;
deny ip.ad.dr.es/19;
allow all;
}
And, it's works :) Thanks Igor for remind me to read the error_log ^^v
Thanks all, case solved :)
--
View this message in context: http://nginx.2469901.n2.nabble.com/ASK-Restrict-direct-link-file-access-tp5417795p5438868.html
Sent from the nginx mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20100818/1f6faaf6/attachment.html>
More information about the nginx
mailing list