【求助】如何通过url改写后反向代理访问两个网站?
nginx吧
全部回复
仅看楼主
level 1
chmi9610 楼主
我在树莓派上开启了2个服务一个是tomcat 8080端口用做jsp,还有一个是transmission 9091端口用来管理bt下载,在nginx中该如何设置才能通过不同url访问到这两个网站呢?
我想这么做:
http://localhost/8080 访问jsp (实际访问 http://localhost:8080)
http://localhost/9091 访问transmission (实际访问 http://localhost:9091)
nginx能做到吗?
大神,谢谢啦!
2014年12月31日 03点12分 1
level 11
location 8080/ {
proxy_pass localhost:8080
}
location 9091/ {
proxy_pass localhost:9091
}
2015年01月08日 09点01分 3
1