TITLE
    AppleShare IP 6.1: Web Server Multi Domain Support
Article ID:
Created:
Modified:
60019
11/9/98
11/1/00

TOPIC

    MultiDomain Support allows you to configure your Web server to host different web sites. A unique home page can be served for each site, a function of the URL used at the client. This is useful for Internet Service Providers, or other server administrators who manage a Web Server for various customers, each of whom want the URL to their home page to reflect their domain or company name.

    This article contains the following sections:

    • Setting up Multi Domain Support
    • Troubleshooting Tips
    • Setting up Secondary IP Addresses for the ASIP server.


DISCUSSION

    Setting Up Multi Domain Support

    This section describes how to set up your Web Server to support multiple domain names. There are two approaches to this:
    • If visitors to your web site have web browsers that support HTTP 1.1 or greater, you can use just one IP address for your server, with multiple domain names mapped to that one IP address. With an HTTP 1.1 compliant client, the domain name is passed along to the server, and the server uses that unique domain name to determine which home page to serve to the client.
    • Earlier specifications of HTTP did not require the client to submit the domain name to the server; only the IP address was sent. For these clients (for example, versions 2.0 of Netscape and Internet Explorer, or Mosaic 2.0.1), you must set up multiple (i.e. secondary) IP addresses for your server (using the single-link multihoming feature of Open Transport), and have your DNS tables map each of your client's domain name to a different IP address. (Consult your network administrator for the unused IP addresses you will need.) When the client sends a request to the Web Server, the server will use the IP address the client used to determine which home page to serve to the client.

    The instructions below address the first method; if you decide to use multiple IP addresses, see the note at the bottom of this page for assistance in setting up multiple IP addresses, then follow the instructions here with this exception: have your DNS tables map each domain name to the appropriate (i.e., different) IP address, and include the IP addresses in the Multi Domain Settings file, rather than the domain names for these sites.

    Step 1: Create separate web folders for each domain.

    AppleShare IP 6.1 allows you to configure the Web Server to host up to 50 domains. For each domain, create a folder on the hard disk that will include a default.html page. For example, you might have 3 clients: Alpha, Baker, and Charlie. Make a folder named "Alpha" that contains the default web page, other pages, and media, that you want visitors to see when they visit the Alpha site. Do the same for Baker and Charlie. The folders can reside anywhere on the hard drive.

    The folders might look like:



    Step 2: Create appropriate DNS entries for each domain.
    Each domain name will need an entry in your DNS tables, mapping it to the IP address of the server. In the example below using MacDNS, our domain is "company.com", but zone files have also been created for each of our customers :



    Note that each domain name above is mapped to the same server. No matter which domain name is used in the URL (www.alpha.com, www.baker.com, etc.), the IP address returned will be 17.104.104.89, thus all requests will go to the same ASIP server.
    Note also that, when preparing Web sites that will be available on the InterNet, each domain name must be registered with InterNIC, and the IP address of the primary name server for each domain specified; otherwise, other name servers and clients on the Internet will not be able to resolve those domain names.

    Step 3: Create the Multi Domain Settings file

    You will find a plain text file called "Multi Domain Settings," in the "Plug Ins" folder in your default Web Folder. Use SimpleText to open and edit that file.

    The syntax for Multi Domain Settings file is described below. Each line of the file contains either the domain name or IP address, the port number, and the path to the web files for that domain on the server.
    • domain name or IP address
      • Both can be used within the same Multi Domain Settings file; in fact, it's a good idea to list both your domain name with path, and to specify which page should be served if someone connects using the server's IP address.
      • Use domain names for your "customers" when you are using a single IP address at the server and will have HTTP 1.1-compliant clients connecting. In this case, the unique domain name will be what the server uses to determine what web pages to serve.
      • Use the IP addresses when you have multiple IP addresses configured for the server (using single-link multihoming).
    • port number
    • path to web files on the server
    Note that the path of the first entry will be used to locate the Remote Admin cgi.

    This is an example of the contents of a Multi Domain Settings file; while this example shows using port 80 for each domain, a different port number could be selected (just make sure the port number you select is not used by another application running on the server.

    Extract from a Multi Domain Settings file:
      dns=www.company.com port=80 path=Macintosh HD:Web Folder:
      dns=17.104.104.89 port=80 path=Macintosh HD:Web Folder:
      dns=www.alpha.com port=80 path=Macintosh HD:Client Folders:Alpha
      dns=www.baker.com port=80 path=Macintosh HD:Client Folders:Baker
      dns=www.charlie.com port=80 path=Macintosh HD:Client Folders:Charlie

    Note that the first site specified is going to be our default, and the domain/path through which Remote Administration will be used. In the second line, we are specifying what page we want served if someone uses the IP address of the server to connect, rather than a domain name. The following lines define the paths for our customer folders.

    Step 4. Settings in Web & File Admin Program

    Verify in the ASIP Web & File Admin program that:
    • Web Services are enabled
    • Web Plug-Ins are enabled (Plug In Messaging is also very useful for troubleshooting purposes, so turn that on as well.)
    • Appropriate privileges have been set up for each folder containing web pages that need to be served: each of your customer folders, as well as the default Web Folder.

    Stop and restart the Web & File Services, for the Multi Domain Settings file to be recognized.

    Step 5. Test from a client

    Test the Multi Domain configuration by connecting to the web server from any client, using each of the domain names you set up: www.alpha.com, www.baker.com, www.charlie.com, and www.company.com.

    If Plug In Messaging has been enabled in Web & File Server Settings, you can also check the Plug In Messages file found in System Folder:Preferences:AppleShare IP Preferences:HTTP Logs: to view the list of sites your server is ready to support.

    NOTE: Using the same domain name with multiple ports does not work. For example, having www.company.com serve Alpha's page at port 8070, Baker's page at 8080 and Charlie's page at 8090, is not supported in this version (may be implemented in future).

    Troubleshooting tips
    • If problems arise, verify correct configuration as follows:
    • Verify that Web Service and Web Plug Ins are enabled.
    • Verify that privileges to the default Web Folder, and to your customer's web folders, and all enclosed folders, are set up correctly.
    • Make sure that the domain names being used at client can be resolved. A utility such as MacTCP Watcher, DNS Lookup, or the Find IP Address feature of TCP Filtering Admin program can be used. If the domain names cannot be resolved, look into DNS issues.
    • Make sure that the Multi Domain Settings file is a text file, named correctly, formatted properly and located in the Plug Ins folder of the default Web Folder (the folder specified in Web & File Admin program).
    • Make sure that the paths indicated in the Multi Domain Settings file contain no typos and are accurate. There should not be blank spaces following the colons which delineate folders names. Remember that if any files are moved around on the server, or the names of disks or folders changed, the paths may no longer be accurate.
    • If Plug In Messaging is turned on, view the Plug In Messages file for a list of sites that the server is ready to support.
    • Verify that each of the web folders has a default.html page (the name of the default page to serve must match what has been set up in the Web & File Server Settings:Web screen); open the page locally using an HTML editor or browser to compare it against whatever page (if any) is being served to the client.
    • Check TCP Filtering to make sure that no filters would prevent access to the Web port from the client computers.
    • If using ports other than the default HTML port 80, make sure the port numbers are not being used by other services.
    • Utilities like MacTCP Watcher could be used to view what ports the server is listening on; with this application open, choose "Show Connection list" from the File menu.
    Setting up Secondary IP addresses on the ASIP server

    The second way of configuring the ASIP server for multi domain support is to set up secondary IP addresses at the server, and have the clients' domain names mapped to the secondary addresses. Open Transport 1.3 or later and a PCI-based server is required to support this capability, which is called 'single-link multihoming', 'IP multinode support', or 'IP aliasing.'

    This method is needed when clients are using older browsers (such as Mosaic) which may not support HTTP 1.1; in these cases, the domain name the client used in the URL is not passed to the server; only the IP address is. Thus, the ASIP Web Server must use the IP address to determine what home page to send to the client. When using this method, you should use IP addresses, rather than the domain name, in the Multi Domain Settings file.
    • Step 1: Verify that the server's primary IP address is static and configured manually. Open the TCP/IP control panel to verify.
    • Step 2: Create an "IP Secondary Addresses" file ; this will be a plain text file that will contain the information on the secondary IP addresses. This file needs to be saved into the Preferences folder of the System Folder.

      Within this file, each line begins with "ip=" followed by a secondary IP address. If the subnet mask and router address are different from those used by the primary IP address, they should be specified also, preceded by "sm=" and "rt=", respectively. Here is an example; note that the first line which begins with a semi-colon is a comment.

      ;ip address subnet mask router address
      ip=192.1.1.4 sm=255.255.255.0 rt=192.1.1.1
      ip=192.1.1.5
      ip=192.1.1.6
    • Step 3: Restart the server and test. Using a ping utility like MacTCP Watcher (you can locate and download this handy utility from various ftp sites on the Internet), try pinging each of the secondary IP addresses you've set up for the server.

Document Information
Product Area: Apple Software; Communications-Networking
Category: AppleShare
Sub Category: AppleShare for Mac OS

Copyright © 2000 Apple Computer, Inc. All rights reserved.