Setting Up Multiple CGI Directories
This document provides instructions for configuring the Web Serve for multiple cgi-bin directories.
To Add the Servlet to the Web Server:
- Log in to the Administration Tool.
- Select the service for which you wish to configure the multiple CGI directories.
- Click Manage.
- On the Service screen, click Servlets.
- On the Servlets panel, click Add.
- In the Servlet Name field, type the new name for the cgi servlet.
This is the
name by which the servlet will be called to handle
the new cgi-bin directory (for example, cgi1).
- In the Servlet Class field, type
com.sun.server.http.servlet.CgiServlet.
For more information see,
see the Administration Tool:
Adding Servlets online help doc.
To Configure the Newly Added Servlet:
- On the Servlets panel, click Configure, then the name of the server.
The Name and Servlet
Class fields on the Configuration tabbed panel
should have the same values as
those you entered in the Adding Servlets screen in the previous procedure.
- Indicate whether you want the servlet loaded at
server startup and/or what to manually load it now.
- Click the Properties tab and add a new property called
"bindir" whose value is the full or relative path to the
cgi-bin directory you want the server to use (for example,
foo/cgi-bin/, which will be relative to
server_root, the location of the installed Java Web Server.)
For more information, see the
Administration Tool: Configuring Servlets online help doc.
To Set the Servlet Alias for the Appropriate cgi-bin Directory:
- Click Setup.
- In the Setup panel, select Servlet Aliases.
-
For each new cgi-bin directory you created in the previous
steps, set the servlet alias for the directory to call the
appropriate cgi servlet.
For example, if you added the servlet cgi1 with
/foo/cgi-bin as its bindir property,
then you'll want a call to
/foo/cgi-bin/ to be aliased to the servlet cgi1.
- Click Save.
For more information, see
the
Administration Tool: Servlet Aliases online help doc.