0
|
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
|
2 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><meta name="generator" content="Website XSL Stylesheet V2.2 |
|
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"> |
|
4 <title>Web server configuration</title> |
|
5 <meta name="keyword" content="SAUTRET, BINS, album, gallery, photos, EXIF"> |
|
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="<-"></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> |
|
7 |
|
8 |
|
9 <div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2469508"></a>Encoding</h3></div></div></div> |
|
10 |
|
11 |
|
12 <p>The <code class="filename">bins</code> program will create |
|
13 automatically an <code class="filename">.htaccess</code> in the root |
|
14 directory of your album if the <code class="literal">createHtaccess</code> |
|
15 parameter is set to 1. This <code class="filename">.htaccess</code> is to |
|
16 be used by the <a href="http://httpd.apache.org/" target="_top">Apache HTTP |
|
17 server</a> to set the correct encoding of the HTTP header |
|
18 according the html pages of the album.</p> <p>To allow |
|
19 Apache to use the <code class="filename">.htaccess</code> file, the |
|
20 following directive must be present in the |
|
21 <code class="literal">Directory</code> or <code class="literal">VirtualHost</code> |
|
22 of the Apache httpd configuration file?: |
|
23 </p> |
|
24 <pre class="programlisting"> |
|
25 AllowOverride All |
|
26 </pre> |
|
27 </div> |
|
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> |
|
29 |
|
30 |
|
31 <p>If you want that the .html extension file to be |
|
32 interpreted by PHP, you have to edit the |
|
33 <code class="filename">.htacces</code> file described in Encoding section |
|
34 and add the following lines?: |
|
35 </p> |
|
36 <pre class="programlisting"> |
|
37 AddHandler server-parsed .html |
|
38 AddType application/x-httpd-php .php .html |
|
39 </pre> |
|
40 <p> |
|
41 Thanks to Gilles Foucault for this Tip |
|
42 </p> |
|
43 </div> |
|
44 <div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2469614"></a>Compression</h3></div></div></div> |
|
45 |
|
46 <p> |
|
47 To reduce size of HTML and Javascript files you can enable |
|
48 compression on the web server. This is specially useful for |
|
49 the search engine because the |
|
50 <code class="filename">search_data.js</code> file, containing all the |
|
51 search data, can be very big on important album, but it |
|
52 compress very well. |
|
53 </p> |
|
54 <p> |
|
55 To enable compression on Apache 2, you have to enable |
|
56 <code class="literal">mod_deflate</code>. Then, in your virtual host configuration, add the following directives: |
|
57 </p> |
|
58 <pre class="programlisting"> |
|
59 |
|
60 <IfModule mod_deflate.c> |
|
61 # Compression |
|
62 AddOutputFilterByType DEFLATE text/html text/plain \ |
|
63 text/xml text/css text/javascript application/x-javascript |
|
64 |
|
65 # Netscape 4.x has some problems... |
|
66 BrowserMatch ^Mozilla/4 gzip-only-text/html |
|
67 |
|
68 # Netscape 4.06-4.08 have some more problems |
|
69 BrowserMatch ^Mozilla/4\.0[678] no-gzip |
|
70 |
|
71 # MSIE masquerades as Netscape, but it is fine |
|
72 #BrowserMatch \bMSIE !no-gzip !gzip-only-text/html |
|
73 |
|
74 # NOTE: Due to a bug in mod_setenvif up to Apache 2.0.48 |
|
75 # the above regex won't work. You can use the following |
|
76 # workaround to get the desired effect: |
|
77 BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html |
|
78 |
|
79 # To see how compression perform |
|
80 DeflateFilterNote Input instream |
|
81 DeflateFilterNote Output outstream |
|
82 DeflateFilterNote Ratio ratio |
|
83 LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate |
|
84 CustomLog /var/log/apache2/deflate.log deflate |
|
85 </IfModule> |
|
86 |
|
87 </pre> |
|
88 <p> |
|
89 See the <a href="http://httpd.apache.org/docs/2.0/mod/mod_deflate.html" target="_top">Apache |
|
90 documentation</a> for more details. |
|
91 </p> |
|
92 </div> |
|
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> |