paulb@114 | 1 | Declare the script in httpd.conf or equivalent Web server configuration file.
|
paulb@114 | 2 | For example:
|
paulb@114 | 3 |
|
paulb@114 | 4 | ScriptAlias /cgi/simple "/home/paulb/Software/Python/WebStack/examples/CGI/SimpleHandler.py"
|
paulb@114 | 5 |
|
paulb@114 | 6 | The WebStack package must reside on the PYTHONPATH, along with the package
|
paulb@114 | 7 | containing the application itself. Therefore, ensure that the handler uses the
|
paulb@114 | 8 | appropriate entries in sys.path.
|
paulb@114 | 9 |
|
paulb@114 | 10 | Ensure that the handler file for the application has the appropriate
|
paulb@114 | 11 | permissions:
|
paulb@114 | 12 |
|
paulb@114 | 13 | chmod u+x examples/CGI/SimpleHandler.py
|