diff options
-rw-r--r-- | docs/manual/howto/cgi.html.en | 63 | ||||
-rw-r--r-- | docs/manual/howto/cgi.xml | 56 |
2 files changed, 57 insertions, 62 deletions
diff --git a/docs/manual/howto/cgi.html.en b/docs/manual/howto/cgi.html.en index f02e9c2c65..73f20f2151 100644 --- a/docs/manual/howto/cgi.html.en +++ b/docs/manual/howto/cgi.html.en @@ -65,9 +65,10 @@ directive has not been commented out. A correctly configured directive may look like this: - <div class="example"><p><code> + <pre class="prettyprint lang-config"> LoadModule cgi_module modules/mod_cgi.so - </code></p></div></div> + </pre> +</div> <h3><a name="scriptalias" id="scriptalias">ScriptAlias</a></h3> @@ -84,9 +85,10 @@ <p>The <code class="directive"><a href="../mod/mod_alias.html#scriptalias">ScriptAlias</a></code> directive looks like:</p> - <div class="example"><p><code> + <pre class="prettyprint lang-config"> ScriptAlias /cgi-bin/ /usr/local/apache2/cgi-bin/ - </code></p></div> + </pre> + <p>The example shown is from your default <code>httpd.conf</code> configuration file, if you installed Apache in the default @@ -139,13 +141,12 @@ file, to specify that CGI execution was permitted in a particular directory:</p> - <div class="example"><p><code> - <Directory /usr/local/apache2/htdocs/somedir><br /> - <span class="indent"> - Options +ExecCGI<br /> - </span> - </Directory> - </code></p></div> + <pre class="prettyprint lang-config"> +<Directory /usr/local/apache2/htdocs/somedir> + Options +ExecCGI +</Directory> + </pre> + <p>The above directive tells Apache to permit the execution of CGI files. You will also need to tell the server what @@ -153,9 +154,10 @@ files with the <code>cgi</code> or <code>pl</code> extension as CGI programs:</p> - <div class="example"><p><code> + <pre class="prettyprint lang-config"> AddHandler cgi-script .cgi .pl - </code></p></div> + </pre> + <h3><a name="htaccess" id="htaccess">.htaccess files</a></h3> @@ -173,27 +175,25 @@ <code>.cgi</code> in users' directories, you can use the following configuration.</p> - <div class="example"><p><code> - <Directory /home/*/public_html><br /> - <span class="indent"> - Options +ExecCGI<br /> - AddHandler cgi-script .cgi<br /> - </span> - </Directory> - </code></p></div> + <pre class="prettyprint lang-config"> +<Directory /home/*/public_html> + Options +ExecCGI + AddHandler cgi-script .cgi +</Directory> + </pre> + <p>If you wish designate a <code>cgi-bin</code> subdirectory of a user's directory where everything will be treated as a CGI program, you can use the following.</p> - <div class="example"><p><code> - <Directory /home/*/public_html/cgi-bin><br /> - <span class="indent"> - Options ExecCGI<br /> - SetHandler cgi-script<br /> - </span> - </Directory> - </code></p></div> + <pre class="prettyprint lang-config"> +<Directory /home/*/public_html/cgi-bin> + Options ExecCGI + SetHandler cgi-script +</Directory> + </pre> + @@ -340,9 +340,10 @@ print "Hello, World."; interpreter (often <code>perl</code>) indicated in the first line of your CGI program, which will look something like:</p> - <div class="example"><p><code> + <pre class="prettyprint lang-perl"> #!/usr/bin/perl - </code></p></div> + </pre> + <p>Make sure that this is in fact the path to the interpreter.</p> diff --git a/docs/manual/howto/cgi.xml b/docs/manual/howto/cgi.xml index a2e0840f4a..fcd70e6c5d 100644 --- a/docs/manual/howto/cgi.xml +++ b/docs/manual/howto/cgi.xml @@ -64,9 +64,9 @@ directive has not been commented out. A correctly configured directive may look like this: - <example> + <highlight language="config"> LoadModule cgi_module modules/mod_cgi.so - </example></note> + </highlight></note> <section id="scriptalias"> <title>ScriptAlias</title> @@ -83,9 +83,9 @@ <p>The <directive module="mod_alias">ScriptAlias</directive> directive looks like:</p> - <example> + <highlight language="config"> ScriptAlias /cgi-bin/ /usr/local/apache2/cgi-bin/ - </example> + </highlight> <p>The example shown is from your default <code>httpd.conf</code> configuration file, if you installed Apache in the default @@ -145,13 +145,11 @@ file, to specify that CGI execution was permitted in a particular directory:</p> - <example> - <Directory /usr/local/apache2/htdocs/somedir><br /> - <indent> - Options +ExecCGI<br /> - </indent> - </Directory> - </example> + <highlight language="config"> +<Directory /usr/local/apache2/htdocs/somedir> + Options +ExecCGI +</Directory> + </highlight> <p>The above directive tells Apache to permit the execution of CGI files. You will also need to tell the server what @@ -160,9 +158,9 @@ files with the <code>cgi</code> or <code>pl</code> extension as CGI programs:</p> - <example> + <highlight language="config"> AddHandler cgi-script .cgi .pl - </example> + </highlight> </section> <section id="htaccess"> @@ -180,27 +178,23 @@ <code>.cgi</code> in users' directories, you can use the following configuration.</p> - <example> - <Directory /home/*/public_html><br/> - <indent> - Options +ExecCGI<br/> - AddHandler cgi-script .cgi<br/> - </indent> - </Directory> - </example> + <highlight language="config"> +<Directory /home/*/public_html> + Options +ExecCGI + AddHandler cgi-script .cgi +</Directory> + </highlight> <p>If you wish designate a <code>cgi-bin</code> subdirectory of a user's directory where everything will be treated as a CGI program, you can use the following.</p> - <example> - <Directory /home/*/public_html/cgi-bin><br/> - <indent> - Options ExecCGI<br/> - SetHandler cgi-script<br/> - </indent> - </Directory> - </example> + <highlight language="config"> +<Directory /home/*/public_html/cgi-bin> + Options ExecCGI + SetHandler cgi-script +</Directory> + </highlight> </section> @@ -346,9 +340,9 @@ print "Hello, World."; interpreter (often <code>perl</code>) indicated in the first line of your CGI program, which will look something like:</p> - <example> + <highlight language="perl"> #!/usr/bin/perl - </example> + </highlight> <p>Make sure that this is in fact the path to the interpreter.</p> |