Created
March 2, 2017 00:39
-
-
Save garethgreenaway/01831ae5ce171ea859518588c463370d to your computer and use it in GitHub Desktop.
This file contains 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
# gunicorn config | |
CONFIG = { | |
# 'mode': 'wsgi', | |
'working_dir': '/usr/lib/python2.7/dist-packages/salt/netapi/rest_cherrypy', | |
# 'python': '/usr/bin/python', | |
'args': ( | |
'--bind=0.0.0.0:8000', | |
'--workers=2', | |
'--timeout=600', | |
'--user=root', | |
'--log-level=debug', | |
'wsgi', | |
), | |
} | |
# nginx config | |
upstream salt_api { | |
# So that docker is a drop-in replacement | |
server 127.0.0.1:8000; | |
} | |
server { | |
listen 0.0.0.0:8080 default_server ssl; | |
listen 0.0.0.0:8443 default_server ssl; | |
ssl_certificate certificate.crt; | |
ssl_certificate_key certificate.key; | |
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; | |
ssl_ciphers HIGH:!aNULL:!MD5; | |
charset utf-8; | |
client_max_body_size 50M; | |
access_log /var/log/nginx/access.log; | |
error_log /var/log/nginx/error.log; | |
location / { | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-Host $host; | |
proxy_set_header X-Forwarded-Server $host; | |
proxy_set_header X-Forwarded-Proto https; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header Host $http_host; | |
proxy_redirect off; | |
proxy_pass http://salt_api; | |
proxy_read_timeout 300s; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment