Click to See Complete Forum and Search --> : Problems with serving webpages within local network with apache
nextwave420
01-24-2003, 10:46 PM
i have a problem........
i currentley have Apache running on my machine (RedHat8.0).........it loads on startup, and as far as i can tell, works fine.......
when i direct mozilla to localhost, i get my index page................
here's the problem.....i have not changed the configuration for apache yet because i don't know two things i need to modify............
first i am networking through a linksys BEFSR41 router.......being on port number one, and leaving the router's configuration as default, my ip address assigned by the router is 192.168.1.100........
is this the address i need to bind apache to?
the problem i am having is when i move to my wife's computer, on the same network, running windows2000 pro, and i try to access my computer by directing InternetExplorer to one of the many addresses i should be able to (192.168.1.100, http://computername, etc....), her browser just hangs........
if i scan my computer with her computer(SuperScan), it shows no open ports...............
is the problem that i didn't specify what ip apache should be bound to as well as port, is it in the router, or is it in the firewall that comes with redhat..........
i know very little about apache, or linux at that......i do know how to configure certain variables of apache, like what directory to serve pages from, and pretty much anything that has been commented in the configuration file......
as it sits everything in apache's configuration file is default........
please help someone
Gaston
01-26-2003, 07:46 AM
Hi, I don't you're using DNS so cannot browse to
http://hostname
To get that working, you'd need to add the hostname
to DNS but that's another long story.
What you can try from your wife's PC is to ping
the linux: start-->run, then type "cmd" and hit enter,
you'll get the dos prompt, now type "ping IP-address"
where IP-address is the IP-address of your linux
box.
If you get a reply, then open the browser and type
to location field: http://ip-address of your linux box,
you should get to the "homepage".
Don't work with IE browser, try with another browser,
like Netscape and see what happens.
If you don't get ping reply, maybe you've disabled
the ICMP echo requests with IP-tables, just flush
them if need be but before doing this, make sure
you're not connected to the internet to avoid attacks ;-)
To flush your iptables, just run iptables -F
Try this, still problems, post it here with any errors.
oakleys
01-26-2003, 08:03 AM
You may also need to change the configuration on your Linksux router; the default "firewall" could be blocking ports.
If you want a real router (and firewall), find an old 486 or Pentium I and a couple of NICs and setup a Linux gateway....
HighOrbit
01-26-2003, 11:46 AM
I use the Linksys router too.
OK.. first to talk about your router and your webserver. You said it assigned 192.168.1.100 to your webserver. If you are using DHCP (i.e. automatic assignment of IP addresses), it might have changed already. Inside your router configuration, look on either the "status" or "DHCP" tab and click on the clients table, make sure that the proper IP address is still assigned. If you want the internal IP address of your webserver to be static (and it probably should be so you can always find it at the same address), you will have to configure that inside linux and make sure that no othe box is ussing that IP by doing a DHCP release/renew on those boxes.
Now as to what address you should bind apache too, I think it might depend on how you are doing external access (if any). If you are just running apache inside your own network and don't want people from outside seeing your pages, then you should bind to your internal address of 192.168.1.100 (or whatever your using).
Now the below I am not completely sure about, but I think this will work. f you are allowing external internet access via port forwarding, I still think you can bind to 192.168.1.100 and let the port forwarding handle the rest.
Could I recommend you look at Rute
Google search Rute linux book
There is an excellent discussion of the problem you
have as it relates to apache and virtual hosts
It's written well... good information and not too abstract.
hth
re-v
nextwave420
01-27-2003, 01:06 PM
ok, overwhelming responces..........
first to gaston:
i pinged my machine from hers and got a reply (ping 192.168.1.100)........i tried directing her browser to the same ip and still just hanged...
to oakleys:
can i set up this machine (my computer wich apache resides on) to be the router/firewall as well as my everyday machine or do i need a separate machine....also how hard will it be, and can i still supply my wife's machine with internet?
to HighOrbit:
my machine is always being assigned the IP 192.168.1.100........it never changes (should it).....i am using DHCP (automatic IP assignment), but it never changes (or i am yet to see it change)....however, when i go to the DHCP tab and select "show client table" my ip is there, but there is no hostname assigned.....does this matter?
finaly to re-v:
i am looking into the rute book (found a copy posted on the net for free).....thank you for the reading material
as for any new error messasges, i have none(or don't know where to find them).....
i do know that if i try to ping my wife's computer from my linux box (ping 192.168.1.101) i get no reply......it just hangs and i am forced to terminate using Ctrl+c......maybe this will help anyone diagnose my prob.
mahalo for all replies
oakleys
01-27-2003, 04:24 PM
Yes, you can use it as your everyday box. But if you want to share your connection through it, you'll probably want to keep it running 24X7 (as you do the Linksux router)--that's why I suggested using an old X486 (consumes less power). I personally use a new box for my gateway because I like to use it as a fileserver for my network--a X486 could be a bit slow for pushing files over the network. Pushing web pages, however, isn't a problem for a X486 because the bottleneck is still your internet connection (even if you have DSL or broadband).
I used to use a Linksux router myself, until I got serious about Linux. It was a good learning experience switching to the Linux gateway.
If/when you're ready to make the change, we're ready to help. Mandrake probably has the easiest gateway configuration tools around (drakgw), but any Linux distribution will work.
Gaston
01-27-2003, 06:41 PM
If you don't have iptables on something's with your router if you can't ping your wife's PC. Unfortunately, I'm not familiar
with it at all. Hopefully someone here can help you out.
nextwave420
01-27-2003, 07:46 PM
gaston:
Thank you for trying to help.......i'm sure you are right and someone else might help, but seeing as i don't know much about what i am trying to do, i can't offer much for people to go on....
oakleys:
i'm pretty sure i will be getting rid of the linksys...........it has proven to be quite un-reliable with more than 2 people sharing it..........sometimes i loose internet all together, but as i said this happens when there are more than 2 computers sharing it........
i would love to change over to a router box, but even with the help you and others here can provide, i'd rather learn a little more about linux (and from what i am starting to see, computers in general :D )..........i'll lbe sure to post here when i decide to tackle the router box..........
thank you all for trying to help, and if i do get it working i will be sure to post a final resolution here for others to go by.....
let me finish with this:
ANYONE switching to Linux (or unix) from windows, should definatley read Rute (http://rute.2038bug.com/)........it not only goes in depth (still on like the 4th chapter) but it is really assuming the bare-minimum of prior knowledge...
Mahalo to all who posted replies in this thread
oakleys
01-27-2003, 08:48 PM
I don't think you mentioned this--can you browse the web on your Linux box through the Linksux router? If so, fixing your problem shouldn't be too hard; if not, there's some preliminary work to do....
Also, are you using DSL or broadband? I presume you're getting a DHCP address from your service provider, yes? If so, beware that hosting a website on DHCP can be tricky!
nextwave420
01-27-2003, 10:58 PM
ok...............
as for the browsing the internet with the linux box throught the "linksux" (i like that), yes, i am using a cable modem with my wife and my computers sharing the connection through DHCP...........
i do know that my ISP dosen't support servers of any kind (don't know if this matters), but right now i just want to be able to serve the pages within the LAN..
i was in another forum, and someone suggested configuring the firewall on the linux box..........
i tried this by opening the "Security Level", and under the Security Level drop down i selected "No Firewall".........i clicked OK and it asked me to confirm.i confirmed, and rebooted the machine......after boot-up i checked the "Security Level" and it was back on "High"........
what is with that?
nextwave420
01-27-2003, 11:21 PM
damn........
ok i did what i was trying to do.........
i didn't realize that when you change the security setting and restart the system, the security setting being displayed isn't the actual security setting (got that from some thread posted here)........so i turned the firewall to medium and customized the services(ports) it was allowing incomming requests..............my wife's computer is able to access my pages lightning fast.............
now the part i was going for next...........
how can i make it public......i know i need to turn on port forwarding on the "linksux" (which i think i can manage), but what else do i need to do to make apache ready..............i will not be using a registered domain, but can't i give out my ip(assigned by my ISP) and have people direct their browsers to that address?
Modorf
01-27-2003, 11:45 PM
nextwave420,
To access your webserver from the internet, just have to open the port forwarding on your linksys DSL/Cable Gateway Router.
For getting a dynamic hostname, one hostname which you can register with any IP, go to google and type in Dynamic Hostname Service. One example is DynDNS.org (the service I use). With a dynamic hostname, you register your current IP address with them and when ever it changes you can update their DNS tables to reflect your new IP. This is an easy way to always know your computer's IP. So if you give out your dynamic hostname, anyone can find you.
Nathan.
nextwave420
01-27-2003, 11:48 PM
dis-regard post
BFK4ever
01-27-2003, 11:56 PM
I see it!!!!!!!!! :)
nextwave420
01-28-2003, 12:12 AM
thank you for your prompt reply, so i could remove the IP before the whole world has it.........
looks good from here.......
once again thanks go out to everyone (as usual) who posted a reply in this thread.......without people like you i would be still kicking the DOS out of my machine.....
Mahalo and Aloha