Migrating a Web Server to IIS 5.0
|
|
Configuring a Script Interpreter
IIS 5.0 provides built-in JScript and VBScript interpreters for ASP, so you don’t have to take any additional steps to run ASP applications written in these scripting languages. However, to run ASP applications written in Perl or to run CGI scripts, you must install and configure a Win32-compatible version of the appropriate script interpreter (also called a scripting engine).
To configure a script interpreter
- Obtain the script interpreter. Perl 5.0 and Regina REXX script interpreters are included on the Resource Kit companion CD. You can also obtain Win32-compatible script interpreters on the Internet. The following Web sites provide Win32 implementations of Perl, TCL, Python, and REXX:
Note The ActiveState Tool Corporation provides three Perl interpreters of interest to IIS 5.0 developers: Perl for Win32 (Perl.exe), Perl for ISAPI (PerlIS.dll), and PerlScript, an Active Scripting interpreter for PerlScript code in ASP pages.
- Install the script interpreter. Extract the script interpreter archive into a new directory on your hard drive, for example, c:\perl. Be sure directory names are expanded from the archive. Follow the instructions provided by the vendor to build the script interpreter from the source code package, and install the files. If the script interpreter package contains files with long file names, when downloading from the Internet be sure to use a zip file handler that opens them correctly, such as WinZip or Info-Zip Unzip.
Note Before running Install.bat, you might want to change directory to the DOS version of your directory if you gave it a long file name. This will ensure that readable paths are listed in the registry.
- Set permissions. In Windows Explorer, set NTFS permissions on the directory containing the script interpreter by giving Execute permissions to the Everyone account. Next, set permissions on the directory containing the actual scripts. For testing purposes, you can give Read permissions to the Everyone account. Otherwise, you should set access permissions to Script, and disable Read permissions. In the IIS snapin, set Script only permissions on the scripts virtual directory. For more information, see Table 3.1, Basic Web Security Settings.
- Set application mappings. In the IIS snap-in, map the extension for the script file(s) to the executable for the script interpreter. For example, you might map the extension .py to Python.exe, the executable for the Python script interpreter. For more information, see the “Setting Application Mappings” topic in the IIS 5.0 online product documentation.
Note For the ActiveState Perl script interpreter, the extension .pl is associated with PerlIS.dll by default. If you want to change the association of .pl to perl.exe, you need to change the application mapping. In the mapping, you must add two percent (%)
characters to the end of the pathname for perl.exe, as shown in the following example:
c:\perl\bin\perl.exe %s %s
- Set permissions on the script interpreter executable directory. In the IIS snap-in, edit the application configuration for the home directory to recognize the script interpreter executable.
© 1997-1999 Microsoft Corporation. All rights reserved.