upstream official_backend { server 192.168.70.15:3000; # 机器A的内网地址 } log_format official_log '客户端IP: $remote_addr | 用户: $remote_user | 时间: $time_local | ' '请求方法和路径: "$request" | 状态码: $status | 响应大小: $body_bytes_sent | ' '来源页面: "$http_referer" | 客户端UA: "$http_user_agent" | ' '上游服务器: $upstream_addr | 上游响应耗时: $upstream_response_time | ' '请求总耗时: $request_time | Host: $host'; server { listen 3001; server_name _; ssl_certificate /data/tengine/certificate/lessie.ai.pem; ssl_certificate_key /data/tengine/certificate/lessie.ai.key; # ssl_protocols TLSv1.2 TLSv1.3; # ssl_ciphers HIGH:!aNULL:!MD5; access_log /data/tengine/logs/test_lessie.official.access.log official_log; error_log /data/tengine/logs/test_lessie.official.error.log; location /video/lessie.mp4 { root /data/tengine/html/test_official_website; expires 30d; add_header Cache-Control "public"; add_header Accept-Ranges bytes; } # 反向代理到后端服务器渲染的nxut项目3000端口 location / { proxy_pass http://official_backend; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; } # 禁止logo走缓存 location = /favicon.svg { proxy_pass http://official_backend; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; add_header Cache-Control "no-cache, no-store, must-revalidate" always; add_header Pragma "no-cache" always; add_header Expires 0 always; } location = /favicon.ico { proxy_pass http://official_backend; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; add_header Cache-Control "no-cache, no-store, must-revalidate" always; add_header Pragma "no-cache" always; add_header Expires 0 always; } }