Created
May 12, 2017 10:23
-
-
Save strets123/199e875a6b747cb610afc8623e26c432 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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