Created
May 19, 2014 07:56
-
-
Save jakubriedl/cb328650438bed2af2ad to your computer and use it in GitHub Desktop.
nginx SSL terminator for varnish
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 ssl; | |
server_name api.example.com; | |
ssl_certificate /etc/ssl/custom/api.example.com.crt; | |
ssl_certificate_key /etc/ssl/custom/api.example.com.key; | |
ssl_session_cache shared:SSL:1m; | |
ssl_session_timeout 5m; | |
ssl_ciphers HIGH:!aNULL:!MD5; | |
ssl_prefer_server_ciphers on; | |
gzip on; | |
access_log /var/log/nginx/access.log; | |
error_log /var/log/nginx/error.log; | |
client_max_body_size 10M; | |
location / { | |
proxy_pass http://api.example.com:80; | |
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504; | |
proxy_redirect off; | |
#proxy_buffering off; | |
proxy_buffer_size 128k; | |
proxy_buffers 4 256k; | |
proxy_busy_buffers_size 256k; | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
} | |
# location / { | |
# root /usr/share/nginx/html; | |
# index index.html index.htm; | |
# } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment