windows - nginx configuration won't deliver static assets -
I want to distribute static assets through a virtual directory, but I'm stuck with the following two problems.
- I am redirected to a URL where NGX wants to add a previous slash to the file name and
- The system thinks that I have a directory list instead of a file I want to, Nginx as a result is working wrong. Error: From the .log file example:
2014/04/24 11:21:37 [error] 6808 # 6952: * 15 directory index " E: / FileRaver / Intranet / "is prohibited, Client: 192.168.110.79, Server: Intrast, Request:" GET /intraStatic/employees/0C0C3E08-5056-A300-0E2C2FF5D437C6A3.png/http / 1.1 ", Host: "Intrast"
Snippet from my config file:
location ~ / intrastatic / {auto-index close; Aliases E: / file / intranet /; break; }
Since the log contains the path mentioned in the alias I know that the location block has not been ignored, but I can not access the files here, even if the file system The permissions are okay and the file exists and nothing has been corrupted.
Since Google responds with the results, where each one is even more useless than the previous caste, I can only hope that
< Thank you for your reply
from ngx_http_core_module:
If a location is defined by the prefix string with a slash character Ends, and requests by proxy_pass, fastcgi_pass, scgi_pass, uwsgi_pass, or one of the memcached_pass If implemented, in response to the URI request equal to this string, but without the following slash, with a 301 code, a permanent redirect slash will be returned in the requested URR. If this is not desired, an exact match of the URI and location can be defined as such:
location / user / {proxy_pass http: //user.example. com; } Location = / user {proxy_pass http://login.example.com; }
Try this:
place ~ / Intrastatic {
Comments
Post a Comment