Mercurial > bins
view doc/usage_httpd.html @ 6:3021deef1599
Encoding related fixes
* chomp encoding string
* reformat else (seems someone hacked it in)
* debug print encoding
* do not use :utf8 binmode ("re-encode") on written file if the input is _already_ UTF-8
author | Peter Gervai <grin@grin.hu> |
---|---|
date | Thu, 16 Oct 2008 00:02:14 +0200 |
parents | a84c32f131df |
children |
line wrap: on
line source
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><meta name="generator" content="Website XSL Stylesheet V2.2 "><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"> <title>Web server configuration</title> <meta name="keyword" content="SAUTRET, BINS, album, gallery, photos, EXIF"> </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> <div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2469508"></a>Encoding</h3></div></div></div> <p>The <code class="filename">bins</code> program will create automatically an <code class="filename">.htaccess</code> in the root directory of your album if the <code class="literal">createHtaccess</code> parameter is set to 1. This <code class="filename">.htaccess</code> is to be used by the <a href="http://httpd.apache.org/" target="_top">Apache HTTP server</a> to set the correct encoding of the HTTP header according the html pages of the album.</p> <p>To allow Apache to use the <code class="filename">.htaccess</code> file, the following directive must be present in the <code class="literal">Directory</code> or <code class="literal">VirtualHost</code> of the Apache httpd configuration file?: </p> <pre class="programlisting"> AllowOverride All </pre> </div> <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> <p>If you want that the .html extension file to be interpreted by PHP, you have to edit the <code class="filename">.htacces</code> file described in Encoding section and add the following lines?: </p> <pre class="programlisting"> AddHandler server-parsed .html AddType application/x-httpd-php .php .html </pre> <p> Thanks to Gilles Foucault for this Tip </p> </div> <div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2469614"></a>Compression</h3></div></div></div> <p> To reduce size of HTML and Javascript files you can enable compression on the web server. This is specially useful for the search engine because the <code class="filename">search_data.js</code> file, containing all the search data, can be very big on important album, but it compress very well. </p> <p> To enable compression on Apache 2, you have to enable <code class="literal">mod_deflate</code>. Then, in your virtual host configuration, add the following directives: </p> <pre class="programlisting"> <IfModule mod_deflate.c> # Compression AddOutputFilterByType DEFLATE text/html text/plain \ text/xml text/css text/javascript application/x-javascript # Netscape 4.x has some problems... BrowserMatch ^Mozilla/4 gzip-only-text/html # Netscape 4.06-4.08 have some more problems BrowserMatch ^Mozilla/4\.0[678] no-gzip # MSIE masquerades as Netscape, but it is fine #BrowserMatch \bMSIE !no-gzip !gzip-only-text/html # NOTE: Due to a bug in mod_setenvif up to Apache 2.0.48 # the above regex won't work. You can use the following # workaround to get the desired effect: BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html # To see how compression perform DeflateFilterNote Input instream DeflateFilterNote Output outstream DeflateFilterNote Ratio ratio LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate CustomLog /var/log/apache2/deflate.log deflate </IfModule> </pre> <p> See the <a href="http://httpd.apache.org/docs/2.0/mod/mod_deflate.html" target="_top">Apache documentation</a> for more details. </p> </div> </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>