1. For example, I have a website deployed to the server: (centos)
according to the saying on the Internet:
1. Released a ROOT.war to tomcat, via www. The domain name .com: 8080 goes directly to the home page of the website.
2. But I want to be direct: www. Domain name .com access, that is, no port number is added. Because I don"t want to change port 8080 of apache to 80, because I don"t know if port 80 is needed elsewhere in the server
3. Checked the Internet: discovery method:
iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080
service iptables save
No error, but no change, www. The domain name .com still cannot access the website, while www. The domain name .com: 8080 can only be accessed. I don"t know what went wrong. I came to codeshelper for help for the first time.