I'm new to using uwsgi and nginx and I haven't been able to figure out why I am getting this error from uwsgi:
ImportError: No module named mysite
unable to load app 0 (mountpoint='my_ipaddr|') (callable not found or import error)
Here is my nginx config file:
server {
listen 80;
server_name my_ipaddr;
location /static {
alias /var/www/mysite/static;
}
location / {
include uwsgi_params;
uwsgi_pass unix:/tmp/mysite.sock;
uwsgi_param UWSGI_PYHOME /var/www/mysite/venv;
uwsgi_param UWSGI_CHDIR /var/www/mysite;
uwsgi_param UWSGI_MODULE app;
uwsgi_param UWSGI_CALLABLE app;
}
Here is my mysite.ini for uwsgi:
[uwsgi]
vhost=true
socket=/tmp/mysite.sock
venv = /var/www/mysite/venv
Here is my app.py:
from flaskext.markdown import Markdown
from views import app
Markdown(app)
def main():
app.run()
if __name__ == '__main__':
main()
I am able to run the app with uwsgi when launching it from the command line but I haven't been able to get it working with nginx using the above setup.