paulb@19 | 1 | For each application, add an Alias line to httpd.conf to point to the directory
|
paulb@20 | 2 | containing the handler package, then specify the appropriate module name as the
|
paulb@19 | 3 | PythonHandler.
|
paulb@19 | 4 |
|
paulb@40 | 5 | Alias /simple "/home/paulb/Software/Python/WebStack/examples/ModPython/SimpleApp"
|
paulb@19 | 6 |
|
paulb@40 | 7 | <Directory "/home/paulb/Software/Python/WebStack/examples/ModPython/SimpleApp">
|
paulb@20 | 8 | AddHandler python-program .simple
|
paulb@20 | 9 | PythonHandler SimpleHandler
|
paulb@19 | 10 | PythonDebug On
|
paulb@19 | 11 | </Directory>
|
paulb@19 | 12 |
|
paulb@20 | 13 | It would appear that the directory really should be distinct from others
|
paulb@20 | 14 | defined for mod_python, and that the handler should have a distinct name from
|
paulb@20 | 15 | other handlers employed.
|
paulb@34 | 16 |
|
paulb@34 | 17 | Using such a definition in httpd.conf, only server resources residing directly
|
paulb@34 | 18 | below "/simple" in the URL "hierarchy" with names ending in ".simple" would be
|
paulb@34 | 19 | associated with the Simple WebStack application's resources. Therefore, the
|
paulb@34 | 20 | following URL paths would access the application:
|
paulb@34 | 21 |
|
paulb@34 | 22 | /simple/home.simple
|
paulb@34 | 23 | /simple/tasks.simple/my-tasks
|
paulb@34 | 24 | /simple/agenda.simple/tomorrow/first-thing
|
paulb@34 | 25 |
|
paulb@34 | 26 | Examples of URL paths not addressing the application are as follows:
|
paulb@34 | 27 |
|
paulb@34 | 28 | /agenda/my-agenda.simple
|
paulb@34 | 29 | /simple/tasks/my-tasks.simple
|