-
-
Save jabley/748880 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; ## listen for ipv4 | |
listen [::]:443 default ssl ipv6only=on; ## listen for ipv6 | |
ssl on; | |
ssl_certificate /etc/ssl/certs/www.varnish-cache.org-http.pem; | |
ssl_certificate_key /etc/ssl/private/www.varnish-cache.org-http.pem; | |
server_name www.varnish-cache.org; | |
access_log /var/log/nginx/localhost.access.log; | |
location / { | |
proxy_pass http://localhost; | |
### force timeouts if one of backend is died ## | |
proxy_next_upstream error timeout | |
invalid_header http_500 http_502 http_503; | |
### Set headers #### | |
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-Proto https; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment