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     # hostname or IP the server listens on
00011     # use '' for all interfaces
00012     # or "1.2.3.4" for some specific IP
00013     #hostname = 'localhost'
00014 
00015     # if you use port < 1024, you need to start as root
00016     #port = 8080
00017 
00018     # if you start the server as root, the standalone server can change
00019     # to this user and group, e.g. 'www-data'
00020     #user = ''
00021     #group = ''
00022 
00023     # How to debug? Your options:
00024     # debug = 'off' # for production wikis, exceptions are logged
00025     # debug = 'web' # show traceback in the browser, offer debug console,
00026     #               # this makes use of a built-in debugger (werkzeug.debug)
00027     # debug = 'external' # don't catch Exceptions, so some external debugger gets them
00028     # CAUTION: Do not use anything but 'off' for production environments as it
00029     #          might disclose sensitive informations and even enable doing evil
00030     #          things from some debugger's web interface!
00031     # For convenience, the default behaviour (see below) is to read the
00032     # environment variable MOIN_DEBUGGER. If not set, it means the same as 'off'.
00033     debug = os.environ.get('MOIN_DEBUGGER', 'off')
00034 
00035 
00036 # DEVELOPERS! Do not add your configuration items there,
00037 # you could accidentally commit them! Instead, create a
00038 # wikiserverconfig_local.py file containing this:
00039 #
00040 # from wikiserverconfig import LocalConfig
00041 #
00042 # class Config(LocalConfig):
00043 #     configuration_item_1 = 'value1'
00044 #
00045 
00046 try:
00047     from wikiserverconfig_local import Config
00048 except ImportError, err:
00049     if not str(err).endswith('wikiserverconfig_local'):
00050         raise
00051     Config = LocalConfig