The following is by no means complete, but will hopefully help you figure out where you might be going wrong.
In the Internet Services Manager (under the Administrative Tools of your Control Panel), right click either on the Default Web Site or your Virtual Directory and select 'Properties'. This should then popup a box of configuration settings. Select the 'Home Directory' tab. Towards the bottom is a drop-down list of 'Execute Permissions', at the very least this should be set to 'Scripts only'. Next to this drop-down list is a 'Configuration' button, click it. This will open an Applications Configuration popup, with a list of 'App Mappings'.
These 'App Mappings' tell IIS which extensions map to which applications. For example the .asp extension should map to a asp.dll. In order to get you CGI scripts to run in IIS, you will need to map the extension of your script to the correct application. In this example I will assume that .cgi and .pl are Perl scripts, but the principle applies to any other CGI scripting language & extension.
On the 'App Mappings' tab, click the button that says 'Add'. This will bring up a blank input popup. The format for the 'Executable:' text box is "<path to app> %s", which for ActivePerl would usually be "C:\Perl\bin\perl.exe %s". The '%s' indicates that the script file needs to be added to the command string. This last bit is probably the most important bit, as I recently spent half a day trying to figure out why scripts wouldn't work only to discover this little gem.
Next add your extension. If you need both .cgi and .pl, you will need to add them separately from the Configuration popup. For this example we'll just add '.pl' into the 'Extension:' text box. The other inputs can be left as is, although it is worth checking the box for 'Check that file exists', just in case something gets deleted or moved. Finally click 'Ok'. On returning to the Applications Configuration popup, you should see a newly added entry to the list. Now either click 'Apply' or 'Ok' to apply the changes.
You will need to stop and start the Web Server in order to action these changes, but once reactivated you should be able to run your CGI scripts
For further information please see ActiveState's documentation for "Using the Microsoft Web Servers" [1]. There is an update for IIS6 on Win2003 too. Thanks to icrf for the link reference.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.