<p>Invalid content types might include:</p>
<example>
- # invalid<br />
- Content-Type: foo<br />
- # blank<br />
- Content-Type:
+<highlight language="config">
+# invalid
+Content-Type: foo
+# blank
+Content-Type:
+</highlight>
</example>
<p>The server administrator has the option to restrict the policy to one
last resort:</p>
<example>
- Accept-Language: fr; q=1.0, en; q=0.5<br />
- Accept: text/html; q=1.0, text/*; q=0.8, image/gif; q=0.6, image/jpeg; q=0.6, image/*; q=0.5, */*; q=0.1
+<highlight language="config">
+Accept-Language: fr; q=1.0, en; q=0.5
+Accept: text/html; q=1.0, text/*; q=0.8, image/gif; q=0.6, image/jpeg; q=0.6, image/*; q=0.5, */*; q=0.1
+</highlight>
</example>
<p>httpd supports 'server driven' content negotiation, as
the map file.</p>
<example>
- URI: foo<br />
-<br />
- URI: foo.en.html<br />
- Content-type: text/html<br />
- Content-language: en<br />
-<br />
- URI: foo.fr.de.html<br />
- Content-type: text/html;charset=iso-8859-2<br />
- Content-language: fr, de<br />
+<highlight language="config">
+URI: foo
+
+URI: foo.en.html
+Content-type: text/html
+Content-language: en
+
+URI: foo.fr.de.html
+Content-type: text/html;charset=iso-8859-2
+Content-language: fr, de
+</highlight>
</example>
<p>Note also that a typemap file will take precedence over the
assigned its language in the type map without being renamed:</p>
<example>
- URI: foo<br />
-<br />
- URI: foo.html<br />
- Content-type: text/html<br />
- Content-language: en<br />
-<br />
- URI: foo.fr.html<br />
- Content-type: text/html<br />
- Content-language: fr<br />
+<highlight language="config">
+URI: foo
+
+URI: foo.html
+Content-type: text/html
+Content-language: en
+
+URI: foo.fr.html
+Content-type: text/html
+Content-language: fr
+</highlight>
</example>
<p>If the variants have different source qualities, that may be
picture (available as JPEG, GIF, or ASCII-art): </p>
<example>
- URI: foo<br />
-<br />
- URI: foo.jpeg<br />
- Content-type: image/jpeg; qs=0.8<br />
-<br />
- URI: foo.gif<br />
- Content-type: image/gif; qs=0.5<br />
-<br />
- URI: foo.txt<br />
- Content-type: text/plain; qs=0.01<br />
+<highlight language="config">
+URI: foo
+
+URI: foo.jpeg
+Content-type: image/jpeg; qs=0.8
+
+URI: foo.gif
+Content-type: image/gif; qs=0.5
+
+URI: foo.txt
+Content-type: text/plain; qs=0.01
+</highlight>
</example>
<p>qs values can vary in the range 0.000 to 1.000. Note that
environment variables, the following.</p>
<example>
- REDIRECT_HTTP_ACCEPT=*/*, image/gif, image/jpeg, image/png<br />
- REDIRECT_HTTP_USER_AGENT=Mozilla/5.0 Fedora/3.5.8-1.fc12 Firefox/3.5.8<br />
- REDIRECT_PATH=.:/bin:/usr/local/bin:/sbin<br />
- REDIRECT_QUERY_STRING=<br />
- REDIRECT_REMOTE_ADDR=121.345.78.123<br />
- REDIRECT_REMOTE_HOST=client.example.com<br />
- REDIRECT_SERVER_NAME=www.example.edu<br />
- REDIRECT_SERVER_PORT=80<br />
- REDIRECT_SERVER_SOFTWARE=Apache/2.2.15<br />
- REDIRECT_URL=/cgi-bin/buggy.pl
+<highlight language="config">
+REDIRECT_HTTP_ACCEPT=*/*, image/gif, image/jpeg, image/png
+REDIRECT_HTTP_USER_AGENT=Mozilla/5.0 Fedora/3.5.8-1.fc12 Firefox/3.5.8
+REDIRECT_PATH=.:/bin:/usr/local/bin:/sbin
+REDIRECT_QUERY_STRING=
+REDIRECT_REMOTE_ADDR=121.345.78.123
+REDIRECT_REMOTE_HOST=client.example.com
+REDIRECT_SERVER_NAME=www.example.edu
+REDIRECT_SERVER_PORT=80
+REDIRECT_SERVER_SOFTWARE=Apache/2.2.15
+REDIRECT_URL=/cgi-bin/buggy.pl
+</highlight>
</example>
<p><code>REDIRECT_</code> environment variables are created from
<code>mod_foo.so</code>:</p>
<example>
-$ ./configure --prefix=/path/to/install --enable-foo<br />
+<highlight language="sh">
+$ ./configure --prefix=/path/to/install --enable-foo
$ make install
+</highlight>
</example>
</li>
<code>httpd.conf</code>.</p>
<example>
-$ ./configure --enable-mods-shared=all<br />
+<highlight language="sh">
+$ ./configure --enable-mods-shared=all
$ make install
+</highlight>
</example>
</li>
<code>--enable-load-all-modules</code>.</p>
<example>
-$ ./configure --enable-mods-shared=reallyall --enable-load-all-modules<br />
+<highlight language="sh">
+$ ./configure --enable-mods-shared=reallyall --enable-load-all-modules
$ make install
+</highlight>
</example>
</li>
source tree using <program>apxs</program>:
<example>
-$ cd /path/to/3rdparty<br />
+<highlight language="sh">
+$ cd /path/to/3rdparty
$ apxs -cia mod_foo.c
+</highlight>
</example>
</li>
</ol>
simple matter of uncompressing, and then untarring:</p>
<example>
-$ gzip -d httpd-<em>NN</em>.tar.gz<br />
+<highlight language="sh">
+$ gzip -d httpd-<em>NN</em>.tar.gz
$ tar xvf httpd-<em>NN</em>.tar
+</highlight>
</example>
<p>This will create a new directory under the current directory
<module>mod_lua</module>:</p>
<example>
- $ CC="pgcc" CFLAGS="-O2" \<br />
- ./configure --prefix=/sw/pkg/apache \<br />
- --enable-ldap=shared \<br />
- --enable-lua=shared
+<highlight language="sh">
+$ CC="pgcc" CFLAGS="-O2" \
+ ./configure --prefix=/sw/pkg/apache \
+ --enable-ldap=shared \
+ --enable-lua=shared
+</highlight>
</example>
<p>When <program>configure</program> is run it will take several minutes to
changes, and then run:</p>
<example>
- $ ./config.nice<br />
- $ make<br />
- $ make install<br />
- $ <em>PREFIX</em>/bin/apachectl -k graceful-stop<br />
- $ <em>PREFIX</em>/bin/apachectl -k start<br />
+<highlight language="sh">
+$ ./config.nice
+$ make
+$ make install
+$ <em>PREFIX</em>/bin/apachectl -k graceful-stop
+$ <em>PREFIX</em>/bin/apachectl -k start
+</highlight>
</example>
<note type="warning">You should always test any new version in your