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;
         }
   }

Logo

前往低代码交流专区

更多推荐