annotate doc/usage_httpd.xml @ 9:0f248ad86f9f 1.1.29.e2

bins_edit: try to get encoding stuff right, move it into main
author Peter Gervai <grin@grin.hu>
date Thu, 16 Oct 2008 00:11:14 +0200
parents a84c32f131df
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
1 <?xml version="1.0" encoding="LATIN1" ?>
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
2 <!DOCTYPE webpage PUBLIC "-//Norman Walsh//DTD Website V2.2//EN"
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
3 "http://docbook.sourceforge.net/release/website/2.2/website.dtd" [
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
4 <!NOTATION XML SYSTEM "xml">
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
5 <!ENTITY usage_desc_xml SYSTEM "usage_desc_xml.xml" NDATA XML>
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
6 ]>
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
7 <!-- $Id: usage_httpd.xml,v 1.2 2005/08/21 20:12:33 jerome Exp $ -->
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
8 <webpage id="usage_httpd">
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
9 <config param="rcsdate" value="$Date: 2005/08/21 20:12:33 $"/>
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
10
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
11 <head>
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
12 <title>Web server configuration</title>
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
13 <keywords>SAUTRET, BINS, album, gallery, photos, EXIF</keywords>
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
14 </head>
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
15
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
16
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
17 <webtoc/>
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
18 <section>
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
19 <title>Apache Configuration</title>
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
20
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
21 <section>
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
22 <title>Encoding</title>
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
23
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
24 <para>The <filename>bins</filename> program will create
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
25 automatically an <filename>.htaccess</filename> in the root
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
26 directory of your album if the <literal>createHtaccess</literal>
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
27 parameter is set to 1. This <filename>.htaccess</filename> is to
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
28 be used by the <ulink url="http://httpd.apache.org/">Apache HTTP
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
29 server</ulink> to set the correct encoding of the HTTP header
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
30 according the html pages of the album.</para> <para>To allow
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
31 Apache to use the <filename>.htaccess</filename> file, the
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
32 following directive must be present in the
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
33 <literal>Directory</literal> or <literal>VirtualHost</literal>
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
34 of the Apache httpd configuration file&nbsp;:
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
35 </para>
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
36 <programlisting>
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
37 AllowOverride All
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
38 </programlisting>
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
39 </section>
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
40 <section>
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
41 <title>Using BINS with PHP</title>
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
42
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
43 <para>If you want that the .html extension file to be
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
44 interpreted by PHP, you have to edit the
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
45 <filename>.htacces</filename> file described in Encoding section
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
46 and add the following lines&nbsp;:
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
47 </para>
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
48 <programlisting>
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
49 AddHandler server-parsed .html
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
50 AddType application/x-httpd-php .php .html
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
51 </programlisting>
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
52 <para>
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
53 Thanks to Gilles Foucault for this Tip
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
54 </para>
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
55 </section>
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
56 <section>
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
57 <title id="usage_httpd.compression">Compression</title>
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
58 <para>
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
59 To reduce size of HTML and Javascript files you can enable
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
60 compression on the web server. This is specially useful for
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
61 the search engine because the
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
62 <filename>search_data.js</filename> file, containing all the
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
63 search data, can be very big on important album, but it
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
64 compress very well.
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
65 </para>
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
66 <para>
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
67 To enable compression on Apache 2, you have to enable
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
68 <literal>mod_deflate</literal>. Then, in your virtual host configuration, add the following directives:
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
69 </para>
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
70 <programlisting>
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
71 <![CDATA[
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
72 <IfModule mod_deflate.c>
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
73 # Compression
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
74 AddOutputFilterByType DEFLATE text/html text/plain \
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
75 text/xml text/css text/javascript application/x-javascript
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
76
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
77 # Netscape 4.x has some problems...
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
78 BrowserMatch ^Mozilla/4 gzip-only-text/html
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
79
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
80 # Netscape 4.06-4.08 have some more problems
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
81 BrowserMatch ^Mozilla/4\.0[678] no-gzip
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
82
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
83 # MSIE masquerades as Netscape, but it is fine
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
84 #BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
85
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
86 # NOTE: Due to a bug in mod_setenvif up to Apache 2.0.48
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
87 # the above regex won't work. You can use the following
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
88 # workaround to get the desired effect:
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
89 BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
90
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
91 # To see how compression perform
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
92 DeflateFilterNote Input instream
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
93 DeflateFilterNote Output outstream
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
94 DeflateFilterNote Ratio ratio
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
95 LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
96 CustomLog /var/log/apache2/deflate.log deflate
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
97 </IfModule>
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
98 ]]>
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
99 </programlisting>
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
100 <para>
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
101 See the <ulink
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
102 url="http://httpd.apache.org/docs/2.0/mod/mod_deflate.html">Apache
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
103 documentation</ulink> for more details.
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
104 </para>
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
105 </section>
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
106 </section>
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
107 </webpage>