Results 1 to 10 of 10

Thread: Lamp & dns

  1. #1
    Join Date
    Aug 2012
    Beans
    3

    Question Lamp & dns

    Hi,

    I've just installed ubuntu on separate machine on my local network and its running fine - I can access test websites running apache, mysql, php locally.

    Is it possible to setup development environment in such a way that i can access number of different VirtualHosts that are run on ubuntu from another windows/mac machine within the network? Eg.

    I have test-site.local running on ubuntu, how would i access it using the same url from another machine on the network? Is this DNS related?

    Any help would be greatly appreciated.

    Cheers

  2. #2
    Join Date
    Jan 2006
    Location
    Orlando
    Beans
    33
    Distro
    Ubuntu 7.04 Feisty Fawn

    Re: Lamp & dns

    Yes, you would need a DNS server to access the different virtual hosts. Now if you simply have "test.local" you *should* be able to access it from any machine on your local network, so long as your router is behaving corectly. Do you require multiple sites? or is simply having test.local accessable enough?

  3. #3
    Join Date
    May 2008
    Location
    Ontario, Canada
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Lamp & dns

    yws but if you dont know how to configure bind an easier and just as good of a aolution is to add the websites and corresponding ip address of the server to the host files on each of the computers on your network

    cheers cc7

    no dns is required if you have set up Apache virtual host correctly. just edit /etc/hosts or if windows c:\windows\system32\etc\hosts

    you computers always check their own host files firsts. maintaining them becomes a pain and that is why dns were made
    Last edited by vandorjw; August 28th, 2012 at 04:15 AM.

  4. #4
    Join Date
    Jan 2006
    Location
    Orlando
    Beans
    33
    Distro
    Ubuntu 7.04 Feisty Fawn

    Re: Lamp & dns

    Configuring / updating hosts files for each machine would be so annoying. At that point I would simply serve the pages on seperate ports, and remember then ports each site was served on D:

  5. #5
    Join Date
    May 2008
    Location
    Ontario, Canada
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Lamp & dns

    yep that might work well enough. just rember to open the ports you use for each site in the server firewall

  6. #6
    Join Date
    Aug 2012
    Beans
    3

    Re: Lamp & dns

    Quote Originally Posted by Szor3n View Post
    Yes, you would need a DNS server to access the different virtual hosts. Now if you simply have "test.local" you *should* be able to access it from any machine on your local network, so long as your router is behaving corectly. Do you require multiple sites? or is simply having test.local accessable enough?
    I would like to access multiple sites(test1.local, test2.local, etc) from any machine within the network. At the moment i can only access the site via IP and not the host name(s). I think my router is configured correctly, never had an issue with it?

    Editing windows/mac hosts file would be a nightmare down the track as number of sites grow.

    Thanks for all your feedback so far

  7. #7
    Join Date
    Jan 2006
    Location
    Orlando
    Beans
    33
    Distro
    Ubuntu 7.04 Feisty Fawn

    Re: Lamp & dns

    Seeing your question got me currious, and so I looked into it a bit more. It seems as if the only two options are to: 1) serve your sites on different ports, or modify your hosts files to direct that correct names to the IP of your server. Option 2 wouldn't be so bad if you made a python script or something to sync up the hosts files on each machine. Otherwise I would stick with option 1, and then create named bookmarks of each 192.x.x.xyz so you could keep track of them.

  8. #8
    Join Date
    Aug 2012
    Beans
    3

    Re: Lamp & dns

    Can i maybe point Windows/Mac to use Ubuntu DNS to lookup local sites first and if none found go to ISP DNS?

  9. #9
    Join Date
    May 2008
    Location
    Ontario, Canada
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Lamp & dns

    message removed
    Last edited by vandorjw; August 28th, 2012 at 02:05 PM.

  10. #10
    Join Date
    Mar 2006
    Location
    The Internet
    Beans
    1,817
    Distro
    Ubuntu

    Re: Lamp & dns

    Quote Originally Posted by drfln View Post
    Can i maybe point Windows/Mac to use Ubuntu DNS to lookup local sites first and if none found go to ISP DNS?
    Yes - ideally this would be setup in your router, if it supports being a local DNS server. There you could make DNS entries for your local virtual hosts.

    This is probably too much trouble for what it is worth though...

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •