[deployment-guide/comm-rel: 544/727] Updated the ScriptAlias directive description.

Jaromir Hradilek jhradile at fedoraproject.org
Tue Oct 19 13:10:41 UTC 2010


commit 4cd77baa7d2aceaae9cde4fdbe01b95200cbb118
Author: Jaromir Hradilek <jhradile at redhat.com>
Date:   Wed Sep 1 14:00:34 2010 +0200

    Updated the ScriptAlias directive description.

 en-US/The_Apache_HTTP_Server.xml |   52 +++++++++++++++++++++++--------------
 1 files changed, 32 insertions(+), 20 deletions(-)
---
diff --git a/en-US/The_Apache_HTTP_Server.xml b/en-US/The_Apache_HTTP_Server.xml
index cb74f25..ba38f02 100644
--- a/en-US/The_Apache_HTTP_Server.xml
+++ b/en-US/The_Apache_HTTP_Server.xml
@@ -453,10 +453,10 @@ AddIcon /icons/blank.png ^^BLANKICON^^</screen>
             </para>
             <screen>Alias <replaceable>url-path</replaceable> <replaceable>real-path</replaceable></screen>
             <para>
-              The <replaceable>url-path</replaceable> refers to an existing icon file, and must be relative to the directory specified by the <option>DocumentRoot</option> directive (for example, <literal>/images/</literal>). The <replaceable>real-path</replaceable> is a full path to a file or directory in the local file system.
+              The <replaceable>url-path</replaceable> must be relative to the directory specified by the <option>DocumentRoot</option> directive (for example, <literal>/images/</literal>). The <replaceable>real-path</replaceable> is a full path to a file or directory in the local file system.
             </para>
             <para>
-              This directive is typically followed by the <literal>Directory</literal> tag with additional permissions to access the target directory. By default, the <literal>/icons/</literal> alias is created, so that the icons from <filename class="directory">/var/www/icons/</filename> are displayed in server-generated directory listings.
+              This directive is typically followed by the <option>Directory</option> tag with additional permissions to access the target directory. By default, the <literal>/icons/</literal> alias is created so that the icons from <filename class="directory">/var/www/icons/</filename> are displayed in server-generated directory listings.
             </para>
             <example id="example-apache-httpdconf-alias">
               <title>Using the <option>Alias</option> directive</title>
@@ -1774,6 +1774,35 @@ ErrorDocument 404 /404-not_found.html</screen>
             </example>
           </listitem>
         </varlistentry>
+        <varlistentry>
+          <term><option>ScriptAlias</option></term>
+          <listitem>
+            <para>
+              The <option>ScriptAlias</option> directive allows you to specify the location of CGI scripts. It takes the following form:
+            </para>
+            <screen>ScriptAlias <replaceable>url-path</replaceable> <replaceable>real-path</replaceable></screen>
+            <para>
+              The <replaceable>url-path</replaceable> must be relative to the directory specified by the <option>DocumentRoot</option> directive (for example, <literal>/cgi-bin/</literal>). The <replaceable>real-path</replaceable> is a full path to a file or directory in the local file system.
+            </para>
+            <para>
+              This directive is typically followed by the <option>Directory</option> tag with additional permissions to access the target directory. By default, the <literal>/cgi-bin/</literal> alias is created so that the scripts located in the <filename class="directory">/var/www/cgi-bin/</filename> are accessible.
+            </para>
+            <para>
+              The <option>ScriptAlias</option> directive is used for security reasons to prevent CGI scripts from being viewed as ordinary text documents.
+            </para>
+            <example id="example-apache-httpdconf-scriptalias">
+              <title>Using the <option>ScriptAlias</option> directive</title>
+              <screen>ScriptAlias /cgi-bin/ /var/www/cgi-bin/
+
+&lt;Directory "/var/www/cgi-bin"&gt;
+  AllowOverride None
+  Options None
+  Order allow,deny
+  Allow from all
+&lt;/Directory&gt;</screen>
+            </example>
+          </listitem>
+        </varlistentry>
       </variablelist>
       <formalpara id="s2-apache-indexoptions">
         <title>IndexOptions</title>
@@ -1801,23 +1830,6 @@ ErrorDocument 404 /404-not_found.html</screen>
       <para>
         <command>IndexOptions</command> has a number of other parameters which can be set to control the appearance of server generated directories. The <command>IconHeight</command> and <command>IconWidth</command> parameters require the server to include HTML <command>HEIGHT</command> and <command>WIDTH</command> tags for the icons in server generated webpages. The <command>IconsAreLinks</command> parameter combines the graphical icon with the HTML link anchor, which contains the URL link target.
       </para>
-      <formalpara id="s2-apache-scriptalias">
-        <title>ScriptAlias</title>
-        <indexterm>
-          <primary><command>ScriptAlias</command></primary>
-          <secondary>Apache configuration directive</secondary>
-        </indexterm>
-        <indexterm>
-          <primary>configuration directives, Apache</primary>
-          <secondary><command>ScriptAlias</command></secondary>
-        </indexterm>
-        <para>
-          The <command>ScriptAlias</command> directive defines where CGI scripts are located. Generally, it is not good practice to leave CGI scripts within the <command>DocumentRoot</command>, where they can potentially be viewed as text documents. For this reason, a special directory outside of the <command>DocumentRoot</command> directory containing server-side executables and scripts is designated by the <command>ScriptAlias</command> directive. This directory is known as a <filename>cgi-bin</filename> and is set to <filename>/var/www/cgi-bin/</filename> by default.
-        </para>
-      </formalpara>
-      <para>
-        It is possible to establish directories for storing executables outside of the <filename>cgi-bin/</filename> directory. <!-- For instructions on doing so, refer to <xref linkend="s2-apache-addhandler" /> and <xref linkend="s2-apache-directory" />. -->
-      </para>
       <formalpara id="s2-apache-serveradmin">
         <title>ServerAdmin</title>
         <indexterm>
@@ -2092,7 +2104,7 @@ ErrorDocument 404 /404-not_found.html</screen>
         <secondary>allowing execution outside <filename>cgi-bin</filename></secondary>
       </indexterm>
       <para>
-        The <command>Directory</command> container can be also be used to configure additional <filename>cgi-bin</filename> directories for server-side applications outside of the directory specified in the <command>ScriptAlias</command> directive (refer to <xref linkend="s2-apache-scriptalias" /> for more information).
+        The <command>Directory</command> container can be also be used to configure additional <filename>cgi-bin</filename> directories for server-side applications outside of the directory specified in the <command>ScriptAlias</command> directive<!-- (refer to <xref linkend="s2-apache-scriptalias" /> for more information) -->.
       </para>
       <para>
         To accomplish this, the <command>Directory</command> container must set the <command>ExecCGI</command> option for that directory.


More information about the docs-commits mailing list