Last active
April 16, 2019 15:54
-
-
Save legalsylvain/0c280677966f078b7868d43069d56af2 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
server { | |
listen 443; | |
server_name ERP.MY_DOMAIN.TLD; | |
# Time Out | |
proxy_connect_timeout 60000; | |
proxy_send_timeout 60000; | |
proxy_read_timeout 60000; | |
send_timeout 60000; | |
keepalive_timeout 60000; | |
# Log File | |
access_log /var/log/nginx/ERP.MY_DOMAIN.TLD.access.log; | |
error_log /var/log/nginx/ERP.MY_DOMAIN.TLD.error.log; | |
# SSL Files | |
ssl on; | |
ssl_certificate /etc/letsencrypt/live/ERP.MY_DOMAIN.TLD/fullchain.pem; | |
ssl_certificate_key /etc/letsencrypt/live/ERP.MY_DOMAIN.TLD/privkey.pem; | |
ssl_trusted_certificate /etc/letsencrypt/live/ERP.MY_DOMAIN.TLD/chain.pem; | |
# set headers | |
proxy_set_header Host $host; | |
proxy_set_header X-Forwarded-Proto $scheme; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-Host $host; | |
# Default Location | |
location / { | |
proxy_pass http://127.0.0.1:8069; | |
} | |
# cache some static data in memory for 60mins | |
location ~* /web/static/ { | |
proxy_pass http://127.0.0.1:8069; | |
proxy_cache_valid 200 60m; | |
proxy_buffering on; | |
expires 864000; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment