LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Cannot load web pages across LAN (https://www.linuxquestions.org/questions/linux-networking-3/cannot-load-web-pages-across-lan-329949/)

tp11235 06-03-2005 10:33 AM

Cannot load web pages across LAN
 
I have a Linux box and a Windows box on a home LAN. The linux box is a P3-450 with SuSE 9.1 and a 2.6.11.6 kernel.

I have successfully connected the Linux box to the web over the LAN, which has a broadband modem/switch to do so.

I set up Apache on the Linux box and it correctly serves pages internally on the Linux box (http://localhost/index.html.en)

I can ping my Windows box (Called Laptop on the DNS setup) successfully and the Windows box can ping the Linux box (called Neptune on the DNS setup). However, when I use the windows box to call for a page from the Linux box:

http://neptune/index.html.en

I just get a standard page not found error.

I am sure there is something simple I am missing, but I have no idea what it is. Any help gratefully received.

Cheers

Tim.

<Ol>Origy 06-03-2005 01:01 PM

The documents should be located in Apache document root folder.
Does that index.html.en happen to be located here: /var/www/manual

Edit: Okay I have tried that on my linux box and I seem to get a page not found on both boxes. The network doesn't seem to be the problem here. If you get a 404 (the apache version, not IE version) while trying to access your server then that means the connection works. If this is true then there must be a configuration thing on your linux box.

Ynot Irucrem 06-03-2005 01:10 PM

can you get to it through the IP instead of "neptune"? e.g. http://192.168.0.12/index.html.en

tp11235 06-04-2005 10:53 AM

Web pages served across the LAN
 
Thanks to you both!

First answer is that the html docs are in /usr/local/apache2/htdocs (the default set by apache's automatic configuration).

Second answer: I tried using the bare IP address as suggested and it works. I should have realised that the modem has no knowledge of hostnames and the actual router at my ISP does not know my hostnames either. I shall have to buy myself a domain name now.

I don't suppose you know how to find out what my unique external IP address is? I thought these were fixed with broadband, but I don't know what it is.

Thanks again.

Tim (A happy Linux user - from scratch to a working webserver in 14 working days!)

comprookie2000 06-04-2005 10:00 PM

See if this helps;
http://www.netmonitor.org/tools/test.php?type=www

Ynot Irucrem 06-05-2005 12:48 AM

Quote:

I thought these were fixed with broadband
not necessarily - you may have to apply to your ISP to get a static IP. alternatively, I read on a thread here a while ago (can't find it now) something about programs that check your IP every 5 mins or so and change the IP that your domain name points to accordingly, though you could probably get away with running a bash script every time you connect to the net.

tp11235 06-06-2005 01:50 PM

I think you are right - I tried the website suggested by comprookie2000 and it worked, but the IP address seems dynamic.

Also, the box plugged into the phone line (modem/switch/router - I am no longer certain what it does) is not forwarding traffic - it just replies with its own index.html page and a log on option I have no knowledge of.

I am in contact with the ISP that supplied it about how to make the thing do what I want.

Cheers

Tim.

comprookie2000 06-06-2005 04:08 PM

Do you have laptop in Neptune in /etc/hosts
here is mine
Code:

# /etc/hosts:  This file describes a number of hostname-to-address
#              mappings for the TCP/IP subsystem.  It is mostly
#              used at boot time, when no name servers are running.
#              On small systems, this file can be used instead of a
#              "named" name server.  Just add the names, addresses
#              and any aliases to this file...
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/hosts,v 1.8 2003/08/04 20:12:25 azarah Exp $
#

127.0.0.1        abbottdavid.no-ip.info  localhost
192.168.1.96      abbottdavid.no-ip.info  abbottdavid
192.168.0.2    tux.no-ip.info tux
# IPV6 versions of localhost and co
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

that way when I put tux in a browser from abbottdavid I get the server and vice versa.abbottdavid is a gentoo box on the www and tux is a debian test server on the LAN good luck

jollyjoice 06-06-2005 04:27 PM

i use no-ip for my dynamic IP, just the free one but you can buy ur domain then hook it up thru them if ya like. Seems to work well in my experience.

Ynot Irucrem 06-08-2005 08:51 AM

Quote:

it just replies with its own index.html page and a log on
This means you have a router. You get that logon page if you type in the IP address of the router in a web browser. It is used for configuring the router for port forwarding etc.

It just so happens that this is what you want to do if you want your web page to be accessible to the outside world. You will need to allow TCP and UDP on whatever port Apache is running on (80 by default). There is information about setting up port forwarding on specific routers and about port forwarding in general here.

BTW the login and password for your router will be in the manual or contact the manufacturer e.g. the default username and password for my router were "admin" and "admin". You might want to change the password.

tp11235 06-25-2005 10:54 AM

I forgot to says thanks. It is all working now - setting up the IP forwarding on the router was easy. I set up an account with DynDNS - all OK. I'll put my notes on Linux Answers.


All times are GMT -5. The time now is 05:38 AM.