LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   set up a website locally (within a LAN) (https://www.linuxquestions.org/questions/linux-networking-3/set-up-a-website-locally-within-a-lan-825199/)

sycamorex 08-09-2010 08:47 PM

set up a website locally (within a LAN)
 
How would I set up a website that would be only accessible locally. There's a router machine (server) that keeps provides internet access for a number of client machines. I need to set up a learning platform (moodle) locally. The server machine runs moodle server (apache server) and students should have access to their accounts locally (no need to be accessible outside of LAN).

First of all, what would be the best network configuration for it.
Sorry for a dumb question, but could I just come up with any domain name if everything stays locally within LAN?

thank you

jefro 08-09-2010 09:56 PM

In my lan I use what is called private IP addresses. All of your clients ought to be on a private IP range. The server is normally something like 192.168.1.1 or such but most times people make it the .1 number. So what you'd do is simply ask your clients to use an IP address in their browser such as 192.168.1.1 along with the port of apache which might be :8080. example 192.168.2.1:8080 would let you access the web page. If you want you can make a host file entry in each client to match a simple name.

tr1pl3x 08-09-2010 10:33 PM

Quote:

First of all, what would be the best network configuration for it.
Sorry for a dumb question, but could I just come up with any domain name if everything stays locally within LAN?
you could setup apache webserver.. what distro are you using?? mine I'm using ubuntu as a local webserver.. you can also create your own local dns resolution for short have your domain name locally. try Installing dnsmasq so that clients can also query your address for example instead of using a fixed ip address such as 192.168.0.1 you can supply name such as www.example.edu or something similar.. try on reading this links below.

http://www.thekelleys.org.uk/dnsmasq/doc.html
____________________________________________
Patience is the key to success!

sycamorex 08-10-2010 04:29 AM

Quote:

Originally Posted by tr1pl3x (Post 4061257)
you could setup apache webserver.. what distro are you using?? mine I'm using ubuntu as a local webserver.. you can also create your own local dns resolution for short have your domain name locally. try Installing dnsmasq so that clients can also query your address for example instead of using a fixed ip address such as 192.168.0.1 you can supply name such as www.example.edu or something similar.. try on reading this links below.

http://www.thekelleys.org.uk/dnsmasq/doc.html
____________________________________________
Patience is the key to success!


Thanks guys, my networking skills may be bad but it's not that hopeless. I know about static IP addresses, etc. The bit I was looking for was dnsmasq.

Thanks again.

sycamorex 08-10-2010 04:32 AM

Quote:

Originally Posted by Sms2everyone (Post 4061420)
Thanks to Everyone..
Nice useful Information,it really helped me a lot,
I request every member that..
Please keep updating this site with there knowledge as Now i am regular visitor of this site.


@Sms2everyone: do you post exactly the same reply to every thread you read?


All times are GMT -5. The time now is 02:20 PM.