- Install UniServerZ: Uniform Server - A lightweight mobile WAMP Server Solution.
- Download1: mod_wsgi library, extract, and copy .so to UniserverZ\core\apache2\modules
- Install Falcon: python -m pip install falcon
- Edit httpd.conf: add:
- Edit passenger_wsgi.py:
LoadModule wsgi_module modules/mod_wsgi.so
WSGIScriptAlias /app "${US_ROOTF_WWW}/passenger_wsgi.py"
import falcon
class Test:
def on_get(self, req, resp):
resp.status = falcon.HTTP_200
resp.body = ('<h1>Test.</h1>')
app = application = falcon.API('text/html')
app.add_route('/', Test())
\UniServerZ>httpd_z -t
httpd_z: Syntax error on line 187 of x:/xxx/UniServerZ/core/apache2/conf/httpd.conf: Cannot load modules/mod_wsgi.so into server: The specified module could not be found.
Occurs if the mod_wsgi.so version is different from python version installed. (What, the error should actually help you know that? ...)
\UniServerZ>httpd_z -t
httpd_z: Syntax error on line 187 of x:/xxx/UniServerZ/core/apache2/conf/httpd.conf: Cannot load modules/mod_wsgi.so into server: %1 is not a valid Win32 application.
Occurs if the .so is 64bit and installed UniServer is 32bit.