Skip to content

Instantly share code, notes, and snippets.

@uogbuji
Created February 28, 2011 19:39
Show Gist options
  • Save uogbuji/847885 to your computer and use it in GitHub Desktop.
Save uogbuji/847885 to your computer and use it in GitHub Desktop.
My local akara.conf for dev/debugging on my Mac
# -*- mode: python -*-
# This is the main Akara server configuration file. It contains
# settings for the server and for its extension modules.
# The configuration file is written in Python. Configuration data goes
# into class attributes. If the module is "A.B.C" then the
# configuration information should be in the class named "C". If there
# is a conflict then use the parameter "akara_name" to set the full
# module name.
# class C1:
# akara_name = "akara.demo.C"
# name = "this is for one module ending with C"
#
# class C2:
# akara_name = "akara.example.C"
# name = "this is for another C module"
# An extension module should get its configuration class using
# akara.module_config(name)
# where "name" is the full module name (usually __name__).
# The name can be omitted in which case __name__ is used.
### Section 1: Global Akara Environment
# The directives in this section affect the overall operation of
# Akara, such as the number of concurrent requests it can handle and
# where it should place its PID and log files.
class Akara:
# Listen: interface name (optional) and port to listen for HTTP requests
Listen = 8880
# To specify the interface name use this format:
# Listen = "localhost:8880"
# ConfigRoot: The top of the directory tree which holds the server's
# configuration, error, and log files.
#
# NOTE: This path is used as the base for any other directives which
# contain a relative filename.
#
# This location follows the LSB recommendation
ConfigRoot = "~/.local/lib/akara"
# PidFile: Filename which holds the process id of a running Akara
# server. The file is created when Akara starts and removed when it
# exists. It contains a single line: the pid followed by a newline.
#
PidFile = "logs/akara.pid"
# ModuleDir: directory containing the Akara extension modules
# Akara loads all of the *.py files in that directory
#
ModuleDir = "modules"
# ModuleCache: directory containing the module cache databases.
# Akara only creates such databases if the akara.caching
# feature is being used to cache GET requests
ModuleCache = "caches"
####
# Different options controlling the number of pre-forked server
# process to run at any one time.
#
# MaxServers: maximum number of servers to run at any one time
# (this is therefore the maximum number of simultaneous connections)
MaxServers = 150
#
# A 'spare' server is one which is waiting to handle an HTTP request
# MinSpareServers: minimum number of spare servers
MinSpareServers = 5
# MaxSpareServers: maximum number of spare servers
MaxSpareServers = 10
# MaxRequestsPerServer: restart a server after this many requests
MaxRequestsPerServer = 10000
#### Log configuration
# ErrorLog: The location of the error log file.
#
ErrorLog = "logs/error.log"
# AccessLog: The location of the access log file.
# Uses the Apache combined log format
#
AccessLog = "logs/access.log"
# LogLevel: Set the severity level for Akara logging messages.
# Messages below the given log level are not written. The levels are,
# from highest to lowest:
# CRITICAL, ERROR, WARN, INFO, DEBUG
# Also, WARNING is an alias for WARN
#
LogLevel = "DEBUG"
#LogLevel = "INFO"
### Section 2: List of extension modules to install
# These are module names found on the Python path
MODULES = [
"akara.demo.echo",
#"akara.demo.xslt",
"akara.demo.moinrest",
"akara.demo.sysinfo",
"zen.akamod.z",
"zen.akamod.geocoding",
]
### Section 3: Other module configuration goes here
MOINREST_TARGETS = {
'x': 'http://localhost:8080/',
#'zzen': 'http://community.zepheira.com/wiki/zen/',
#'z': 'http://community.zepheira.com/wiki/public/',
'xml3k': 'http://wiki.xml3k.org/',
'codex': 'http://codex.zepheira.com/codex/',
}
class moinrest:
targets = MOINREST_TARGETS
CACHE_MAX_AGE = 86400
class geocoding:
#geonames_dbfile = '/Users/uche/tmp/geonames.sqlite3'
cache_max_age = 86400
geocoder = "geocoders.get_geocoder('geonames', user='zepheira')"
class z:
RULESHEET_SECRET = "zenzenzen11"
class SPACES:
def x(self):
return "zen.slave.moin.space"
def xml3k(self):
return "zen.slave.moin.space"
def codex(self):
return "zen.slave.moin.space"
def couch(self):
return ("zen.slave.couchdb.space", {'dburi':'http://codex.zepheira.com:5984/couch'})
class xslt: #Corresponding to the module filename, xslt.py
default_transform = "http://github.com/zepheira/amara/raw/master/demo/data/pretty.xslt"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment