location / {
try_files $uri $uri/ @router;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
location @router {
rewrite ^.*$ /index.html last;
}
location /h5 {
try_files $uri $uri/ @rewrites ;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
location @rewrites {
rewrite ^.*$ /h5/index.html last;
}
Nginx多项目路由转发
最新推荐文章于 2024-07-02 10:49:05 发布