mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-09 20:21:53 +01:00
67 lines
1.4 KiB
Nginx Configuration File
67 lines
1.4 KiB
Nginx Configuration File
|
worker_processes auto;
|
||
|
|
||
|
events {
|
||
|
worker_connections 1024;
|
||
|
use epoll;
|
||
|
multi_accept on;
|
||
|
}
|
||
|
|
||
|
http {
|
||
|
tcp_nodelay on;
|
||
|
|
||
|
# this is necessary for us to be able to disable request buffering in all cases
|
||
|
proxy_http_version 1.1;
|
||
|
|
||
|
|
||
|
upstream registry {
|
||
|
server registry:5000;
|
||
|
}
|
||
|
|
||
|
upstream ui {
|
||
|
server ui:80;
|
||
|
}
|
||
|
|
||
|
|
||
|
server {
|
||
|
listen 80;
|
||
|
|
||
|
# disable any limits to avoid HTTP 413 for large image uploads
|
||
|
client_max_body_size 0;
|
||
|
|
||
|
location / {
|
||
|
proxy_pass http://ui/;
|
||
|
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 $scheme;
|
||
|
proxy_buffering off;
|
||
|
proxy_request_buffering off;
|
||
|
}
|
||
|
|
||
|
location /v1/ {
|
||
|
return 404;
|
||
|
}
|
||
|
|
||
|
location /v2/ {
|
||
|
proxy_pass http://registry/v2/;
|
||
|
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 $scheme;
|
||
|
proxy_buffering off;
|
||
|
proxy_request_buffering off;
|
||
|
|
||
|
}
|
||
|
|
||
|
location /service/ {
|
||
|
proxy_pass http://ui/service/;
|
||
|
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 $scheme;
|
||
|
proxy_buffering off;
|
||
|
proxy_request_buffering off;
|
||
|
}
|
||
|
}
|
||
|
}
|