python - Unable to run 2 different flask apps on same server -


here nginx config

server {     listen       80;     server_name site.com;      location / {         include uwsgi_params;         uwsgi_pass unix:/tmp/uwsgi.sock;         uwsgi_param uwsgi_pyhome /var/www/site/env;         uwsgi_param uwsgi_chdir /var/www/site;         uwsgi_param uwsgi_module app;         uwsgi_param uwsgi_callable app;     }      location /site2 {         include uwsgi_params;         uwsgi_pass unix:/tmp/uwsgi.sock;         uwsgi_param uwsgi_pyhome /var/www/site2/env;         uwsgi_param uwsgi_chdir /var/www/site2;         uwsgi_param uwsgi_module app;         uwsgi_param uwsgi_callable app;     } } 

when visit site.com, i'm being served /var/www/site, , other times /var/www/site2. also, when try visit site.com/site2, i'm being served var/www/site2 , /var/www/site.

what reason inconsistent behavior, , how resolve can use 2 different flask apps without using 2 different domains?

you connecting both of applications through same socket unix:/tmp/uwsgi.sock. have same problem if used different domains.


Comments

Popular posts from this blog

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -