annotate doc/usage_httpd.html @ 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 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
2 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><meta name="generator" content="Website XSL Stylesheet V2.2
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
3 "><link rel="home" href="index.html" title="BINS Photo Album"><link rel="up" href="usage.html" title="Usage"><link rel="previous" href="usage_custom.html" title="Customization"><link rel="next" href="usage_tools.html" title="Tools"><link rel="first" href="usage_album.html" title="Creating an album"><link rel="last" href="usage_tools.html" title="Tools"><link rel="stylesheet" href="example.css" type="text/css">
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
4 <title>Web server configuration</title>
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
5 <meta name="keyword" content="SAUTRET, BINS, album, gallery, photos, EXIF">
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
6 </head><body class="tabular" bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div id="usage_httpd" class="webpage"><a name="usage_httpd"></a><table border="0" cellpadding="0" cellspacing="0" width="100%" summary="Navigation"><tr><td valign="top" align="left" bgcolor="#4080FF" width="220"><p class="navtoc"><a href="index.html"><img align="left" border="0" src="graphics/banner.png" alt="Banner"></a><br clear="all"><br><span class="toplevel"><img src="graphics/blank.gif" alt="???"><a href="intro.html"><img src="graphics/navicons/triangle/other/leaf.gif" alt="?" border="0"></a><span class="otherpage"><a href="intro.html">Introduction</a></span><br></span><span class="toplevel"><img src="graphics/blank.gif" alt="???"><a href="examples.html"><img src="graphics/navicons/triangle/other/leaf.gif" alt="?" border="0"></a><span class="otherpage"><a href="examples.html">Examples</a></span><br></span><span class="toplevel"><img src="graphics/blank.gif" alt="???"><a href="faq.html"><img src="graphics/navicons/triangle/other/leaf.gif" alt="?" border="0"></a><span class="otherpage"><a href="faq.html">FAQ</a></span><br></span><span class="toplevel"><img src="graphics/blank.gif" alt="???"><a href="download.html"><img src="graphics/navicons/triangle/other/leaf.gif" alt="?" border="0"></a><span class="otherpage"><a href="download.html">Download</a></span><br></span><span class="toplevel"><img src="graphics/blank.gif" alt="???"><a href="install.html"><img src="graphics/navicons/triangle/other/closed.gif" alt="?" border="0"></a><span class="otherpage"><a href="install.html">Installation</a></span><br></span><span class="toplevel"><img src="graphics/blank.gif" alt="???"><a href="usage_album.html"><img src="graphics/navicons/triangle/other/open.gif" alt="?" border="0"></a><span class="ancestor"><a href="usage_album.html">Usage</a></span><br></span><span class="shrink1"><img src="graphics/blank.gif" alt="???"><img src="graphics/blank.gif" alt="???"><a href="usage_album.html"><img src="graphics/navicons/triangle/other/leaf.gif" alt="?" border="0"></a><span class="otherpage"><a href="usage_album.html">Creating an album</a></span><br></span><span class="shrink1"><img src="graphics/blank.gif" alt="???"><img src="graphics/blank.gif" alt="???"><a href="usage_desc.html"><img src="graphics/navicons/triangle/other/closed.gif" alt="?" border="0"></a><span class="otherpage"><a href="usage_desc.html">Setting description fields</a></span><br></span><span class="shrink1"><img src="graphics/blank.gif" alt="???"><img src="graphics/blank.gif" alt="???"><a href="usage_custom.html"><img src="graphics/navicons/triangle/other/leaf.gif" alt="?" border="0"></a><span class="otherpage"><a href="usage_custom.html">Customization</a></span><br></span><span class="shrink1"><img src="graphics/blank.gif" alt="???"><img src="graphics/blank.gif" alt="???"><a href="usage_httpd.html"><img src="graphics/navicons/triangle/current/leaf.gif" alt="+" border="0"></a><span class="curpage">Web server configuration?<img src="graphics/navicons/triangle/current/pointer.gif" alt="&lt;-"></span><br></span><span class="shrink1"><img src="graphics/blank.gif" alt="???"><img src="graphics/blank.gif" alt="???"><a href="usage_tools.html"><img src="graphics/navicons/triangle/other/leaf.gif" alt="?" border="0"></a><span class="otherpage"><a href="usage_tools.html">Tools</a></span><br></span><span class="toplevel"><img src="graphics/blank.gif" alt="???"><a href="contact.html"><img src="graphics/navicons/triangle/other/leaf.gif" alt="?" border="0"></a><span class="otherpage"><a href="contact.html">Contact and contribution</a></span><br></span><span class="toplevel"><img src="graphics/blank.gif" alt="???"><a href="license.html"><img src="graphics/navicons/triangle/other/leaf.gif" alt="?" border="0"></a><span class="otherpage"><a href="license.html">License</a></span><br></span><br></p></td><td valign="top" align="left" bgcolor="white"><h1>Web server configuration</h1><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2469502"></a>Apache Configuration</h2></div></div></div>
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
7
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
8
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
9 <div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2469508"></a>Encoding</h3></div></div></div>
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
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
12 <p>The <code class="filename">bins</code> program will create
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
13 automatically an <code class="filename">.htaccess</code> in the root
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
14 directory of your album if the <code class="literal">createHtaccess</code>
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
15 parameter is set to 1. This <code class="filename">.htaccess</code> is to
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
16 be used by the <a href="http://httpd.apache.org/" target="_top">Apache HTTP
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
17 server</a> to set the correct encoding of the HTTP header
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
18 according the html pages of the album.</p> <p>To allow
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
19 Apache to use the <code class="filename">.htaccess</code> file, the
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
20 following directive must be present in the
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
21 <code class="literal">Directory</code> or <code class="literal">VirtualHost</code>
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
22 of the Apache httpd configuration file?:
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
23 </p>
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
24 <pre class="programlisting">
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
25 AllowOverride All
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
26 </pre>
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
27 </div>
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
28 <div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2469579"></a>Using BINS with PHP</h3></div></div></div>
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
29
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
30
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
31 <p>If you want that the .html extension file to be
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
32 interpreted by PHP, you have to edit the
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
33 <code class="filename">.htacces</code> file described in Encoding section
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
34 and add the following lines?:
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
35 </p>
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
36 <pre class="programlisting">
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
37 AddHandler server-parsed .html
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
38 AddType application/x-httpd-php .php .html
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
39 </pre>
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
40 <p>
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
41 Thanks to Gilles Foucault for this Tip
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
42 </p>
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
43 </div>
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
44 <div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2469614"></a>Compression</h3></div></div></div>
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
45
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
46 <p>
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
47 To reduce size of HTML and Javascript files you can enable
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
48 compression on the web server. This is specially useful for
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
49 the search engine because the
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
50 <code class="filename">search_data.js</code> file, containing all the
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
51 search data, can be very big on important album, but it
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
52 compress very well.
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
53 </p>
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
54 <p>
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
55 To enable compression on Apache 2, you have to enable
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
56 <code class="literal">mod_deflate</code>. Then, in your virtual host configuration, add the following directives:
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
57 </p>
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
58 <pre class="programlisting">
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
59
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
60 &lt;IfModule mod_deflate.c&gt;
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
61 # Compression
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
62 AddOutputFilterByType DEFLATE text/html text/plain \
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
63 text/xml text/css text/javascript application/x-javascript
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
64
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
65 # Netscape 4.x has some problems...
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
66 BrowserMatch ^Mozilla/4 gzip-only-text/html
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
67
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
68 # Netscape 4.06-4.08 have some more problems
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
69 BrowserMatch ^Mozilla/4\.0[678] no-gzip
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
70
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
71 # MSIE masquerades as Netscape, but it is fine
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
72 #BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
73
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
74 # 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
75 # the above regex won't work. You can use the following
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
76 # workaround to get the desired effect:
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
77 BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
78
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
79 # To see how compression perform
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
80 DeflateFilterNote Input instream
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
81 DeflateFilterNote Output outstream
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
82 DeflateFilterNote Ratio ratio
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
83 LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
84 CustomLog /var/log/apache2/deflate.log deflate
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
85 &lt;/IfModule&gt;
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
86
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
87 </pre>
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
88 <p>
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
89 See the <a href="http://httpd.apache.org/docs/2.0/mod/mod_deflate.html" target="_top">Apache
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
90 documentation</a> for more details.
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
91 </p>
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
92 </div>
a84c32f131df Import vendor version
Peter Gervai <grin@grin.hu>
parents:
diff changeset
93 </div><br></td></tr></table><div class="navfoot"><hr><table width="100%" border="0" summary="Footer navigation"><tr><td width="33%" align="left"><span class="footdate">$Date: 2005/08/21 20:12:33 $</span></td><td width="34%" align="center"><span class="foothome"><a href="index.html">Home</a></span></td><td width="33%" align="right">?</td></tr><tr><td colspan="3" align="right"><span class="footcopy"><span class="copyright">Copyright ? 2001, 2005, J?r?me SAUTRET. </span></span></td></tr></table></div></div></body></html>