簡體   English   中英

Nginx和Gunicorn獲得許可被拒絕的錯誤

[英]geting permission denied error with nginx and gunicorn

我正在使用django-gunicorn-nginx-virtualenv的網站,但出現404錯誤。 當我檢查nginx錯誤日志時,我得到了:

   connect() to unix:/webapps/myapp/run/gunicorn.sock failed (13: Permission denied)

這是gunicorn.sock的許可:

  srwxrwxrwx 1 myappuser webapps    0 Sep  7 22:17 gunicorn.sock

我使用以下命令檢查nginx是否可以運行:

 ps aux | grep “nginx: worker process” | awk ‘{print $1}’

我得到了:

  nginx
  root 

有人可以幫助我嗎?

您可能已經以root用戶身份安裝了gunicorn,應該重新安裝:

sudo pip uninstall gunicorn
pip install gunicorn

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM