Ubuntu 8.04 change LAN access to webserver

  • devilwood
  • Silver Member
  • Silver Member
  • User avatar
  • Posts: 436

Post 3+ Months Ago

I'm tired of connecting to my webserver from other computers on my network by going to http://192.168.1.102/mywebdevfolder/myflashapp.htm

What's the simplest way to get a domain name pointed to 192.168.1.102?

I'd much rather go to http://some_domain_name.net/mywebdevfol ... ashapp.htm

I've read some walk-thrus and howto's on dns servers and virtual hosts, but I'm still confused.

In the past I've editted my host file to link localhost and 127.0.0.1 when I couldn't access my www/ folder by going to http://localhost and instead I had to go to http://127.0.0.1 but that was locally. I need access using a web browser on other machines in my house. Could it be as easy as adding a line to my hosts file? Such as:

192.168.1.102 some_domain_name.net
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • Don2007
  • Web Master
  • Web Master
  • Don2007
  • Posts: 4924
  • Loc: NY

Post 3+ Months Ago

Is it really that much more work to type the IP address instead of a domain name? Is that why your signature says you need 12 hours of sleep?

Why if you create a shortcut on your desktop to get to the page? That way, you won't have to type at all?
  • kc0tma
  • o|||||||o
  • Web Master
  • User avatar
  • Posts: 3318
  • Loc: Trout Creek, MT

Post 3+ Months Ago

If the other computer is a winblows box, then just put a line in your HOST file (somewhere in system32, I can't remember exactly where). The syntax is something like 192.168.1.102[TAB]hostname its pretty self explanitory when you look in there.

Then when go to your web browser you just type that hostname and it will take you right to it.
  • devilwood
  • Silver Member
  • Silver Member
  • User avatar
  • Posts: 436

Post 3+ Months Ago

That's what I needed to know if just adding the ip/hostname pair to the host file on the server would also let my other computers use the hostname in the browser address bar. I've only ever just mapped my loopback ip to localhost in the host file when it stopped working once on my local machine and I've always just use localhost in the address when viewing my webpages locally.

Also, yes it's getting to be a pain because I can type faster than I can press the number keys separated by periods. Further, if someone gets on my router then I'd rather be able to tell that person to go to somedomain.com than the ip address to view my stuff. However, you're right about making the desktop shortcuts(that's easiest for me and it's already done), but if it's as easy as mapping the ip in my host file then it should be done as friends and family won't use the site that much and probably don't want a shortcut or wouldn't even remember they had it once I created it for them. This would also save me having to create a shortcut for everyone that logs onto my internal site.

What's easier; doing something or not doing it all? I can get 12 hours of sleep and still have time to knock this out while making my intranet webpages easier to access.
  • kc0tma
  • o|||||||o
  • Web Master
  • User avatar
  • Posts: 3318
  • Loc: Trout Creek, MT

Post 3+ Months Ago

So are you really wanting to have kind of like a proxy type of thing, like you see in motels and stuff? When someone connects to the wireless and tries to hit the internet, they are automatically redirected to your page on your web server...right?
  • jammer2552
  • Graduate
  • Graduate
  • User avatar
  • Posts: 139

Post 3+ Months Ago

You should have DNS running on the *nix box. Simply type in http://DNSNAME and it should take you straight to it. The DNS name is whatever you named the machine when you installed the OS.

For instance, I named my Ubuntu Server 8.10 jcserver, so to access Apache from my lan I can just type http://jcserver/

:)
  • devilwood
  • Silver Member
  • Silver Member
  • User avatar
  • Posts: 436

Post 3+ Months Ago

Hey jammer2552,

that worked for me. So, I actually don't have to do anything.

One last thing,

How do I change the name if I ever want to? Is this the hostname in my bin/hostname file?

thanks for the reply.
  • kc0tma
  • o|||||||o
  • Web Master
  • User avatar
  • Posts: 3318
  • Loc: Trout Creek, MT

Post 3+ Months Ago

That should work for the hostname, try typing man hostname to see the man page for it. If you just type the hostname command it will show you the hostname, but if you type hostname blahblah that will change it to blahblah.
  • devilwood
  • Silver Member
  • Silver Member
  • User avatar
  • Posts: 436

Post 3+ Months Ago

k thnx kc. I'll check the man page, but just wanted to make sure that the hostname was the same as the dnsname jammer was talking about or if the name was set in some other file.

Post Information

  • Total Posts in this topic: 9 posts
  • Users browsing this forum: No registered users and 63 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.