You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Neil Aggarwal <ne...@JAMMConsulting.com> on 2013/04/19 15:44:48 UTC

[users@httpd] Apache not responding to external requests

Hello:

This is strange.  I did a fresh install of CentOS 6.4 on a virtual
server and then did a yum install httpd.

The apache server responds to local requests but not requests
over eth0.  I checked the Listen directive in httpd.conf and
it is not restricted.

Did something change in the default configuration of httpd
to stop it from listening on eth0?  

It used to work out of the box every time I did an install, but it 
seems something is  different with the release of CentOS 6.4.

Thanks,
  Neil

--
Neil Aggarwal, (972)834-1565, http://UnmeteredVPS.net/centos
Virtual private server with CentOS 6 preinstalled
Unmetered bandwidth = no overage charges


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] Apache not responding to external requests

Posted by Neil Aggarwal <ne...@JAMMConsulting.com>.
Mauricio:

>      My money is on selinux. Can you check it allows apache to listen
> to the outside world?

Selinux is diabled:

# sestatus
SELinux status:                 disabled

Any other ideas?

Thanks,
  Neil


--
Neil Aggarwal, (972)834-1565, http://UnmeteredVPS.net/centos
Virtual private server with CentOS 6 preinstalled
Unmetered bandwidth = no overage charges




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache not responding to external requests

Posted by Mauricio Tavares <ra...@gmail.com>.
On Fri, Apr 19, 2013 at 9:44 AM, Neil Aggarwal <ne...@jammconsulting.com> wrote:
> Hello:
>
> This is strange.  I did a fresh install of CentOS 6.4 on a virtual
> server and then did a yum install httpd.
>
> The apache server responds to local requests but not requests
> over eth0.  I checked the Listen directive in httpd.conf and
> it is not restricted.
>
> Did something change in the default configuration of httpd
> to stop it from listening on eth0?
>
> It used to work out of the box every time I did an install, but it
> seems something is  different with the release of CentOS 6.4.
>
      My money is on selinux. Can you check it allows apache to listen
to the outside world?

> Thanks,
>   Neil
>
> --
> Neil Aggarwal, (972)834-1565, http://UnmeteredVPS.net/centos
> Virtual private server with CentOS 6 preinstalled
> Unmetered bandwidth = no overage charges
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] Apache not responding to external requests

Posted by Neil Aggarwal <ne...@JAMMConsulting.com>.
Pete:

> 1. As it's a fresh install, check your firewall configuration. If you
> haven't specifically modified it you will have the default CentOS
> configuration which won't allow inbound to eth0:80.

Yes, this was it.  I did not realize that was the default.
I took a look at iptables -L and that seemed to have ACCEPT
for everything.

Thanks for the help.

 Neil

--
Neil Aggarwal, (972)834-1565, http://UnmeteredVPS.net/centos
Virtual private server with CentOS 6 preinstalled
Unmetered bandwidth = no overage charges





---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache not responding to external requests

Posted by Pete Houston <ph...@openstrike.co.uk>.
On Fri, Apr 19, 2013 at 08:44:48AM -0500, Neil Aggarwal wrote:
> This is strange.  I did a fresh install of CentOS 6.4 on a virtual
> server and then did a yum install httpd.
> 
> The apache server responds to local requests but not requests
> over eth0.  I checked the Listen directive in httpd.conf and
> it is not restricted.

1. As it's a fresh install, check your firewall configuration. If you
haven't specifically modified it you will have the default CentOS
configuration which won't allow inbound to eth0:80.

2. If the firewall is OK, check whether apache is actually bound to
the eth0 address or not. If not, fix that - see the apache error log
at startup for reasons why the bind might fail (eg. you accidentally
installed squid or something else which grabbed it, maybe?).

If apache is bound to the right ip+port and the firewall allows the
traffic, then check the apache error log and the system error logs for
traces of your request and debug from there. If there is no evidence of
your request arriving at the server, try a packet sniffer to see what's
happening.

> Did something change in the default configuration of httpd
> to stop it from listening on eth0?  

Not that I'm aware of.

Good luck,

Pete
-- 
Openstrike - improving business through open source
http://www.openstrike.co.uk/ or call 01722 770036 / 07092 020107

RE: [users@httpd] Apache not responding to external requests

Posted by Neil Aggarwal <ne...@JAMMConsulting.com>.
Kevin:

> Try /etc/rc.d/init.d/iptables stop and /etc/rc.d/init.d/ip6tables stop 
> and looking at the iptables files in /etc/sysconfig.

Iptables is set to accept all packets:

# iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere            state
RELATED,ESTABLISHED
ACCEPT     icmp --  anywhere             anywhere
ACCEPT     all  --  anywhere             anywhere
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp
dpt:ssh
REJECT     all  --  anywhere             anywhere            reject-with
icmp-host-prohibited

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
REJECT     all  --  anywhere             anywhere            reject-with
icmp-host-prohibited

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

Any other ideas?

Thanks,
  Neil


--
Neil Aggarwal, (972)834-1565, http://UnmeteredVPS.net/centos
Virtual private server with CentOS 6 preinstalled
Unmetered bandwidth = no overage charges





---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache not responding to external requests

Posted by "Kevin A. McGrail" <KM...@PCCC.com>.
On 4/19/2013 9:44 AM, Neil Aggarwal wrote:
> This is strange.  I did a fresh install of CentOS 6.4 on a virtual
> server and then did a yum install httpd.
>
> The apache server responds to local requests but not requests
> over eth0.  I checked the Listen directive in httpd.conf and
> it is not restricted.
>
> Did something change in the default configuration of httpd
> to stop it from listening on eth0?
>
> It used to work out of the box every time I did an install, but it
> seems something is  different with the release of CentOS 6.4.
>
> Thanks,
>    Neil
Try /etc/rc.d/init.d/iptables stop and /etc/rc.d/init.d/ip6tables stop 
and looking at the iptables files in /etc/sysconfig.

You likely are blocking port 80.

regards,
KAM

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org