Created
December 17, 2015 17:52
-
-
Save fellipeh/16dd84bbab6f7e79eea4 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
aquivo: site1.conf | |
--------------------------- | |
upstream site1 { | |
server unix:/home/ubuntu/sites/site1/run/gunicorn.sock fail_timeout=0; | |
} | |
server { | |
listen 80; | |
server_name www.site1.com.br site1.com.br; | |
client_max_body_size 50M; | |
charset utf-8; | |
access_log off; | |
location /static/ { | |
alias /home/ubuntu/sites/site1/app/static/; | |
expires max; | |
} | |
location / { | |
proxy_pass http://site1; | |
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; | |
client_max_body_size 10m; | |
client_body_buffer_size 128k; | |
proxy_connect_timeout 90; | |
proxy_send_timeout 90; | |
proxy_read_timeout 90; | |
proxy_buffer_size 4k; | |
proxy_buffers 4 32k; | |
proxy_busy_buffers_size 64k; | |
proxy_temp_file_write_size 64k; | |
} | |
} | |
/*/*/*/*/*/* | |
aquivo: site2.conf | |
--------------------------- | |
upstream site2 { | |
server unix:/home/ubuntu/sites/site2/run/gunicorn.sock fail_timeout=0; | |
} | |
server { | |
listen 80; | |
server_name site2.net.br www.site2.net.br; | |
return 301 https://www.site2.net.br$request_uri; | |
} | |
server { | |
listen 443; | |
ssl on; | |
ssl_certificate /home/ubuntu/sites/site2/certs/bundle.crt; | |
ssl_certificate_key /home/ubuntu/sites/site2/certs/soofertas.key; | |
server_name site2.net.br www.site2.net.br; | |
client_max_body_size 50M; | |
charset utf-8; | |
access_log off; | |
location /static/ { | |
alias /home/ubuntu/sites/site2/app/static/; | |
expires max; | |
} | |
location / { | |
proxy_pass http://site2; | |
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; | |
client_max_body_size 10m; | |
client_body_buffer_size 128k; | |
proxy_connect_timeout 90; | |
proxy_send_timeout 90; | |
proxy_read_timeout 90; | |
proxy_buffer_size 4k; | |
proxy_buffers 4 32k; | |
proxy_busy_buffers_size 64k; | |
proxy_temp_file_write_size 64k; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment