unable to forbidden access by ip

baalchina baalchina at gmail.com
Fri Jun 18 14:32:51 UTC 2021

Hi all,
I am using nginx as my reverse proxy, and I do not want all Excel files in
my server to be accessed in the internet. So I add this in my nginx.conf:

    location ~* \.(xls|xlsx)$ {
        deny all;

while my intranet address is I found in internet, nginx return
a 403 error, that's correct.

But in my intranet, which ip in, nginx return a 404 error. I
looked the error.log, it return like this:

[nginx][error] open() "/etc/nginx/html/_upload/article/files/d7/c2.xlsx"
failed (2: No such file or directory), client:, server: xxxxx
request: "GET /_upload/article/files/d7/c2.xlsx HTTP/1.1", host: "xxx",
referrer: "xxx"

So, is there anything wrong in my config file?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20210618/51eec049/attachment.htm>

More information about the nginx mailing list