Where should you put the files?

Before you start the Slinger web server and begin creating your web pages, you need to determine what directory structure is appropriate, and where you should put your files.

CAUTION:
Be careful not to place your files in a location where your system is open to outsiders, thereby exposing your system to undue risk. For example, don't place your CGI scripts in the same directory as your regular system binaries, because doing so could let people run any command on the machine that supports your web server.

Use these environment variables to configure Slinger:

HTTPD_ROOT_DIR
The name of the directory where Slinger looks for data files. The default is /usr/local/httpd.
HTTP_ROOT_DOC
The name of the root document. When a web client requests the root document, HTTPD_ROOT_DOC is appended to HTTPD_ROOT_DIR to build the full pathname of the root document. The default is index.html.

For example, if HTTPD_ROOT_DOC is defined as index.html, and HTTPD_ROOT_DIR is defined as /usr/www, Slinger appends index.html to /usr/www to build /usr/www/index.html.

Once you've decided on a directory structure, you need to export these environment variables before starting Slinger:

export HTTPD_ROOT_DIR=/usr/local/httpd
export HTTPD_ROOT_DOC=index.html

For information on setting environment variables when you log in to your machine, see Configuring Your Environment.