利用iptable端口转发,将收到的80端口的请求都转到8080端口,命令:

iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080

参考:

http://blog.csdn.net/qinhl99/article/details/5741700