The reason is that the port 80 CentOS firewall is disabled and APACHE cannot be installed on the CENTOS of the virtual machine, solution:/sbin/iptables-IINPUT-ptcp -- dport80-jACCEPT/sbin/iptables-IINPUT-because port 80 is not open
The CentOS firewall cannot be used when APACHE is installed on the CENTOS of the VM. the solution is as follows:
/Sbin/iptables-I INPUT-p tcp -- dport 80-j ACCEPT
/Sbin/iptables-I INPUT-p tcp -- dport 22-j ACCEPT
Then save:
/Etc/rc. d/init. d/iptables save
After the computer is restarted, the CentOS firewall has opened ports 80 and 22 by default.
You may not restart the computer either here:
/Etc/init. d/iptables restart
Close the CentOS firewall and disable its services:
View CentOS firewall information:/etc/init. d/iptables status
Disable CentOS firewall service:/etc/init. d/iptables stop
Permanently Close? I don't know how to use the permanent method:
Chkconfig-level 35 iptables off