Skip to content

Instantly share code, notes, and snippets.

@jabley
Forked from tfheen/gist:748877
Created December 20, 2010 19:40
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jabley/748880 to your computer and use it in GitHub Desktop.
Save jabley/748880 to your computer and use it in GitHub Desktop.
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