LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   LAN Only Web Server Questions (https://www.linuxquestions.org/questions/linux-newbie-8/lan-only-web-server-questions-161426/)

bmrust 03-23-2004 12:49 PM

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.

kobs 03-23-2004 01:00 PM

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

jcspray 03-23-2004 01:04 PM

>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.

artur 03-23-2004 01:07 PM

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.

bmrust 03-23-2004 01:10 PM

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.

comp12345 03-23-2004 01:15 PM

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.

artur 03-23-2004 01:17 PM

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.

artur 03-23-2004 01:22 PM

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"

bmrust 03-23-2004 02:36 PM

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

artur 03-25-2004 09:59 AM

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.


All times are GMT -5. The time now is 08:31 AM.