next up previous contents
Next: Quick Test Up: Using Mod Snake Previous: Installation   Contents

Apache Webserver Configuration

The next step is to configure Apache to use mod_snake and any of its contained PyMods. The only lines that must be added to the server configuration file (httpd.conf) are:

LoadModule snake_module libexec/libmod_snake.so

AddModule mod_snake.c
These alone will load mod_snake, but will not net you any of the value that mod_snake provides. In order to do that, you must select a layout to place your mod_snake PyMods. The PyMods that come with mod_snake are generally kept in mod_snake/snake_lib and mod_snake/examples. Assuming that we placed these PyMods in /home/httpd/mod_snake, we can add the following directives to Apache's httpd.conf file to activate them:

SnakeModuleDir /home/httpd/mod_snake/snake_lib

SnakeModuleDir /home/httpd/mod_snake/examples
This tells mod_snake to look in those directories for modules to load. This also restricts the import functionality of PyMods which get imported. To then load a module from either of those directories (say for instance, SnakeLib's SnakeEMB embedded Python processor), the following directive can be added:

SnakeModule mod_snake_emb.SnakeEMB
This loads in the SnakeEMB module, and gives us more directives that we can place in the configuration file. To then enable embedded Python processing for main server, we can specify the directive:

SnakeEMB on
Other PyMods can be added and configured in similar ways. See the documentation for the individual PyMods, or look at the mod_snake_api documentation for the SnakeLib hooks. For more information about the directives, see section 3.


next up previous contents
Next: Quick Test Up: Using Mod Snake Previous: Installation   Contents
2000-09-01