Apache and httpd running but not opening in browser http://<ipaddress>


I am facing problem to access Apache from browser[ http:// ]. Following are the details related to apache config:

  • I have install apache on centos 7.2 and using iptables instead firewalld .
  • Apache is runnning on port 80  

    [root@VMAS04 ~]# netstat -anp | grep 80   tcp 0 0* LISTEN 10419/httpd

  • Firewall rules in iptables are :  

     [root@VMAS04 ~]# iptables -S    -P INPUT ACCEPT    -P FORWARD ACCEPT    -P OUTPUT ACCEPT    -A INPUT -p tcp -m tcp --dport 22 -j ACCEPT    -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT    -A INPUT -p tcp -m tcp --dport 443 -j ACCEPT    -A OUTPUT -p icmp -m icmp --icmp-type 0 -j ACCEPT

  • I tried "telnet localhost 80" which giving "HTTP/1.1 400 Bad Request"


     [root@VMAS04 ~]# telnet localhost 80    Trying ::1...    telnet: connect to address ::1: Connection refused    Trying    Connected to localhost.    Escape character is ' ]'.    hi    HTTP/1.1 400 Bad Request    Date: Sat 13 May 2017 06:06:53 GMT    Server: Apache/2.4.6 (CentOS) PHP/5.4.16    Content-Length: 226    Connection: close    Content-Type: text/html; charset=iso-8859-1               400 Bad Request        

    Bad Request


    Your browser sent a request that this server could not understand.

          Connection closed by foreign host.

    can anyone help me on this . very thanks in advance.