flask + nginx + uwsgi で開発したwebサイトにアクセスしたいです。
さくらのVPSを使って、flask + nginx + uwsgiでサイトを作ったのですが、ブラウザからアクセスできないです。
各々の設定は以下のようになっています。
・nginx.conf
user nginx; worker_processes 1; error_log /var/log/nginx/error.log warn; pid /var/run/nginx.pid; events { worker_connections 1024; } http { include /etc/nginx/mime.types; default_type application/octet-stream; log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; access_log /var/log/nginx/access.log main; sendfile on; keepalive_timeout 65; server { listen 80; server_name localhost; location / { root /usr/share/nginx/html; index index.html index.htm; } location /uwsgi { include uwsgi_params; uwsgi_pass unix:///tmp/project.sock; } error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/share/nginx/html; } } }
・uwsgi.ini
[uwsgi] current_release = /home/user/project wsgi-file = %(current_release)/app/views.py callable = app daemonize = %(current_release)/log/uwsgi.log log-reopen = true log-maxsize = 8000000 logfile-chown = on logfile-chmod = 644 processes = 4 threads = 2 thunder-lock = true max-requests = 3000 max-requests-delta = 300 master = true pidfile = %(current_release)/uwsgi.pid vacuum = true socket = ///tmp/project.sock chmod-socket = 666
アクセスする際は、「hostname -I」と実行した際にでてくるIPアドレスをブラウザのURL入力欄に打ち込みました。
nginxとuwsgiを起動したあと、「curl http://[IPアドレス]」と実行すると、nginxのindex.htmlが返ってきます。
nginxとuwsgiのログを確認したのですが、エラーは発生していないようです。
ずっと詰まっています。ネットワーク周りに詳しい方、ご教授いただけないでしょうか?