# TARGET-voc-instance 反向代理示例 # 浏览器只访问客户域名;公司中转由后端出站 HTTPS 访问。 server { listen 443 ssl http2; server_name TARGET_HOST; # ssl_certificate /path/to/fullchain.pem; # ssl_certificate_key /path/to/privkey.pem; root /var/www/TARGET-voc-instance/frontend/dist; index index.html; location / { try_files $uri $uri/ /index.html; } location /api/ { proxy_pass http://127.0.0.1:3000/api/; 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 X-Request-Id $request_id; proxy_read_timeout 60s; } location /parse/ { proxy_pass http://127.0.0.1:3000/parse/; 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; } location = /health { proxy_pass http://127.0.0.1:3000/health; } }