Created
May 7, 2019 20:24
-
-
Save wellington1993/22fe970b5da65408d4cf5d2ed2bd40d4 to your computer and use it in GitHub Desktop.
Nginx Conf Example
This file contains 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 http2; | |
listen [::]:443 ssl http2; | |
server_name localhost; | |
ssl_certificate /etc/ssl/certs/localhost.crt; | |
ssl_certificate_key /etc/ssl/private/localhost.key; | |
ssl_protocols TLSv1.2 TLSv1.1 TLSv1; | |
# Optimizations | |
ssl_session_cache shared:SSL:120m; | |
ssl_session_timeout 1d; | |
ssl_buffer_size 1k; | |
keepalive_timeout 300; | |
keepalive_requests 1024; | |
tcp_nodelay on; | |
tcp_nopush on; | |
sendfile on; | |
location / { | |
proxy_http_version 1.1; | |
proxy_pass http://unix:///tmp/server-puma; | |
proxy_redirect off; | |
proxy_set_header Connection ""; | |
proxy_set_header Connection keep-alive; | |
proxy_set_header Host $host; | |
proxy_set_header Keep-Alive timeout=30,max=100; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Forwarded-Proto $scheme; | |
proxy_set_header X-Real-IP $remote_addr; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment