X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fprojects%2Fwipi.git;a=blobdiff_plain;f=wipi.fcgi;h=d953547e9467e999e9d47effaa1307abf7d60965;hp=91462912e27cf7abdc09bf65cf43e0ea27171d2f;hb=HEAD;hpb=a555edbb0dabd3cc0dee5716285dff1c042bd79e diff --git a/wipi.fcgi b/wipi.fcgi index 9146291..d953547 100755 --- a/wipi.fcgi +++ b/wipi.fcgi @@ -9,38 +9,20 @@ import sys, os -# a) Configuration of Python's code search path -# If you already have set up the PYTHONPATH environment variable for the -# stuff you see below, you don't need to do a1) and a2). +# Define the path to our config relative to where we are. +confdir = os.path.join(os.path.dirname(__file__), 'conf') -# a1) Path of the directory where the MoinMoin code package is located. -# Needed if you installed with --prefix=PREFIX or you didn't use setup.py. -#sys.path.insert(0, 'PREFIX/lib/python2.3/site-packages') +# Put our config in the python path +sys.path.insert(0, confdir) -# a2) Path of the directory where wikiconfig.py / farmconfig.py is located. -# See wiki/config/... for some sample config files. -#sys.path.insert(0, '/etc/moin') -sys.path.insert(0, '/etc/moin') +# Load a logging conf +from MoinMoin import log +log.load_config(os.path.join(confdir, 'logging.conf')) -# b) Configuration of moin's logging -# If you have set up MOINLOGGINGCONF environment variable, you don't need this! -# You also don't need this if you are happy with the builtin defaults. -# See wiki/config/logging/... for some sample config files. -#from MoinMoin import log -#log.load_config('/path/to/logging_configuration_file') - -# Debug mode - show detailed error reports -#os.environ['MOIN_DEBUG'] = '1' - - -from MoinMoin.server.server_fastcgi import FastCgiConfig, run - -class Config(FastCgiConfig): - properties = {} - # properties = {'script_name': '/'} # use this instead of the line above if your wiki runs under "/" url - - # for backlog, we use a default of 5. if the listen(backlog) call crashes for you, try a smaller value! - # backlog = 1 - -run(Config) +from MoinMoin.web.flup_frontend import CGIFrontEnd +options = [ + # Show errors in the output + #"--debug", "web", + ] +CGIFrontEnd().run(options)