nginx添加配置 server { listen 80; server_name www.b.com; location /{ root /data/front/www.b.com/dist; #前端项目在服务器的目录 try_files $uri $uri/ /index.html; index index.html index.htm; } location /api{ proxy_pass www.b.com; client_max_body_size 500m; } } 检查配置是否正确:nginx -t 重载配置:nginx -s reload