Only 22 ports are opened when the system is loaded. The site cannot be accessed after the Nginx+php+mysql is loaded.
Iptables-l-N
View firewall settings Discovery does not turn on port 80
Because the Linux firewall is turned off by default. There are two ways, one is to turn off the firewall, and the other is to let the firewall open the port.
To turn off firewall naming:
Service iptables Stop (not recommended)
The steps to open port 8080 are as follows:
1, modify the/etc/sysconfig/iptables file, add the following line:
-A rh-firewall-1-input-m state--state new-m tcp-p TCP--dport 8080-j ACCEPT
Restart Iptables
Service Iptables Restart
2, restart the firewall, there are two ways to restart the firewall
A) effective after reboot
Open: Chkconfig iptables on
OFF: Chkconfig iptables off
b) immediate effect, failure after reboot
Open: Service iptables start
Close: Service iptables stop
Open a range of ports 3000 through 5000
-A rh-firewall-1-input-m state--state new-m tcp-p TCP--dport 3000:5000-j ACCEPT
Centos/linux Open 80, 8080 ports or open a port