Loading ...
Sorry, an error occurred while loading the content.

RE: [nslu2-linux] Re: Setting up virtual hosts on Linksys NSLU2

Expand Messages
  • Gregg C Levine
    Hello! This is something that I ve researched to the vanishing point for a large number of people. A virtual host, on the Linksys NSLU2 can obviously be done,
    Message 1 of 18 , Feb 1 7:31 AM
    • 0 Attachment
      Hello!
      This is something that I've researched to the vanishing point for a large
      number of people. A virtual host, on the Linksys NSLU2 can obviously be
      done, and many people have explained thusly how that would work out. I do
      know enough about Apache, and since it enjoys a lot of memory, it may not
      work on the thing.

      However if you are going to be running a DHCP service, then it can only be
      run from one unit only. This can be either your Orange Box gizmo, or even
      your router, or a local Linux box who's connected to that router. Multiple
      DHCP servers tend to confuse even the best managed networks.

      Mailhosts that is a subject of yet another thread and an even bigger
      discussion.
      --
      Gregg C Levine hansolofalcon@...
      "The Force will be with you always." Obi-Wan Kenobi
       
      -----Original Message-----
      From: nslu2-linux@yahoogroups.com [mailto:nslu2-linux@yahoogroups.com] On
      Behalf Of Frank Reijn
      Sent: Thursday, January 31, 2008 2:55 PM
      To: nslu2-linux@yahoogroups.com
      Subject: Re: [nslu2-linux] Re: Setting up virtual hosts on Linksys NSLU2

      Hi Raspden,

      No it can not..... The orange box I mean  but.........

      Why not creating your own DNS server  :-)
      Although it is a small box, it has a lot of power !!!!!!

      http://www.nslu2-linux.org/wiki/Optware/DnsMasq

      Be carefull now...  wrongly setting up internal DNS can mess up your
      outgoing internet connection.

      Cheers,

        Frank



      raspden <raspden@...> wrote:
      Thanks. That's cleared things up nicely. I didn't realise I still
      needed to use the hosts file.

      The local network is just my basic home network. It's run from an
      Orange Livebox which has a DHCP server. All very simple. Have had a
      look in the livebox setup and can find no sign of DNS Servers. There
      is dynamic DNS, but I don't think that can be used for this purpose(???).

      Does anyone know if the DNS Servers can be resolved on the Livebox?

      If not I'll just use hosts.

      Thanks again.

      --- In nslu2-linux@yahoogroups.com, "Scott Ruckh" <sruckh@...> wrote:
      >
      >
      > This is what you said Brian Wood
      > > Frank Reijn wrote:
      > >>
      > >>
      > >> You do have two questions here.
      > >>
      > >> 1 - what and how is DNS
      > >>
      > >> 2 - Virtual hosting
      > >>
      > >>
      > >> I give you the answer on Q 1.
      > >>
      > >> If you type http://192.168.1.77:8081 your browser knows which
      machine
      > >> to query because it uses the ip adress to reach your slug.
      > >>
      > >> if you type http://pma.rhazzzz.com:8081/
      > >> <http://pma.rhazzzz.com:8081/> your browser will query the
      configured
      > >> DNS server and ask it for the relevant ipaddress.
      > >> As you stated this is a FAKE url and the DNS server does not
      have an
      > >> entry for this and your journey on the network stops....
      > >>
      > >> Eighter you have a local network DNS and put the pma.rhazzzz.com
      in , or
      > >> you do need a host file on EVERY computer to translate
      pma.rhazzzz.com
      > >> into
      > >> 192.168.1.77.
      > >>
      > >> You just did your first 2 baby steps on the network :-)
      > >>
      > >> For the second question I can not help you... sorry...
      > >
      > > I can, perhaps:
      > >
      > > Normally and originally a web server had a single address and hosted a
      > > single site.
      > >
      > > Virtual hosting allows you to host more than one site using a single
      > > machine.
      > >
      > > One way to do this is to run multiple web servers on different ports,
      > > but this doesn't work well because most people and systems expect
      a web
      > > server to be on a certain port.
      > >
      > > "Name virtual hosting" allows multiple host names to all resolve
      to the
      > > same IP address. The server knows by what name it was called, and will
      > > serve up the appropriate site based on this.
      > >
      > > The problem, of course, is when somebody calls the site via its
      > > numerical address, not a name. Now the server has no way to know what
      > > site is wanted and will serve up only the "default" site.
      > >
      > > But as long as the sites are callled by name, and each name has a DNS
      > > entry that points to the same server, the server can decide which site
      > > to serve up based on what name it was called by.
      > >
      > > Name virtual hosting has to be enabled in the server, and a separate
      > > configuration has to be made for each named site ("named virtual
      host").
      > >
      > > Hope that helps.
      > >
      > For the original poster, I will say this again (especially knowing
      this is
      > for your internal network only).
      >
      > If your client (the one running the web browser) is a windows box:
      > Open up (in your favorite editor)
      %SystemRoot%\system32\drivers\etc\hosts,
      > most commonly, C:\WINDOWS\system32\drivers\etc\hosts, and add an
      entry for
      > your virtual host your are creating for your http server. Possibly
      > something like this:
      >
      > 192.168.1.77 pma pma.rhazzzz.com
      >
      > On a *NIX type client, the hosts file is typically located here:
      /etc/hosts.
      >
      > Again, add an entry to the hosts file, using the exact same syntax
      as above.
      >
      > This edit of the hosts file will be necessary for every client.
      >
      > If you are in control of a DNS server on your network, then obviously
      > adding possibly a CNAME record for that name would be your best option.
      > If you don't maintain a DNS server for your local network, then use the
      > hosts file as mentioned above.
      >
      > Now from that machine, you should be able to do things like 'ping
      > pma.rhazzzz.com'. This assumes that your name look-up is using the
      hosts
      > file (which is by default true on most Operating Systems).
      >
      > Now that the name resolution problem is resolved, it is now a matter of
      > getting your virtual host configuration set up in your lighttpd.conf
      file
      > (I have already posted and example of this, so you should be ready
      to go).
      >
    • Scott Ruckh
      This is what you said Gregg C Levine ... I have the luxury of having a dedicated Linux box that acts as firewall, router, DNS, DHCP server, etc. Although I
      Message 2 of 18 , Feb 1 2:29 PM
      • 0 Attachment
        This is what you said Gregg C Levine
        > Hello!
        > This is something that I've researched to the vanishing point for a large
        > number of people. A virtual host, on the Linksys NSLU2 can obviously be
        > done, and many people have explained thusly how that would work out. I do
        > know enough about Apache, and since it enjoys a lot of memory, it may not
        > work on the thing.
        >
        > However if you are going to be running a DHCP service, then it can only be
        > run from one unit only. This can be either your Orange Box gizmo, or even
        > your router, or a local Linux box who's connected to that router. Multiple
        > DHCP servers tend to confuse even the best managed networks.
        >
        > Mailhosts that is a subject of yet another thread and an even bigger
        > discussion.
        > --

        I have the luxury of having a dedicated Linux box that acts as firewall,
        router, DNS, DHCP server, etc. Although I run CentOS there are several
        self contained distributions made just for the purpose of being an
        internet gateway. They have web interfaces for configuration in hopes to
        simplify the setup.

        This is not entirely practical for everyone, but it is definitely a
        solution that has worked well for me (including a mail host gateway, which
        the NSLU2 w/sendmail are configured to use).
      • raspden
        ... a large ... obviously be ... out. I do ... may not ... only be ... or even ... Multiple ... hopes to ... which ... Hello Again, I have now set up dnsmasq
        Message 3 of 18 , Feb 11 6:23 AM
        • 0 Attachment
          --- In nslu2-linux@yahoogroups.com, "Scott Ruckh" <sruckh@...> wrote:
          >
          >
          >
          > This is what you said Gregg C Levine
          > > Hello!
          > > This is something that I've researched to the vanishing point for
          a large
          > > number of people. A virtual host, on the Linksys NSLU2 can
          obviously be
          > > done, and many people have explained thusly how that would work
          out. I do
          > > know enough about Apache, and since it enjoys a lot of memory, it
          may not
          > > work on the thing.
          > >
          > > However if you are going to be running a DHCP service, then it can
          only be
          > > run from one unit only. This can be either your Orange Box gizmo,
          or even
          > > your router, or a local Linux box who's connected to that router.
          Multiple
          > > DHCP servers tend to confuse even the best managed networks.
          > >
          > > Mailhosts that is a subject of yet another thread and an even bigger
          > > discussion.
          > > --
          >
          > I have the luxury of having a dedicated Linux box that acts as firewall,
          > router, DNS, DHCP server, etc. Although I run CentOS there are several
          > self contained distributions made just for the purpose of being an
          > internet gateway. They have web interfaces for configuration in
          hopes to
          > simplify the setup.
          >
          > This is not entirely practical for everyone, but it is definitely a
          > solution that has worked well for me (including a mail host gateway,
          which
          > the NSLU2 w/sendmail are configured to use).
          >

          Hello Again,

          I have now set up dnsmasq on my slug and it works great with no
          problems with the internet or anything. I'm really quite impressed
          with it. Now I have some sites running as well. I added the following
          lines to /etc/hosts

          192.168.1.77 pma.aspdendev.com 192.168.1.77
          192.168.1.77 bramley.aspdendev.com 192.168.1.77

          Now when I navigate to pma.aspdendev.com:8081 I see the phpmyadmin
          site as I want.

          However I was wondering, as I'm using aspdendev.com as my server name,
          is there a way of setting dnsmasq to send all sites which have the
          format '<name>.aspdendev.com' to the slug so that I don't have to keep
          adding new lines to the /etc/hosts file and restarting the dns server
          as i have to do at the moment?

          Any help appreciated.
        Your message has been successfully submitted and would be delivered to recipients shortly.