You can control the behavior of AOLserver's CGI interface using the server setup pages. For example, you can control which files and directories are treated as CGI programs, you can determine how to run various types of programs, and you can set a group of environment variables for each type of program you use.
The Commercial service level is pre-configured with CGI support..
Note that if you use multiple virtual servers, you will need to configure the CGI interface for each virtual server.
On the Setup AOLserver page, follow the Virtual Servers link. The Setup Virtual Servers page lists all the virtual servers you have defined.
Decide which virtual server should support the CGI interface. If the arrow next to that virtual server is a right arrow, click the right arrow so it becomes a down arrow. You see a page that lists the currently-defined parameter, capabilities, and loaded modules for that virtual server.
Follow the CGI scripting link. You will see a page showing the parameters for the CGI.
If the top of the Setup Server page for CGI shows a Basic icon (a green circle), click on the icon. This gives you a new page that shows an Expert icon (a black diamond) instead and lets you set more advanced parameters.
Modify the values of any parameters you want to change. You can see online help about each parameter by clicking the information booth icon at the top of the page.
If you plan to use a program which requires an interpreter, e.g., Perl or a shell script, you will need to define an Interpreter in the Interps section. If the interpreter you need is defined within the square brackets in the Interps section, click on the toggle next to the name of that interpreter. If the interpreter is not listed, follow these steps:
Determine which interpreter you need. If the interpreter requires certain environment variables, follow these steps:
Follow the Define link for Environment.
On the Add Environment page, give a name to the group of environment variables needed for your interpreter.
Add an entry for each environment variable required by your interpreter.
Click the Add button at the bottom of the page. If you are defining environment variables for more than one interpreter you may choose to go back to the Add Environment page to define a separate set of environment variables for the other interpreter(s) or include the environment variable for all interpreters in one set.
Click the Back button on the browser/authoring page twice, to return to the Add Module to Server-name page.
Click the Reload button on the browser/authoring page to update the page and see the environment variable set you just defined.
Follow the Define link for Interps.
On the Add Interps page, give a name to the set of interpreters you plan to define.
Enter the key/value pairs which define the location of the interpreter to use for URLs with the specified extension. For example, for this URL:
http:/your-server/reservation/NewYork.pl
which is to run a Perl script using the interpreter in c:\perl\bin, define the Extension .pl (include the dot) and Interpreter c:\perl\bin\perl.exe.
For each definition, click the toggle next to the environment for this interpreter or click the toggle next to None.
Click the Add button at the bottom of the page
Click the Back button on the browser/authoring page twice, to return to the Add Module to Server-name page.
Click the Reload button on the browser/authoring page to update the page and see the environment variable set you just defined.
Click on the environment you want to use for this server, or click on the Interps (which includes the environment you defined for this set of interpreters).
Define the Mappings for the cgi module. Specify the Method, URL and directory where the CGI resides. For example:
GET /cgi /usr/local/cgi
tells the server that a request with the method GET and URI starting with "/cgi" could be found in the /usr/local/cgi directory. Or, this example:
GET /cgi
tells the server that a request with the method GET and URI starting with "/cgi" could be found in the server's pages directory.
Click the Update button at the bottom of the page.
AOLserver will validate your changes and, if no errors are detected, write the information to the configuration file. (Note that not all errors can be detected.) If it finds any errors, AOLserver will inform you of the error and you will need to modify the parameters before the information can be written to the configuration file. You will need to stop and restart your server to see the effects of your changes.