|
| 1 | +## Version 2023/03/05 |
| 2 | +# make sure that your nexusoss container is named nexusoss |
| 3 | +# make sure that your dns has a cname set for nexusoss |
| 4 | +# make sure that the port for the nexusoss container 8081 (the first location "/") |
| 5 | +# make sure that the HTTP Connector port for the hosted docker repository is 8082 (the second location "/v2/") |
| 6 | + |
| 7 | +server { |
| 8 | + listen 443 ssl; |
| 9 | + listen [::]:443 ssl; |
| 10 | + |
| 11 | + server_name nexusoss.*; |
| 12 | + |
| 13 | + # allow large uploads of files - refer to nginx documentation |
| 14 | + client_max_body_size 1G; |
| 15 | + |
| 16 | + include /config/nginx/ssl.conf; |
| 17 | + |
| 18 | + location / { |
| 19 | + include /config/nginx/proxy.conf; |
| 20 | + include /config/nginx/resolver.conf; |
| 21 | + set $upstream_app nexusoss; |
| 22 | + set $upstream_port 8081; |
| 23 | + set $upstream_proto http; |
| 24 | + proxy_pass $upstream_proto://$upstream_app:$upstream_port; |
| 25 | + |
| 26 | + proxy_set_header Host $host; |
| 27 | + proxy_set_header X-Real-IP $remote_addr; |
| 28 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
| 29 | + } |
| 30 | + |
| 31 | + location /v2/ { |
| 32 | + include /config/nginx/proxy.conf; |
| 33 | + include /config/nginx/resolver.conf; |
| 34 | + set $upstream_app nexusoss; |
| 35 | + set $upstream_port 8082; |
| 36 | + set $upstream_proto http; |
| 37 | + proxy_pass $upstream_proto://$upstream_app:$upstream_port; |
| 38 | + |
| 39 | + proxy_set_header Host $host; |
| 40 | + proxy_set_header X-Real-IP $remote_addr; |
| 41 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
| 42 | + } |
| 43 | +} |
0 commit comments