LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   local web server behind dhcp router (https://www.linuxquestions.org/questions/linux-networking-3/local-web-server-behind-dhcp-router-215111/)

j4b 08-08-2004 06:06 PM

local web server behind dhcp router
 
I'm really new to this, but I would like to run Apache as a local web server for my little cluster of workstation running DHCP on a 4-port router (d-link). Apache (httpd.conf) wants a name/IP.

What is the trick here? Am I free to assign names behind my router (eeny, meanie, mynie, moe), or is there more to it than that?

amfoster 08-08-2004 06:24 PM

I believe your first step is to log into that dlink router and see if it supports virtual servers. Everything will be done from there.

michaelk 08-08-2004 07:36 PM

Behind the router you can use anyname

j4b 08-08-2004 11:05 PM

OK, the d-link supports virtual servers. The help page indicates that I can get to the server (port 80?) from the WAN. I think that my DSL provider will block that, but I really want to run an internal server anyway.

How do I tell the Linux box what name to respond to on the LAN (inside the router)? (How do you put a DHCP IP number in the /etc/hosts file?)

OEP 08-08-2004 11:19 PM

EDIT: nm

Your name doesn't really matter on your LAN, because your computers won't be able to resolve that name to an IP unless all of them have your IP recorded in their hosts files. Windows computers I know do not refer to their host file most of the time, just go straight to the ISP. Linux computers will, but I don't see much point in putting a name in all of your LAN's computers.

Apache doesn't really care what your name is, it just responds to whatever's on port 80 or whatever you set it up as.

So if you really wanna put a server name into Apache, I'd just put your LAN IP.

For the other LAN computers to connect to the Apache computer, just type in the IP address unless there's a big problem with doing so.

j4b 08-08-2004 11:45 PM

I'm not a frequent user. Is it necessary for me to query the Apache server before I know what IP to point my browser to? This is what buggers me about DCHP. The computers on my LAN are a Mac (OS-9), Win-XP, and the FC2 server.

It looks like I will have to get used to logging into my router (admin passworded) to find out what IP numbers are in use today. I am really not excited about teaching my Mac user how to do this, just to see the web pages....

synaptical 08-08-2004 11:52 PM

you should be able to assign IPs statically with your router, in the DHCP section.

j4b 08-09-2004 12:16 AM

In the "filters" section I can associate a MAC with an IP on the LAN. (Although I can choose to "disable MAC filters" after assigning the IP address.

I hope this is what you meant.

Thanks.

synaptical 08-09-2004 12:25 AM

once you assign an IP to the mac address of the lan web server (192.168.0.111, for example), make the IP static. then all the computers on your network can always access the web server at that IP.

j4b 08-09-2004 10:03 PM

As I have admitted to being a newbie, "make the IP static" is like magic to me. Does FC2 have a wizard to help, or must I muddle through man "everything netlike" to find the obscure set of commands to do this?

synaptical 08-09-2004 10:21 PM

as i said, it should be a setting in your router. i have one of the most basic d-link routers, dl-604, and it has the option to use the router as a DHCP server for the lan and to set IPs statically. maybe your router doesn't allow that, but afaik, most routers do allow it. read the documentation for your router, or post the model if you can't figure it out so someone can help you do it. :cool:


All times are GMT -5. The time now is 03:31 PM.