I am trying to open a static file with root function. Here is my NGiNX config:
location = /test {
root /var/53c74dc1c284ff0d63b019fd736f2c7965939e0452104120130821064016.png;
}
I get this error in my browser:
404 Not Found
Also it does not seem to produce any errors in the NGiNX error logs.
I am using Ubuntu 12.
And I am using NGiNX version 1.2.7.
If you're trying to serve a single, specific file with the URI given for that
location
, usealias
instead ofroot
.Loading
http://www.example.com/test
will then serve the named file.The
root
command is for directories, not files.Try this, and move the PNG under your normal web root: