Mercurial > bins
view doc/usage_httpd.xml @ 8:c28af937b9bd
log verbosity fix (entr)
author | Peter Gervai <grin@grin.hu> |
---|---|
date | Thu, 16 Oct 2008 00:06:40 +0200 |
parents | a84c32f131df |
children |
line wrap: on
line source
<?xml version="1.0" encoding="LATIN1" ?> <!DOCTYPE webpage PUBLIC "-//Norman Walsh//DTD Website V2.2//EN" "http://docbook.sourceforge.net/release/website/2.2/website.dtd" [ <!NOTATION XML SYSTEM "xml"> <!ENTITY usage_desc_xml SYSTEM "usage_desc_xml.xml" NDATA XML> ]> <!-- $Id: usage_httpd.xml,v 1.2 2005/08/21 20:12:33 jerome Exp $ --> <webpage id="usage_httpd"> <config param="rcsdate" value="$Date: 2005/08/21 20:12:33 $"/> <head> <title>Web server configuration</title> <keywords>SAUTRET, BINS, album, gallery, photos, EXIF</keywords> </head> <webtoc/> <section> <title>Apache Configuration</title> <section> <title>Encoding</title> <para>The <filename>bins</filename> program will create automatically an <filename>.htaccess</filename> in the root directory of your album if the <literal>createHtaccess</literal> parameter is set to 1. This <filename>.htaccess</filename> is to be used by the <ulink url="http://httpd.apache.org/">Apache HTTP server</ulink> to set the correct encoding of the HTTP header according the html pages of the album.</para> <para>To allow Apache to use the <filename>.htaccess</filename> file, the following directive must be present in the <literal>Directory</literal> or <literal>VirtualHost</literal> of the Apache httpd configuration file : </para> <programlisting> AllowOverride All </programlisting> </section> <section> <title>Using BINS with PHP</title> <para>If you want that the .html extension file to be interpreted by PHP, you have to edit the <filename>.htacces</filename> file described in Encoding section and add the following lines : </para> <programlisting> AddHandler server-parsed .html AddType application/x-httpd-php .php .html </programlisting> <para> Thanks to Gilles Foucault for this Tip </para> </section> <section> <title id="usage_httpd.compression">Compression</title> <para> 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 <filename>search_data.js</filename> file, containing all the search data, can be very big on important album, but it compress very well. </para> <para> To enable compression on Apache 2, you have to enable <literal>mod_deflate</literal>. Then, in your virtual host configuration, add the following directives: </para> <programlisting> <![CDATA[ <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> ]]> </programlisting> <para> See the <ulink url="http://httpd.apache.org/docs/2.0/mod/mod_deflate.html">Apache documentation</ulink> for more details. </para> </section> </section> </webpage>