NaviServer - programmable web server
4.99  5.0

[ Main Table Of Contents | Table Of Contents | Keyword Index ]

ns_serverpath(n) 5.0.0a naviserver "NaviServer Built-in Commands"

Name

ns_serverpath - Returns absolute path to current virtual server home directory

Table Of Contents

Synopsis

Description

This is virtual hosting aware command that returns absolute path to the server home for current virtual server context

COMMANDS

ns_serverpath ?-host value? ?--? ?path-segment ...?

Returns the absolute path to current virtual server home directory followed by the optional path segments. Similar to ns_pagepath.

The optional -host parameter can be used to return the path for a certain virtual host. If not specified the value for the host is taken from the host header field of the current request.

EXAMPLES

 % ns_serverpath
 /usr/local/ns
 
 % ns_serverpath foo bar
 /usr/local/ns/foo/bar

See Also

ns_pagepath, nsd

Keywords

NaviServer, global built-in, virtual host