5.2 Configuration File

This section describes the general Aspen configuration file at __/etc/aspen.conf. Additional configuration files are described in the "Extending Aspen" chapter. aspen.conf is in .ini-style format per the ConfigParser module. Aspen responds to the following settings in the main section. You may define additional settings and sections that are meaningful to your application, which you may access using the aspen.conf object described below in the "API" chapter.

Option Description Default
address The address to which Aspen should bind. If address begins with a dot or a forward slash, then it is interpreted as an AF_UNIX socket. If it contains more than one colon, it is seen as an AF_INET6 address. Otherwise, it is interpreted as AF_INET. If address begins with a colon, then the AF_INET loopback address is assumed. 0.0.0.0:8080
defaults A comma-separated list of names to look for when a directory is requested. Any default resource is located immediately before dispatching to a handler. index.html, index.htm
mode One of debugging, development, staging, or production. In debugging and development modes, Aspen will restart itself any time configuration files or module source files change on the filesystem. development
server_name The value to use for the SERVER_NAME WSGI environment setting. socket.gethostname()
threads The number of threads to maintain in the request-servicing thread pool. 10

See Also:

Extending Aspen
Aspen three additional configuration files are described here.

mode
Aspen relies on this module to model the application life-cycle. It is available to your applications at aspen.mode

Aspen is copyright © 2006-2007 by Chad Whitacre and contributors, and is offered under the MIT license.