Not able to access apache on virtual box from host machine [closed]

I am not able to access apache installed on the guest machine from the host. Details below. I saw the previous threads and worked on that, but still no luck. So am asking.

  • host: windows xp
  • guest : centos

In the guest, I could see apache running on 192.168.56.101 and I am able ping this IP from windows(host) machine. But in the browser(host) I am not able to access this apache URL.

Answer

Have you configured your iptables to allow CentOS to accept incoming TCP 80 and TCP 443 traffic? Try adding the following line in your /etc/sysconfig/iptables file

-A INPUT -m state --state NEW -m tcp --dport 80 -j ACCEPT
-A INPUT -m state --state NEW -m tcp --dport 443 -j ACCEPT

You may also want to try restoring / resetting the security context of files in your /var/www/html/ directory by issuing command restorecon -Rv /var/www/html

Hope this helps.

Attribution
Source : Link , Question Author : tarakant , Answer Author : NAT3863

Leave a Comment