comparison wiki/server/moin.fcgi @ 5492:e900c097a46b

moin.fcgi: fix recursion error, try 2
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Thu, 04 Feb 2010 10:44:39 +0100
parents 65bf6cb180b7
children 7d27d4c3f44b
comparison
equal deleted inserted replaced
5491:65bf6cb180b7 5492:e900c097a46b
39 # Creating the WSGI application 39 # Creating the WSGI application
40 # use shared=True to have moin serve the builtin static docs 40 # use shared=True to have moin serve the builtin static docs
41 # use shared=False to not have moin serve static docs 41 # use shared=False to not have moin serve static docs
42 # use shared='/my/path/to/htdocs' to serve static docs from that path 42 # use shared='/my/path/to/htdocs' to serve static docs from that path
43 from MoinMoin.web.serving import make_application 43 from MoinMoin.web.serving import make_application
44 application = make_application(shared=True) 44 app = make_application(shared=True) # <-- adapt here as needed
45 45
46 ## Uncomment this if you need to set the SCRIPT_NAME: 46 # Is fixing the script name needed?
47 #def script_fixer(env, start): 47 # Use None if your url looks like http://domain/wiki/moin.fcgi
48 # env['SCRIPT_NAME'] = '' # use '' for running at /, '/wiki' for running at /wiki/ 48 # Use '' if you use rewriting to run at http://domain/
49 # return application(env, start) 49 # Use '/mywiki' if you use rewriting to run at http://domain/mywiki/
50 #application = script_fixer 50 fix_script_name = None # <-- adapt here as needed
51
52 if fix_script_name is None:
53 application = app
54 else:
55 def script_name_fixer(env, start):
56 env['SCRIPT_NAME'] = fix_script_name
57 return app(env, start)
58 application = script_name_fixer
51 59
52 ## Choose your server mode (threaded, forking or single-thread) 60 ## Choose your server mode (threaded, forking or single-thread)
53 try: 61 try:
62 # v-- adapt here as needed
54 from flup.server.fcgi import WSGIServer 63 from flup.server.fcgi import WSGIServer
55 # from flup.server.fcgi_fork import WSGIServer 64 # from flup.server.fcgi_fork import WSGIServer
56 # from flup.server.fcgi_single import WSGIServer 65 # from flup.server.fcgi_single import WSGIServer
57 except ImportError: 66 except ImportError:
58 logging.warning("No flup-package installed, only basic CGI support is available.") 67 logging.warning("No flup-package installed, only basic CGI support is available.")