| Monkey HTTP Daemon 0.11.0 Documentation: A Fast and Lightweight Web Server for Linux | ||
|---|---|---|
| Prev | Chapter 2. Monkey Configuration | Next |
2.2. Configuration structure files
Monkey is configured using the old unix way: plain text files. The configuration files are located in the conf/ directory and have the following structure.
conf/
/monkey.conf
/monkey.mime
/plugins.load
/sites/
/default
/plugins
/plugins/security
/plugins/security/security.confConfiguration Files and Directories
- monkey.conf
This is the principal configuration file, it describes the server setup and different variables such as number of workers, TCP port, timeouts, etc.
- monkey.mime
Each file in an operative system has a mime type associated, by convention using the file extension. It defines the data type contained, in this case, for a web server, monkey.mime contains a list of file extensions associated with the right mime type, this information is used in the HTTP protocol to communicate to the HTTP client what type of data is being transfered. If the requested file has not an extension or mime type associated, the default mime type text/plain is sent.
- plugins.load
When Monkey starts up, it reads the plugins.load file and check which plugins must loaded. Each plugin is a shared library.
- sites/
The sites directory, specifies the virtual hosts available, each file under this directory is considerated as a virtual host configuration file.
- sites/default
As was described above, the sites directory contains virtual host definitions on each existent file, the default file is mandatory and define the default virtual host. For Monkey at least one virtual host must exists under the filename default.
- plugins/
The plugins directory, contains specific configuration files for the running plugins.