[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()
failed (2: No such file or directory), client: ip.ad.dr.es, server:
antituhan.com, request: "GET
HTTP/1.1", host: "antituhan.com"

I know why nginx shows 404's error code, the root path is changed from 




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