The solution steps are as follows:
Key point: CentOS cannot access port 80 without opening the firewall! ! ! There’s nothing you can do if you open it! ! You need to add the port! !
Check the firewall status
firewall-cmd --state
Open the firewall
systemctl start firewalld
Recommended tutorial: centos usage tutorial
View the current firewall open Port
firewall-cmd --list-ports
Add port 80
firewall-cmd --zone=public --add-port=80/tcp --permanent
Restart the firewall
firewall-cmd --reload
Recommended related video tutorials: linux video tutorial
The above is the detailed content of centos cannot access port 80. For more information, please follow other related articles on the PHP Chinese website!