nginx not using root from location

Francis Daly francis at
Tue Jul 12 17:30:08 UTC 2016

On Tue, Jul 12, 2016 at 10:47:56AM -0400, reaper wrote:

Hi there,

> Hello. I'm obviously missing something but I'm not quite sure what.

You don't have a "root" directive inside the location.

Your "index" directive as-written has three arguments, although you want
it to only have one.

>   location /testlocation {
>     index index.html
>     root /data/www/htdocs/test;
>   }

Add a semicolon to tell nginx that your "index" directive is complete.

Francis Daly        francis at

More information about the nginx mailing list