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. |
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 |
>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. |
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. |
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. |
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.
|
Quote:
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. |
Quote:
Hmmm, I think I should get me a sig. Something like "if you don't wanna learn anything - stick with windoze" |
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 |
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. |