To set up virtual hosts
1. Log in to Server Admin (on Mac OS X Server 10.0-10.1) or Server Settings (on Mac OS X Server 10.2).
2. Click the Internet Tab.
3. Click Web.
4. Select 'Configure Web Service.'
5. In the Configure Web Service area, click Sites.
6. Click Add.
7. Set up a site for each virtual host. To configure name-based virtual hosts, be sure to enter the same IP address for each virtual host. To configure IP-based virtual hosts, enter the correct IP for each domain.
In order to serve a domain as well as host in that domain, you need to configure each as a separate name-based virtual host. For example, if you are setting up www.example.com and you want visitors entering example.com to get to your Web site, you must:
- make sure that DNS is correctly configured to allow this.
- enter example.com and www.example.com as two separate name-based virtual hosts configured the same except for their names.