Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 47 lines (31 sloc) 1.032 kb
d421c13 @mdipierro initial commit
mdipierro authored
1 #!/usr/bin/env python
2 # -*- coding: utf-8 -*-
3
4 """
5 This file is part of the web2py Web Framework
6 Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>
7 License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)
8
9
10 This is a WSGI handler for Apache
11 Requires apache+mod_wsgi.
12
13 In httpd.conf put something like:
14
15 LoadModule wsgi_module modules/mod_wsgi.so
16 WSGIScriptAlias / /path/to/wsgihandler.py
17
18 """
19
20 # change these parameters as required
21 LOGGING = False
22 SOFTCRON = False
23
24 import sys
25 import os
26
27 path = os.path.dirname(os.path.abspath(__file__))
28 os.chdir(path)
29 sys.path = [path]+[p for p in sys.path if not p==path]
30
31 sys.stdout=sys.stderr
32
33 import gluon.main
34
35 if LOGGING:
36 application = gluon.main.appfactory(wsgiapp=gluon.main.wsgibase,
37 logfilename='httpserver.log',
38 profilerfilename=None)
39 else:
40 application = gluon.main.wsgibase
41
42 if SOFTCRON:
43 from gluon.settings import global_settings
44 global_settings.web2py_crontype = 'soft'
45
d281acb @mdipierro fixws and 'new' button in grid query
mdipierro authored
46
Something went wrong with that request. Please try again.