我在Ubuntu上安装了Nginx,我有下一个配置文件:
server {
root /www/test;
index index.html index.htm;
server_name .dev.mysite.info;
我在目录/ www / test中有HTML文件,一切正常.
现在我想将我的文件夹更改为软链接:
lrwxrwxrwx 1 root root 33 Jun 17 10:39 test -> /root/Dropbox/digital_ocean/test/
但是在浏览器中获取错误消息:
"500 Internal Server Error"
为什么以及如何解决它?
更新:
root@ocean:/var/log/nginx# cat error.log
2013/06/17 11:40:27 [crit] 26197#0: *1 stat() "/www/test/" failed (13: Permission denied),client: 195.239.188.28,server: dev.meditat0r.info,request: "GET / HTTP/1.1",host: "meditat0r.info"
2013/06/17 11:40:27 [crit] 26197#0: *1 stat() "/www/test/" failed (13: Permission denied),host: "meditat0r.info"
2013/06/17 11:40:27 [crit] 26197#0: *1 stat() "/www/test/index.html" failed (13: Permission denied),host: "meditat0r.info"
...
2013/06/17 11:40:27 [error] 26197#0: *1 rewrite or internal redirection cycle while internally redirecting to "/index.html",host: "meditat0r.info"
最佳答案
root文件夹的基本默认权限是rwx —–所以除root之外的任何人都可以从中读取/写入.你可以:
a)将您的Dropbox文件夹移动到其他位置(首选方式:创建单独的非root用户)
b)更改/ root文件夹的权限(永远不要这样做!)