# mod_scgi

The Apache2 `mod_scgi` module gives Apache2 the ability to delegate requests to a separate SCGI server. The details of the SCGI protocol are provided in scgi.html.

To install the mod_scgi module for Apache2, do this: `cd DurusWorks/scgi make sudo make install sudo make clean`

To configure Apache2 to use mod_scgi, the Apache configuration file (`/etc/apache2/httpd.conf`, for example) needs to include directives to load the module and to specify which paths should be directed to the SCGI server, and on host and port the SCGI server can be found. Here is an example of typical Apache2 directives.

`# Your path to mod_scgi may be different from this example. LoadModule scgi_module libexec/apache2/mod_scgi.so Listen 80 Listen 443 <VirtualHost _default_:80> SCGIMount / 127.0.0.1:9000 # assuming scgi server on port 9000 # The following LocationMatch section is an example # of how you handle a case when you want certain paths to be # handled without the SCGI server. <LocationMatch "^/robots.txt"> SCGIHandler off </LocationMatch> # The rest of this virtual host needs to be customized for your # host requirements. ServerName www.example.org </VirtualHost> <VirtualHost _default_:443> SCGIMount / 127.0.0.1:9000 # assuming scgi server on port 9000 # The following LocationMatch section is an example # of how you handle a case when you want certain paths to be # handled without the SCGI server. <LocationMatch "^/robots.txt"> SCGIHandler off </LocationMatch> # The rest of this virtual host needs to be customized for your # host and SSL requirements. ServerName www.example.org SSLEngine on SSLOptions +StdEnvVars SSLCertificateFile /my/ssl/server.crt SSLCertificateKeyFile /my/ssl/server.key </VirtualHost>` DurusWorks Documentation