Last active
December 13, 2019 14:17
-
-
Save dulanism/afc4024bfa6b4a2f3275326940942e15 to your computer and use it in GitHub Desktop.
Sample nginx.conf
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
events { | |
worker_connections 768; | |
# multi_accept on; | |
} | |
http { | |
proxy_send_timeout 120; | |
proxy_read_timeout 300; | |
proxy_buffering off; | |
keepalive_timeout 5 5; | |
tcp_nodelay on; | |
server { | |
listen 443 ssl; | |
server_name repo.example.com; | |
# allow large uploads of files | |
client_max_body_size 1G; | |
# optimize downloading files larger than 1G | |
#proxy_max_temp_file_size 2G; | |
#ssl on; | |
ssl_certificate example.cert; | |
ssl_certificate_key example.key; | |
location / { | |
# Use IPv4 upstream address instead of DNS name to avoid attempts by nginx to use IPv6 DNS lookup | |
proxy_pass http://127.0.0.1:8081/; | |
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