Files
QingLong/XiaoZhi/xiaozhi-esp32-server/docs/docker/nginx.conf
2025-08-15 09:13:13 +08:00

26 lines
703 B
Nginx Configuration File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

server {
listen 8002;
server_name localhost;
# 静态资源服务Vue项目
location / {
root /usr/share/nginx/html;
try_files $uri $uri/ /index.html;
}
# API反向代理Java项目
location /xiaozhi/ {
proxy_pass http://127.0.0.1:8003;
proxy_set_header Host $host;
proxy_cookie_path /api/ /;
proxy_set_header Referer $http_referer;
proxy_set_header Cookie $http_cookie;
proxy_connect_timeout 10;
proxy_send_timeout 10;
proxy_read_timeout 10;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}