/usr/share/cups/doc-root/help/cgi.html is in cups-server-common 2.2.7-1ubuntu2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | <HTML>
<!-- SECTION: Getting Started -->
<HEAD>
<TITLE>Using CGI Programs</TITLE>
<LINK REL="STYLESHEET" TYPE="text/css" HREF="../cups-printable.css">
</HEAD>
<BODY>
<H1 CLASS="title">Using CGI Programs</H1>
<P>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.</P>
<P>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. <a href="#TABLE1">Table 1</a> 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.</P>
<DIV CLASS="table"><TABLE SUMMARY="CGI MIME Media Types">
<CAPTION><A NAME="TABLE1">Table 1</A>: CGI MIME Media Types</CAPTION>
<TR>
<TH>MIME Media Type</TH>
<TH>Description</TH>
</TR>
<TR>
<TD>application/x-httpd-cgi</TD>
<TD>CGI script/program</TD>
</TR>
<TR>
<TD>application/x-httpd-java</TD>
<TD>Java program</TD>
</TR>
<TR>
<TD>application/x-httpd-perl</TD>
<TD>Perl script</TD>
</TR>
<TR>
<TD>application/x-httpd-php</TD>
<TD>PHP script</TD>
</TR>
<TR>
<TD>application/x-httpd-python</TD>
<TD>Python script</TD>
</TR>
</TABLE></DIV>
<H2><A NAME="CONFIG">Configuring the Server</A></H2>
<P>In order to enable the corresponding type, you must create a
new <VAR>/etc/cups/cgi.types</VAR> file which maps the filename
extensions to the appropriate MIME types, for example:</P>
<PRE CLASS="command">
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
</PRE>
<P>CGI scripts/programs (application/x-httpd-cgi) also must be owned by root, have execution permissions, and not have world or group write permissions to be treated as a CGI script or program.</P>
<H2><A NAME="LIMITS">Limitations</A></H2>
<P>CUPS implements most of the CGI/1.1 specification, with the
following exceptions:</P>
<UL>
<LI>No PATH_INFO or PATH_TRANSLATED support</LI>
<LI>Limited HTTP field support; only the Content-Length (CONTENT_LENGTH), Content-Type (CONTENT_TYPE), Cookie (HTTP_COOKIE), Referrer (HTTP_REFERRER), and User-Agent (HTTP_USER_AGENT) fields are placed in environment variables at this time</LI>
</UL>
</BODY>
</HTML>
|