Zero logo

Document root paths (Absolute vs Relative)

Apache serves pages from document root folders located anywhere on the filing system. The Uniform Server ZeroXII has two pre-defined root folders www and ssl located within The Uniform Server file hierarchy specifically for portability. There are no restrictions on these root folders you can use a different name and or location. This page details various options for the document root folder.

Overview

The Uniform Server allows you to select (details see Change Apache Root-folders ) any folder to use as a root folder. The folder path selected is analysed and converted to either an absolute or relative path format. This converted path is saved to a configuration file (UniServerZ\home\us_config\us_user.ini). Starting Apache this configuration file is read. Apache requires absolute paths, a relative path read from the configuration file is converted to a absolute path.

Note: Relative to absolute path conversion is performed at run-time and uses the basepath (path to UniController.exe) for conversion making the server portable.

Absolute and Relative path formats

The Uniform Server ZeroXII supports the following Absolute and Relative path formats:

Symbol Function Type Example
D: Drive Absolute d:/somefolder/www On a different drive not the current drive
/ Root of the current disk Absolute/(Relative) /somefolder/www Starting from top level of current drive
. Current directory Relative ./somefolder/www Starting at UniServerZ gives UniServerZ/somefolder/www
.. Parent directory Relative ../../www Two levels up from folder UniServerZ

Note: Although '/' is an absolute path it is also relative! For example the folder location say on a USB memory stick when copied to an identical location on a hard is accessible by Apache on that hard drive. No changes are required to the Apache configuration file directives.

Configuration file us_user.ini

Document root folder paths are stored in configuration file UniServerZ\home\us_config\us_user.ini
the two parameters used are shown on the right with their default values.

US_ROOTF_WWW=./www
US_ROOTF_SSL=./ssl

You can edit this file and change the parameters however remember that UniController Change Apache Root-folders will overwrite these parameters.


--oOo--