vue项目经过npm run build编译之后,将dist给到nginx,
这里记得将后端api也配置过来,否则post请求可能会遇到405的问题
server { listen 8003; server_name 192.168.1.1; root /data1/dist; location / { try_files $uri $uri/ @router; } location @router { rewrite ^.*$ /index.html last; } location /api/{ proxy_pass http://****:8020; } } }