nginx代理Tomcat带路径的项目
位置:
首页>文章>详情
分类:
教程分享
>
nginx教程
阅读
(1131)
2024-04-17 10:26:48
nginx代理Tomcat带路径的项目
location / {
proxy_pass http://localhost:8080/v1/;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
#root html;
#index index.html;
}
location /v1/ {
proxy_pass http://localhost:8080/v1/;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
#root html;
#index index.html;
}
地址:https://www.leftso.com/article/431.html