Created
July 7, 2014 18:30
-
-
Save CARocha/2407f7bf97cd0687e1c1 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
import os | |
bind = "127.0.0.1:9002" | |
workers = (os.sysconf("SC_NPROCESSORS_ONLN") * 2) + 1 | |
loglevel = "error" | |
pidfile = "/home/pywatch/run/staging-pywatch-site.pid" | |
accesslog = "/home/pywatch/logs/gunicorn/gunicorn-access-staging-pywatch-site.log" | |
errorlog = "/home/pywatch/logs/gunicorn/gunicorn-error-staging-pywatch-site.log" | |
secure_scheme_headers = {'X-FORWARDED-PROTOCOL': 'http', | |
'X-FORWARDED-PROTO': 'http', | |
'X-FORWARDED-SSL': 'off'} |
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
upstream gunicorn_pywatch_staging { | |
server 127.0.0.1:9002; | |
} | |
server { | |
listen 80; | |
server_name staging-pywatch.lucassimon.com.br *.staging-pywatch.lucassimon.com.br; | |
client_max_body_size 10M; | |
keepalive_timeout 15; | |
location / { | |
proxy_redirect off; | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Forwarded-Protocol $scheme; | |
proxy_pass http://gunicorn_pywatch_staging; | |
} | |
location /static/ { | |
root /home/pywatch/sites/staging-pywatch; | |
access_log off; | |
log_not_found off; | |
} | |
location /robots.txt { | |
root /home/pywatch/sites/staging-pywatch/static; | |
access_log off; | |
log_not_found off; | |
} | |
location /favicon.ico { | |
root /home/pywatch/sites/staging-pywatch/static/img; | |
access_log off; | |
log_not_found off; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment