server {
listen 3010;
server_name localhost;
location / {
root /usr/s_sinux_project/dist;#你的dist目录
index index.html index.htm;
try_files $uri $uri/ /index.html;
}
location /api/ {
proxy_pass http://127.0.0.1:8888/;
}
location /tag/ {
proxy_pass http://127.0.0.1:11223/;
}
}
nginx 配置dist 加上跨域配置
最新推荐文章于 2024-05-28 21:56:16 发布