mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-29 05:09:46 +01:00
19 lines
No EOL
526 B
Nginx Configuration File
19 lines
No EOL
526 B
Nginx Configuration File
server {
|
||
listen 8002;
|
||
server_name localhost;
|
||
|
||
# 静态资源服务(Vue项目)
|
||
location / {
|
||
root /usr/share/nginx/html;
|
||
try_files $uri $uri/ /index.html;
|
||
}
|
||
|
||
# API反向代理(Java项目)
|
||
location /xiaozhi-esp32-api/ {
|
||
proxy_pass http://localhost:8003/;
|
||
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;
|
||
}
|
||
} |