【发布时间】:2015-07-14 14:36:05
【问题描述】:
好的。我已经走到了尽头。我有这个工作,然后我不确定这是否只是巧合,但我在服务器上设置了 VNC 并且它停止工作(按照本教程:https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-vnc-on-ubuntu-14-04)
我通过 Digital Ocean 获得了一个 Django 项目。我按照他们在此处找到的教程进行操作:https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-14-04
sudo nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
cat /var/log/nginx/error.log
015/05/04 22:03:33 [crit] 6399#0: *3 connect() to unix:/path/to/project.sock failed (13: Permission denied) while connecting to upstream, client: ipaddress, server: myproject.com, request: "GET / HTTP/1.1", upstream: "http://unix:/path/to/project.sock:/", host: "myproject.com"
ls -lh ~/myproject
srwxrwxrwx 1 myusername www-data 0 Apr 1 12:37 myproject.sock
我一直在四处寻找,但我找不到任何与我的问题完全匹配的东西,即使我觉得这只是一个愚蠢的许可事情,以某种方式改变了。
如果上面有什么不够清楚的地方,请让我详细说明。
【问题讨论】:
-
我的建议是回滚 VNC 并首先使用不太复杂的设置。但是,如果你想保留 VNC,你可能想尝试这种方法来实现:github.com/kanaka/noVNC/wiki/Proxying-with-nginx
-
说实话,我决定重新启动。该网站在技术上是“活的”,但它真的只适合我。所以我在数据库中没有太多东西,而且都是可以复制的。不过感谢您的链接!
-
不客气!祝你好运。
标签: django ubuntu nginx gunicorn digital-ocean