Skip to content

Instantly share code, notes, and snippets.

@haghighi
Created September 4, 2019 12:28
Show Gist options
  • Save haghighi/96d95697f95ffd4091ccdccfe1108e16 to your computer and use it in GitHub Desktop.
Save haghighi/96d95697f95ffd4091ccdccfe1108e16 to your computer and use it in GitHub Desktop.

Revisions

  1. haghighi created this gist Sep 4, 2019.
    18 changes: 18 additions & 0 deletions nexus3-nginx-reverse-proxy
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,18 @@
    server {
    listen *:80;
    server_name repo.samim.int;

    # allow large uploads of files
    client_max_body_size 1G;

    # optimize downloading files larger than 1G
    #proxy_max_temp_file_size 2G;

    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;
    }
    }