root works, alias doesn't

Grant emailgrant at gmail.com
Wed Sep 25 18:14:00 UTC 2013


Can anyone tell me why this works:

root /var/www/localhost/htdocs;
location / {
    root /var/www/localhost/htdocs/webalizer/;
}

And this doesn't:

root /var/www/localhost/htdocs;
location / {
    alias /webalizer/;
}

I get:

"/webalizer/index.html" is not found (2: No such file or directory)

/var/www/localhost/htdocs/webalizer/index.html does exist.

- Grant



More information about the nginx mailing list