This page holds true for Cherrypy 2.0.0, a new (but similar) config system will ship with 2.1. For newer versions, see the ConfigAPI page.
Available options in the config file
Some of these options obviously cannot be used together because they conflict
* socketFile and socketPort obviously conflict with each other
* threading, forking, processPool and threadPool obviously conflict with each other
Section [server]
- logFile = "" -- This indicates which file to log to.
- logToScreen = 1 -- Set this to 0 if you want to disable that the server prints the log to stdout.
- socketPort = 8080 -- This indicates which port the server should listen to.
- socketHost = "" -- This indicates which address the server should bind to (the default is localhost).
- socketFile = "" -- This is only used on Unix, if you want to use an AF_UNIX socket instead of a regular AF_INET socket.
- threading = 0 -- Set this to 1 if you want a threading server.
- forking = rejected in CP2
- processPool = rejected in CP2
- threadPool = 0 -- Set this to n (n>1) if you want to have n threads created at startup.
- reverseDNS = 0 -- Set this to 1 if you want to enable reverse DNS (this way the full name of the domain name for the clients will be written to the * logs).
- socketQueueSize = 5 -- Size of the socket queue (this value will be passed to the listen() function).:
Section [session]
- storageType = "" -- Where to store the session. "ram" or "file" are possible values.
- timeout = 60 -- This indicates how long before the session expires.
- cleanUpDelay = 60 -- Number of minutes between cleanups for old/expired sessions
- cookieName = "CherryPySession" -- Name of the cookie that will pass the session-id
- storageFileDir = "" -- If storageType is set to file, this tells which file directory to put these.
Section [staticContent]
See StaticContent
Question
Can I change these parameters without using a config file? Use the configMap parameter to cpg.server.start()
Yes you can.
cpg.configOption.staticContentList.append(('cfg','c:\\autoexec.bat')) going to http://127.0.0.1:8080/cfg shows your autoexec file.

