* Add wipi.fcgi fastcgi script. It is the the standard moin fcgi script,
[matthijs/projects/wipi.git] / wipi.fcgi
1 #!/usr/bin/python
2 # -*- coding: iso-8859-1 -*-
3 """
4     MoinMoin - FastCGI Driver Script
5     
6     @copyright: 2007 MoinMoin:ThomasWaldmann
7     @license: GNU GPL, see COPYING for details.
8 """
9
10 import sys, logging
11
12 # Path to MoinMoin package, needed if you installed with --prefix=PREFIX
13 # or if you did not use setup.py.
14 #sys.path.insert(0, 'PREFIX/lib/python2.3/site-packages')
15
16 # Path of the directory where wikiconfig.py is located.
17 # YOU NEED TO CHANGE THIS TO MATCH YOUR SETUP.
18 #sys.path.insert(0, '/etc/moin')
19
20 import os
21 # Path of the directory where farmconfig is located (if different).
22 sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'conf'))
23
24 # Debug mode - show detailed error reports
25 #import os
26 #os.environ['MOIN_DEBUG'] = '1'
27
28 from MoinMoin.server.server_fastcgi import FastCgiConfig, run
29
30 class Config(FastCgiConfig):
31     #loglevel_file = logging.DEBUG  # adapt if you don't like the default
32     logPath = os.path.join(os.path.dirname(__file__), os.path.pardir, os.path.pardir, 'logs', 'wipi.log')
33
34     properties = {}
35     # properties = {'script_name': '/'} # use this instead of the line above if your wiki runs under "/" url
36
37     # for backlog, we use a default of 5. if the listen(backlog) call crashes for you, try a smaller value!
38     # backlog = 1
39
40 run(Config)
41