Changes between Initial Version and Version 2 of Ticket #728


Ignore:
Timestamp:
06/17/15 12:59:38 (10 years ago)
Author:
Maxim Dounin
Comment:

The problem is that alias set doesn't ends with / for directories. This results in incorrect paths created by index module (it will try to use something like /path/to/directoryindex.html, and also affects how autoindex works (when opening a directory it strips the last character in path, assuming it's /). Trivial fix is to rewrite config to make sure directory paths from alias ends with /, like this:

location ~ ^/api/(?<module>.+/)doc/ {
    autoindex on;
    index index.html;
    alias /home/dmac/www/hub/hub/modules/RestApi/Resources/Doc/$1;
    error_log /var/log/nginx/hub-test-error.log debug;
}

Note well that correct behaviour happens automatically when using root.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #728

    • Property Status newclosed
    • Property Resolutionwontfix
  • Ticket #728 – Description

    initial v2  
    22
    33its part
    4 
     4{{{
    55location ~ ^/api/(?<module>.+)/doc/ {
    66    autoindex on;
     
    99    error_log /var/log/nginx/hub-test-error.log debug;
    1010}
     11}}}
    1112But when i make request, i have error
    1213