Installing isapi_scgi

isapi_scgi is installed like any other ISAPI extension. The sample session below illustrates installation under IIS 5.1 on Windows XP. It assumes a simple configuration where the extension will be accessed under /sandbox/isapi_scgi.dll/. All requests to URLs below this will be passed by the extension to the SCGI server. Obviously you may use techniques such as URL rewriting to hide the use of the DLL but that is not described here.

Start up the MMC IIS manager and create a new virtual directory, sandbox, under the default Web site as shown in the screenshot below.

Initial MMC screen

Right click on the sandbox virtual directory and configure its properties as shown below.

Sandbox properties screen

We have mapped the sandbox virtual directory to a physical directory, c:\scgi-example, on the local system. The important thing to note in the above configuration screen is that Execute Permissions have been set to Scripts and Executables. This is required for ISAPI extensions to be enabled for the virtual directory. Also, setting the Application Protection value to Low instead of Medium as above will give higher performance.

Copy the isapi_scgi.dll from the temporary directory where you extracted the distribution into the physical directory, c:\scgi-example, in the above example. The IIS manager console will look as follows after refreshing.

Sandbox properties screen

If you are not running the default SCGI server address and port, follow the steps described in the configuration section to set up isapi_scgi options.

Finally, stop and restart IIS and the default Web site. The isapi_scgi extension will now be invoked whenever a request for a URL beginning with /sandbox/isapi_scgi.dll is received.