#sample nginx default config file for iottalk using uwsgi server { listen 9999; #allow 127.0.0.1 ; #deny all; access_log off; location / { include uwsgi_params; uwsgi_pass unix:/tmp/uwsgi_csm.sock; #uwsgi_pass 127.0.0.1:9999; uwsgi_param UWSGI_PYHOME /home/iottalkuser/iottalk_server_1.0/lib; uwsgi_param UWSGI_SCRIPT csm:app; } } server { listen 7788; access_log off; location / { include uwsgi_params; uwsgi_pass unix:/tmp/uwsgi_ccm.sock; uwsgi_param UWSGI_PYHOME /home/iottalkuser/iottalk_server_1.0/lib/ccm; uwsgi_param UWSGI_SCRIPT ccm:app; } } server { access_log off; listen 80 default_server; #server_name iottalk.vip; location / { proxy_pass http://localhost:9999; proxy_set_header Host $host; } location /static/ { proxy_pass http://localhost:9999/static/; proxy_set_header Host $host; } location /map/ { proxy_pass http://localhost:8866/; proxy_set_header Host $host; } # location /static/ { # proxy_pass http://localhost:8866/static/; # proxy_set_header Host $host; # } location /secure/ { proxy_pass http://localhost:8866/secure/; proxy_set_header Host $host; } location /socket.io/ { proxy_pass http://localhost:8866/socket.io/; proxy_set_header Host $host; } }