server { listen 39101; listen [::]:39101; server_name localhost; access_log access.log; error_log error.log; location / { root /dist; index index.html index.htm; try_files $uri $uri/ /index.html; } # 后端 location /api { proxy_pass http://192.168.31.83:39000; } }