nginx 配置vue项目增加统一前缀
nginx配置:server {listen123;server_name192.168.88.128;location /calledfront/trafficbg/public/ {proxy_pass http://127.0.0.1:8080/;proxy_pass_header Set-Cookie;proxy_set_header Host $p
·
nginx配置:
server {
listen 123;
server_name 192.168.88.128;
location /calledfront/api/ {
proxy_pass http://127.0.0.1:8080/;
proxy_pass_header Set-Cookie;
proxy_set_header Host $proxy_host;
}
location /calledfront {
root /usr/local/nginx/html/ctyuncss; #路径配置到vue项目的上层目录
#index index.html index.htm;
try_files $uri $uri/ /calledfront/index.html; #calledfront为vue项目打包后的文件夹
expires 7d;
}
}
更多推荐
已为社区贡献1条内容
所有评论(0)