前端访问路径为 http://localhost:8080/view
后端服务接口路径为 http://localhost:8080/view/**
像这样的路径,配置完页面404;接口正常
server {
listen 80;
server_name localhost;
#charset koi8-r;
#access_log logs/host.access.log main;
location /view{
proxy_pass http://localhost:8080/view;
index index.html index.htm;
}
location /view/static/ {
root /usr/local/nginx/html;
}
}
这样该怎么配置?
-- 2022-10-02 17:14 --
自己慢慢研究,已经解决,放在下面供大家参考
上面配置监听的是80端口,但是页面是8080,还有8082的端口,这个是弄错了?