tuna 是一个基于NIO的简单http服务器,简单的实现了反向代理和负载均衡
这是tuna的配置文件
#this is config file for tuna
#some common config
keepalived: 5000
username: root
password: root
proxyServer:
tomcatServer: localhost:8081,localhost:8082
#http protocol
http:
# #this is a server
server1:
server-name: localhost
listening: 8081
location1:
match: /html
root: D:/testproject/t1
index: index.html
server2:
server-name: localhost
listening: 8082
location1:
match: /html
root: D:/testproject/t2
index: index.html
# location2:
# match: /t2
# root: D:/testproject
# index: index.html
server3:
server-name: localhost
listening: 8000
upstream: tomcatServer
# location2:
# match: /html
# root: D:/tuna/test
# index: /index.html
源码地址-https://download.youkuaiyun.com/download/qq_31408331/11088593