CUPS provides a dynamic web interface through dedicated CGI programs that are executed when users open special directories on the CUPS server. Each CGI performs administration, class, help, job, and printer functions as directed by the user, but the actual programs that are run and functions that are available are limited to those that were originally designed into the scheduler.
CUPS also supports CGI programs and specific scripting languages (Java, Perl, PHP, and Python) for pages you want to provide. The interpreters for these languages are currently configured at compile time and are associated with MIME media types. Table 1 shows the MIME media types that are reserved for each type of page and are the same as those used by the Apache web server.
|MIME Media Type||Description|
In order to enable the corresponding type, you must create a new /etc/cups/cgi.types file which maps the filename extensions to the appropriate MIME types, for example:
application/x-httpd-cgi cgi application/x-httpd-java class application/x-httpd-perl pl application/x-httpd-php php application/x-httpd-python py
CGI scripts/programs (application/x-httpd-cgi) also must have execution permissions to be treated as a CGI script or program.
CUPS implements most of the CGI/1.1 specification, with the following exceptions: