The HTTP User module can start CGI programs and scripts. To access a CGI program, the /cgi-bin/programName URL should be used, and the programName program should be placed into the CommuniGate Pro CGI Directory.
Use the WebAdmin Interface to open the HTTP User settings page:
CGI Directory: Enter the name of the server system file directory where your CGI programs are located. If that directory is inside the CommuniGate Pro base directory, then you can specify its relative name, otherwise specify the full path to that directory. The CGI Directory should not have any subdirectories.
File Extensions: While some operating systems (such as Unix) can start various interpreter-type programs/scripts by starting the proper interpreter, other operating systems require that the interpreter program is started explicitly. The CommuniGate Pro Server supports those operating systems by allowing you to specify the name of the interpreter program for certain file extensions. As a result, when the CommuniGate Pro Server needs to start a program or script with the specified extension, it forms the OS-level command line by prefixing the program/script name with the specified interpreter program name.
In the above example the Server will process the /cgi-bin/script.pl URL by executing the
HTTP Header Field: Use this table to specify custom, non-standard HTTP Request header fields that you want to pass to your CGI applications. If a request contains a header line with the specified field name, the line is passed to CGI applications as an environment variable with the HTTP_H_convertedFieldName name, where convertedFieldName is the field name in the uppercase letters, with all minus (-) symbols substituted with the underscore (_) symbols.
CGI programs can be used to extend functionality of the WebUser Interface. They can log into the Server via its PWD module to do some CLI/API operations and/or via the IMAP or XIMSS modules to access and modify Mailbox data. To simplify these login operations, CGI programs can use the SessionID Authentication method.