Vps – Install Apache to CentOs 7 installed but not showing in the browser

centos7terminalvps

I hope someone can help me, I am trying to set up a VPS, i have a small VPS to learn on before i use my main VPS.
Ok so, I have installed Apache without any problems and when i try
" sudo service httpd status ", I am told that Apache is active and running and everything is fine. but when i go to my IP in the browser, i get told that the browser can not connect, no matter what browser i use.
I did a " sudo service firewalld status " and found that i did not have a firewall no such file or folder.
I then did " systemctl list-units –type=service "
this did not show any firewall at all.
this showed up with one problem,
"systemd-v…le-setup.service loaded failed failed Setup Virtual Console"

So as i am very new to all this i have no idea what i have done wrong.
If anyone knows how to solve this i would be happy.
I am using a MacBook Pro and Terminal to connect via SSH
I have tried Reinstalling CentOs 7 and starting again but i get the exact same problems.
Thank you for all help in advance.

Best Answer

CentOS 7 uses firewalld by default. You could remove this and install iptables.

However if you want to do this the firewalld way, run the following commands:

sudo firewall-cmd --add-service=http
sudo firewall-cmd --add-service=https