Skip to content

Instantly share code, notes, and snippets.

@strets123
Created May 12, 2017 10:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save strets123/199e875a6b747cb610afc8623e26c432 to your computer and use it in GitHub Desktop.
Save strets123/199e875a6b747cb610afc8623e26c432 to your computer and use it in GitHub Desktop.
daemon off;
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 80;
server_name localhost;
charset utf-8;
client_max_body_size 75M;
rewrite ^login https://\$server_name\$request_uri? permanent;
location /zegami {
try_files $uri @yourapplication;
}
location @yourapplication {
include uwsgi_params;
uwsgi_pass unix:///tmp/zegami-uwsgi.sock;
include uwsgi_params; #add a script name parameter
uwsgi_param SCRIPT_NAME /zegami;
uwsgi_modifier1 30; #give uwsgi permission
}
}
server {
listen 443;
ssl on;
ssl_certificate /opt/zegami_python/anaconda/etc/ssl/localhost.crt;
ssl_certificate_key /opt/zegami_python/anaconda/etc/ssl/localhost.key;
server_name localhost;
charset utf-8;
client_max_body_size 75M;
location /zegami {
try_files $uri @yourapplication;
}
location @yourapplication {
include uwsgi_params;
uwsgi_pass unix:///tmp/zegami-uwsgi.sock;
include uwsgi_params; #add a script name parameter
uwsgi_param SCRIPT_NAME /zegami;
uwsgi_modifier1 30; #give uwsgi permission
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment