阿里雲將80端口請求轉發到其餘端口

                                                                                 ----- 關於AliYunDun的程序將80端口占用解決方法bash

一、 檢查佔用80端口的程序服務器

是一個叫AliYunDun的程序將80端口占用了。微信

解決方案
因爲80端口受到各類保護措施,因此通常程序是沒法獲取80端口的使用權的,要想實現不輸入端口號直接訪問程序,須要將80端口的請求轉發到Tomcat設定的端口上去,也就是默認的8080端口。tcp

二、 服務器網卡及ip設置:code

三、 設置端口號轉發規則:ip

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

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

service iptables save

四、 保存規則it

[root ~]# cd /etc/rc.d/init.d
[root ~]# ./iptables save
## iptables: Saving firewall rules to /etc/sysconfig/iptables:[  OK  ]

  搞定!!!table

若有BUG或者須要jar包,加我微信!class

相關文章
相關標籤/搜索