私はサーバーの設定が初めてです。そして、Amazon-EC2 インスタンスを構成したいと考えています。このドキュメントに従って設定しました。http://www.soundrenalin.com/about
ただし、URLをクリックすると502 Bad Gateway
エラーが発生します。私のプロジェクトは次のパスにあります: /home/ubuntu/dsn/app
.
フォルダ ツリーは次
のとおりです。/home/ubuntu/dsn
app/
app.py
static/
templates/
themes/
bin/
build/
include/
lib/
local/
run.py
これが私のnginx構成です(/etc/nginx/sites-available/default
):
server {
listen 80;
root /home/ubuntu/dsn/app
index index.html index.htm;
server_name localhost;
location / { try_files $uri @app; }
location @app {
include uwsgi_params;
uwsgi_pass unix:/tmp/uwsgi.sock;
}
}
そして、ここに私のuwsgi.ini
ファイルがあります:
[uwsgi]
chdir = /home/ubuntu/dsn/
uid = www-data
gid = www-data
chmod-socket = 666
socket = /tmp/uwsgi.sock
module = run
virtualenv = /home/ubuntu/dsn/
そしてもう1つは
、コマンドを実行するとtail -f /var/log/nginx/error.log
結果が次のようになることです。
2013/06/09 15:58:11 [error] 5321#0: *1 connect() to unix:/tmp/uwsgi.sock failed (111: Connection refused) while connecting to upstream, client: <myip>, server: localhost, request: "GET / HTTP/1.1", upstream: "uwsgi://unix:/tmp/uwsgi.sock:", host: "54.218.14.213"
どうすればこれを解決できますか? ありがとう。