nginx代理Tomcat带路径的项目
教程分享
>
nginx教程
(2215)
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