INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS
Come Join Us!
Are you a
Computer / IT professional?
Join Tek-Tips now!
- Talk With Other Members
- Be Notified Of Responses
To Your Posts
- Keyword Search
- One-Click Access To Your
- Automated Signatures
On Your Posts
- Best Of All, It's Free!
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.
Partner With Us!
"Best Of Breed" Forums Add Stickiness To Your Site
(Download This Button Today!)
"...An excellent site which has quite possibly prevented me from having a mental/nervous breakdown..."
Where in the world do Tek-Tips members come from?
IIS Script Configuration
How do I get my CGI script to work under IIS:
Posted: 9 May 03
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 :)
Back to Microsoft: Internet Information Server FAQ Index
Back to Microsoft: Internet Information Server Forum
Join Tek-Tips® Today!
Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.
Here's Why Members Love Tek-Tips Forums:
- Talk To Other Members
- Notification Of Responses To Questions
- Favorite Forums One Click Access
- Keyword Search Of All Posts, And More...
Register now while it's still free!
Already a member? Close this window and log in.
Join Us Close