#1
  1. Full Access
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jun 2000
    Location
    London, UK
    Posts
    2,019
    Rep Power
    17
    OK, I work for a small web design company and we are shortly having a fast leased line installed. We are planning on having a web server in our office to host some of our smaller client's sites on. The thing is, these clients will have their own domain names and the server only has one IP address, so how can I set up a DNS for the domains to point to? I'm quite new to the whole idea of DNS but I know that it basically converts IP addresses to domain names and vice versa, and I know that when you have a web server it only has one IP address normally, since we're only running one internet connection on the server. Any advice would be appreciated. I know how to set up Apache, by the way.
    ------------------------------
    Alex
    (http://www.alex-greg.co.uk)
  2. #2
  3. No Profile Picture
    RyanP
    Guest
    Devshed Newbie (0 - 499 posts)
    I can't give you an answer on exactly what you need to do, but I am quite sure that what you want to look into is Virtual Hosting. Read up about it in the apache manual and check out the Virtual Hosting entries at the end of httpd.conf
  4. #3
  5. SwollenMember
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Location
    the master control
    Posts
    264
    Rep Power
    15
    For the DNS issue, I would use BIND...download it from freshmeat.net
    When you register a domain, you must supply DNS server(s). In BIND there are zone files which contain information about the domain name. For example, what IP it points to for a web page, what is the name of the mail exchanger...etc. Since you mentioned that you are only hosting a few sites, you might want to install BIND on the same box that is going to be your web server...however if you are doing DNS for many sites, a seperate box might be the answer. The configuration of BIND is not too hard, but make sure you look at the readme file for help.
  6. #4
  7. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Location
    Spokane, Wa. US
    Posts
    3
    Rep Power
    0
    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by alexgreg:
    OK, I work for a small web design company and we are shortly having a fast leased line installed. We are planning on having a web server in our office to host some of our smaller client's sites on. The thing is, these clients will have their own domain names and the server only has one IP address, so how can I set up a DNS for the domains to point to? I'm quite new to the whole idea of DNS but I know that it basically converts IP addresses to domain names and vice versa, and I know that when you have a web server it only has one IP address normally, since we're only running one internet connection on the server. Any advice would be appreciated. I know how to set up Apache, by the way.[/quote]

    First set up bind. You can find everything you need at the Internet Software Consortium (www.isc.org). In all of your forward DNS files, you'll just have your "IN A ip.address" line reflect the same thing. In your reverse DNS, you'll just have the single IP referenced to whatever you consider your primary domain.

    In Apache, you'll need the NameVirtualHost directive pointing to your server's IP, and use the <VirtualHost ip.address> syntax with the ServerName and ServerAlias directives to handle the resolves.

    Take care,

    Brendan http://www.witheredpipedream.com
  8. #5
  9. Full Access
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jun 2000
    Location
    London, UK
    Posts
    2,019
    Rep Power
    17
    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by sophisticate:
    ...In all of your forward DNS files, you'll just have your "IN A ip.address" line reflect the same thing. In your reverse DNS, you'll just have the single IP referenced to whatever you consider your primary domain.

    In Apache, you'll need the NameVirtualHost directive pointing to your server's IP, and use the <VirtualHost ip.address> syntax with the ServerName and ServerAlias directives to handle the resolves.
    [/quote]

    Thanks very much for your help but I'm still unclear about one or two things such as the reverse DNS and the forward DNS and what those do. Also how do I get a name for my DNS to point the domain names that I register to? The names require at least two DNS's.

    Regards,

    Alex
  10. #6
  11. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Location
    Spokane, Wa. US
    Posts
    3
    Rep Power
    0
    The reverse DNS translates ip addresses to verbal addresses, vice versa for the forward DNS.

    If you're not that worried about having redundancy with your DNS (ie. multiple machines in case one breaks), place CNAMEs (aliases) in your primary domain's forward DNS entry like:

    ns0 IN CNAME yourdomain.com.
    ns1 IN CNAME yourdomain.com.

    So both of those addresses point to your server. I think that will work, though it's possible that the registrars won't allow two hosts with the same IP -- I've never tried. If that's the case, try to get 2 IPs from your provider, bind them both to the same machine and in the forward DNS, use:

    ns0 IN CNAME yourdomain.com
    ns1 IN A second.ip.address

    Good luck!

    Brendan Cassida
    http://www.witheredpipedream.com

    [This message has been edited by sophisticate (edited July 12, 2000).]

IMN logo majestic logo threadwatch logo seochat tools logo