vue打包的publicPath:
publicPath: process.env.NODE_ENV === "production" ? "/sjhjWeb/" : "/",
nginx 的配置:
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 9404;
server_name localhost;
location /sjhjWeb {
alias D:/workspace/LW/yibiaosanshi-cloud2/platform-admin-ui/dist/;
index index.html index.htm:
# root D:/workspace/LW/yibiaosanshi-cloud2/platform-admin-ui/dist;
try_files $uri $uri/ /sjhjWeb/index.html;
}
}
}
访问: ip:9404/sjhjWeb