X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=etc%2Fkoha-httpd.conf;h=dc82d08a394edb563f9766d2fbd58aee32ff78a7;hb=c6337e7ea54d341dfc133d3f201442ab399a1d77;hp=6122ff69795ed2a9dd4df244741d9a9a17768f6d;hpb=28695e9166911f95a78f38d8c301da9c24c6e783;p=koha_fer diff --git a/etc/koha-httpd.conf b/etc/koha-httpd.conf index 6122ff6979..dc82d08a39 100644 --- a/etc/koha-httpd.conf +++ b/etc/koha-httpd.conf @@ -5,24 +5,88 @@ ## OPAC ServerAdmin __WEBMASTER_EMAIL__ - DocumentRoot __BASE_DIR__/opac/htdocs + DocumentRoot __OPAC_WWW_DIR__ ServerName __WEBSERVER_HOST__ # ServerAlias opac.mydomain.com - ScriptAlias /cgi-bin/koha/ "__BASE_DIR__/opac/cgi-bin/" - ScriptAlias /index.html "__BASE_DIR__/opac/cgi-bin/opac-main.pl" - ScriptAlias /opac-search.pl "__BASE_DIR__/opac/cgi-bin/search" - ScriptAlias /search "__BASE_DIR__/opac/cgi-bin/search" - ErrorLog __BASE_DIR__/log/opac-error_log -# TransferLog __BASE_DIR__/log/opac-access_log - SetEnv PERL5LIB "__BASE_DIR__/intranet/modules" - SetEnv KOHA_CONF "__BASE_DIR__/etc/koha-conf.xml" + ScriptAlias /cgi-bin/koha/ "__OPAC_CGI_DIR__/opac/" + ScriptAlias /index.html "__OPAC_CGI_DIR__/opac/opac-main.pl" + ScriptAlias /opac-search.pl "__OPAC_CGI_DIR__/opac/opac-search.pl" + ScriptAlias /search "__OPAC_CGI_DIR__/opac/opac-search.pl" + ErrorLog __LOG_DIR__/koha-opac-error_log +# CustomLog __LOG_DIR__/koha-opac-access.log combined +# TransferLog __LOG_DIR__/koha-opac-access.log + SetEnv KOHA_CONF "__KOHA_CONF_DIR__/koha-conf.xml" + SetEnv PERL5LIB "__PERL_MODULE_DIR__" + SetEnv MEMCACHED_SERVERS "__MEMCACHED_SERVERS__" + SetEnv MEMCACHED_NAMESPACE "__MEMCACHED_NAMESPACE__" + + + mod_gzip_on yes + mod_gzip_dechunk yes + mod_gzip_keep_workfiles No + mod_gzip_can_negotiate yes + mod_gzip_update_static No + mod_gzip_temp_dir /tmp + mod_gzip_minimum_file_size 512 + mod_gzip_maximum_file_size 1000000 + mod_gzip_maximum_inmem_size 1000000 + mod_gzip_handle_methods GET POST + mod_gzip_item_exclude reqheader "User-Agent: .*Mozilla/4\..*\[" + mod_gzip_item_exclude mime ^image/.* + mod_gzip_item_exclude rspheader Content-Type:image/* + mod_gzip_item_include file \.js$ + mod_gzip_item_include mime ^application/javascript$ + mod_gzip_item_include mime ^application/x-javascript$ + mod_gzip_item_include file \.php$ + mod_gzip_item_include mime ^text/html$ + mod_gzip_item_include file \.css$ + mod_gzip_item_include mime ^text/css$ + + + + + # Compress content with type html, text, and css, ... + AddOutputFilterByType DEFLATE text/plain text/html text/xml text/css + AddOutputFilterByType DEFLATE application/xml application/xhtml+xml application/rss+xml application/javascript application/x-javascript + + DeflateCompressionLevel 9 + + # Properly handle old browsers that do not support compression + BrowserMatch ^Mozilla/4 gzip-only-text/html + BrowserMatch ^Mozilla/4\.0[678] no-gzip + BrowserMatch \bMSIE !no-gzip !gzip-only-text/html + + DeflateFilterNote Input instream + DeflateFilterNote Output outstream + DeflateFilterNote Ratio ratio + + LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate + + #properly handle requests coming from behind proxies + Header append Vary User-Agent + + + + +# Repeat this virtualhost stanza changing the following environment vars to +# create multiple OPAC interfaces with custom css and/or search limits: +# SetEnv OPAC_CSS_OVERRIDE mystyle.css +# SetEnv OPAC_SEARCH_LIMIT branch:CODE +# SetEnv OPAC_LIMIT_OVERRIDE 1 + Options +FollowSymLinks + ErrorDocument 400 /cgi-bin/koha/errors/400.pl + ErrorDocument 401 /cgi-bin/koha/errors/401.pl + ErrorDocument 403 /cgi-bin/koha/errors/403.pl + ErrorDocument 404 /cgi-bin/koha/errors/404.pl + ErrorDocument 500 /cgi-bin/koha/errors/500.pl + # Rewrite Rules RewriteEngine On # Uncomment to turn on rewrite logging -# RewriteLog __BASE_DIR__/log/opac-rewrite.log +# RewriteLog __LOG_DIR__/koha-opac-rewrite.log # RewriteLogLevel 1 RewriteCond %{QUERY_STRING} (.*?)(?:[A-Za-z0-9_-]+)=&(.*) RewriteRule (.+) $1?%1%2 [N,R,NE] @@ -35,20 +99,76 @@ ## Intranet ServerAdmin __WEBMASTER_EMAIL__ - DocumentRoot __BASE_DIR__/intranet/htdocs + DocumentRoot __INTRANET_WWW_DIR__ ServerName __WEBSERVER_HOST__:__WEBSERVER_PORT_LIBRARIAN__ # ServerAlias intranet.mydomain.com - ScriptAlias /cgi-bin/koha/ "__BASE_DIR__/intranet/cgi-bin/" - ScriptAlias /index.html "__BASE_DIR__/intranet/cgi-bin/mainpage.pl" - ScriptAlias /search "__BASE_DIR__/intranet/cgi-bin/search.pl" - ErrorLog __BASE_DIR__/log/error_log -# TransferLog __BASE_DIR__/log/access_log - SetEnv PERL5LIB "__BASE_DIR__/intranet/modules" - SetEnv KOHA_CONF "__BASE_DIR__/etc/koha-conf.xml" + ScriptAlias /cgi-bin/koha/ "__INTRANET_CGI_DIR__/" + ScriptAlias /index.html "__INTRANET_CGI_DIR__/mainpage.pl" + ScriptAlias /search "__INTRANET_CGI_DIR__/search.pl" + ErrorLog __LOG_DIR__/koha-error_log +# TransferLog __LOG_DIR__/koha-access.log + SetEnv KOHA_CONF "__KOHA_CONF_DIR__/koha-conf.xml" + SetEnv PERL5LIB "__PERL_MODULE_DIR__" + SetEnv MEMCACHED_SERVERS "__MEMCACHED_SERVERS__" + SetEnv MEMCACHED_NAMESPACE "__MEMCACHED_NAMESPACE__" Options +FollowSymLinks + + ErrorDocument 400 /cgi-bin/koha/errors/400.pl + ErrorDocument 401 /cgi-bin/koha/errors/401.pl + ErrorDocument 403 /cgi-bin/koha/errors/403.pl + ErrorDocument 404 /cgi-bin/koha/errors/404.pl + ErrorDocument 500 /cgi-bin/koha/errors/500.pl + + + mod_gzip_on yes + mod_gzip_dechunk yes + mod_gzip_keep_workfiles No + mod_gzip_can_negotiate yes + mod_gzip_update_static No + mod_gzip_temp_dir /tmp + mod_gzip_minimum_file_size 512 + mod_gzip_maximum_file_size 1000000 + mod_gzip_maximum_inmem_size 1000000 + mod_gzip_handle_methods GET POST + mod_gzip_item_exclude reqheader "User-Agent: .*Mozilla/4\..*\[" + mod_gzip_item_exclude mime ^image/.* + mod_gzip_item_exclude rspheader Content-Type:image/* + mod_gzip_item_include file \.js$ + mod_gzip_item_include mime ^application/javascript$ + mod_gzip_item_include mime ^application/x-javascript$ + mod_gzip_item_include file \.php$ + mod_gzip_item_include mime ^text/html$ + mod_gzip_item_include file \.css$ + mod_gzip_item_include mime ^text/css$ + + + + + # Compress content with type html, text, and css, ... + AddOutputFilterByType DEFLATE text/plain text/html text/xml text/css + AddOutputFilterByType DEFLATE application/xml application/xhtml+xml application/rss+xml application/javascript application/x-javascript + + DeflateCompressionLevel 9 + + # Properly handle old browsers that do not support compression + BrowserMatch ^Mozilla/4 gzip-only-text/html + BrowserMatch ^Mozilla/4\.0[678] no-gzip + BrowserMatch \bMSIE !no-gzip !gzip-only-text/html + + DeflateFilterNote Input instream + DeflateFilterNote Output outstream + DeflateFilterNote Ratio ratio + + LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate + + #properly handle requests coming from behind proxies + Header append Vary User-Agent + + + RewriteEngine On # Uncomment to turn on rewrite logging -# RewriteLog __BASE_DIR__/log/intranet-rewrite.log +# RewriteLog __LOG_DIR__/koha-intranet-rewrite.log # RewriteLogLevel 1 RewriteCond %{QUERY_STRING} (.*?)(?:[A-Za-z0-9_-]+)=&(.*)