When configuring a LAMP server on CentOS 7, do I need to to setup first a public IP address before my website to be accessible on the browser?

I already tried configuring the /etc/sysconfig/network-scripts/ifcfg-eth0 and adding the following items:


But I'm not sure if I added the right IPADDR, NETMASK, GATEWAY, DNS1 and DNS2, because when I tried to access my IP to the browser it doesn't show the apache page that I already installed. I also already allowed it to the firewall by typing

firewall-cmd --zone=public --permanent --add-service=http
firewall-cmd --zone=public --permanent --add-service=https
firewall-cmd --reload 
  • What is the problem you are having? – Michael Hampton Feb 18 at 1:56
  • I'm not sure if I configured properly the ifcfg-eth0 because when I try to connect to the public ip on my local machine it won't establish a connection – shiroyashaa Feb 18 at 3:14
  • What happened instead? – Michael Hampton Feb 18 at 3:49
  • Unable to Connect on browser – shiroyashaa Feb 18 at 5:14
  • @MichaelHampton I got it now I was able to access it now on my local machine, but I tried it on my phone browser and I can't access it, where did I go wrong? – shiroyashaa Feb 18 at 5:24

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.