]> granicus.if.org Git - apache/commitdiff
New Japanese translation by Minoru Yamazato <yamazato@geocities.co.jp>
authorYoshiki Hayashi <yoshiki@apache.org>
Thu, 18 Jan 2001 08:54:02 +0000 (08:54 +0000)
committerYoshiki Hayashi <yoshiki@apache.org>
Thu, 18 Jan 2001 08:54:02 +0000 (08:54 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87704 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/howto/cgi.html [deleted file]
docs/manual/howto/cgi.html.ja.jis [new file with mode: 0644]

diff --git a/docs/manual/howto/cgi.html b/docs/manual/howto/cgi.html
deleted file mode 100644 (file)
index fadbceb..0000000
+++ /dev/null
@@ -1,499 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<html>
-<head>
-<title>Apache Tutorial: Dynamic Content with CGI</title>
-<link rev="made" href="mailto:rbowen@rcbowen.com">
-</head>
-<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
-<body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#000080"
-alink="#FF0000">
-<!--#include virtual="header.html" -->
-<h1 align="CENTER">Dynamic Content with CGI</h1>
-
-<a name="__index__"></a> <!-- INDEX BEGIN -->
-
-<ul>
-<li><a href="#dynamiccontentwithcgi">Dynamic Content with
-CGI</a></li>
-
-<li><a href="#configuringapachetopermitcgi">Configuring Apache to
-permit CGI</a>
-
-<ul>
-<li><a href="#scriptalias">ScriptAlias</a></li>
-
-<li><a href="#cgioutsideofscriptaliasdirectories">CGI outside of
-ScriptAlias directories</a>
-
-<ul>
-<li><a href="#explicitlyusingoptionstopermitcgiexecution">Explicitly using
-Options to permit CGI execution</a></li>
-
-<li><a href="#htaccessfiles">.htaccess files</a></li>
-</ul>
-</li>
-</ul>
-</li>
-
-<li><a href="#writingacgiprogram">Writing a CGI program</a>
-
-<ul>
-<li><a href="#yourfirstcgiprogram">Your first CGI program</a></li>
-</ul>
-</li>
-
-<li><a href="#butitsstillnotworking">But it's still not
-working!</a>
-
-<ul>
-<li><a href="#filepermissions">File permissions</a></li>
-
-<li><a href="#pathinformation">Path information</a></li>
-
-<li><a href="#syntaxerrors">Syntax errors</a></li>
-
-<li><a href="#errorlogs">Error logs</a></li>
-</ul>
-</li>
-
-<li><a href="#whatsgoingonbehindthescenes">What's going on behind
-the scenes?</a>
-
-<ul>
-<li><a href="#environmentvariables">Environment variables</a></li>
-
-<li><a href="#stdinandstdout">STDIN and STDOUT</a></li>
-</ul>
-</li>
-
-<li><a href="#cgimoduleslibraries">CGI modules/libraries</a></li>
-
-<li><a href="#formoreinformation">For more information</a></li>
-</ul>
-
-<!-- INDEX END -->
-<hr>
-<h2><a name="dynamiccontentwithcgi">Dynamic Content with
-CGI</a></h2>
-
-<table border="1">
-<tr><td valign="top">
-<strong>Related Modules</strong><br><br>
-
-<a href="../mod/mod_alias.html">mod_alias</a><br>
-<a href="../mod/mod_cgi.html">mod_cgi</a><br>
-
-</td><td valign="top">
-<strong>Related Directives</strong><br><br>
-
-<a href="../mod/mod_mime.html#addhandler">AddHandler</a><br>
-<A HREF="../mod/core.html#options">Options</a><br>
-<a href="../mod/mod_alias.html#scriptalias">ScriptAlias</a><br>
-
-</td></tr></table>
-
-<p>The CGI (Common Gateway Interface) defines a way for a web server
-to interact with external content-generating programs, which are often
-referred to as CGI programs or CGI scripts.  It is the simplest, and
-most common, way to put dynamic content on your web site. This
-document will be an introduction to setting up CGI on your Apache web
-server, and getting started writing CGI programs.</p>
-
-<hr>
-<h2><a name="configuringapachetopermitcgi">Configuring Apache to
-permit CGI</a></h2>
-
-<p>In order to get your CGI programs to work properly, you'll need to
-have Apache configured to permit CGI execution. There are several ways
-to do this.</p>
-
-<h3><a name="scriptalias">ScriptAlias</a></h3>
-
-<p>The <code>ScriptAlias</code> directive tells Apache that a
-particular directory is set aside for CGI programs. Apache will assume
-that every file in this directory is a CGI program, and will attempt to
-execute it, when that particular resource is requested by a client.</p>
-
-<p>The <code>ScriptAlias</code> directive looks like:</p>
-
-<pre>
-        ScriptAlias /cgi-bin/ /usr/local/apache/cgi-bin/
-</pre>
-
-<p>The example shown is from your default <code>httpd.conf</code>
-configuration file, if you installed Apache in the default location.
-The <code>ScriptAlias</code> directive is much like the
-<code>Alias</code> directive, which defines a URL prefix that is to
-mapped to a particular directory. <code>Alias</code> and
-<code>ScriptAlias</code> are usually used for directories that are
-outside of the <code>DocumentRoot</code> directory. The difference
-between <code>Alias</code> and <code>ScriptAlias</code> is that
-<code>ScriptAlias</code> has the added meaning that everything under
-that URL prefix will be considered a CGI program. So, the example above
-tells Apache that any request for a resource beginning with
-<code>/cgi-bin/</code> should be served from the directory
-<code>/usr/local/apache/cgi-bin/</code>, and should be treated as a CGI
-program.</p>
-
-<p>For example, if the URL
-<code>http://dev.rcbowen.com/cgi-bin/test.pl</code> is requested,
-Apache will attempt to execute the file
-<code>/usr/local/apache/cgi-bin/test.pl</code> and return the output.
-Of course, the file will have to exist, and be executable, and return
-output in a particular way, or Apache will return an error message.</p>
-
-<h3><a name="cgioutsideofscriptaliasdirectories">CGI outside of
-ScriptAlias directories</a></h3>
-
-<p>CGI programs are often restricted to <code>ScriptAlias</code>'ed
-directories for security reasons.  In this way, administrators can
-tightly control who is allowed to use CGI programs.  However, if the
-proper security precautions are taken, there is no reason why
-CGI programs cannot be run from arbitrary directories.  For example,
-you may wish to let users have web content in their home directories
-with the <code>UserDir</code> directive. If they want to have their
-own CGI programs, but don't have access to the main
-<code>cgi-bin</code> directory, they will need to be able to run CGI
-programs elsewhere.</p>
-
-<h3><a name="explicitlyusingoptionstopermitcgiexecution">Explicitly using
-Options to permit CGI execution</a></h3>
-
-<p>You could explicitly use the <code>Options</code> directive, inside
-your main server configuration file, to specify that CGI execution was
-permitted in a particular directory:</p>
-
-<pre>
-        &lt;Directory /usr/local/apache/htdocs/somedir&gt;
-                Options +ExecCGI
-        &lt;/Directory&gt;
-</pre>
-
-<p>The above directive tells Apache to permit the execution of CGI
-files. You will also need to tell the server what files are CGI files.
-The following <code>AddHandler</code> directive tells the server
-to treat all files with the <code>cgi</code> or <code>pl</code>
-extension as CGI programs:</p>
-
-<pre>
-     AddHandler cgi-script cgi pl
-</pre>
-
-<h3><a name="htaccessfiles">.htaccess files</a></h3>
-
-<p>A <code>.htaccess</code> file is a way to set configuration
-directives on a per-directory basis. When Apache serves a resource, it
-looks in the directory from which it is serving a file for a file
-called <code>.htaccess</code>, and, if it finds it, it will apply
-directives found therein. <code>.htaccess</code> files can be permitted
-with the <code>AllowOverride</code> directive, which specifies what
-types of directives can appear in these files, or if they are not
-allowed at all. To permit the directive we will need for this purpose,
-the following configuration will be needed in your main server
-configuration:</p>
-
-<pre>
-        AllowOverride Options
-</pre>
-
-<p>In the <code>.htaccess</code> file, you'll need the following
-directive:</p>
-
-<pre>
-        Options +ExecCGI
-</pre>
-
-<p>which tells Apache that execution of CGI programs is permitted in
-this directory.</p>
-
-<hr>
-<h2><a name="writingacgiprogram">Writing a CGI program</a></h2>
-
-<p>There are two main differences between ``regular'' programming, and
-CGI programming.</p>
-
-<p>First, all output from your CGI program must be preceded by a
-MIME-type header. This is HTTP header that tells the client what sort
-of content it is receiving. Most of the time, this will look like:</p>
-
-<pre>
-        Content-type: text/html
-</pre>
-
-<p>Secondly, your output needs to be in HTML, or some other format that
-a browser will be able to display. Most of the time, this will be HTML,
-but occasionally you might write a CGI program that outputs a gif
-image, or other non-HTML content.</p>
-
-<p>Apart from those two things, writing a CGI program will look a lot
-like any other program that you might write.</p>
-
-<h3><a name="yourfirstcgiprogram">Your first CGI program</a></h3>
-
-<p>The following is an example CGI program that prints one line to your
-browser. Type in the following, save it to a file called
-<code>first.pl</code>, and put it in your <code>cgi-bin</code>
-directory.</p>
-
-<pre>
-        #!/usr/bin/perl
-        print "Content-type: text/html\r\n\r\n";
-        print "Hello, World.";
-</pre>
-
-<p>Even if you are not familiar with Perl, you should be able to see
-what is happening here. The first line tells Apache (or whatever shell
-you happen to be running under) that this program can be executed by
-feeding the file to the interpreter found at the location
-<code>/usr/bin/perl</code>. The second line prints the content-type
-declaration we talked about, followed by two carriage-return newline
-pairs. This puts a blank line after the header, to indicate the end of
-the HTTP headers, and the beginning of the body. The third line prints
-the string ``Hello, World.'' And that's the end of it.</p>
-
-<p>If you open your favorite browser and tell it to get the address</p>
-
-<pre>
-        http://www.example.com/cgi-bin/first.pl
-</pre>
-
-<p>or wherever you put your file, you will see the one line
-<code>Hello, World.</code> appear in your browser window. It's not very
-exciting, but once you get that working, you'll have a good chance of
-getting just about anything working.</p>
-
-<hr>
-<h2><a name="butitsstillnotworking">But it's still not
-working!</a></h2>
-
-<p>There are four basic things that you may see in your browser when
-you try to access your CGI program from the web:</p>
-
-<dl>
-<dt>The output of your CGI program</dt>
-<dd>Great!  That means everything worked fine.<br><br></dd>
-
-<dt>The source code of your CGI program or a "POST Method Not Allowed"
-message</dt> 
-<dd>That means that you have not properly configured
-Apache to process your CGI program.  Reread the section on <a
-href="#configuringapachetopermitcgi">configuring Apache</a> and try to
-find what you missed.<br><br></dd>
-
-<dt>A message starting with "Forbidden"</dt> <dd>That means that there
-is a permissions problem.  Check the <a href="#errorlogs">Apache
-error log</a> and the section below on <a
-href="#filepermissions">file permissions</a>.<br><br></dd>
-
-<dt>A message saying "Internal Server Error"</dt> <dd>If you check the
-<a href="#errorlogs">Apache error log</a>, you will probably find
-that it says "Premature end of script headers", possibly along with an
-error message generated by your CGI program.  In this case, you will
-want to check each of the below sections to see what might be preventing
-your CGI program from emitting the proper HTTP headers.</dd>
-</dl>
-
-
-<h3><a name="filepermissions">File permissions</a></h3>
-
-<p>Remember that the server does not run as you. That is, when the
-server starts up, it is running with the permissions of an unprivileged
-user - usually ``nobody'', or ``www'' - and so it will need extra
-permissions to execute files that are owned by you. Usually, the way to
-give a file sufficient permissions to be executed by ``nobody'' is to
-give everyone execute permission on the file:</p>
-
-<pre>
-        chmod a+x first.pl
-</pre>
-
-<p>Also, if your program reads from, or writes to, any other files,
-those files will need to have the correct permissions to permit
-this.</p>
-
-<p>The exception to this is when the server is configured to use <a
-href="../suexec.html">suexec</a>.  This program allows CGI programs to
-be run under different user permissions, depending on which virtual
-host or user home directory they are located in.  Suexec has very
-strict permission checking, and any failure in that checking will
-result in your CGI programs failing with an "Internal Server Error".
-In this case, you will need to check the suexec log file to see what
-specific security check is failing.</p>
-
-<h3><a name="pathinformation">Path information</a></h3>
-
-<p>When you run a program from your command line, you have certain
-information that is passed to the shell without you thinking about it.
-For example, you have a path, which tells the shell where it can look
-for files that you reference.</p>
-
-<p>When a program runs through the web server as a CGI program, it does
-not have that path. Any programs that you invoke in your CGI program
-(like 'sendmail', for example) will need to be specified by a full
-path, so that the shell can find them when it attempts to execute your
-CGI program.</p>
-
-<p>A common manifestation of this is the path to the script interpreter
-(often <code>perl</code>) indicated in the first line of your CGI
-program, which will look something like:</p>
-
-<pre>
-     #!/usr/bin/perl
-</pre>
-
-<p>Make sure that this is in fact the path to the interpreter.</p>
-
-<h3><a name="syntaxerrors">Syntax errors</a></h3>
-
-<p>Most of the time when a CGI program fails, it's because of a problem
-with the program itself. This is particularly true once you get the
-hang of this CGI stuff, and no longer make the above two mistakes.
-Always attempt to run your program from the command line before you
-test if via a browser. This will eliminate most of your problems.</p>
-
-<h3><a name="errorlogs">Error logs</a></h3>
-
-<p>The error logs are your friend. Anything that goes wrong generates
-message in the error log. You should always look there first. If the
-place where you are hosting your web site does not permit you access to
-the error log, you should probably host your site somewhere else. Learn
-to read the error logs, and you'll find that almost all of your
-problems are quickly identified, and quickly solved.</p>
-
-<hr>
-<h2><a name="whatsgoingonbehindthescenes">What's going on behind
-the scenes?</a></h2>
-
-<p>As you become more advanced in CGI programming, it will become
-useful to understand more about what's happening behind the scenes.
-Specifically, how the browser and server communicate with one another.
-Because although it's all very well to write a program that prints
-``Hello, World.'', it's not particularly useful.</p>
-
-<h3><a name="environmentvariables">Environment variables</a></h3>
-
-<p>Environment variables are values that float around you as you use
-your computer. They are useful things like your path (where the
-computer searches for a the actual file implementing a command when you
-type it), your username, your terminal type, and so on. For a full list
-of your normal, every day environment variables, type <code>env</code>
-at a command prompt.</p>
-
-<p>During the CGI transaction, the server and the browser also set
-environment variables, so that they can communicate with one another.
-These are things like the browser type (Netscape, IE, Lynx), the server
-type (Apache, IIS, WebSite), the name of the CGI program that is being
-run, and so on.</p>
-
-<p>These variables are available to the CGI programmer, and are half of
-the story of the client-server communication. The complete list of
-required variables is at <a href=
-"http://hoohoo.ncsa.uiuc.edu/cgi/env.html">http://hoohoo.ncsa.uiuc.edu/cgi/env.html</a></p>
-
-<p>This simple Perl CGI program will display all of the environment
-variables that are being passed around.  Two similar programs are
-included in the <code>cgi-bin</code> directory of the Apache
-distribution. Note that some variables are required, while others are
-optional, so you may see some variables listed that were not in the
-official list.  In addition, Apache provides many different ways for
-you to <a href="../env.html">add your own environment variables</a> to
-the basic ones provided by default.</p>
-
-<pre>
-     #!/usr/bin/perl
-     print "Content-type: text/html\n\n";
-     foreach $key (keys %ENV) {
-          print "$key --&gt; $ENV{$key}&lt;br&gt;";
-     }
-</pre>
-
-<h3><a name="stdinandstdout">STDIN and STDOUT</a></h3>
-
-<p>Other communication between the server and the client happens over
-standard input (<code>STDIN</code>) and standard output
-(<code>STDOUT</code>). In normal everyday context, <code>STDIN</code>
-means the keyboard, or a file that a program is given to act on, and
-<code>STDOUT</code> usually means the console or screen.</p>
-
-<p>When you <code>POST</code> a web form to a CGI program, the data in
-that form is bundled up into a special format and gets delivered to
-your CGI program over <code>STDIN</code>. The program then can process
-that data as though it was coming in from the keyboard, or from a
-file</p>
-
-<p>The ``special format'' is very simple. A field name and its value
-are joined together with an equals (=) sign, and pairs of values are
-joined together with an ampersand (&amp;). Inconvenient characters like
-spaces, ampersands, and equals signs, are converted into their hex
-equivalent so that they don't gum up the works. The whole data string
-might look something like:</p>
-
-<pre>
-     name=Rich%20Bowen&amp;city=Lexington&amp;state=KY&amp;sidekick=Squirrel%20Monkey
-</pre>
-
-<p>You'll sometimes also see this type of string appended to the a URL.
-When that is done, the server puts that string into the environment
-variable called <code>QUERY_STRING</code>. That's called a
-<code>GET</code> request. Your HTML form specifies whether a
-<code>GET</code> or a <code>POST</code> is used to deliver the data, by
-setting the <code>METHOD</code> attribute in the <code>FORM</code>
-tag.</p>
-
-<p>Your program is then responsible for splitting that string up into
-useful information. Fortunately, there are libraries and modules
-available to help you process this data, as well as handle other of the
-aspects of your CGI program.</p>
-
-<hr>
-<h2><a name="cgimoduleslibraries">CGI modules/libraries</a></h2>
-
-<p>When you write CGI programs, you should consider using a code
-library, or module, to do most of the grunt work for you. This leads to
-fewer errors, and faster development.</p>
-
-<p>If you're writing CGI programs in Perl, modules are available on <a
-href="http://www.cpan.org/">CPAN</a>. The most popular module for this
-purpose is CGI.pm. You might also consider CGI::Lite, which implements
-a minimal set of functionality, which is all you need in most
-programs.</p>
-
-<p>If you're writing CGI programs in C, there are a variety of options.
-One of these is the CGIC library, from <a href=
-"http://www.boutell.com/cgic/">http://www.boutell.com/cgic/</a></p>
-
-<hr>
-<h2><a name="formoreinformation">For more information</a></h2>
-
-<p>There are a large number of CGI resources on the web. You can
-discuss CGI problems with other users on the Usenet group
-comp.infosystems.www.authoring.cgi. And the -servers mailing list from
-the HTML Writers Guild is a great source of answers to your questions.
-You can find out more at <a href=
-"http://www.hwg.org/lists/hwg-servers/">http://www.hwg.org/lists/hwg-servers/</a></p>
-
-<p>And, of course, you should probably read the CGI specification,
-which has all the details on the operation of CGI programs.  You can
-find the original version at the <a href=
-"http://hoohoo.ncsa.uiuc.edu/cgi/interface.html">NCSA</a> and there is
-an updated draft at the <a
-href="http://web.golux.com/coar/cgi/">Common Gateway Interface RFC
-project</a>.</p>
-
-<p>When you post a question about a CGI problem that you're having,
-whether to a mailing list, or to a newsgroup, make sure you provide
-enough information about what happened, what you expected to happen,
-and how what actually happened was different, what server you're
-running, what language your CGI program was in, and, if possible, the
-offending code. This will make finding your problem much simpler.</p>
-
-<p>Note that questions about CGI problems should <strong>never</strong>
-be posted to the Apache bug database unless you are sure you have found
-a problem in the Apache source code.</p>
-
-<!--#include virtual="footer.html" -->
-
-</body>
-</html>
-
diff --git a/docs/manual/howto/cgi.html.ja.jis b/docs/manual/howto/cgi.html.ja.jis
new file mode 100644 (file)
index 0000000..b6bf58c
--- /dev/null
@@ -0,0 +1,495 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<html>
+<head>
+<title>Apache Tutorial: CGI \e$B$K$h$kF0E*%3%s%F%s%D\e(B</title>
+</head>
+<!-- English revision: 1.6 -->
+<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
+<body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#000080"
+alink="#FF0000">
+<!--#include virtual="header.html" -->
+<h1 align="CENTER">CGI \e$B$K$h$kF0E*%3%s%F%s%D\e(B</h1>
+
+<a name="__index__"></a> <!-- INDEX BEGIN -->
+
+<ul>
+<li><a href="#dynamiccontentwithcgi">CGI \e$B$K$h$kF0E*%3%s%F%s%D\e(B</a></li>
+
+<li><a href="#configuringapachetopermitcgi">CGI \e$B$r5v2D$9$k$h$&$K\e(B Apache \e$B$r\e(B
+\e$B@_Dj$9$k\e(B</a>
+
+<ul>
+<li><a href="#scriptalias">ScriptAlias</a></li>
+
+<li><a href="#cgioutsideofscriptaliasdirectories">ScriptAlias \e$B%G%#%l%/%H%j30$N\e(B
+CGI</a>
+
+<ul>
+<li><a href="#explicitlyusingoptionstopermitcgiexecution">CGI \e$B$N<B9T$r2DG=$K\e(B
+\e$B$9$k$?$a$K\e(B Options \e$B$rL@<(E*$K;HMQ$9$k\e(B</a></li>
+
+
+<li><a href="#htaccessfiles">.htaccess \e$B%U%!%$%k\e(B</a></li>
+</ul>
+</li>
+</ul>
+</li>
+
+<li><a href="#writingacgiprogram">CGI \e$B%W%m%0%i%`$r=q$/\e(B</a>
+
+<ul>
+<li><a href="#yourfirstcgiprogram">\e$B$"$J$?$N:G=i$N\e(B CGI \e$B%W%m%0%i%`\e(B</a></li>
+</ul>
+</li>
+
+<li><a href="#butitsstillnotworking">\e$B$7$+$7!"$^$@F0$+$J$$\e(B !</a>
+
+<ul>
+<li><a href="#filepermissions">\e$B%U%!%$%k$N%Q!<%_%C%7%g%s\e(B</a></li>
+
+<li><a href="#pathinformation">\e$B%Q%9>pJs\e(B</a></li>
+
+<li><a href="#syntaxerrors">\e$B9=J8%(%i!<\e(B</a></li>
+
+<li><a href="#errorlogs">\e$B%(%i!<%m%0\e(B</a></li>
+</ul>
+</li>
+
+<li><a href="#whatsgoingonbehindthescenes">\e$BN"$G2?$,5/$3$C$F$$$k$N$+\e(B?</a>
+
+<ul>
+<li><a href="#environmentvariables">\e$B4D6-JQ?t\e(B</a></li>
+
+<li><a href="#stdinandstdout">\e$BI8=`F~=PNO\e(B</a></li>
+</ul>
+</li>
+
+<li><a href="#cgimoduleslibraries">CGI \e$B%b%8%e!<%k\e(B/\e$B%i%$%V%i%j\e(B</a></li>
+
+<li><a href="#formoreinformation">\e$B99$J$k>pJs\e(B</a></li>
+</ul>
+
+<!-- INDEX END -->
+<hr>
+<h2><a name="dynamiccontentwithcgi">CGI \e$B$K$h$kF0E*%3%s%F%s%D\e(B</a></h2>
+
+<table border="1">
+<tr><td valign="top">
+<strong>\e$B4XO"%b%8%e!<%k\e(B</strong><br><br>
+
+<a href="../mod/mod_alias.html">mod_alias</a><br>
+<a href="../mod/mod_cgi.html">mod_cgi</a><br>
+
+</td><td valign="top">
+<strong>\e$B4XO"%G%#%l%/%F%#%V\e(B</strong><br><br>
+
+<a href="../mod/mod_mime.html#addhandler">AddHandler</a><br>
+<A HREF="../mod/core.html#options">Options</a><br>
+<a href="../mod/mod_alias.html#scriptalias">ScriptAlias</a><br>
+
+</td></tr></table>
+
+<p>CGI (Common Gateway Interface) \e$B$O!"%&%'%V%5!<%P$,%3%s%F%s%D@8@.$r$9$k\e(B
+\e$B30It%W%m%0%i%`$H6(D4$7$FF0:n$9$k$?$a$NJ}K!$rDj5A$7$F$$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<$N$h$&$K;HMQ$7$^$9\e(B:</p>
+
+<pre>
+        ScriptAlias /cgi-bin/ /usr/local/apache/cgi-bin/
+</pre>
+
+<p>\e$B%G%U%)%k%H0LCV$K\e(B Apache \e$B$r%$%s%9%H!<%k$7$?$J$i$P!"\e(B
+\e$B$3$NNc$O%G%U%)%k%H>uBV$N\e(B <code>httpd.conf</code> \e$B@_Dj%U%!%$%k\e(B
+\e$B$K4^$^$l$F$$$^$9!#\e(B
+<code>ScriptAlias</code> \e$B%G%#%l%/%F%#%V$O!"\e(BURL \e$B$NA0$KIU2C$9$k%G%#%l%/%H%j$rDj5A$9$k\e(B <code>Alias</code> \e$B%G%#%l%/%F%#%V$H$+$J$j;w$F$$$^$9!#\e(B
+<code>Alias</code> \e$B$H\e(B <code>ScriptAlias</code> \e$B$ODL>o!"\e(B
+<code>DocumentRoot</code> \e$B%G%#%l%/%H%j30$N%G%#%l%/%H%j$N$?$a$K;HMQ$5$l$^$9!#\e(B
+<code>Alias</code> \e$B$H\e(B <code>ScriptAlias</code> \e$B$H$N:9$O!"\e(B
+<code>ScriptAlias</code> \e$B$,@\F,<-$G;O$^$k$9$Y$F$N\e(B URL \e$B$O\e(B CGI \e$B%W%m%0%i%`$H\e(B
+\e$B$_$J$5$l$k$H$$$&DI2C$N0UL#$r4^$s$G$$$k$3$H$G$9!#=>$C$F!"\e(B
+\e$B>e5-$NNc$G$O!"\e(B<code>/cgi-bin/</code>
+\e$B$G;O$^$k%j%=!<%9$X$N$"$i$f$k%j%/%(%9%H$KBP$7$F!"%G%#%l%/%H%j\e(B
+<code>/usr/local/apache/cgi-bin/</code>
+\e$B$+$iDs6!$7!"$=$l$i$r\e(B CGI \e$B%W%m%0%i%`$H$7$F07$&$h$&\e(B Apache \e$B$K<($7$^$9!#\e(B</p>
+
+<p>\e$BNc$($P!"\e(BURL <code>http://dev.rcbowen.com/cgi-bin/test.pl</code>
+\e$B$,MW5a$5$l$?>l9g!"\e(BApache \e$B$O\e(B \e$B%U%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e(B
+\e$B<B9T$9$k$3$H$,$G$-$kB>$N>l=j$,I,MW$K$J$j$^$9!#\e(B</p>
+
+<h3><a name="explicitlyusingoptionstopermitcgiexecution">
+CGI \e$B$N<B9T$r2DG=$K$9$k$?$a$K\e(B Options \e$B$rL@<(E*$K;HMQ$9$k\e(B</a></h3>
+
+<p>\e$B%5!<%P$N%a%$%s$N@_Dj%U%!%$%kCf$G\e(B <code>Options</code> \e$B%G%#%l%/%F%#%V$r\e(B
+\e$BL@<(E*$K;HMQ$9$k$3$H$G!"FCDj$N%G%#%l%/%H%jG[2<$G\e(B CGI \e$B$N<B9T$r5v2D$9$k$h$&$K\e(B
+\e$B;XDj$9$k$3$H$,$G$-$^$9\e(B:<p>
+
+<pre>
+        &lt;Directory /usr/local/apache/htdocs/somedir&gt;
+                Options +ExecCGI
+        &lt;/Directory&gt;
+</pre>
+
+<p>\e$B>e5-%G%#%l%/%F%#%V$O!"\e(BCGI \e$B%U%!%$%k$N<B9T$r2DG=$K$9$k$h$&\e(B Apache 
+\e$B$KEA$($^$9!#$^$?!"$I$N%U%!%$%k$,\e(B CGI \e$B%U%!%$%k$+$r\e(B
+\e$B%5!<%P$KEA$($kI,MW$,$"$j$^$9!#<!$N\e(B <code>AddHandler</code>
+\e$B%G%#%l%/%F%#%V$NNc$G$O!"\e(B<code>cgi</code> \e$B$^$?$O\e(B <code>pl</code> \e$B$r3HD%;R$K\e(B
+\e$B;}$D$9$Y$F$N%U%!%$%k$r\e(B CGI \e$B%W%m%0%i%`$H$7$F$_$J$9$3$H$r%5!<%P$KEA$($^$9\e(B:<p>
+
+<pre>
+     AddHandler cgi-script cgi pl
+</pre>
+
+<h3><a name="htaccessfiles">.htaccess \e$B%U%!%$%k\e(B</a></h3>
+
+<p><code>.htaccess</code> \e$B%U%!%$%k$O!"%G%#%l%/%H%jKh$K\e(B
+\e$B%G%#%l%/%F%#%V$r;XDj$9$kJ}K!$G$9!#\e(B
+Apache \e$B$O!"%j%=!<%9$rDs6!$9$k$H$-$K!"Ds6!$9$k%U%!%$%k$,CV$+$l$F$$$k\e(B
+\e$B%G%#%l%/%H%jCf$N\e(B <code>.htaccess</code> \e$B$H$$$&%U%!%$%k$r;2>H$7$^$9!#\e(B
+\e$B$=$N%U%!%$%k$rH/8+$7$?$i!"$=$NCf$GH/8+$5$l$?%G%#%l%/%F%#%V$,E,MQ$5$l$^$9!#\e(B
+<code>.htaccess</code> \e$B%U%!%$%k$O!"\e(B<code>AllowOverride</code> 
+\e$B%G%#%l%/%F%#%V$N;XDj$K$h$j;H$($k$h$&$K$J$j$^$9!#\e(B
+<code>AllowOverride</code> \e$B%G%#%l%/%F%#%V$O!"\e(B<code>.htaccess</code> \e$B%U%!%$%k$G\e(B
+\e$B@_Dj$G$-$k%G%#%l%/%F%#%V$N%?%$%W$r;XDj$7$^$9!#\e(B
+<code>AllowOverride</code> \e$B%G%#%l%/%F%#%V$N;XDj$,$J$$>l9g!"$^$C$?$/;H$($^$;$s!#\e(B
+CGI \e$B$N<B9T$r5v2D$9$k$?$a$KI,MW$H$J$k%G%#%l%/%F%#%V$r;XDj2DG=$K$9$k$K$O!"\e(B
+\e$B0J2<$N@_Dj$,%5!<%P$N%a%$%s$N@_Dj$GI,MW$K$J$j$^$9\e(B:</p>
+
+<pre>
+        AllowOverride Options
+</pre>
+
+<p><code>.htaccess</code> \e$B%U%!%$%k$G$O!"<!$N%G%#%l%/%F%#%V$,I,MW$H\e(B
+\e$B$J$j$^$9\e(B:</p>
+
+<pre>
+        Options +ExecCGI
+</pre>
+
+<p>\e$B$3$N@_Dj$G$O!"$3$N%G%#%l%/%H%j$K$*$1$k\e(B CGI \e$B%W%m%0%i%`$N<B9T$r5v2D$9$k$h$&\e(B
+Apache \e$B$KEA$($^$9!#\e(B</p>
+
+<hr>
+<h2><a name="writingacgiprogram">CGI \e$B%W%m%0%i%`$r=q$/\e(B</a></h2>
+
+<p>\e$BDL>o$N%W%m%0%i%_%s%0$H\e(B CGI \e$B%W%m%0%i%_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/%H%j$KCV$$$F$/$@$5$$!#\e(B</p>
+
+<pre>
+        #!/usr/bin/perl
+        print "Content-type: text/html\r\n\r\n";
+        print "Hello, World.";
+</pre>
+
+<p>Perl \e$B$K@:DL$7$F$$$J$/$F$b!"2?$,5/$3$k$+$r\e(B
+\e$BM}2r$9$k$3$H$O$G$-$k$O$:$G$9!#\e(B
+1 \e$B9TL\$O!"\e(B<code>/usr/bin/perl</code> \e$B$G8+$D$1\e(B
+\e$B$i$l$k%$%s%?%W%j%?$K$3$N%U%!%$%k$r6!5k$9$k$3$H$G$3$N%W%m%0%i%`$,<B9T$5$l$k$3$H$r\e(B
+Apache \e$B$K\e(B (\e$B%7%'%k>e$G<B9T$7$h$&$H$7$F$$$k$J$i$P!"$=$N%7%'%k$K\e(B ) \e$B<($7$^$9!#\e(B
+2 \e$B9TL\$O!"A0=R$7$?$H$*$j\e(B content-type \e$B$NDj5A$r0u;z$7$^$9!#\e(B
+\e$B$3$l$K$OI|5"2~9T$NFs$D$NAH$r8e$KIU2C$7$^$9!#$3$l$K$h$j!"\e(B
+\e$B%X%C%@$N=*$j$K6u9T$,CV$+$l!"\e(BHTTP \e$B%X%C%@$N=*$j$H%\%G%#$N;O$^$j$r<($7$^$9!#\e(B
+3 \e$B9TL\$O!"\e(B``Hello, World.'' \e$B$H$$$&J8;zNs$r0u;z$7!"$3$l$G=*$j$H$J$j$^$9!#\e(B</p>
+
+<p>\e$B9%$_$N%V%i%&%6$r3+$-!"%"%I%l%9\e(B</p>
+
+<pre>
+        http://www.example.com/cgi-bin/first.pl
+</pre>
+
+<p>\e$B$"$k$$$O%U%!%$%k$rCV$$$?%m%1!<%7%g%s$r;XDj$9$k$H!"\e(B
+<code>Hello, World.</code> \e$B$H$$$&\e(B 1 \e$B9T$,%V%i%&%6%&%#%s%I$K8=$l$k$G$7$g$&!#\e(B
+\e$B$=$l$O$"$^$j%(%-%5%$%F%#%s%0$J$3$H$G$O$"$j$^$;$s!#\e(B
+\e$B$7$+$7!"$3$l$,$&$^$/F0$1$P!"\e(B
+\e$BB>$N$I$N$h$&$J$b$N$G$bF0$+$9$3$H$,$G$-$k$h$&$K$J$j$^$9!#\e(B</p>
+
+<hr>
+<h2><a name="butitsstillnotworking">\e$B$7$+$7!"$^$@F0$+$J$$\e(B !</a></h2>
+
+<p>\e$B%&%'%V$+$i\e(B CGI \e$B%W%m%0%i%`$X$N%"%/%;%9$r9T$J$C$?$H$-!"\e(B
+\e$B%V%i%&%6$G8+$k2DG=@-$,$"$k;M$D$N4pK\E*$J$3$H$,$"$j$^$9\e(B:</p>
+
+<dl>
+<dt>CGI \e$B%W%m%0%i%`$N=PNO\e(B</dt>
+<dd>\e$BAG@2$i$7$$\e(B ! \e$B$=$l$O$9$Y$F$,$&$^$/F0$$$?$3$H$r0UL#$7$^$9!#\e(B<br><br></dd>
+
+<dt>CGI \e$B%W%m%0%i%`$N%=!<%9%3!<%I!"$^$?$O\e(B "POST Method Not Allowed" 
+\e$B$H$$$&%a%C%;!<%8\e(B</dt> 
+<dd>\e$B$3$l$O!"\e(BCGI \e$B%W%m%0%i%`$r=hM}$G$-$k$h$&\e(B Apache \e$B$rE,@Z$K@_Dj$7$F\e(B
+\e$B$$$J$+$C$?$3$H$r0UL#$7$^$9!#\e(B
+<a href="#configuringapachetopermitcgi">\e$B!V\e(BCGI \e$B$r5v2D$9$k$h$&$K\e(B Apache \e$B$r@_Dj$9$k!W\e(B</a>\e$B$N>O$rFI$_D>$7!"$"$J$?$,2?$r4V0c$($?$+$r\e(B
+\e$BC5$7$F$_$F$/$@$5$$!#\e(B<br><br></dd>
+
+<dt>\e$B%a%C%;!<%8$,\e(B "Forbidden" \e$B$G;O$^$C$F$$$k\e(B</dt>
+<dd>\e$B$3$l$O%Q!<%_%C%7%g%s$NLdBj$H$$$&$3$H$r0UL#$7$^$9!#\e(B
+<a href="#errorlogs">Apache \e$B$N%(%i!<%m%0\e(B</a>\e$B$H!"8e=R$N\e(B
+<a href="#filepermissions">\e$B!V%U%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7$^$9!#F1MM$N%W%m%0%i%`$O!"\e(BApache \e$B%G%#%9%H%j%S%e!<%7%g%s$N\e(B
+<code>cgi-bin</code> \e$B%G%#%l%/%H%j$KFs$D4^$^$l$F$$$^$9!#\e(B
+\e$B$$$/$D$+$NJQ?t$,I,?\$G$"$j!"$$$/$D$+$OG$0U$G$"$k$3$H$KCm0U$7$F$/$@$5$$!#\e(B
+\e$B$=$7$F!"8x<0$N%j%9%H$K$O$J$$$$$/$D$+$NJQ?t$,I=<($5$l$F$$$k$+$b$7$l$^$;$s!#\e(B
+\e$B$5$i$K!"\e(BApache \e$B$O%G%U%)%k%H$GMQ0U$5$l$F$$$k4pK\E*$J$b$N$K\e(B
+<a href="../env.html">\e$B$"$J$?<+?H$N4D6-JQ?t$r2C$($k\e(B</a>
+\e$B$?$a$N!"B?$/$N0[$J$kJ}K!$rMQ0U$7$F$7$^$9!#\e(B</p>
+
+<pre>
+     #!/usr/bin/perl
+     print "Content-type: text/html\n\n";
+     foreach $key (keys %ENV) {
+          print "$key --&gt; $ENV{$key}&lt;br&gt;";
+     }
+</pre>
+
+<h3><a name="stdinandstdout">STDIN \e$B$H\e(B STDOUT</a></h3>
+
+<p>\e$B%5!<%P$H%/%i%$%"%s%H4V$N$b$&0l$D$NDL?.$O!"I8=`F~NO\e(B (<code>STDIN</code>)\e$B$H\e(B
+\e$BI8=`=PNO\e(B (<code>STDOUT</code>) \e$B$rDL$8$F9T$J$o$l$^$9!#DL>o$NJ8L.$K$*$$$F!"\e(B
+<code>STDIN</code> \e$B$O%-!<%\!<%I$d%W%m%0%i%`$,F0:n$9$k$?$a$KM?$($i$l$k\e(B
+\e$B%U%!%$%k$r0UL#$7!"\e(B<code>STDOUT</code> \e$B$ODL>o%3%s%=!<%k$^$?$O%9%/%j!<%s$r\e(B
+\e$B0UL#$7$^$9!#\e(B</p>
+
+<p>\e$B%&%'%V%U%)!<%`$+$i\e(B CGI \e$B%W%m%0%i%`$X\e(B<code>POST</code> \e$B$7$?$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cgic/">http://www.boutell.com/cgic/</a>
+\e$B$GDs6!$5$l$F$$$k\e(B CGIC \e$B%i%$%V%i%j$G$9!#\e(B</p>
+
+<hr>
+<h2><a name="formoreinformation">\e$B99$J$k>pJs\e(B</a></h2>
+
+<p>CGI \e$B$K4X$9$k>pJs$O%&%'%V$G?tB?$/Ds6!$5$l$F$$$^$9!#\e(BCGI \e$B$NLdBj$K$D$$$F$O\e(B
+Usenet \e$B$N\e(B comp.infosystems.www.authoring.cgi \e$B$G!"B>$N%f!<%6$H\e(B
+\e$BO@5D$9$k$3$H$,$G$-$^$9!#\e(BHTML Writers Guide \e$B$N\e(B -servers\e$B%a!<%j%s%0%j%9%H\e(B
+\e$B$O!"$"$J$?$N<ALd$K2sEz$7$F$/$l$k0NBg$J%j%=!<%9$G$9!#\e(B
+<a href="http://www.hwg.org/lists/hwg-servers/">http://www.hwg.org/lists/hwg-servers/</a>
+\e$B$G99$KB?$/$rC5$7=P$9$3$H$,\e(B
+\e$B$G$-$^$9!#\e(B</p>
+
+<p>\e$B$=$7$F$b$A$m$s!"$*$=$i$/\e(B CGI \e$B%W%m%0%i%`$NF0:n$K4X$9$k>\:Y$N\e(B
+\e$BA4$F$,5-=R$5$l$F$$$k\e(B CGI \e$B$N;EMM$rFI$`$Y$-$G$9!#%*%j%8%J%k%P!<%8%g%s$r\e(B
+<a href="http://hoohoo.ncsa.uiuc.edu/cgi/interface.html">NCSA</a> \e$B$G!"\e(B
+\e$B%"%C%W%G!<%H$5$l$?%I%i%U%H$r\e(B
+<a href="http://web.golux.com/coar/cgi/">Common Gateway Interface RFC
+\e$B%W%m%8%'%/%H\e(B</a>\e$B$G;2>H$9$k$3$H$,$G$-$^$9!#\e(B</p>
+
+<p>CGI \e$B$NLdBj$K$D$$$F!"2C$o$C$F$$$k%a!<%j%s%0%j%9%H$^$?$O%K%e!<%9\e(B
+\e$B%0%k!<%W$K<ALd$rAw$k$H$-!"5/$3$C$?$b$N!"5/$3$C$F$[$7$$$3$H!"\e(B
+\e$B<B:]$K5/$3$C$?$3$H$,$I$&0c$&$+!";HMQ$7$F$$$k%5!<%P!"\e(B
+CGI \e$B%W%m%0%i%`$r5-=R$7$F$$$k8@8l$K4X$9$k==J,$J>pJs$H!"\e(B
+\e$B2DG=$G$"$l$PLdBj$N%3!<%I$rDs6!$9$k$h$&$K$7$F$/$@$5$$!#\e(B
+\e$B$=$&$9$k$3$H$G!"LdBj$,$h$j4VC1$K8+$D$+$k$h$&$K$J$j$^$9!#\e(B</p>
+
+<p>Apache \e$B$N%=!<%9%3!<%I$K$*$$$FLdBj$rH/8+$7$?$3$H$r3N?.$7$F$$$J$$\e(B
+\e$B8B$j!"\e(BCGI \e$B$NLdBj$K4X$9$k<ALd$r\e(B Apache \e$B%P%0%G!<%?%Y!<%9$KAw$k$Y$-$G$J$$\e(B
+\e$B$3$H$KCmL\$7$F$/$@$5$$!#\e(B</p>
+
+<!--#include virtual="footer.html" -->
+
+</body>
+</html>
+