paulb@307 | 1 | Currently, the WSGI examples use the WSGI CGI handler code found in PEP 333
|
paulb@307 | 2 | and placed in the wsgi_cgi module. Deploying in other environments would
|
paulb@307 | 3 | require slightly different "glue code" to be written.
|
paulb@302 | 4 |
|
paulb@307 | 5 | --------
|
paulb@307 | 6 |
|
paulb@307 | 7 | Declare the script in httpd.conf or equivalent Web server configuration file.
|
paulb@307 | 8 | For example:
|
paulb@307 | 9 |
|
paulb@307 | 10 | ScriptAlias /wsgi/simple "/home/paulb/Software/Python/WebStack/examples/WSGI/SimpleHandler.py"
|
paulb@302 | 11 |
|
paulb@302 | 12 | The WebStack package must reside on the PYTHONPATH, along with the package
|
paulb@307 | 13 | containing the application itself. Therefore, ensure that the handler uses the
|
paulb@307 | 14 | appropriate entries in sys.path.
|
paulb@302 | 15 |
|
paulb@307 | 16 | Ensure that the handler file for the application has the appropriate
|
paulb@307 | 17 | permissions:
|
paulb@307 | 18 |
|
paulb@307 | 19 | chmod u+x examples/WSGI/SimpleHandler.py
|