Because the Linux kernel kernel code prohibits ordinary users from using ports below 1024, many times when we want to start using 80 ports of Apache, Nginx, or Tomcat as a normal user for security purposes, we are forbidden by permission.
Workaround:
Typically, the application uses more than 1024 ports and then forwards the 80 port to the corresponding program port using a firewall (hardware firewall or iptables), such as forwarding 80 to 8080 ports.
Iptables Add a forwarding rule:
#iptables-A prerouting-t nat-p tcp--dport 80-j REDIRECT--to-port 8080
Then save the forwarding rules to the configuration file
#service iptables Save
or modify the configuration file directly
#vim/etc/sysconfig/iptables
Add under the *nat key
-A prerouting-p tcp-m tcp--dport 80-j REDIRECT--to-ports 8080
Other than that:
It is not recommended to pass the chmod u+s way, so that there is a breach of the original purpose of security.
Linux normal users use the following 1024 port problem