server {
listen 80; #首先是nginx的监听端口默认为80
server_name localhost; #这里是你需要访问的域名地址
charset utf-8;
#详细介绍location
location / {
root /opt/vue/dist;
index index.html index.htm;
try_files $uri $uri/ /index.html;
}
location /api{
proxy_pass http://localhost:8083/;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
云服务器通过Nginx部署Spring Boot+Vue前后端分离项目标准配置文件
于 2021-07-25 21:07:49 首次发布