Partager via


Set Virtual Paths (Compact 2013)

3/26/2014

Virtual paths specify a mapping between the virtual path in a URL and the physical path on the device. For example, you can allow a client browser to connect to http://www.widgets-inc-10.com/www/sample.htm while retrieving the file that is named Sample.htm from the \Windows\www\data directory. To accomplish this connection, specify a mapping between the /www virtual path and the \Windows\www\data physical path.

At least one virtual path must be created before the web server starts. If no valid virtual path mappings have been specified, the web server cannot perform any mappings and returns the 404 - Object not found status code for all requests.

If a web client browser requests a directory, the web server searches for default pages in the corresponding physical directory, following the order in which they are listed in the registry. If no pages are found and the DirBrowse registry value is nonzero, the web server sends a list of links to all of the files and directories in the requested directory. If no default pages are found and the DirBrowse registry value is 0, the web server sends the 403 - Forbidden status code.

HKEY_LOCAL_MACHINE\COMM\HTTPD\VROOTS is the virtual path protected registry key. For more information about this key and its use, see Virtual Path Registry Settings.

The following registry key example shows how to perform the following tasks:

  • Set the Windows\www directory as the default directory.

  • Set the authentication level to 1, which requires a valid user identifier and password.

  • Grant read, write, and execute permissions to valid users by default without the P option.

  • Identify a list of users, groups, or both who are allowed or not allowed to access the virtual directory.

    [HKEY_LOCAL_MACHINE\Comm\HTTPD\VROOTS\/www]
        "(default)"="\windows\www"
        "A"=1
        "UserList" = "Maxine Benson; -Ronda Mack; @Group1"
    

See Also

Concepts

Web Server Implementation Details