Web Server Setup tutorial
Examples of Mapping Using the HTTPS client certificates

## Preliminaries

- The Web server can be setup to check the HTTPS client certificate
- The HTTPS client must have installed a X.509 certificate.

## Using the Virtual Directories UI

- Login to the Conductor UI using the dba account.
- Go to "Web Application Server" tab and then go to the "Virtual Domains & Directories" tab.
- In the empty fields below the list of HTTP Listeners enter:
- In the "HTTP Host" field the qualified name of the host.
- In the "Interface" field the qualified name of the interface to listen to.
- In the "Port" field the port number to listen on.
- Press the "Add" button.
- Define the HTTP root location of this host. The root location can be mapped in file system, DAV or proxy. This example uses the filesystem.
- Create a "/ssl_cv" directory under the HTTPServer ServerRoot directory. This will be used for the new mapping.
- Click the icon in front of the Interface value.
- Click the "Add new directory" link.
- Choose the "File System" type and press the button 'Next>>'.
- Enter for "Path" "/ssl_cv" and enter "/ssl_cv/" (or select with "Browse" button this directory) in the "Physical path" location.
- If you wish to make entire site to be executable specify the VSP user. (See also: VS-B-1 example)
- Select the "SSL" as "Security method"

- Enter for authentication options the files for the certificate and the private key of the server:

      https_cert=PATH_TO_THE_CERTIFICATE;
      https_key=PATH_TO_THE_PRIVATE_KEY;
      https_cv=PATH_TO_THE_CA_LIST;
      https_cv_depth=2;

- Press the "Save Changes" button.
- If needed, more path mapping can be added to the defined.
- To test the definition enter http://[yourhost:port]/ in location box of your browser.

## Equivalent SQL commands for above

- Connect to the Virtuoso server via ISQL utility as DBA user.

- Define a virtual directory mapping for the host alias:

      SQL> vhost_define (vhost=>'[yourhost]:4334',lhost=>'[yourhost]:4334',
                   lpath=>'/',ppath=>'/ssl_cv/', def_page=>'index.html',
      		     is_brws=>1, sec=>'SSL',
      		     auth_opts=>vector ('https_cert','PATH_TO_THE_CERTIFICATE',
      			 'https_key','PATH_TO_THE_PRIVATE_KEY', 'https_cv', 'PATH_TO_THE_CA_LIST',
      			 'https_cv_depth', 1));

- Note that in the sample SQL script, 'localhost' is used instead of 'yourhost'. This can be replaced with the official host name.