立项配置页初步优化

This commit is contained in:
Cheng Zhou
2026-02-24 16:53:22 +08:00
parent 0693f09b1d
commit 8f3f717e48
124 changed files with 12519 additions and 2954 deletions
+22 -2
View File
@@ -10,6 +10,7 @@ events {
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
resolver 127.0.0.11 valid=10s ipv6=off;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
@@ -21,11 +22,13 @@ http {
keepalive_timeout 65;
upstream frontend {
server frontend:5173;
zone frontend 64k;
server frontend:5173 resolve;
}
upstream backend {
server backend:8000;
zone backend 64k;
server backend:8000 resolve;
}
server {
@@ -33,6 +36,15 @@ http {
server_name _;
client_max_body_size 20m;
location = /favicon.ico {
root /usr/share/nginx/html;
try_files /favicon.ico =204;
access_log off;
log_not_found off;
expires 1d;
add_header Cache-Control "public, max-age=86400" always;
}
location /api/ {
proxy_pass http://backend;
proxy_set_header Host $host;
@@ -41,6 +53,14 @@ http {
proxy_set_header X-Forwarded-Proto $scheme;
}
location /health {
proxy_pass http://backend;
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;
}
location / {
proxy_pass http://frontend;
proxy_http_version 1.1;