Home  Contents

httpd:setPath

Httpd Core4 Lua Event System

SYNOPSIS

  1. httpd:setPath(path)
  2. httpd:setSystemPath(path)

DESCRIPTION

The first form sets the path of the server root directory. The second form sets the path of the secondary system server root directory.

When a client requests a file, the server will first look in the server root directory. If the file is not found there, the server will then check the secondary directory. If the file is not found either, the request fails with a 404 error.

The primary server root is usually at /usr/lib/htdocs. The files are created by the application developer.

The secondary server root is at /lib/htdocs. The files are provided by the SDK and allow changing of system settings, firmware updates and debugging.

The server will never serve files outside of these directories.

If you need to disable the secondary root, simply configure it to nil.