Created
April 17, 2019 22:02
-
-
Save ederparaiso/49742b268413512fffc2dab24fa2c69c to your computer and use it in GitHub Desktop.
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 *:80; | |
server_name my.nexus.url; | |
# and redirect to the non-www host (declared below) | |
return 301 https://my.nexus.url$request_uri; | |
} | |
server { | |
listen 443 ssl; | |
server_name my.nexus.url; | |
# allow large uploads of files | |
client_max_body_size 500M; # used by nexus | |
# optimize downloading files larger than 1G | |
proxy_max_temp_file_size 2G; # used by nexus | |
# ssl certificates config goes there | |
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:$server_port; | |
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 $scheme; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment