SAS/IntrNet 9.2: htmSQL |
When you configure your Web server to recognize htmSQL input files, you no longer have to specify the pathname of the htmSQL executable in the URL that you use for invoking htmSQL. For example, instead of the following URL
http://support.sas.com/cgi-bin/htmSQL/myinput/myfile.hsql
you can use
http://support.sas.com/myinput/myfile.hsql
and the Web server knows to automatically invoke htmSQL to process the input file.
The following sections provide some instructions on how to configure various Web servers to recognize htmSQL input files.
Note: This section discusses only servers that we have tested and is not an exhaustive discussion of the topic. If you encounter problems when configuring your Web server or for more information about configuring your Web server, consult your Web server documentation.
To configure the Apache Web server (version 1.1 or later), add the following lines to the srm.conf file. The lines that begin with the pound sign (#) are comment lines that are already in the srm.conf file that is included in the Apache download package.
# AddHandler allows you to map certain file extensions to "handlers", # actions unrelated to filetype. These can be either built into the server # or added with the Action command (see below) # Format: AddHandler action-name ext1 AddHandler htmSQL .hsql # Action lets you define media types that will execute a script whenever # a matching file is called. This eliminates the need for repeated URL # pathnames for oft-used CGI file processors. # Format: Action media/type /cgi-script/location # Format: Action handler-name /cgi-script/location Action htmSQL /cgi-bin/htmSQL
To set up htmSQL on IIS 6.0, complete the following steps within the IIS Administrator:
In IIS, right-click the individual Web site or the Web Sites folder, and then click Properties.
On the Home Directory tab, click Configuration.
Under Application Configuration, click Add, and then click the Mappings tab.
With the Add/Edit Application Extension Mapping dialog box open, click Browse to select the htmsql.exe file from the local path on the Web server.
Note: You must type the path to a valid file in the Executable text box or the OK button remains unavailable. The easiest way to ensure that you enter a valid path is to select the file by using the Browse button.
After the path appears in the Executable text box, click in the Executable text box to initialize the path.
Click in the Extension space, and then type .hsql
as the filename extension.
Note: You must enter the period (.) in front of the extension in the Extension text box, or the OK button remains unavailable.
Click OK.
Configure IIS to allow the hsql MIME type. This can be done by completing the following steps:
In the left window of the IIS Administrator, right-click your machine name and select Properties.
Add a MIME type of .hsql, application/octet-stream
.
Right-click the directory where the htmsql.exe file is located (for example, cgi-bin) and allow scripts and executables. If your IIS6 Web Server does not already have a scripts
directory or a cgi-bin
directory, you will need to create one. After you create this directory, on the Virtual Directory tab, specify Scripts and Executables for the value of Execution Permissions.
Some versions of IIS might have a check box called Execute (such as ISAPI applications or CGI). If you have this selection, then the box should be checked.
Right-click the directory where the Web site is located (for example, MyWeb) and allow scripts and executables.
Enable Web Service Extensions for the htmsql.exe file. This can be done by completing the following steps:
In the left window of the IIS Administrator, select your machine name. Then select the Web Service Extensions folder. The Web Service Extensions folder is under the folder that specifies the name of your machine. For example, if your machine name is SUSAN2, then there should be three folders under SUSAN2 (called Application Pools, Web Sites, and Web Service Extensions).
Browse to the EXE for htmSQL and click Allow (to permit the htmsql.exe file to be executed). Otherwise, the status will be DENY.
Start your Share server.
For more information about running CGI Tools on Microsoft IIS 6.0 Web Server, see SAS Note #23931 at support.sas.com/kb.
To configure Microsoft Peer Web Services for Windows NT workstations or the Microsoft Internet Information Server (IIS) for Windows NT servers, you must add two string values for the following key in the Windows registry on your Web server machine:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W3SVC\Parameters\ScriptMap]
Use the Registry Editor (regedit
) to add the following string values:
".hsql"="c:\directory_for_htmSQL_executable\htmSQL.exe" ".hsq"="c:\directory_for_htmSQL_executable\htmSQL.exe"
Ensure that you change directory_for_htmSQL_executable
to the directory in which you installed htmSQL.
Note: You must also turn on the execute bit for the directory that contains the .hsq or .hsql files.
Copyright © 2007 by SAS Institute Inc., Cary, NC, USA. All rights reserved.