python - Problems Serving Flask through Nginx -
i unable serve flask through nginx. looked through logs , says:
traceback (most recent call last): file "/var/www/site.me/server.py", line 1, in <module> flask import flask importerror: no module named flask sun jun 8 09:35:30 2014 - unable load app 0 (mountpoint='') (callable not found or import error) sun jun 8 09:35:30 2014 - *** no app loaded. going in full dynamic mode *** sun jun 8 09:35:30 2014 - *** uwsgi running in multiple interpreter mode *** sun jun 8 09:35:30 2014 - spawned uwsgi master process (pid: 2176) sun jun 8 09:35:30 2014 - spawned uwsgi worker 1 (pid: 2180, cores: 1) sun jun 8 09:35:30 2014 - spawned uwsgi worker 2 (pid: 2181, cores: 1)
however, in virtual environment, made sure flask installed. configuration file nginx.
server { listen 80; root /var/www/site; index index.html index.htm; error_log /root/documents/site; rewrite_log on; server_name www.site.me; location / { include uwsgi_params; uwsgi_pass unix:/tmp/site.sock; uwsgi_param uwsgi_chdir /var/www/site/env; uwsgi_param uwsgi_pyhome /var/www/site/env; uwsgi_param uwsgi_module server; uwsgi_param uwsgi_callable app; } }
this config uwsgi.
[uwsgi] vhost = true socket = /tmp/site.sock venv = /var/www/site.sock/.env chdir = /var/www/site.me/ module = server callable = app no-site= true
i extremely grateful help.
Comments
Post a Comment