2
MoinMoin - Moin as WSGI application with flup as fcgi gateway
4
@copyright: 2005 by Anakim Border <akborder@gmail.com>,
5
2008 by MoinMoin:ThomasWaldmann
6
@license: GNU GPL, see COPYING for details.
11
# a) Configuration of Python's code search path
12
# If you already have set up the PYTHONPATH environment variable for the
13
# stuff you see below, you don't need to do a1) and a2).
15
# a1) Path of the directory where the MoinMoin code package is located.
16
# Needed if you installed with --prefix=PREFIX or you didn't use setup.py.
17
#sys.path.insert(0, 'PREFIX/lib/python2.3/site-packages')
19
# a2) Path of the directory where wikiconfig.py / farmconfig.py is located.
20
# See wiki/config/... for some sample config files.
21
#sys.path.insert(0, '/path/to/wikiconfigdir')
22
#sys.path.insert(0, '/path/to/farmconfigdir')
24
# b) Configuration of moin's logging
25
# If you have set up MOINLOGGINGCONF environment variable, you don't need this!
26
# You also don't need this if you are happy with the builtin defaults.
27
# See wiki/config/logging/... for some sample config files.
28
#from MoinMoin import log
29
#log.load_config('/path/to/logging_configuration_file')
31
# Debug mode - show detailed error reports
32
#os.environ['MOIN_DEBUG'] = '1'
35
unixSocketPath = '/tmp/moin.sock'
37
# Set threads flag, so other code can use proper locking
38
from MoinMoin import config
39
config.use_threads = use_threads
42
from flup.server.fcgi import WSGIServer
43
from MoinMoin.server.server_wsgi import moinmoinApp, WsgiConfig
45
class Config(WsgiConfig):
50
if __name__ == '__main__':
51
server = WSGIServer(moinmoinApp, bindAddress=unixSocketPath)
53
os.unlink(unixSocketPath)