~ubuntu-branches/ubuntu/intrepid/apache2/intrepid

« back to all changes in this revision

Viewing changes to docs/manual/mod/mod_alias.html.en

  • Committer: Bazaar Package Importer
  • Author(s): Stefan Fritsch, Stefan Fritsch, Peter Samuelson
  • Date: 2007-07-01 19:57:51 UTC
  • mfrom: (0.8.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20070701195751-kcags6dpm5up3li5
Tags: 2.2.4-1
[ Stefan Fritsch ]
* Urgency medium for security fix
* Fix CVE-2007-1863: DoS in mod_cache
* New upstream version (Closes: #427050)
  - Fixes "proxy: error reading status line from remote server"
    (Closes: #410331)
* Fix CVE-2007-1862: mod_mem_cache DoS (introduced in 2.2.4)
* Change logrotate script to use reload instead of restart.
  (Closes: #298689)
* chmod o-rx /var/log/apache2 (Closes: #291841)
* chmod o-x suexec (Closes: #431048)
* Update patch for truncated mod_cgi 500 responses from upstream SVN
  (Closes: #412580)
* Don't use AddDefaultCharset for our docs (Closes: #414429)
* fix options syntax in sites-available/default (Closes: #419539)
* Move conf.d include to the end of apache2.conf (Closes: #305933)
* Remove log, cache, and lock files on purge (Closes: #428887)
* Ship /usr/lib/cgi-bin (Closes: #415698)
* Add note to README.Debian how to read docs (Closes: #350822)
* Document pid file name (Closes: #350286)
* Update Standards-Version (no changes needed)
* Fix some lintian warnings, add some overrides
* Start apache when doing a "restart" even if it was not running
  (Closes: #384682)
* reload config in apache2-doc postinst (Closes: #289289)
* don't fail in prerm if apache is not running (Closes: #418536)
* Suggest apache2-doc and www-browser (Closes: #399056)
* Make init script always display a warning if NO_START=1 since
  VERBOSE=yes is not the default anymore (Closes: #430116)
* Replace apache2(8) man page with a more current version
* Add httxt2dbm(8) man page
* Show -X option in help message (Closes: #391817)
* remove sick-hack-to-update-modules
* don't depend on procps on hurd (Closes: #431125)

[ Peter Samuelson ]
* Add shlibs:Depends to apache2.2-common.

Show diffs side-by-side

added added

removed removed

Lines of Context:
118
118
    be stored in the local filesystem other than under the 
119
119
    <code class="directive"><a href="../mod/core.html#documentroot">DocumentRoot</a></code>. URLs with a
120
120
    (%-decoded) path beginning with <var>url-path</var> will be mapped
121
 
    to local files beginning with <var>directory-path</var>.</p>
 
121
    to local files beginning with <var>directory-path</var>.  The 
 
122
    <var>url-path</var> is case-sensitive, even on case-insenitive 
 
123
    file systems.</p>
122
124
 
123
125
    <div class="example"><h3>Example:</h3><p><code>
124
126
      Alias /image /ftp/pub/image
184
186
      AliasMatch ^/icons(.*) /usr/local/apache/icons$1
185
187
    </code></p></div>
186
188
 
 
189
    <p>It is also possible to construct an alias with case-insensitive
 
190
    matching of the url-path:</p>
 
191
 
 
192
    <div class="example"><p><code>
 
193
      AliasMatch (?i)^/image(.*) /ftp/pub/image$1
 
194
    </code></p></div>
 
195
 
 
196
 
187
197
</div>
188
198
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
189
199
<div class="directive-section"><h2><a name="Redirect" id="Redirect">Redirect</a> <a name="redirect" id="redirect">Directive</a></h2>
200
210
    <p>The Redirect directive maps an old URL into a new one by asking
201
211
    the client to refetch the resource at the new location.</p>
202
212
 
203
 
    <p>The old <em>URL-path</em> is a (%-decoded) path beginning with
204
 
    a slash.  A relative path is not allowed.  The new <em>URL</em>
205
 
    should be an absolute URL beginning with a scheme and hostname,
206
 
    but a URL-path beginning with a slash may also be used, in which
207
 
    case the scheme and hostname of the current server will be
208
 
    added.</p>
 
213
    <p>The old <em>URL-path</em> is a case-sensitive (%-decoded) path
 
214
    beginning with a slash.  A relative path is not allowed.  The new
 
215
    <em>URL</em> should be an absolute URL beginning with a scheme and
 
216
    hostname, but a URL-path beginning with a slash may also be used,
 
217
    in which case the scheme and hostname of the current server will
 
218
    be added.</p>
209
219
 
210
220
    <p>Then any request beginning with <em>URL-Path</em> will return a
211
221
    redirect request to the client at the location of the target
342
352
    <p>The <code class="directive">ScriptAlias</code> directive has the same
343
353
    behavior as the <code class="directive"><a href="#alias">Alias</a></code>
344
354
    directive, except that in addition it marks the target directory
345
 
    as containing CGI scripts that will be processed by <code class="module"><a href="../mod/mod_cgi.html">mod_cgi</a></code>'s cgi-script handler. URLs with a
 
355
    as containing CGI scripts that will be processed by <code class="module"><a href="../mod/mod_cgi.html">mod_cgi</a></code>'s cgi-script handler. URLs with a case-sensitive
346
356
    (%-decoded) path beginning with <var>URL-path</var> will be mapped
347
 
    to scripts beginning with the second argument which is a full
 
357
    to scripts beginning with the second argument, which is a full
348
358
    pathname in the local filesystem.</p>
349
359
 
350
360
    <div class="example"><h3>Example:</h3><p><code>
352
362
    </code></p></div>
353
363
 
354
364
    <p>A request for <code>http://myserver/cgi-bin/foo</code> would cause the
355
 
    server to run the script <code>/web/cgi-bin/foo</code>.</p>
356
 
 
 
365
    server to run the script <code>/web/cgi-bin/foo</code>.  This configuration
 
366
    is essentially equivalent to:</p>
 
367
    <div class="example"><p><code>
 
368
      Alias /cgi-bin/ /web/cgi-bin/<br />
 
369
      &lt;Location /cgi-bin &gt;<br />
 
370
      <span class="indent">
 
371
      SetHandler cgi-script<br />
 
372
      Options +ExecCGI<br />
 
373
      </span>
 
374
      &lt;/Location&gt;
 
375
    </code></p></div>
 
376
 
 
377
    <div class="warning">It is safer to avoid placing CGI scripts under the
 
378
    <code class="directive"><a href="../mod/core.html#documentroot">DocumentRoot</a></code> in order to
 
379
    avoid accidentally revealing their source code if the
 
380
    configuration is ever changed.  The
 
381
    <code class="directive">ScriptAlias</code> makes this easy by mapping a
 
382
    URL and designating CGI scripts at the same time.  If you do
 
383
    choose to place your CGI scripts in a directory already
 
384
    accessible from the web, do not use
 
385
    <code class="directive">ScriptAlias</code>.  Instead, use <code class="directive"><a href="../mod/core.html#directory">&lt;Directory&gt;</a></code>, <code class="directive"><a href="../mod/core.html#sethandler">SetHandler</a></code>, and <code class="directive"><a href="../mod/core.html#options">Options</a></code> as in:
 
386
    <div class="example"><p><code>
 
387
      &lt;Directory /usr/local/apache2/htdocs/cgi-bin &gt;<br />
 
388
      <span class="indent">
 
389
      SetHandler cgi-script<br />
 
390
      Options ExecCGI<br />
 
391
      </span>
 
392
      &lt;/Directory&gt;
 
393
    </code></p></div>
 
394
    This is necessary since multiple <var>URL-paths</var> can map
 
395
    to the same filesystem location, potentially bypassing the
 
396
    <code class="directive">ScriptAlias</code> and revealing the source code
 
397
    of the CGI scripts if they are not restricted by a 
 
398
    <code class="directive"><a href="../mod/core.html#directory">Directory</a></code> section.</div>
 
399
 
 
400
 
 
401
<h3>See also</h3>
 
402
<ul>
 
403
<li><a href="../howto/cgi.html">CGI Tutorial</a></li>
 
404
</ul>
357
405
</div>
358
406
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
359
407
<div class="directive-section"><h2><a name="ScriptAliasMatch" id="ScriptAliasMatch">ScriptAliasMatch</a> <a name="scriptaliasmatch" id="scriptaliasmatch">Directive</a></h2>