Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

This commit was manufactured by cvs2svn to create tag

'APACHE_2_0_ALPHA_8'.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/tags/APACHE_2_0_ALPHA_8@87038 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
commit c0cfb725c790190eb9d44418dbdc846a13974bc3 1 parent dab7ff0
No Author authored

Showing 48 changed files with 0 additions and 13,065 deletions. Show diff stats Hide diff stats

  1. +0 300 build/binbuild.sh
  2. BIN  docs/docroot/apache_pb.gif
  3. +0 135 docs/manual/bind.html.en
  4. +0 93 docs/manual/cgi_path.html.en
  5. +0 242 docs/manual/configuring.html.en
  6. +0 588 docs/manual/content-negotiation.html.en
  7. +0 177 docs/manual/custom-error.html.en
  8. +0 1,153 docs/manual/developer/API.html
  9. +0 200 docs/manual/developer/modules.html.en
  10. +0 393 docs/manual/dso.html.en
  11. +0 156 docs/manual/handler.html.en
  12. +0 174 docs/manual/index.html.en
  13. +0 270 docs/manual/install.html.en
  14. +0 144 docs/manual/invoking.html.en
  15. +0 265 docs/manual/mod/directive-dict.html.en
  16. +0 144 docs/manual/mod/module-dict.html.en
  17. +0 96 docs/manual/mpm.html.en
  18. +0 79 docs/manual/new_features_2_0.html.en
  19. +0 278 docs/manual/platform/netware.html
  20. +0 254 docs/manual/platform/perf-bsd44.html
  21. +0 285 docs/manual/platform/perf-dec.html
  22. +0 122 docs/manual/platform/perf-hp.html
  23. +0 175 docs/manual/platform/perf.html
  24. +0 208 docs/manual/platform/readme-tpf.html
  25. +0 62 docs/manual/platform/unixware.html
  26. +0 182 docs/manual/platform/win_compiling.html
  27. +0 325 docs/manual/platform/win_service.html
  28. +0 511 docs/manual/platform/windows.html
  29. +0 170 docs/manual/sections.html.en
  30. +0 217 docs/manual/server-wide.html.en
  31. +0 183 docs/manual/stopping.html.en
  32. +0 518 docs/manual/suexec.html.en
  33. +0 94 docs/manual/upgrading.html.en
  34. +0 59 docs/manual/vhosts/fd-limits.html.en
  35. +0 65 docs/manual/vhosts/index.html.en
  36. +0 169 docs/manual/vhosts/name-based.html.en
  37. +0 553 httpd.dsp
  38. +0 440 libhttpd.def
  39. +0 100 libhttpd.dsp
  40. +0 1,294 modules/arch/win32/mod_isapi.c
  41. +0 10 os/win32/libhttpd.c
  42. +0 5 server/mpm/experimental/perchild/.cvsignore
  43. +0 5 server/mpm/experimental/perchild/Makefile.in
  44. +0 88 server/mpm/experimental/perchild/mpm.h
  45. +0 144 server/mpm/experimental/perchild/mpm_default.h
  46. +0 1,765 server/mpm/experimental/perchild/perchild.c
  47. +0 51 srclib/expat-lite/libexpat.def
  48. +0 124 srclib/expat-lite/libexpat.dsp
300 build/binbuild.sh
... ... @@ -1,300 +0,0 @@
1   -#!/bin/sh
2   -#
3   -# binbuild.sh - Builds an Apache binary distribution.
4   -# Initially written by Lars Eilebrecht <lars@apache.org>.
5   -#
6   -# This script falls under the Apache License.
7   -# See http://www.apache.org/docs/LICENSE
8   -
9   -OS=`src/helpers/GuessOS`
10   -case "x$OS" in
11   - x*390*) CONFIGPARAM="--with-layout=BinaryDistribution --enable-module=most";;
12   - *) CONFIGPARAM="--with-layout=BinaryDistribution --enable-module=most --enable-shared=max";;
13   -esac
14   -APDIR=`pwd`
15   -APDIR=`basename $APDIR`
16   -VER=`echo $APDIR |sed s/apache_//`
17   -TAR="`src/helpers/PrintPath tar`"
18   -GTAR="`src/helpers/PrintPath gtar`"
19   -GZIP="`src/helpers/PrintPath gzip`"
20   -
21   -if [ x$1 != x ]
22   -then
23   - USER=$1
24   -else
25   - USER="`src/helpers/buildinfo.sh -n %u@%h%d`"
26   -fi
27   -
28   -if [ ! -f ./ABOUT_APACHE ]
29   -then
30   - echo "ERROR: The current directory contains no valid Apache distribution."
31   - echo "Please change the directory to the top level directory of a freshly"
32   - echo "unpacked Apache 1.3 source distribution and re-execute the script"
33   - echo "'./src/helpers/bindbuild.sh'."
34   - exit 1;
35   -fi
36   -
37   -if [ -d ./CVS ]
38   -then
39   - echo "ERROR: The current directory is a CVS checkout of Apache."
40   - echo "Only a standard Apache 1.3 source distribution should be used to"
41   - echo "create a binary distribution."
42   - exit 1;
43   -fi
44   -
45   -echo "Building Apache $VER binary distribution..."
46   -echo "Platform is \"$OS\"..."
47   -
48   -( echo "Build log for Apache binary distribution" && \
49   - echo "----------------------------------------------------------------------" && \
50   - ./configure $CONFIGPARAM && \
51   - echo "----------------------------------------------------------------------" && \
52   - make clean && \
53   - rm -rf bindist install-bindist.sh *.bindist
54   - echo "----------------------------------------------------------------------" && \
55   - make && \
56   - echo "----------------------------------------------------------------------" && \
57   - make install-quiet root="bindist/" && \
58   - echo "----------------------------------------------------------------------" && \
59   - make clean && \
60   - echo "----------------------------------------------------------------------" && \
61   - echo "[EOF]" \
62   -) > build.log 2>&1
63   -
64   -if [ ! -f ./bindist/bin/httpd ]
65   -then
66   - echo "ERROR: Failed to build Apache. See \"build.log\" for details."
67   - exit 1;
68   -fi
69   -
70   -echo "Binary image successfully created..."
71   -
72   -./bindist/bin/httpd -v
73   -
74   -echo "Creating supplementary files..."
75   -
76   -( echo " " && \
77   - echo "Apache $VER binary distribution" && \
78   - echo "================================" && \
79   - echo " " && \
80   - echo "This binary distribution is usable on a \"$OS\"" && \
81   - echo "system and was built by \"$USER\"." && \
82   - echo "" && \
83   - echo "The distribution contains all standard Apache modules as shared" && \
84   - echo "objects. This allows you to enable or disable particular modules" && \
85   - echo "with the LoadModule/AddModule directives in the configuration file" && \
86   - echo "without the need to re-compile Apache." && \
87   - echo "" && \
88   - echo "See \"INSTALL.bindist\" on how to install the distribution." && \
89   - echo " " && \
90   - echo "NOTE: Please do not send support-related mails to the address mentioned" && \
91   - echo " above or to any member of the Apache Group! Support questions" && \
92   - echo " should be directed to the \"comp.infosystems.www.servers.unix\"" && \
93   - echo " or \"comp.infosystems.www.servers.ms-windows\" newsgroup" && \
94   - echo " (as appropriate for the platform you use), where some of the" && \
95   - echo " Apache team lurk, in the company of many other Apache gurus" && \
96   - echo " who should be able to help." && \
97   - echo " If you think you found a bug in Apache or have a suggestion please" && \
98   - echo " visit the bug report page at http://www.apache.org/bug_report.html" && \
99   - echo " " && \
100   - echo "----------------------------------------------------------------------" && \
101   - ./bindist/bin/httpd -V && \
102   - echo "----------------------------------------------------------------------" \
103   -) > README.bindist
104   -cp README.bindist ../apache_$VER-$OS.README
105   -
106   -( echo " " && \
107   - echo "Apache $VER binary installation" && \
108   - echo "================================" && \
109   - echo " " && \
110   - echo "To install this binary distribution you have to execute the installation" && \
111   - echo "script \"install-bindist.sh\" in the top-level directory of the distribution." && \
112   - echo " " && \
113   - echo "The script takes the ServerRoot directory into which you want to install" && \
114   - echo "Apache as an option. If you ommit the option the default path" && \
115   - echo "\"/usr/local/apache\" is used." && \
116   - echo "Make sure you have write permissions in the target directory, e.g. switch" && \
117   - echo "to user \"root\" before you execute the script." && \
118   - echo " " && \
119   - echo "See \"README.bindist\" for further details about this distribution." && \
120   - echo " " && \
121   - echo "Please note that this distribution includes the complete Apache source code." && \
122   - echo "Therefore you may compile Apache yourself at any time if you have a compiler" && \
123   - echo "installation on your system." && \
124   - echo "See \"INSTALL\" for details on how to accomplish this." && \
125   - echo " " \
126   -) > INSTALL.bindist
127   -
128   -( echo "#!/bin/sh" && \
129   - echo "#" && \
130   - echo "# Usage: install-bindist.sh [ServerRoot]" && \
131   - echo "# This script installs the Apache binary distribution and" && \
132   - echo "# was automatically created by binbuild.sh." && \
133   - echo " " && \
134   - echo "lmkdir()" && \
135   - echo "{" && \
136   - echo " path=\"\"" && \
137   - echo " dirs=\`echo \$1 | sed -e 's%/% %g'\`" && \
138   - echo " mode=\$2" && \
139   - echo " " && \
140   - echo " set -- \${dirs}" && \
141   - echo " " && \
142   - echo " for d in \${dirs}" && \
143   - echo " do" && \
144   - echo " path=\"\${path}/\$d\"" && \
145   - echo " if test ! -d \"\${path}\" ; then" && \
146   - echo " mkdir \${path}" && \
147   - echo " if test \$? -ne 0 ; then" && \
148   - echo " echo \"Failed to create directory: \${path}\"" && \
149   - echo " exit 1" && \
150   - echo " fi" && \
151   - echo " chmod \${mode} \${path}" && \
152   - echo " fi" && \
153   - echo " done" && \
154   - echo "}" && \
155   - echo " " && \
156   - echo "lcopy()" && \
157   - echo "{" && \
158   - echo " from=\$1" && \
159   - echo " to=\$2" && \
160   - echo " dmode=\$3" && \
161   - echo " fmode=\$4" && \
162   - echo " " && \
163   - echo " test -d \${to} || lmkdir \${to} \${dmode}" && \
164   - echo " (cd \${from} && tar -cf - *) | (cd \${to} && tar -xf -)" && \
165   - echo " " && \
166   - echo " if test \"X\${fmode}\" != X ; then" && \
167   - echo " find \${to} -type f -print | xargs chmod \${fmode}" && \
168   - echo " fi" && \
169   - echo " if test \"X\${dmode}\" != X ; then" && \
170   - echo " find \${to} -type d -print | xargs chmod \${dmode}" && \
171   - echo " fi" && \
172   - echo "}" && \
173   - echo " " && \
174   - echo "##" && \
175   - echo "## determine path to (optional) Perl interpreter" && \
176   - echo "##" && \
177   - echo "PERL=no-perl5-on-this-system" && \
178   - echo "perls='perl5 perl'" && \
179   - echo "path=\`echo \$PATH | sed -e 's/:/ /g'\`" && \
180   - echo " " && \
181   - echo "for dir in \${path} ; do" && \
182   - echo " for pperl in \${perls} ; do" && \
183   - echo " if test -f \"\${dir}/\${pperl}\" ; then" && \
184   - echo " if \`\${dir}/\${pperl} -v | grep 'version 5\.' >/dev/null 2>&1\` ; then" && \
185   - echo " PERL=\"\${dir}/\${pperl}\"" && \
186   - echo " break" && \
187   - echo " fi" && \
188   - echo " fi" && \
189   - echo " done" && \
190   - echo "done" && \
191   - echo " " && \
192   - echo "if [ .\$1 = . ]" && \
193   - echo "then" && \
194   - echo " SR=/usr/local/apache" && \
195   - echo "else" && \
196   - echo " SR=\$1" && \
197   - echo "fi" && \
198   - echo "echo \"Installing binary distribution for platform $OS\"" && \
199   - echo "echo \"into directory \$SR ...\"" && \
200   - echo "lmkdir \$SR 755" && \
201   - echo "lmkdir \$SR/proxy 750" && \
202   - echo "lmkdir \$SR/logs 750" && \
203   - echo "lcopy bindist/man \$SR/man 755 644" && \
204   - echo "lcopy bindist/libexec \$SR/libexec 750 644" && \
205   - echo "lcopy bindist/include \$SR/include 755 644" && \
206   - echo "lcopy bindist/icons \$SR/icons 755 644" && \
207   - echo "lcopy bindist/cgi-bin \$SR/cgi-bin 750 750" && \
208   - echo "lcopy bindist/bin \$SR/bin 750 750" && \
209   - echo "if [ -d \$SR/conf ]" && \
210   - echo "then" && \
211   - echo " echo \"[Preserving existing configuration files.]\"" && \
212   - echo " cp bindist/conf/*.default \$SR/conf/" && \
213   - echo "else" && \
214   - echo " lcopy bindist/conf \$SR/conf 750 640" && \
215   - echo "fi" && \
216   - echo "if [ -d \$SR/htdocs ]" && \
217   - echo "then" && \
218   - echo " echo \"[Preserving existing htdocs directory.]\"" && \
219   - echo "else" && \
220   - echo " lcopy bindist/htdocs \$SR/htdocs 755 644" && \
221   - echo "fi" && \
222   - echo " " && \
223   - echo "sed -e \"s;^#!/.*;#!\$PERL;\" -e \"s;\@prefix\@;\$SR;\" -e \"s;\@sbindir\@;\$SR/bin;\" \\" && \
224   - echo " -e \"s;\@libexecdir\@;\$SR/libexec;\" -e \"s;\@includedir\@;\$SR/include;\" \\" && \
225   - echo " -e \"s;\@sysconfdir\@;\$SR/conf;\" bindist/bin/apxs > \$SR/bin/apxs" && \
226   - echo "sed -e \"s;^#!/.*;#!\$PERL;\" bindist/bin/dbmmanage > \$SR/bin/dbmmanage" && \
227   - echo "sed -e \"s%/usr/local/apache%\$SR%\" \$SR/conf/httpd.conf.default > \$SR/conf/httpd.conf" && \
228   - echo "sed -e \"s%PIDFILE=%PIDFILE=\$SR/%\" -e \"s%HTTPD=%HTTPD=\\\"\$SR/%\" -e \"s%httpd\$%httpd -d \$SR -R \$SR/libexec\\\"%\" bindist/bin/apachectl > \$SR/bin/apachectl" && \
229   - echo " " && \
230   - echo "echo \"Ready.\"" && \
231   - echo "echo \" +--------------------------------------------------------+\"" && \
232   - echo "echo \" | You now have successfully installed the Apache $VER |\"" && \
233   - echo "echo \" | HTTP server. To verify that Apache actually works |\"" && \
234   - echo "echo \" | correctly you should first check the (initially |\"" && \
235   - echo "echo \" | created or preserved) configuration files: |\"" && \
236   - echo "echo \" | |\"" && \
237   - echo "echo \" | \$SR/conf/httpd.conf\"" && \
238   - echo "echo \" | |\"" && \
239   - echo "echo \" | You should then be able to immediately fire up |\"" && \
240   - echo "echo \" | Apache the first time by running: |\"" && \
241   - echo "echo \" | |\"" && \
242   - echo "echo \" | \$SR/bin/apachectl start \"" &&\
243   - echo "echo \" | |\"" && \
244   - echo "echo \" | Thanks for using Apache. The Apache Group |\"" && \
245   - echo "echo \" | http://www.apache.org/ |\"" && \
246   - echo "echo \" +--------------------------------------------------------+\"" && \
247   - echo "echo \" \"" \
248   -) > install-bindist.sh
249   -chmod 755 install-bindist.sh
250   -
251   -sed -e "s%\"htdocs%\"/usr/local/apache/htdocs%" \
252   - -e "s%\"icons%\"/usr/local/apache/icons%" \
253   - -e "s%\"cgi-bin%\"/usr/local/apache/cgi-bin%" \
254   - -e "s%\"proxy%\"/usr/local/apache/proxy%" \
255   - -e "s%^ServerAdmin.*%ServerAdmin you@your.address%" \
256   - -e "s%#ServerName.*%#ServerName localhost%" \
257   - -e "s%Port 8080%Port 80%" \
258   - bindist/conf/httpd.conf.default > bindist/conf/httpd.conf
259   -cp bindist/conf/httpd.conf bindist/conf/httpd.conf.default
260   -
261   -echo "Creating distribution archive and readme file..."
262   -
263   -if [ ".`grep -i error build.log > /dev/null`" != . ]
264   -then
265   - echo "ERROR: Failed to build Apache. See \"build.log\" for details."
266   - exit 1;
267   -else
268   - if [ "x$GTAR" != "x" ]
269   - then
270   - $GTAR -zcf ../apache_$VER-$OS.tar.gz -C .. apache_$VER
271   - else
272   - if [ "x$TAR" != "x" ]
273   - then
274   - case "x$OS" in
275   - x*390*) $TAR -cfU ../apache_$VER-$OS.tar -C .. apache_$VER;;
276   - *) (cd .. && $TAR -cf apache_$VER-$OS.tar apache_$VER);;
277   - esac
278   - if [ "x$GZIP" != "x" ]
279   - then
280   - $GZIP ../apache_$VER-$OS.tar
281   - fi
282   - else
283   - echo "ERROR: Could not find a 'tar' program!"
284   - echo " Please execute the following commands manually:"
285   - echo " tar -cf ../apache_$VER-$OS.tar ."
286   - echo " gzip ../apache_$VER-$OS.tar"
287   - fi
288   - fi
289   -
290   - if [ -f ../apache_$VER-$OS.tar.gz ] && [ -f ../apache_$VER-$OS.README ]
291   - then
292   - echo "Ready."
293   - echo "You can find the binary archive (apache_$VER-$OS.tar.gz)"
294   - echo "and the readme file (apache_$VER-$OS.README) in the"
295   - echo "parent directory."
296   - exit 0;
297   - else
298   - exit 1;
299   - fi
300   -fi
BIN  docs/docroot/apache_pb.gif
135 docs/manual/bind.html.en
... ... @@ -1,135 +0,0 @@
1   -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
2   -<HTML><HEAD>
3   -<TITLE>Setting which addresses and ports Apache uses</TITLE>
4   -</HEAD>
5   -
6   -<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
7   -<BODY
8   - BGCOLOR="#FFFFFF"
9   - TEXT="#000000"
10   - LINK="#0000FF"
11   - VLINK="#000080"
12   - ALINK="#FF0000"
13   ->
14   -<!--#include virtual="header.html" -->
15   -<H1 ALIGN="CENTER">Setting which addresses and ports Apache uses</H1>
16   -
17   -<HR>
18   -
19   -When Apache starts, it connects to some port and address on the
20   -local machine and waits for incoming requests. By default, it
21   -listens to all addresses on the machine, and to the port
22   -as specified by the <TT>Port</TT> directive in the server configuration.
23   -However, it can be told to listen to more the one port, or to listen
24   -to only selected addresses, or a combination. This is often combined
25   -with the Virtual Host feature which determines how Apache
26   -responds to different IP addresses, hostnames and ports.<P>
27   -
28   -There are two directives used to restrict or specify which addresses
29   -and ports Apache listens to.
30   -
31   -<UL>
32   -<LI><A HREF="#bindaddress">BindAddress</A> is used to restrict the server to
33   - listening to
34   - a single address, and can be used to permit multiple Apache servers
35   - on the same machine listening to different IP addresses.
36   -<LI><A HREF="#listen">Listen</A> can be used to make a single Apache server
37   - listen
38   - to more than one address and/or port.
39   -</UL>
40   -
41   -<H3><A NAME="bindaddress">BindAddress</A></H3>
42   -<A
43   - HREF="mod/directive-dict.html#Syntax"
44   - REL="Help"
45   -><STRONG>Syntax:</STRONG></A> BindAddress <EM>[ * | IP-address
46   - | hostname ]</EM><BR>
47   -<A
48   - HREF="mod/directive-dict.html#Default"
49   - REL="Help"
50   -><STRONG>Default:</STRONG></A> <CODE>BindAddress *</CODE><BR>
51   -<A
52   - HREF="mod/directive-dict.html#Context"
53   - REL="Help"
54   -><STRONG>Context:</STRONG></A> server config<BR>
55   -<A
56   - HREF="mod/directive-dict.html#Status"
57   - REL="Help"
58   -><STRONG>Status:</STRONG></A> Core<P>
59   -
60   -Makes the server listen to just the specified address. If the argument
61   -is *, the server listens to all addresses. The port listened to
62   -is set with the <TT>Port</TT> directive. Only one BindAddress
63   -should be used.
64   -
65   -<H3><A NAME="listen">Listen</A></H3>
66   -<A
67   - HREF="mod/directive-dict.html#Syntax"
68   - REL="Help"
69   -><STRONG>Syntax:</STRONG></A> Listen <EM>[ port | IP-address:port ]</EM><BR>
70   -<A
71   - HREF="mod/directive-dict.html#Default"
72   - REL="Help"
73   -><STRONG>Default:</STRONG></A> <CODE>none</CODE><BR>
74   -<A
75   - HREF="mod/directive-dict.html#Context"
76   - REL="Help"
77   -><STRONG>Context:</STRONG></A> server config<BR>
78   -<A
79   - HREF="mod/directive-dict.html#Status"
80   - REL="Help"
81   -><STRONG>Status:</STRONG></A> Core<P>
82   -
83   -<TT>Listen</TT> can be used instead of <TT>BindAddress</TT> and
84   -<TT>Port</TT>. It tells the server to accept incoming requests on the
85   -specified port or address-and-port combination. If the first format is
86   -used, with a port number only, the server listens to the given port on
87   -all interfaces, instead of the port given by the <TT>Port</TT>
88   -directive. If an IP address is given as well as a port, the server
89   -will listen on the given port and interface. <P> Multiple Listen
90   -directives may be used to specify a number of addresses and ports to
91   -listen to. The server will respond to requests from any of the listed
92   -addresses and ports.<P>
93   -
94   -For example, to make the server accept connections on both port
95   -80 and port 8000, use:
96   -<PRE>
97   - Listen 80
98   - Listen 8000
99   -</PRE>
100   -
101   -To make the server accept connections on two specified
102   -interfaces and port numbers, use
103   -<PRE>
104   - Listen 192.170.2.1:80
105   - Listen 192.170.2.5:8000
106   -</PRE>
107   -
108   -<H2>How this works with Virtual Hosts</H2>
109   -
110   -BindAddress and Listen do not implement Virtual Hosts. They tell the
111   -main server what addresses and ports to listen to. If no
112   -&lt;VirtualHost&gt; directives are used, the server will behave the
113   -same for all accepted requests. However, &lt;VirtualHost&gt; can be
114   -used to specify a different behavior for one or more of the addresses
115   -and ports. To implement a VirtualHost, the server must first be told
116   -to listen to the address and port to be used. Then a
117   -&lt;VirtualHost&gt; section should be created for a specified address
118   -and port to set the behavior of this virtual host. Note that if the
119   -&lt;VirtualHost&gt; is set for an address and port that the server is
120   -not listening to, it cannot be accessed.
121   -
122   -<H2>See also</H2>
123   -
124   -See also the documentation on
125   -<A HREF="vhosts/index.html">Virtual Hosts</A>,
126   -<A HREF="mod/core.html#bindaddress">BindAddress directive</A>,
127   -<A HREF="mod/core.html#port">Port directive</A>,
128   -<A HREF="dns-caveats.html">DNS Issues</A>
129   -and
130   -<A HREF="mod/core.html#virtualhost">&lt;VirtualHost&gt; section</A>.
131   -
132   -<!--#include virtual="footer.html" -->
133   -</BODY>
134   -</HTML>
135   -
93 docs/manual/cgi_path.html.en
... ... @@ -1,93 +0,0 @@
1   -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
2   -<HTML><HEAD>
3   -<TITLE>PATH_INFO Changes in the CGI Environment</TITLE>
4   -</HEAD>
5   -
6   -<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
7   -<BODY
8   - BGCOLOR="#FFFFFF"
9   - TEXT="#000000"
10   - LINK="#0000FF"
11   - VLINK="#000080"
12   - ALINK="#FF0000"
13   ->
14   -<!--#include virtual="header.html" -->
15   -<H1 ALIGN="CENTER">PATH_INFO Changes in the CGI Environment</H1>
16   -
17   -<HR>
18   -
19   -<H2><A NAME="over">Overview</A></H2>
20   -
21   -<P>As implemented in Apache 1.1.1 and earlier versions, the method
22   -Apache used to create PATH_INFO in the CGI environment was
23   -counterintuitive, and could result in crashes in certain cases. In
24   -Apache 1.2 and beyond, this behavior has changed. Although this
25   -results in some compatibility problems with certain legacy CGI
26   -applications, the Apache 1.2 behavior is still compatible with the
27   -CGI/1.1 specification, and CGI scripts can be easily modified (<A
28   -HREF="#compat">see below</A>).
29   -
30   -<H2><A NAME="prob">The Problem</A></H2>
31   -
32   -<P>Apache 1.1.1 and earlier implemented the PATH_INFO and SCRIPT_NAME
33   -environment variables by looking at the filename, not the URL. While
34   -this resulted in the correct values in many cases, when the filesystem
35   -path was overloaded to contain path information, it could result in
36   -errant behavior. For example, if the following appeared in a config
37   -file:
38   -<PRE>
39   - Alias /cgi-ralph /usr/local/httpd/cgi-bin/user.cgi/ralph
40   -</PRE>
41   -<P>In this case, <CODE>user.cgi</CODE> is the CGI script, the "/ralph"
42   -is information to be passed onto the CGI. If this configuration was in
43   -place, and a request came for "<CODE>/cgi-ralph/script/</CODE>", the
44   -code would set PATH_INFO to "<CODE>/ralph/script</CODE>", and
45   -SCRIPT_NAME to "<CODE>/cgi-</CODE>". Obviously, the latter is
46   -incorrect. In certain cases, this could even cause the server to
47   -crash.</P>
48   -
49   -<H2><A NAME="solution">The Solution</A></H2>
50   -
51   -<P>Apache 1.2 and later now determine SCRIPT_NAME and PATH_INFO by
52   -looking directly at the URL, and determining how much of the URL is
53   -client-modifiable, and setting PATH_INFO to it. To use the above
54   -example, PATH_INFO would be set to "<CODE>/script</CODE>", and
55   -SCRIPT_NAME to "<CODE>/cgi-ralph</CODE>". This makes sense and results
56   -in no server behavior problems. It also permits the script to be
57   -guaranteed that
58   -"<CODE>http://$SERVER_NAME:$SERVER_PORT$SCRIPT_NAME$PATH_INFO</CODE>"
59   -will always be an accessible URL that points to the current script,
60   -something which was not necessarily true with previous versions of
61   -Apache.
62   -
63   -<P>However, the "<CODE>/ralph</CODE>"
64   -information from the <CODE>Alias</CODE> directive is lost. This is
65   -unfortunate, but we feel that using the filesystem to pass along this
66   -sort of information is not a recommended method, and a script making
67   -use of it "deserves" not to work. Apache 1.2b3 and later, however, do
68   -provide <A HREF="#compat">a workaround.</A>
69   -
70   -<H2><A NAME="compat">Compatibility with Previous Servers</A></H2>
71   -
72   -<P>It may be necessary for a script that was designed for earlier
73   -versions of Apache or other servers to need the information that the
74   -old PATH_INFO variable provided. For this purpose, Apache 1.2 (1.2b3
75   -and later) sets an additional variable, FILEPATH_INFO. This
76   -environment variable contains the value that PATH_INFO would have had
77   -with Apache 1.1.1.</P>
78   -
79   -<P>A script that wishes to work with both Apache 1.2 and earlier
80   -versions can simply test for the existence of FILEPATH_INFO, and use
81   -it if available. Otherwise, it can use PATH_INFO. For example, in
82   -Perl, one might use:
83   -<PRE>
84   - $path_info = $ENV{'FILEPATH_INFO'} || $ENV{'PATH_INFO'};
85   -</PRE>
86   -
87   -<P>By doing this, a script can work with all servers supporting the
88   -CGI/1.1 specification, including all versions of Apache.</P>
89   -
90   -<!--#include virtual="footer.html" -->
91   -</BODY>
92   -</HTML>
93   -
242 docs/manual/configuring.html.en
... ... @@ -1,242 +0,0 @@
1   -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
2   -<HTML>
3   -<HEAD>
4   -<TITLE>Configuration Files</TITLE>
5   -</HEAD>
6   -
7   -<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
8   -<BODY
9   - BGCOLOR="#FFFFFF"
10   - TEXT="#000000"
11   - LINK="#0000FF"
12   - VLINK="#000080"
13   - ALINK="#FF0000"
14   ->
15   -<!--#include virtual="header.html" -->
16   -<H1 ALIGN="CENTER">Configuration Files</H1>
17   -
18   -<ul>
19   -<li><a href="#main">Main Configuration Files</a></li>
20   -<li><a href="#syntax">Syntax of the Configuration Files</a></li>
21   -<li><a href="#modules">Modules</a></li>
22   -<li><a href="#scope">Scope of Directives</a></li>
23   -<li><a href="#htaccess">.htaccess Files</a></li>
24   -<li><a href="#log">Log Files</a></li>
25   -</ul>
26   -
27   -<hr>
28   -
29   -<H2><a name="main">Main Configuration Files</a></H2>
30   -
31   -<table border="1"><tr><td valign="top">
32   -<strong>Related Modules</strong><br><br>
33   -<a href="mod/mod_mime.html">mod_mime</a><br>
34   -</td>
35   -
36   -<td valign="top">
37   -<strong>Related Directives</strong><br><br>
38   -<A HREF="mod/core.html#accessconfig">AccessConfig</A><br>
39   -<A HREF="mod/core.html#ifdefine">&lt;IfDefine&gt;</A><br>
40   -<a href="mod/core.html#include">Include</a><br>
41   -<A HREF="mod/core.html#resourceconfig">ResourceConfig</A><br>
42   -<A HREF="mod/mod_mime.html#typesconfig">TypesConfig</A><br>
43   -</td></tr></table>
44   -
45   -<P>Apache is configured by placing <A HREF="mod/directives.html"
46   ->directives</A> in plain text configuration files. The main
47   -configuration file is usually called <CODE>httpd.conf</CODE>. The
48   -location of this file is set at compile-time, but may be overridden
49   -with the <CODE>-f</CODE> command line flag. Some sites also have
50   -<CODE>srm.conf</CODE> and <CODE>access.conf</CODE> files for <A
51   -HREF="http://www.apache.org/info/three-config-files.html">historical
52   -reasons</A>. In addition, other configuration files may be added using
53   -the <CODE><A HREF="mod/core.html#include">Include</A></CODE>
54   -directive. Any directive may be placed in any of these configuration
55   -files. Changes to the main configuration files are only recognized by
56   -Apache when it is started or restarted.</p>
57   -
58   -<P>
59   -The server also reads a file containing mime document types; the
60   -filename is set by the <A HREF="mod/mod_mime.html#typesconfig"
61   ->TypesConfig</A> directive, and is <CODE>mime.types</CODE> by default.
62   -
63   -<hr>
64   -
65   -<H2><a name="syntax">Syntax of the Configuration Files</a></H2>
66   -
67   -<P>Apache configuration files contain one directive per line. The
68   -back-slash "\" may be used as the last character on a line to indicate
69   -that the directive continues onto the next line. There must be no
70   -other characters or white space between the back-slash and the end of
71   -the line.
72   -
73   -<P>Directives in the configuration files are case-insensitive, but
74   -arguments to directives are often case sensitive. Lines which begin
75   -with the hash character "#" are considered comments, and are ignored.
76   -Comments may <STRONG>not</STRONG> be included on a line after a
77   -configuration directive. Blank lines and white space occurring before
78   -a directive are ignored, so you may indent directives for clarity.
79   -
80   -<P>You can check your configuration files for syntax errors without
81   -starting the server by using <CODE>apachectl configtest</CODE>
82   -or the <CODE>-t</CODE> command line option.
83   -
84   -<hr>
85   -
86   -<H2><a name="modules">Modules</a></H2>
87   -
88   -<table border="1"><tr><td valign="top">
89   -<strong>Related Modules</strong><br><br>
90   -<a href="mod/mod_so.html">mod_so</a><br>
91   -</td>
92   -<td valign="top">
93   -<strong>Related Directives</strong><br><br>
94   -<A HREF="mod/core.html#addmodule">AddModule</A><br>
95   -<A HREF="mod/core.html#clearmodulelist">ClearModuleList</A><br>
96   -<A HREF="mod/core.html#ifmodule">&lt;IfModule&gt;</A><br>
97   -<a href="mod/mod_so.html">LoadModule</a><br>
98   -</td></tr></table>
99   -
100   -<P>Apache is a modular server. This implies that only the most basic
101   -functionality is included in the core server. Extended features are
102   -available through <A HREF="mod/index-bytype.html">modules</A> which
103   -can be loaded into Apache. By default, a <A
104   -HREF="mod/module-dict.html#Status">base</A> set of modules is
105   -included in the server at compile-time. If the server is compiled to
106   -use <A HREF="dso.html">dynamically loaded</A> modules, then modules
107   -can be compiled separately and added at any time using the <A
108   -HREF="mod/mod_so.html#loadmodule">LoadModule</A> directive.
109   -Otherwise, Apache must be recompiled to add or remove modules.
110   -Configuration directives may be included conditional on a presence of
111   -a particular module by enclosing them in an <A
112   -HREF="mod/core.html#ifmodule">&lt;IfModule&gt;</A> block.
113   -
114   -<P>To see which modules are currently compiled into the server,
115   -you can use the <CODE>-l</CODE> command line option.
116   -
117   -<hr>
118   -
119   -<H2><a name="scope">Scope of Directives</a></H2>
120   -
121   -<table border="1"><tr><td valign="top">
122   -<strong>Related Directives</strong><br><br>
123   -<A HREF="mod/core.html#directory">&lt;Directory&gt;</A><br>
124   -<A HREF="mod/core.html#directorymatch">&lt;DirectoryMatch&gt;</A><br>
125   -<A HREF="mod/core.html#files">&lt;Files&gt;</A><br>
126   -<A HREF="mod/core.html#filesmatch">&lt;FilesMatch&gt;</A><br>
127   -<A HREF="mod/core.html#location">&lt;Location&gt;</A><br>
128   -<A HREF="mod/core.html#locationmatch">&lt;LocationMatch&gt;</A><br>
129   -<a href="mod/core.html#virtualhost">&lt;VirtualHost&gt;</a><br>
130   -</td></tr></table>
131   -
132   -<P>Directives placed in the main configuration files apply to the entire
133   -server. If you wish to change the configuration for only a part of
134   -the server, you can scope your directives by placing them in
135   -<CODE><A HREF="mod/core.html#directory">&lt;Directory&gt;</A>,
136   -<A HREF="mod/core.html#directorymatch">&lt;DirectoryMatch&gt;</A>,
137   -<A HREF="mod/core.html#files">&lt;Files&gt;</A>,
138   -<A HREF="mod/core.html#filesmatch">&lt;FilesMatch&gt;</A>,
139   -<A HREF="mod/core.html#location">&lt;Location&gt;</A>,
140   -</CODE> and <CODE>
141   -<A HREF="mod/core.html#locationmatch">&lt;LocationMatch&gt;</A>
142   -</CODE>
143   -sections. These sections limit the application of the directives
144   -which they enclose to particular filesystem locations or URLs. They
145   -can also be nested, allowing for very fine grained configuration.
146   -
147   -<P>Apache has the capability to serve many different websites
148   -simultaneously. This is called <A HREF="vhosts/">Virtual Hosting</A>.
149   -Directives can also be scoped by placing them inside
150   -<CODE><A HREF="mod/core.html#virtualhost">&lt;VirtualHost&gt;</A></CODE>
151   -sections, so that they will only apply to requests for a particular
152   -website.
153   -
154   -<P>Although most directives can be placed in any of these sections,
155   -some directives do not make sense in some contexts. For example,
156   -directives controlling process creation can only be placed in the main
157   -server context. To find which directives can be placed in which
158   -sections, check the <A
159   -HREF="mod/directive-dict.html#Context">Context</A> of the directive.
160   -For further information, we provide details on <A
161   -HREF="sections.html">How Directory, Location and Files sections
162   -work</A>.
163   -
164   -<hr>
165   -
166   -<H2><a name="htaccess">.htaccess Files</a></H2>
167   -
168   -<table border="1"><tr><td valign="top">
169   -<strong>Related Directives</strong><br><br>
170   -<A HREF="mod/core.html#accessfilename">AccessFileName</A><br>
171   -<A HREF="mod/core.html#allowoverride">AllowOverride</A><br>
172   -</td></tr></table>
173   -
174   -<P>Apache allows for decentralized management of configuration via
175   -special files placed inside the web tree. The special files are
176   -usually called <CODE>.htaccess</CODE>, but any name can be specified
177   -in the <A HREF="mod/core.html#accessfilename"><CODE
178   ->AccessFileName</CODE></A> directive. Directives placed in
179   -<CODE>.htaccess</CODE> files apply to the directory where you place
180   -the file, and all sub-directories. The <CODE>.htaccess</CODE> files
181   -follow the same syntax as the main configuration files. Since
182   -<CODE>.htaccess</CODE> files are read on every request, changes made
183   -in these files take immediate effect.
184   -
185   -<P>To find which directives can be placed in <CODE>.htaccess</CODE>
186   -files, check the <A HREF="mod/directive-dict.html#Context">Context</A>
187   -of the directive. The server administrator further controls what
188   -directives may be placed in <CODE>.htaccess</CODE> files by
189   -configuring the <A
190   -HREF="mod/core.html#allowoverride"><CODE>AllowOverride</CODE></A>
191   -directive in the main configuration files.
192   -
193   -<hr>
194   -
195   -<H2><a name="logs">Log files</a></H2>
196   -<!-- This section should be moved to its own file -->
197   -<H3>security warning</H3>
198   -Anyone who can write to the directory where Apache is writing a
199   -log file can almost certainly gain access to the uid that the server is
200   -started as, which is normally root. Do <EM>NOT</EM> give people write
201   -access to the directory the logs are stored in without being aware of
202   -the consequences; see the <A HREF="misc/security_tips.html">security tips</A>
203   -document for details.
204   -
205   -<H3>pid file</H3>
206   -
207   -<P>On startup, Apache saves the process id of the parent httpd process to
208   -the file <CODE>logs/httpd.pid</CODE>. This filename can be changed
209   -with the <A HREF="mod/core.html#pidfile">PidFile</A> directive. The
210   -process-id is for use by the administrator in restarting and
211   -terminating the daemon: on Unix, a HUP or USR1 signal causes the
212   -daemon to re-read its configuration files and a TERM signal causes it
213   -to die gracefully; on Windows, use the -k command line option instead.
214   -For more information see the <A HREF="stopping.html">Stopping and
215   -Restarting</A> page.
216   -
217   -<P>
218   -If the process dies (or is killed) abnormally, then it will be necessary to
219   -kill the children httpd processes.
220   -
221   -<H3>Error log</H3>
222   -
223   -<P>The server will log error messages to a log file, by default
224   -<CODE>logs/error_log</CODE> on Unix or <CODE>logs/error.log</CODE> on
225   -Windows and OS/2. The filename can be set using the <A
226   -HREF="mod/core.html#errorlog">ErrorLog</A> directive; different error
227   -logs can be set for different <A
228   -HREF="mod/core.html#virtualhost">virtual hosts</A>.
229   -
230   -<H3>Transfer log</H3>
231   -
232   -<P>The server will typically log each request to a transfer file, by
233   -default <CODE>logs/access_log</CODE> on Unix or
234   -<CODE>logs/access.log</CODE> on Windows and OS/2. The filename can be
235   -set using a <A HREF="mod/mod_log_config.html#customlog">CustomLog</A>
236   -directive; different transfer logs can be set for different <A
237   -HREF="mod/core.html#virtualhost">virtual hosts</A>.
238   -
239   -
240   -<!--#include virtual="footer.html" -->
241   -</BODY>
242   -</HTML>
588 docs/manual/content-negotiation.html.en
... ... @@ -1,588 +0,0 @@
1   -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
2   -<HTML>
3   -<HEAD>
4   -<TITLE>Apache Content Negotiation</TITLE>
5   -</HEAD>
6   -
7   -<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
8   -<BODY
9   - BGCOLOR="#FFFFFF"
10   - TEXT="#000000"
11   - LINK="#0000FF"
12   - VLINK="#000080"
13   - ALINK="#FF0000"
14   ->
15   -<!--#include virtual="header.html" -->
16   -<H1 ALIGN="CENTER">Content Negotiation</H1>
17   -
18   -<P>
19   -Apache's support for content negotiation has been updated to meet the
20   -HTTP/1.1 specification. It can choose the best representation of a
21   -resource based on the browser-supplied preferences for media type,
22   -languages, character set and encoding. It is also implements a
23   -couple of features to give more intelligent handling of requests from
24   -browsers which send incomplete negotiation information. <P>
25   -
26   -Content negotiation is provided by the
27   -<A HREF="mod/mod_negotiation.html">mod_negotiation</A> module,
28   -which is compiled in by default.
29   -
30   -<HR>
31   -
32   -<H2>About Content Negotiation</H2>
33   -
34   -<P>
35   -A resource may be available in several different representations. For
36   -example, it might be available in different languages or different
37   -media types, or a combination. One way of selecting the most
38   -appropriate choice is to give the user an index page, and let them
39   -select. However it is often possible for the server to choose
40   -automatically. This works because browsers can send as part of each
41   -request information about what representations they prefer. For
42   -example, a browser could indicate that it would like to see
43   -information in French, if possible, else English will do. Browsers
44   -indicate their preferences by headers in the request. To request only
45   -French representations, the browser would send
46   -
47   -<PRE>
48   - Accept-Language: fr
49   -</PRE>
50   -
51   -<P>
52   -Note that this preference will only be applied when there is a choice
53   -of representations and they vary by language.
54   -<P>
55   -
56   -As an example of a more complex request, this browser has been
57   -configured to accept French and English, but prefer French, and to
58   -accept various media types, preferring HTML over plain text or other
59   -text types, and preferring GIF or JPEG over other media types, but also
60   -allowing any other media type as a last resort:
61   -
62   -<PRE>
63   - Accept-Language: fr; q=1.0, en; q=0.5
64   - Accept: text/html; q=1.0, text/*; q=0.8, image/gif; q=0.6,
65   - image/jpeg; q=0.6, image/*; q=0.5, */*; q=0.1
66   -</PRE>
67   -
68   -Apache 1.2 supports 'server driven' content negotiation, as defined in
69   -the HTTP/1.1 specification. It fully supports the Accept,
70   -Accept-Language, Accept-Charset and Accept-Encoding request headers.
71   -Apache 1.3.4 also supports 'transparent' content negotiation, which is
72   -an experimental negotiation protocol defined in RFC 2295 and RFC 2296.
73   -It does not offer support for 'feature negotiation' as defined in
74   -these RFCs.
75   -<P>
76   -
77   -A <STRONG>resource</STRONG> is a conceptual entity identified by a URI
78   -(RFC 2396). An HTTP server like Apache provides access to
79   -<STRONG>representations</STRONG> of the resource(s) within its namespace,
80   -with each representation in the form of a sequence of bytes with a
81   -defined media type, character set, encoding, etc. Each resource may be
82   -associated with zero, one, or more than one representation
83   -at any given time. If multiple representations are available,
84   -the resource is referred to as <STRONG>negotiable</STRONG> and each of its
85   -representations is termed a <STRONG>variant</STRONG>. The ways in which the
86   -variants for a negotiable resource vary are called the
87   -<STRONG>dimensions</STRONG> of negotiation.
88   -
89   -<H2>Negotiation in Apache</H2>
90   -
91   -<P>
92   -In order to negotiate a resource, the server needs to be given
93   -information about each of the variants. This is done in one of two
94   -ways:
95   -
96   -<UL>
97   - <LI> Using a type map (<EM>i.e.</EM>, a <CODE>*.var</CODE> file) which
98   - names the files containing the variants explicitly, or
99   - <LI> Using a 'MultiViews' search, where the server does an implicit
100   - filename pattern match and chooses from among the results.
101   -</UL>
102   -
103   -<H3>Using a type-map file</H3>
104   -
105   -<P>
106   -A type map is a document which is associated with the handler
107   -named <CODE>type-map</CODE> (or, for backwards-compatibility with
108   -older Apache configurations, the mime type
109   -<CODE>application/x-type-map</CODE>). Note that to use this feature,
110   -you must have a handler set in the configuration that defines a
111   -file suffix as <CODE>type-map</CODE>; this is best done with a
112   -
113   -<PRE>
114   - AddHandler type-map var
115   -</PRE>
116   -
117   -in the server configuration file. See the comments in the sample config
118   -file for more details. <P>
119   -
120   -Type map files have an entry for each available variant; these entries
121   -consist of contiguous HTTP-format header lines. Entries for
122   -different variants are separated by blank lines. Blank lines are
123   -illegal within an entry. It is conventional to begin a map file with
124   -an entry for the combined entity as a whole (although this
125   -is not required, and if present will be ignored). An example
126   -map file is:
127   -
128   -<PRE>
129   - URI: foo
130   -
131   - URI: foo.en.html
132   - Content-type: text/html
133   - Content-language: en
134   -
135   - URI: foo.fr.de.html
136   - Content-type: text/html;charset=iso-8859-2
137   - Content-language: fr, de
138   -</PRE>
139   -
140   -If the variants have different source qualities, that may be indicated
141   -by the "qs" parameter to the media type, as in this picture (available
142   -as jpeg, gif, or ASCII-art):
143   -
144   -<PRE>
145   - URI: foo
146   -
147   - URI: foo.jpeg
148   - Content-type: image/jpeg; qs=0.8
149   -
150   - URI: foo.gif
151   - Content-type: image/gif; qs=0.5
152   -
153   - URI: foo.txt
154   - Content-type: text/plain; qs=0.01
155   -</PRE>
156   -<P>
157   -
158   -qs values can vary in the range 0.000 to 1.000. Note that any variant with
159   -a qs value of 0.000 will never be chosen. Variants with no 'qs'
160   -parameter value are given a qs factor of 1.0. The qs parameter indicates
161   -the relative 'quality' of this variant compared to the other available
162   -variants, independent of the client's capabilities. For example, a jpeg
163   -file is usually of higher source quality than an ascii file if it is
164   -attempting to represent a photograph. However, if the resource being
165   -represented is an original ascii art, then an ascii representation would
166   -have a higher source quality than a jpeg representation. A qs value
167   -is therefore specific to a given variant depending on the nature of
168   -the resource it represents.
169   -
170   -<P>
171   -The full list of headers recognized is:
172   -
173   -<DL>
174   - <DT> <CODE>URI:</CODE>
175   - <DD> uri of the file containing the variant (of the given media
176   - type, encoded with the given content encoding). These are
177   - interpreted as URLs relative to the map file; they must be on
178   - the same server (!), and they must refer to files to which the
179   - client would be granted access if they were to be requested
180   - directly.
181   - <DT> <CODE>Content-Type:</CODE>
182   - <DD> media type --- charset, level and "qs" parameters may be given. These
183   - are often referred to as MIME types; typical media types are
184   - <CODE>image/gif</CODE>, <CODE>text/plain</CODE>, or
185   - <CODE>text/html;&nbsp;level=3</CODE>.
186   - <DT> <CODE>Content-Language:</CODE>
187   - <DD> The languages of the variant, specified as an Internet standard
188   - language tag from RFC 1766 (<EM>e.g.</EM>, <CODE>en</CODE> for English,
189   - <CODE>kr</CODE> for Korean, <EM>etc.</EM>).
190   - <DT> <CODE>Content-Encoding:</CODE>
191   - <DD> If the file is compressed, or otherwise encoded, rather than
192   - containing the actual raw data, this says how that was done.
193   - Apache only recognizes encodings that are defined by an
194   - <A HREF="mod/mod_mime.html#addencoding">AddEncoding</A> directive.
195   - This normally includes the encodings <CODE>x-compress</CODE>
196   - for compress'd files, and <CODE>x-gzip</CODE> for gzip'd files.
197   - The <CODE>x-</CODE> prefix is ignored for encoding comparisons.
198   - <DT> <CODE>Content-Length:</CODE>
199   - <DD> The size of the file. Specifying content
200   - lengths in the type-map allows the server to compare file sizes
201   - without checking the actual files.
202   - <DT> <CODE>Description:</CODE>
203   - <DD> A human-readable textual description of the variant. If Apache cannot
204   - find any appropriate variant to return, it will return an error
205   - response which lists all available variants instead. Such a variant
206   - list will include the human-readable variant descriptions.
207   -</DL>
208   -
209   -<H3>Multiviews</H3>
210   -
211   -<P>
212   -<CODE>MultiViews</CODE> is a per-directory option, meaning it can be set with
213   -an <CODE>Options</CODE> directive within a <CODE>&lt;Directory&gt;</CODE>,
214   -<CODE>&lt;Location&gt;</CODE> or <CODE>&lt;Files&gt;</CODE>
215   -section in <CODE>access.conf</CODE>, or (if <CODE>AllowOverride</CODE>
216   -is properly set) in <CODE>.htaccess</CODE> files. Note that
217   -<CODE>Options All</CODE> does not set <CODE>MultiViews</CODE>; you
218   -have to ask for it by name.
219   -
220   -<P>
221   -The effect of <CODE>MultiViews</CODE> is as follows: if the server
222   -receives a request for <CODE>/some/dir/foo</CODE>, if
223   -<CODE>/some/dir</CODE> has <CODE>MultiViews</CODE> enabled, and
224   -<CODE>/some/dir/foo</CODE> does <EM>not</EM> exist, then the server reads the
225   -directory looking for files named foo.*, and effectively fakes up a
226   -type map which names all those files, assigning them the same media
227   -types and content-encodings it would have if the client had asked for
228   -one of them by name. It then chooses the best match to the client's
229   -requirements.
230   -
231   -<P>
232   -<CODE>MultiViews</CODE> may also apply to searches for the file named by the
233   -<CODE>DirectoryIndex</CODE> directive, if the server is trying to
234   -index a directory. If the configuration files specify
235   -
236   -<PRE>
237   - DirectoryIndex index
238   -</PRE>
239   -
240   -then the server will arbitrate between <CODE>index.html</CODE>
241   -and <CODE>index.html3</CODE> if both are present. If neither are
242   -present, and <CODE>index.cgi</CODE> is there, the server will run it.
243   -
244   -<P>
245   -If one of the files found when reading the directive is a CGI script,
246   -it's not obvious what should happen. The code gives that case
247   -special treatment --- if the request was a POST, or a GET with
248   -QUERY_ARGS or PATH_INFO, the script is given an extremely high quality
249   -rating, and generally invoked; otherwise it is given an extremely low
250   -quality rating, which generally causes one of the other views (if any)
251   -to be retrieved.
252   -
253   -<H2>The Negotiation Methods</H2>
254   -
255   -After Apache has obtained a list of the variants for a given resource,
256   -either from a type-map file or from the filenames in the directory, it
257   -invokes one of two methods to decide on the 'best' variant to
258   -return, if any. It is not necessary to know any of the details of how
259   -negotiation actually takes place in order to use Apache's content
260   -negotiation features. However the rest of this document explains the
261   -methods used for those interested.
262   -<P>
263   -
264   -There are two negotiation methods:
265   -
266   -<OL>
267   -
268   -<LI><STRONG>Server driven negotiation with the Apache
269   -algorithm</STRONG> is used in the normal case. The Apache algorithm is
270   -explained in more detail below. When this algorithm is used, Apache
271   -can sometimes 'fiddle' the quality factor of a particular dimension to
272   -achieve a better result. The ways Apache can fiddle quality factors is
273   -explained in more detail below.
274   -
275   -<LI><STRONG>Transparent content negotiation</STRONG> is used when the
276   -browser specifically requests this through the mechanism defined in RFC
277   -2295. This negotiation method gives the browser full control over
278   -deciding on the 'best' variant, the result is therefore dependent on
279   -the specific algorithms used by the browser. As part of the
280   -transparent negotiation process, the browser can ask Apache to run the
281   -'remote variant selection algorithm' defined in RFC 2296. </UL>
282   -
283   -
284   -<H3>Dimensions of Negotiation</H3>
285   -
286   -<TABLE>
287   -<TR valign="top">
288   -<TH>Dimension
289   -<TH>Notes
290   -<TR valign="top">
291   -<TD>Media Type
292   -<TD>Browser indicates preferences with the Accept header field. Each item
293   -can have an associated quality factor. Variant description can also
294   -have a quality factor (the "qs" parameter).
295   -<TR valign="top">
296   -<TD>Language
297   -<TD>Browser indicates preferences with the Accept-Language header field.
298   -Each item can have a quality factor. Variants can be associated with none, one
299   -or more than one language.
300   -<TR valign="top">
301   -<TD>Encoding
302   -<TD>Browser indicates preference with the Accept-Encoding header field.
303   -Each item can have a quality factor.
304   -<TR valign="top">
305   -<TD>Charset
306   -<TD>Browser indicates preference with the Accept-Charset header field.
307   -Each item can have a quality factor.
308   -Variants can indicate a charset as a parameter of the media type.
309   -</TABLE>
310   -
311   -<H3>Apache Negotiation Algorithm</H3>
312   -
313   -<P>
314   -Apache can use the following algorithm to select the 'best' variant
315   -(if any) to return to the browser. This algorithm is not
316   -further configurable. It operates as follows:
317   -
318   -<OL>
319   -<LI>First, for each dimension of the negotiation, check the appropriate
320   -<EM>Accept*</EM> header field and assign a quality to each
321   -variant. If the <EM>Accept*</EM> header for any dimension implies that this
322   -variant is not acceptable, eliminate it. If no variants remain, go
323   -to step 4.
324   -
325   -<LI>Select the 'best' variant by a process of elimination. Each of the
326   -following tests is applied in order. Any variants not selected at each
327   -test are eliminated. After each test, if only one variant remains,
328   -select it as the best match and proceed to step 3. If more than one
329   -variant remains, move on to the next test.
330   -
331   -<OL>
332   -<LI>Multiply the quality factor from the Accept header with the
333   - quality-of-source factor for this variant's media type, and select
334   - the variants with the highest value.
335   -
336   -<LI>Select the variants with the highest language quality factor.
337   -
338   -<LI>Select the variants with the best language match, using either the
339   - order of languages in the Accept-Language header (if present), or else
340   - else the order of languages in the <CODE>LanguagePriority</CODE>
341   - directive (if present).
342   -
343   -<LI>Select the variants with the highest 'level' media parameter
344   - (used to give the version of text/html media types).
345   -
346   -<LI>Select variants with the best charset media parameters,
347   - as given on the Accept-Charset header line. Charset ISO-8859-1
348   - is acceptable unless explicitly excluded. Variants with a
349   - <CODE>text/*</CODE> media type but not explicitly associated
350   - with a particular charset are assumed to be in ISO-8859-1.
351   -
352   -<LI>Select those variants which have associated
353   - charset media parameters that are <EM>not</EM> ISO-8859-1.
354   - If there are no such variants, select all variants instead.
355   -
356   -<LI>Select the variants with the best encoding. If there are
357   - variants with an encoding that is acceptable to the user-agent,
358   - select only these variants. Otherwise if there is a mix of encoded
359   - and non-encoded variants, select only the unencoded variants.
360   - If either all variants are encoded or all variants are not encoded,
361