在debian squeeze中我的nginx中有一个非常默认的站点启用设置,我现在试图让它在myhost / munin /上提供我的munin图表
下面是我添加到配置中的位置
location /munin
{
root /var/cache/munin/www/;
index index.htm index.html;
}
这是我收到的错误:
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: ""
这个设置习惯于在apache中“正常工作”.我是nginx的新手,所以有点迷失为什么在寻找路径时添加额外的/ munin.任何建议?
最佳答案
您需要使用
alias
指令,而不是root:
location /munin/ {
alias /var/cache/munin/www/;
}
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。