Forum Moderators: bakedjake

Message Too Old, No Replies

Problems Running Apache on RH7.2

Problems Running Apache on RH7.2

         

joshua

5:22 pm on Dec 7, 2002 (gmt 0)

10+ Year Member



Hi,
I'm very knew to the Linux world. I'm not sure if this is the most appropriate forum for this message, so please bear with me.

I'm attempting to run Apache on Red Hat Linux 7.2. I have a cable internet connection. I can access the server fine from the computer that Apache's running on via [localhost...] or the computer's IP address. However, when I try to access it with another computer, hooked up to the same hub, it won't load it. I thought mabye the firewall was keeping other computers out, so I disabled it completely with gnome-lokkit. I don't know if the problem is with RH, Apache, or me. Let me know what additional information I need to provide.

TIA,
Joshua

andreasfriedrich

5:50 pm on Dec 7, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



However, when I try to access it with another computer, hooked up to the same hub, it won't load it.

Are you trying by IP or name. If it works by IP but not by name then you would configure the other computer to resolve the hostname correctly. You can do this by adding an appropriate line to the hosts file on each computer in your network that you want to access the server from or you could setup a DNS server on the linux box and let other computers in your network use that DNS server to resolve hostnames.

Andreas

littleman

6:45 pm on Dec 7, 2002 (gmt 0)



How are you trying to connect to your web server from the other computers in your local network?

As root type in 'ifconfig eth0', that is eth + zero. You should have a block of information printed out from that. Grab the IP number from:
'inet addr:' if you are using a typical DHCP network it could look like "192.168.1.xxx".

Try using that IP on the Red Hat box and see if you get the same results as when you use localhost. Does [localhost...] = http:// [your local IP]? If so, try using that IP to connect to your redhat machine from the outside.

joshua

8:53 pm on Dec 7, 2002 (gmt 0)

10+ Year Member



Thanks for your replies...I left out some of the information I meant to say originally. From the other machines on the network, I'm trying to use the IP address of the linux box. The linux box gets its IP from the ISP. I'm not currently using a router either. My static IP address is like 68.102.xx.xxx. When I type in this IP on the linux box (locally) it loads fine. When I type in this IP on the on the other computer it can't connect.

As root type in 'ifconfig eth0', that is eth + zero.

Entering that from the shell, I get I command not found error.?

Joshua

David

11:50 pm on Dec 7, 2002 (gmt 0)

10+ Year Member



>> Entering that from the shell, I get I command not found error.? <<

Sounds like you are not getting clear down to root. Some commands a "su" will not get it. Try..
su -l root

amoore

12:59 am on Dec 8, 2002 (gmt 0)

10+ Year Member



You typially don't have to be root to run ifconfig. It is often in /sbin, though, which isn't always in your $PATH, so you may want to call it like:

/sbin/ifconfig -a

and see what it gives you. I guess the point of all of this is just to get your IP address so that you can try it from the other machine like [192.168.1.4...] or whatever. You can get your IP addresses in other ways, like /proc/net/arp or something, too.

Sometimes the problem is that your firewall is keeping the traffic out or you don't have apache configured to bind to all (any) interfaces. (See the BindAddress directive in your apache config, but I would be surprised if that's the problem.)

What kind of error do you get when you try to access the page? Does it take a long time and then say that it couldn't contact the server, or does it say that the connection was refused, or do you get a 404 or 500 error? The more details you give the easier it is to figure out.

David

1:13 am on Dec 8, 2002 (gmt 0)

10+ Year Member



>>You typially don't have to be root to run ifconfig.<<

Thanks I just learned something :)

Never thought abot it being a user path issue

sun818

1:54 am on Dec 8, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



How are your other computers connecting to the Internet if you are not using a router? Can you see your web site from those computers via dial-up?

joshua

6:10 am on Dec 8, 2002 (gmt 0)

10+ Year Member



Thanks to everyone for your help. For some reason it seems to be working. I say for some reason, because I haven't changed/reconfigured anything. I ran ifconfig -a and inet address on eth0 was the IP my ISP gave me (68.102.xx.xxx) and the inet address on lo was 127.0.0.1.

amoore:

What kind of error do you get when you try to access the page? Does it take a long time and then say that it couldn't contact the server,...
Yes, it just sat there for awhile then said it couldn't contact the server.

sun818:

How are your other computers connecting to the Internet if you are not using a router?

The other computers are hooked up to a hub which is connected to the cable modem via the uplink port.

Like I said, it seems to be working now. We'll just wait and see.

Joshua

littleman

7:01 am on Dec 8, 2002 (gmt 0)



>The other computers are hooked up to a hub which is connected to the cable modem via the uplink port.

So, all your computers are broadcasting form the same IP? If so, that is your problem.

sun818

10:50 am on Dec 8, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



joshua, unless you receive a static IP for each computer from your ISP, you will need a router to handle moving the data between your ISP (public) to your internal network (private). There are a lot of consumer brands to be had around $50 - I personally like SMC because they also include a print server.

joshua

7:53 pm on Dec 8, 2002 (gmt 0)

10+ Year Member



So, all your computers are broadcasting form the same IP?

No. Each computer has a different IP. When I put a new network card in my linux box, the IP address changed. I have a cable internet connection.

Joshua