LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-23-2004, 12:49 PM   #1
bmrust
LQ Newbie
 
Registered: Mar 2004
Posts: 5

Rep: Reputation: 0
LAN Only Web Server Questions


Alrighty, here we go. This is what I want this system to do:
(system specs are listed below)

1. Host a website with PHP and MySQL support.
2. Make is so that when a user on the LAN goes to xxxx.lan, it brings up this website.
3. Be accessible when no internet connection is present, however, have it be accessible when an internet connection IS present, as well.

Pretty simple? I hope so.

System specs:
PII 233Mhz
64MB EDO Ram
15GB Hard Drive (1GB swap)
2x 3Com 905B NICs (only one installed, but 2 available)

I have no idea where to start, or where to go looking for articles to read.

Any and all help would be appreciated.
 
Old 03-23-2004, 01:00 PM   #2
kobs
Member
 
Registered: Mar 2004
Location: 127.0.0.1
Distribution: FreeBSD 5.3-STABLE, Slackware 10-CURRENT, Debian Sarge
Posts: 51

Rep: Reputation: 15
edit the /etc/hosts on each computer....(if they're linux) on windows it's in %WINNDIR%/system32/drivers/etc/hosts file.

192.168.x.x myserver.net
 
Old 03-23-2004, 01:04 PM   #3
jcspray
Member
 
Registered: Mar 2004
Location: York, UK
Distribution: Ubuntu
Posts: 132

Rep: Reputation: 15
>user on the LAN goes to xxxx.lan
Doing this will be a DNS configuration: depends what you're using for DNS at the moment. The whole ".lan" thing is just making work for yourself: just use the hostname of the machine that the web server is running on.

As for actually setting up the web server, you're probably going to be using Apache: look for one of the many articles/books on configuring apache.

I assume you don't want to have the whole internet able to access this server, so be sure configure your firewall appropriately.
 
Old 03-23-2004, 01:07 PM   #4
artur
Member
 
Registered: Apr 2002
Location: Illinois, US
Distribution: Red Hat, Fedora, Yellow Dog, Debian, FreeBSD, Embedix
Posts: 106

Rep: Reputation: 15
I dunno why you won't just use your domain name and put the server on the LAN. Might be simpler this way. If you're trying to secure your server and make it not accessible from the net by doing this - you're complicating things for yourself more than you have to, I think.

Anyway. When a host on your network requests a website by it's name, e.g. http://xxxx.lan/, the first thing that happens is that xxxx.lan is looked up in your DNS server and converted to numeric IP address of the web server. So all you have to do is configure your DNS server to return the IP of your web server whenever an IP for xxxx.lan is requested.

Let me know if the light dodn't turn on yet.
 
Old 03-23-2004, 01:10 PM   #5
bmrust
LQ Newbie
 
Registered: Mar 2004
Posts: 5

Original Poster
Rep: Reputation: 0
artur, that makes sense. i should probably just spend some time looking thru the files to figure out what is where.

I found this article, seems to be pretty good.

http://www.tldp.org/HOWTO/DNS-HOWTO.html

Once I get home from work tonight I'll play around some more.

Thanks.
 
Old 03-23-2004, 01:15 PM   #6
comp12345
Member
 
Registered: Feb 2004
Posts: 467

Rep: Reputation: 30
If you do not already have a DNS server, sticking with editing the hosts file will be the easiest method. You will get the same results and it will only take a couple minutes at most.
 
Old 03-23-2004, 01:17 PM   #7
artur
Member
 
Registered: Apr 2002
Location: Illinois, US
Distribution: Red Hat, Fedora, Yellow Dog, Debian, FreeBSD, Embedix
Posts: 106

Rep: Reputation: 15
Quote:
Originally posted by bmrust
I found this article, seems to be pretty good.

http://www.tldp.org/HOWTO/DNS-HOWTO.html

Yep, that's a good place to start. Configuring BIND looks kinda scary in the beginning, but gets simple once you play with it for a while, so don't get discouraged if things don't work right-away.
Added benefit of having your own in-house dns server is that you can cache dns queries in it and reduce traffic through your internet connection.
 
Old 03-23-2004, 01:22 PM   #8
artur
Member
 
Registered: Apr 2002
Location: Illinois, US
Distribution: Red Hat, Fedora, Yellow Dog, Debian, FreeBSD, Embedix
Posts: 106

Rep: Reputation: 15
Quote:
Originally posted by comp12345
If you do not already have a DNS server, sticking with editing the hosts file will be the easiest method. You will get the same results and it will only take a couple minutes at most.
That of course depends on how many machines you need to configure, keep track of and update as things change. Setting up dns server may be more complicated in the beginning, but pays off in the long run. Not to mention that it is The Right Thing To Do and educational.

Hmmm, I think I should get me a sig. Something like "if you don't wanna learn anything - stick with windoze"
 
Old 03-23-2004, 02:36 PM   #9
bmrust
LQ Newbie
 
Registered: Mar 2004
Posts: 5

Original Poster
Rep: Reputation: 0
i should have made this clear at the beginning. this is not for a home lan...it is for a LAN Party. I am not going to be able to edit all of the host files.

DNS is my only option.

Thanks again artur
 
Old 03-25-2004, 09:59 AM   #10
artur
Member
 
Registered: Apr 2002
Location: Illinois, US
Distribution: Red Hat, Fedora, Yellow Dog, Debian, FreeBSD, Embedix
Posts: 106

Rep: Reputation: 15
One more thought now that you mention the lan party: you might want to also configure DHCP server on the same box that you use for DNS. In /etc/dhcp.conf (or whatever your config file is) indicate that you want clients to use your machine as DNS server. You can also tell them which ntpd, default gw, etc. to use. This way all the lan party people would need to do is set their boxes to dhcp and everything should get configured automatically.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
IPTABLES How to access to web server on gateway from LAN? kozaki Linux - Networking 4 08-26-2005 11:27 AM
cannot access web server from LAN puding Linux - Newbie 11 09-07-2004 12:06 AM
web server through lan zdos Linux - Software 3 05-24-2004 12:08 PM
some web server questions! Trixer Linux - Newbie 1 06-10-2003 07:40 PM
Can't access Linux web server web pages from LAN client jaydave Linux - Networking 4 03-16-2003 02:38 AM


All times are GMT -5. The time now is 05:09 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration