Today, I installed lnmp on CentOS 7.6, after the lnmp installed on the Linux system, I can’t visit the website (by IP) anyway. I did the same work before and by the same steps to install lnmp on CentOS.

However, why can’t visit to the website?

I searched some solutions to solve this problem. I notice the official explanation:

After installation, the port is normal, Ping is normal, but can not access the website through IP or domain name.


Solution: Generally caused by iptables, you can delete iptables by yum or apt-get, or /etc/init.d/iptables stop Iptables. 
In addition, the VPS service provider may have another firewall or security group setting.

The operations to solve the problem as following steps.

Centos 7.6 does not have iptables, replace it with firewall to handle port problems.

It’s need to manually open port 80 to access the website

1.Open port 80

Firewall-cmd --permanent --add-port=80/tcp

2. Restart the firewall

Service firewalld restart

3. Check if port 3306 is open.

Firewall-cmd --query-port=80/tcp

Yes

 4. View the firewall now again

Firewall-cmd --list-all

Now it should be able to access the website. You can also test it by the following command. According to the returned information to do further work.

wget ip or domain name