Back to index

moin  1.9.0~rc2
wikiserverconfig.py
Go to the documentation of this file.
00001 """
00002     Standalone server configuration, you can either use this file or
00003     commandline options to configure server options.
00004 """
00005 import os
00006 
00007 from MoinMoin.script.server.standalone import DefaultConfig
00008 
00009 class LocalConfig(DefaultConfig):
00010     port = 8080 # if you use port < 1024, you need to start as root
00011 
00012     # if you start the server as root, the standalone server can change
00013     # to this user and group, e.g. 'www-data'
00014     #user = ''
00015     #group = ''
00016 
00017     # use '' for all interface or "1.2.3.4" for some specific IP
00018     #interface = 'localhost'
00019 
00020     # where the static data is served from - you can either use:
00021     # docs = True  # serve the builtin static data from MoinMoin/web/static/htdocs
00022     # docs = '/where/ever/you/like/to/keep/htdocs'  # serve it from the given path
00023     # docs = False  # do not serve static files at all (will not work except
00024     #               # you serve them in some other working way)
00025     docs = True
00026 
00027     # tuning options:
00028     #serverClass = 'ThreadPoolServer'
00029     #threadLimit = 10
00030     #requestQueueSize = 50
00031 
00032     # How to debug? Your options:
00033     # debug = 'off' # for production wikis, exceptions are logged
00034     # debug = 'web' # show traceback in the browser, offer debug console,
00035     #               # this makes use of a built-in debugger (werkzeug.debug)
00036     # debug = 'external' # don't catch Exceptions, so some external debugger gets them
00037     # CAUTION: Do not use anything but 'off' for production environments as it
00038     #          might disclose sensitive informations and even enable doing evil
00039     #          things from some debugger's web interface!
00040     # For convenience, the default behaviour (see below) is to read the
00041     # environment variable MOIN_DEBUGGER. If not set, it means the same as 'off'.
00042     debug = os.environ.get('MOIN_DEBUGGER', 'off')
00043 
00044 # DEVELOPERS! Do not add your configuration items there,
00045 # you could accidentally commit them! Instead, create a
00046 # wikiserverconfig_local.py file containing this:
00047 #
00048 # from wikiserverconfig import LocalConfig
00049 #
00050 # class Config(LocalConfig):
00051 #     configuration_item_1 = 'value1'
00052 #
00053 
00054 try:
00055     from wikiserverconfig_local import Config
00056 except ImportError, err:
00057     if not str(err).endswith('wikiserverconfig_local'):
00058         raise
00059     Config = LocalConfig