67 lines
1.8 KiB
Plaintext
67 lines
1.8 KiB
Plaintext
upstream harbor_active {
|
|
include /etc/nginx/harbor-active-server.conf;
|
|
keepalive 32;
|
|
}
|
|
|
|
upstream harbor_minio {
|
|
server 127.0.0.1:9000;
|
|
keepalive 16;
|
|
}
|
|
|
|
server {
|
|
listen 80;
|
|
listen [::]:80;
|
|
server_name threads-tool-dev.30cm.net 10.0.0.33;
|
|
|
|
root /opt/harbor/current/web;
|
|
index index.html;
|
|
client_max_body_size 100m;
|
|
|
|
location = /health {
|
|
proxy_pass http://harbor_active/api/v1/health;
|
|
proxy_set_header Host $host;
|
|
}
|
|
|
|
location /api/ {
|
|
proxy_pass http://harbor_active;
|
|
proxy_http_version 1.1;
|
|
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_set_header Origin "";
|
|
proxy_set_header Authorization $http_authorization;
|
|
proxy_set_header X-Member-Authorization $http_x_member_authorization;
|
|
proxy_set_header Connection "";
|
|
proxy_buffering off;
|
|
proxy_cache off;
|
|
proxy_read_timeout 3600s;
|
|
proxy_send_timeout 3600s;
|
|
}
|
|
|
|
location /haixun-assets/ {
|
|
proxy_pass http://harbor_minio;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Host $http_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;
|
|
expires 7d;
|
|
add_header Cache-Control "public" always;
|
|
}
|
|
|
|
location /assets/ {
|
|
try_files $uri =404;
|
|
expires 1y;
|
|
add_header Cache-Control "public, immutable" always;
|
|
}
|
|
|
|
location = /index.html {
|
|
add_header Cache-Control "no-cache, no-store, must-revalidate" always;
|
|
}
|
|
|
|
location / {
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
}
|