Alias routing in nginx-0.8.13

Dinh Pham lists at ruby-forum.com
Wed Sep 2 23:55:55 MSD 2009


I did as you told but it did not work. Here is my configuration

       location /gostats {
           autoindex on;
           access_log off;
           alias /home/web/usage/site;
           index index.html;
        }

        location ~ /go2stats($|/.*) {
           autoindex on;
           access_log off;
           alias /home/web/munin$1;
        }

While requests to /go2stats work perfectly, requests to /gostats 
generate error logs that indicate Nginx tried to find 
"/home/web/usage/site/index.htmlhtml" instead of 
"/home/web/usage/site/index.html"

Do you think that a bug occurs when someone configures 2 location with 
alias enabled?


Thanks

Igor Sysoev wrote:
> 
>> Is is a bug?
> 
> Yes. This is because of
> 
>     if (-f $request_filename) {
>         break;
>     }
> 
> You do not need this.
> 
> Also, you may use just without any regex:
> 
>          location /gostats {
>             autoindex on;
>             access_log off;
>             alias /home/web/usage/site;
>             index index.html;
>          }

-- 
Posted via http://www.ruby-forum.com/.





More information about the nginx mailing list