###前提・実現したいこと
Nginx+uwsgiがつなげられません.
(
###発生している問題・エラーメッセージ
*5 connect() to unix:/var/www/example/uwsgi.sock failed (13: Permission denied) while connecting to upstream, client: 127.0.0.1, server: , request: "GET / HTTP/1.1", upstream: "uwsgi://unix:/var/www/example/uwsgi.sock:", host: "127.0.0.1"
###該当のソースコード
example_nginx.conf
1server { 2 listen 80; 3 server_name localhost; 4 charset utf-8; 5 client_max_body_size 75M; 6 7 location / { try_files $uri @yourapplication; } 8 location @yourapplication { 9 include uwsgi_params; 10 uwsgi_pass unix:/var/www/example/example_uwsgi.sock; 11 } 12}
example_uwsgi.ini
1#application's base folder 2base = /var/www/example 3 4#python module to import 5app = hello 6module = %(app) 7 8#virtualenv folder 9virtualenv = /home/nan/.pyenv/versions/nanserver 10 11pythonpath = %(base) 12 13#socket file's location 14socket = /var/www/example/%n.sock 15 16#permissions for the socket file 17chmod-socket = 666 18 19#the variable that holds a flask application inside the module imported at line #6 20callable = app 21 22#location of log files 23logto = /var/log/uwsgi/%n.log 24
myapp.ini
1[uwsgi] 2module = app 3callable = app 4master = true 5processes = 1 6socket = /var/www/example/uwsgi.sock 7chmod-socket = 664 8vacuum = true 9die-on-term = true 10uid = www-data 11gid = www-data
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2017/06/28 03:43