Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've got a pretty much default sites-enabled set up in my nginx on debian squeeze and i'm now trying to get it to serve up my munin graphs on myhost/munin/

Heres the location i've added to the config

       location /munin
                    root /var/cache/munin/www/;
                    index index.htm index.html;

And here is the error I recieve:

            2012/07/09 23:52:03 [error] 3598#0: *13 "/var/cache/munin/www/munin/index.htm" is not found (2: No such file or directory), client: 93.*.*.*, server: , request: "GET /munin/ HTTP/1.1", host: ""

This set up used to 'just work' in apache. I'm new to nginx so a bit lost as to why its adding the extra /munin when looking for the path. Any advice?

share|improve this question
up vote 5 down vote accepted

You need to use the alias directive, rather than root:

location /munin/ {
    alias /var/cache/munin/www/;
share|improve this answer
Perfect, Thank you so much! – Michael Jefferys Jul 10 '12 at 6:10

Try this

root /var/cache/munin/www/;

location /

                    index index.htm index.html;

Whats going on here (for dummies mode, no offence):

First we are telling nginx where the DocRoot is, which is /var/.... meaning all future "location" refer to path under this.

then location is simply referencing the top "/" path of this directory

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.