Discussion:
apache on centos problem
Robert Mckennon
2012-09-27 18:55:12 UTC
Permalink
CentOS 6

I'm having an issue accessing my apache website from any host other
than localhost... the website works when queried by either 127.0.0.1
or it's assigned ip of 10.11.248.77 using lynx (text browser)

It is running on a windows hyper-v, but I CAN ssh into it, and ping it.

I have disabled selinux.


httpd.conf (excerpt)
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, in addition to the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
#
Listen 0.0.0.0:80


[***@blog conf]# netstat -anp |grep tcp
tcp 0 0 0.0.0.0:3306 0.0.0.0:*
LISTEN 1279/mysqld
tcp 0 0 0.0.0.0:44492 0.0.0.0:*
LISTEN 1000/rpc.statd
tcp 0 0 0.0.0.0:111 0.0.0.0:*
LISTEN 982/rpcbind
tcp 0 0 0.0.0.0:80 0.0.0.0:*
LISTEN 1357/httpd
tcp 0 0 0.0.0.0:22 0.0.0.0:*
LISTEN 1098/sshd
tcp 0 52 10.11.248.77:22 10.11.250.105:15055
ESTABLISHED 1122/0
tcp 0 0 :::111 :::*
LISTEN 982/rpcbind
tcp 0 0 :::22 :::*
LISTEN 1098/sshd
tcp 0 0 :::49562 :::*
LISTEN 1000/rpc.statd



So... I loaded it on my laptop under VirtualBox and I have the SAME
ISSUE. (so I'm kind of assuming it's a problem with a configuration).


Any ideas would be greatly appreciated...


Rob.

---------------------------------------------------------------------
Archive http://marc.info/?l=jaxlug-list&r=1&w=2
RSS Feed http://www.mail-archive.com/list-QVYiWngmsdMdnm+***@public.gmane.org/maillist.xml
Unsubscribe list-unsubscribe-QVYiWngmsdMdnm+***@public.gmane.org
Tim Holloway
2012-09-27 19:48:51 UTC
Permalink
Rob,

Just to clarify, this is a CentOS VM Guest in a Windows Host?

What it sounds like is an issue with virtual routing.

I've not done much lately with the Windows VM manager, but the VMWare
product has 3 different virtual network configurations to choose from:

1. Internal only. Localhost (Windows) can access VM Guests, but external
visitors cannot.
2. Bridged. The VM has a unique IP address(es) and the Windows VM Host
just passes traffic along to them
3. NAT. The VM has its own IP address (typically private) and the
Windows VM Host routes selected traffic that was originally targeted at
the Windows VM Host IP address.

I've probably got the names and behaviours slightly mangled, since I
haven't messed with that stuff lately either. But it's in the ballpark.

I'd say that most probably you want to set up for option 3, considering
that your VM has a private-space IP address. It's what I use (with Xen)
on the mousetech.com VM hosts.

Tim
Post by Robert Mckennon
CentOS 6
I'm having an issue accessing my apache website from any host other
than localhost... the website works when queried by either 127.0.0.1
or it's assigned ip of 10.11.248.77 using lynx (text browser)
It is running on a windows hyper-v, but I CAN ssh into it, and ping it.
I have disabled selinux.
httpd.conf (excerpt)
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, in addition to the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
#
Listen 0.0.0.0:80
tcp 0 0 0.0.0.0:3306 0.0.0.0:*
LISTEN 1279/mysqld
tcp 0 0 0.0.0.0:44492 0.0.0.0:*
LISTEN 1000/rpc.statd
tcp 0 0 0.0.0.0:111 0.0.0.0:*
LISTEN 982/rpcbind
tcp 0 0 0.0.0.0:80 0.0.0.0:*
LISTEN 1357/httpd
tcp 0 0 0.0.0.0:22 0.0.0.0:*
LISTEN 1098/sshd
tcp 0 52 10.11.248.77:22 10.11.250.105:15055
ESTABLISHED 1122/0
tcp 0 0 :::111 :::*
LISTEN 982/rpcbind
tcp 0 0 :::22 :::*
LISTEN 1098/sshd
tcp 0 0 :::49562 :::*
LISTEN 1000/rpc.statd
So... I loaded it on my laptop under VirtualBox and I have the SAME
ISSUE. (so I'm kind of assuming it's a problem with a configuration).
Any ideas would be greatly appreciated...
Rob.
---------------------------------------------------------------------
Archive http://marc.info/?l=jaxlug-list&r=1&w=2
---------------------------------------------------------------------
Archive http://marc.info/?l=jaxlug-list&r=1&w=2
RSS Feed http://www.mail-archive.com/list-QVYiWngmsdMdnm+***@public.gmane.org/maillist.xml
Unsubscribe list-unsubscribe-QVYiWngmsdMdnm+***@public.gmane.org
Robert Mckennon
2012-09-27 19:50:02 UTC
Permalink
DAMMMMIIITTTT!!!!!

Why do I always get my A$$ kicked by iptables!!!!

fixed...


thank you Russ!!!!

Rob.
Post by Robert Mckennon
CentOS 6
I'm having an issue accessing my apache website from any host other
than localhost... the website works when queried by either 127.0.0.1
or it's assigned ip of 10.11.248.77 using lynx (text browser)
did you add a rule to open port 80 in /etc/sysconfig/iptables and restart
the service?
-- Russ herrold
---------------------------------------------------------------------
Archive http://marc.info/?l=jaxlug-list&r=1&w=2
RSS Feed http://www.mail-archive.com/list-QVYiWngmsdMdnm+***@public.gmane.org/maillist.xml
Unsubscribe list-unsubscribe-QVYiWngmsdMdnm+***@public.gmane.org
Chris B.
2012-09-28 01:43:35 UTC
Permalink
Post by Robert Mckennon
DAMMMMIIITTTT!!!!!
Why do I always get my A$$ kicked by iptables!!!!
fixed...
thank you Russ!!!!
Rob.
Post by Robert Mckennon
CentOS 6
I'm having an issue accessing my apache website from any host other
than localhost... the website works when queried by either 127.0.0.1
or it's assigned ip of 10.11.248.77 using lynx (text browser)
did you add a rule to open port 80 in /etc/sysconfig/iptables and restart
the service?
-- Russ herrold
---------------------------------------------------------------------
Archive http://marc.info/?l=jaxlug-list&r=1&w=2
I have a similar question. On Debian (and it's derivatives) is it best
to use ufw to manage iptables or edit the rules by hand?

---------------------------------------------------------------------
Archive http://marc.info/?l=jaxlug-list&r=1&w=2
RSS Feed http://www.mail-archive.com/list-QVYiWngmsdMdnm+***@public.gmane.org/maillist.xml
Unsubscribe list-unsubscribe-QVYiWngmsdMdnm+***@public.gmane.org
R P Herrold
2012-09-27 19:38:12 UTC
Permalink
Post by Robert Mckennon
CentOS 6
I'm having an issue accessing my apache website from any host other
than localhost... the website works when queried by either 127.0.0.1
or it's assigned ip of 10.11.248.77 using lynx (text browser)
did you add a rule to open port 80 in /etc/sysconfig/iptables
and restart the service?

-- Russ herrold

---------------------------------------------------------------------
Archive http://marc.info/?l=jaxlug-list&r=1&w=2
RSS Feed http://www.mail-archive.com/list-QVYiWngmsdMdnm+***@public.gmane.org/maillist.xml
Unsubscribe list-unsubscribe-QVYiWngmsdMdnm+***@public.gmane.org
Marshall Davis
2012-09-29 03:46:47 UTC
Permalink
Personally, I'll stick to iptables - it's much more common in any admin or
security position, and not that difficult after you play with it for a
while.
---------- Forwarded message ----------
From: "Robert Mckennon" <robmckennon-***@public.gmane.org>
Date: Sep 27, 2012 2:55 PM
Subject: apache on centos problem
To: "Jax-LUG" <list-QVYiWngmsdMdnm+***@public.gmane.org>

CentOS 6

I'm having an issue accessing my apache website from any host other
than localhost... the website works when queried by either 127.0.0.1
or it's assigned ip of 10.11.248.77 using lynx (text browser)

It is running on a windows hyper-v, but I CAN ssh into it, and ping it.

I have disabled selinux.


httpd.conf (excerpt)
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, in addition to the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
#
Listen 0.0.0.0:80


[***@blog conf]# netstat -anp |grep tcp
tcp 0 0 0.0.0.0:3306 0.0.0.0:*
LISTEN 1279/mysqld
tcp 0 0 0.0.0.0:44492 0.0.0.0:*
LISTEN 1000/rpc.statd
tcp 0 0 0.0.0.0:111 0.0.0.0:*
LISTEN 982/rpcbind
tcp 0 0 0.0.0.0:80 0.0.0.0:*
LISTEN 1357/httpd
tcp 0 0 0.0.0.0:22 0.0.0.0:*
LISTEN 1098/sshd
tcp 0 52 10.11.248.77:22 10.11.250.105:15055
ESTABLISHED 1122/0
tcp 0 0 :::111 :::*
LISTEN 982/rpcbind
tcp 0 0 :::22 :::*
LISTEN 1098/sshd
tcp 0 0 :::49562 :::*
LISTEN 1000/rpc.statd



So... I loaded it on my laptop under VirtualBox and I have the SAME
ISSUE. (so I'm kind of assuming it's a problem with a configuration).


Any ideas would be greatly appreciated...


Rob.

---------------------------------------------------------------------
Archive http://marc.info/?l=jaxlug-list&r=1&w=2
RSS Feed http://www.mail-archive.com/list-QVYiWngmsdMdnm+***@public.gmane.org/maillist.xml
Unsubscribe list-unsubscribe-QVYiWngmsdMdnm+***@public.gmane.org
Loading...