Created
February 10, 2016 04:00
-
-
Save macknilan/c62bda0e70e4c77e0066 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
upstream myapp { | |
server 0.0.0.0:8000; | |
} | |
server { | |
listen 80; # EL PUERTO EN EL QUE ESTOY ESCUCHANDO EN EL SERVIDOR | |
listen [::]:80 default_server ipv6only=on; | |
server_name muebleria.rodolfougalde.xyz; | |
server_tokens off; #NO DESPLEGAR LA VERSION DE NGINX EN ERROR LOGS | |
access_log /var/log/nginx/myapp.log; # LOG DE LOS ERRORES | |
error_log /var/log/nginx/myapp.error.log; # LOG DE LOS ERRORES | |
location = /favicon.ico { access_log off; log_not_found off; } # SE LE DICE A NGINX QUE IGNORE NO PODER ENCONTRAR favicon.ico | |
# Ruta absoluta donde django copia los archivos estaticos | |
# Es el valor que tiene la variable STATIC_ROOT en el setings.py | |
location /static/ { | |
autoindex on; | |
alias /home/muebleria/LandingPage/landingpage/static/; | |
} | |
location /media/ { | |
autoindex on; | |
alias /home/muebleria/LandingPage/landingpage/media/; | |
} | |
location / { | |
# Ruta donde correc nuesta proyecto de django con gunicorn | |
proxy_pass http://myapp; | |
proxy_redirect off; | |
proxy_set_header Host $http_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