# 3. Quick Start & Tours

Chapter Contents | Prev | Next
Keyword Search:
www.openlinksw.com
docs.openlinksw.com
Book Home
Contents
Preface
Quick Start & Tours
Where to Start
Client Connections
Virtual Database Server
Web Server
Virtual Directories Multi Homing
WebDAV
Web Services
Exposing Persistent Stored Modules as Web Services
VSMX - Virtuoso Service Module for XML
SQL to XML
NNTP
Dynamic Web Pages
VSP Examples
Third-Party Runtime Typing, Hosting & User Defined Types
Troubleshooting Tips

## 3.4. Web Server

### 3.4.1. Virtual Directories

The term virtual directory applies to the mechanism to hide the physical location of a Web resource under different path which user agents use to retrieve it. This mechanism in virtuoso is a part of host definition.

This method is useful when one server has to keep many Web sites. Using a redirect mechanism is not a universal way to do this. It is better to define virtual hosts and paths to the directory entries which contain Web pages.

#### 3.4.1.1. Creating Virtual Directories Programmatically

For an overview of virtual directories, and how to configure them in PL, refer to the Virtual Directories Section.

#### 3.4.1.2. Setup in Administration Interface

This step by step example will define a virtual directory /help that will point to the directory /departments/support/

1. In the Virtuoso Administration Interface select the menu WebDAV / WebDav Services / HTTP Virtual Directories.

   Figure: 3.4.1.2.1. Select Menu

2. To add a new directory definition select Edit URL mappings action for the Default Web Site.

   Figure: 3.4.1.2.1. Edit URL mappings

3. Press the button at the foot of the form to add a new virtual directory.

   Figure: 3.4.1.2.1. Add virtual directory

4. Select File system from the Templates, as this mapping example will be from one directory to another.

   Figure: 3.4.1.2.1. Use File system template

5. Enter details in the form to define the mapping. Most of the fields are optional. In this example, only the logical and physical paths and the default page name are required.

   Figure: 3.4.1.2.1. Mapping details

6. The following URLs will then be equivalent:

   - http://localhost:8890/help
   - http://localhost:8890/departments/support/index.html

### 3.4.2. Multi Homing

The term Multi Homing refers to the practice of maintaining more than one server on one machine, differentiated by their apparent host name. It is often desirable for companies sharing a web server to have their own domains, with web servers accessible as www.company1.com and www.company2.com, without requiring the user to know any extra path information.

#### 3.4.2.1. Creating Multiple Homes Programmatically

For an overview of Multi Homing, and how to configure it with PL, refer to the Virtual Hosting and Multi Hosting section.

#### 3.4.2.2. Setup in Administration Interface

This step by step example will define a virtual home for the URL http://www.ahelp.com/ to the server www.a.com and directory /departments/support/

1. Have a domain name allocated in the DNS for the ahelp.com that points to the same IP address of the a.com that is hosting a virtuoso server.

2. In the Virtuoso Administration Interface select the menu WebDAV / WebDav Services / HTTP Virtual Directories.

   Figure: 3.4.2.2.1. Select Menu

3. To add a new host definition select Add new site button.

   Figure: 3.4.2.2.1. Add new site

4. Define the mapping between the virtual host and the actual listening host domain names.

   Figure: 3.4.2.2.1. New site mapping

5. Select File system from the Templates, as this mapping example will be from one directory to another.

   Figure: 3.4.2.2.1. Use File system template

6. Enter details in the form to define the mapping. Most of the fields are optional. In this example, only the logical and physical paths and the default page name are required.

   Figure: 3.4.2.2.1. Mapping details

7. The following URLs will then be equivalent:

   - http://www.ahelp.com/
   - http://www.a.com/departments/support/index.html

Previous Virtual Database Server | Chapter Contents | Next WebDAV