X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=etc%2Fkoha-httpd.conf;h=f9a1970767e35331224193a9efb85b1688ac34ef;hb=0f9ec8f589e0afee79923570b71078d8c94b8986;hp=eaf249ea7e99231cb1c712712e5b2ac09b5525f2;hpb=d339abf0bfc334a819818bbb9b4c31f23326cbd1;p=koha_fer diff --git a/etc/koha-httpd.conf b/etc/koha-httpd.conf index eaf249ea7e..f9a1970767 100644 --- a/etc/koha-httpd.conf +++ b/etc/koha-httpd.conf @@ -13,9 +13,77 @@ 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 -# TransferLog __LOG_DIR__/koha-opac-access_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__" + + # This syntax allows you to override a system preference + # for a given virtual host. Use with caution! + # You should add all the system preferences you override + # in one or more vhosts to the environment variable + # OVERRIDE_SYSPREF_NAMES for your staff intranet vhost + # SetEnv OVERRIDE_SYSPREF_PrefName Value + + + Options -Indexes + + + # Secure internal stuff + + Order deny,allow + Deny from all + + + + 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: @@ -31,18 +99,20 @@ ErrorDocument 404 /cgi-bin/koha/errors/404.pl ErrorDocument 500 /cgi-bin/koha/errors/500.pl -# Rewrite Rules - RewriteEngine On + + # Rewrite Rules + RewriteEngine On -# Uncomment to turn on rewrite logging -# RewriteLog __LOG_DIR__/koha-opac-rewrite.log -# RewriteLogLevel 1 - RewriteCond %{QUERY_STRING} (.*?)(?:[A-Za-z0-9_-]+)=&(.*) - RewriteRule (.+) $1?%1%2 [N,R,NE] + # Uncomment to turn on rewrite logging + #RewriteLog __LOG_DIR__/koha-opac-rewrite.log + #RewriteLogLevel 1 - RewriteRule ^/bib/([^\/]*)/?$ /cgi-bin/koha/opac-detail\.pl?bib=$1 [PT] - RewriteRule ^/isbn/([^\/]*)/?$ /search?q=isbn:$1 [PT] - RewriteRule ^/issn/([^\/]*)/?$ /search?q=issn:$1 [PT] + RewriteCond %{QUERY_STRING} (.*?)(?:[A-Za-z0-9_-]+)=&(.*) + #RewriteRule (.+) $1?%1%2 [N,R,NE] + RewriteRule ^/bib/([^\/]*)/?$ /cgi-bin/koha/opac-detail\.pl?bib=$1 [PT] + RewriteRule ^/isbn/([^\/]*)/?$ /search?q=isbn:$1 [PT] + RewriteRule ^/issn/([^\/]*)/?$ /search?q=issn:$1 [PT] + ## Intranet @@ -54,26 +124,95 @@ ScriptAlias /cgi-bin/koha/ "__INTRANET_CGI_DIR__/" ScriptAlias /index.html "__INTRANET_CGI_DIR__/mainpage.pl" ScriptAlias /search "__INTRANET_CGI_DIR__/search.pl" + Alias /plugin/ "__PLUGINS_DIR__/" ErrorLog __LOG_DIR__/koha-error_log -# TransferLog __LOG_DIR__/koha-access_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 + # If you are overriding any system preferences, + # list them in this variable so the preference editor + # knows that they have been overridden. + # SetEnv OVERRIDE_SYSPREF_NAMES "Pref1,Pref2,Pref3" + 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 - RewriteEngine On -# Uncomment to turn on rewrite logging -# RewriteLog __LOG_DIR__/koha-intranet-rewrite.log -# RewriteLogLevel 1 + + Options -Indexes + + + # Secure internal stuff + + Order deny,allow + Deny from all + + + + 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 + + + + + # Rewrite Rules + RewriteEngine On + + # Uncomment to turn on rewrite logging + #RewriteLog __LOG_DIR__/koha-intranet-rewrite.log + #RewriteLogLevel 1 - RewriteCond %{QUERY_STRING} (.*?)(?:[A-Za-z0-9_-]+)=&(.*) - RewriteRule (.+) $1?%1%2 [N,R,NE] - RewriteRule ^/bib/([^\/]*)/?$ /cgi-bin/koha/detail\.pl?bib=$1 [PT] - RewriteRule ^/isbn/([^\/]*)/?$ /search?q=isbn:$1 [PT] - RewriteRule ^/issn/([^\/]*)/?$ /search?q=issn:$1 [PT] + RewriteCond %{QUERY_STRING} (.*?)(?:[A-Za-z0-9_-]+)=&(.*) + #RewriteRule (.+) $1?%1%2 [N,R,NE] + RewriteRule ^/bib/([^\/]*)/?$ /cgi-bin/koha/detail\.pl?bib=$1 [PT] + RewriteRule ^/isbn/([^\/]*)/?$ /search?q=isbn:$1 [PT] + RewriteRule ^/issn/([^\/]*)/?$ /search?q=issn:$1 [PT] +