In Linux, port 80, port 8080, or port linux8080 is enabled.
Only port 22 is enabled when the system is loaded. After Nginx + php + mysql is installed, the website cannot be accessed.
Iptables-L-n
Check the firewall settings and find that port 80 is not enabled
The Linux firewall is disabled by default. Either firewall is disabled or the port is opened to the firewall.
Disable firewall Name:
Service iptables stop (not recommended)
To open port 8080, follow these steps:
1. Modify the/etc/sysconfig/iptables file and 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 methods to restart the firewall.
A) It takes effect after restart
Enable: chkconfig iptables on
Close: chkconfig iptables off
B) It takes effect immediately and becomes invalid after restart.
Enable: service iptables start
Disable: service iptables stop
Open a range of ports 3000 to 5000
-A RH-Firewall-1-INPUT-m state -- state NEW-m tcp-p tcp -- dport 3000: 5000-j ACCEPT