Bug 7298: (follow-up) fix uninitialized variable warning
[koha.git] / etc / koha-httpd.conf
index 2b986ac..f9a1970 100644 (file)
    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
+#  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
+
+   <Directory "__OPAC_WWW_DIR__">
+      Options -Indexes
+   </Directory>
+
+   # Secure internal stuff
+   <DirectoryMatch "__OPAC_WWW_DIR__/.*/(modules|xslt|includes)">
+      Order deny,allow
+      Deny from all
+   </DirectoryMatch>
+
    <IfModule mod_gzip.c>
      mod_gzip_on yes
      mod_gzip_dechunk yes
    ErrorDocument 404 /cgi-bin/koha/errors/404.pl
    ErrorDocument 500 /cgi-bin/koha/errors/500.pl
 
-#  Rewrite Rules
-   RewriteEngine On
+   <IfModule mod_rewrite.c>
+     # 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]
+   </IfModule>
 </VirtualHost>
 
 ## Intranet
    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
 
+   <Directory "__INTRANET_WWW_DIR__">
+      Options -Indexes
+   </Directory>
+
+   # Secure internal stuff
+   <DirectoryMatch "__INTRANET_WWW_DIR__/.*/(modules|xslt|includes)">
+      Order deny,allow
+      Deny from all
+   </DirectoryMatch>
+
    <IfModule mod_gzip.c>
      mod_gzip_on yes
      mod_gzip_dechunk yes
      </IfModule>
   </IfModule>
 
-   RewriteEngine On    
-#  Uncomment to turn on rewrite logging
-#  RewriteLog __LOG_DIR__/koha-intranet-rewrite.log
-#  RewriteLogLevel 1
+   <IfModule mod_rewrite.c>
+     # Rewrite Rules
+     RewriteEngine On
 
-   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]
+     # 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]
+   </IfModule>
 </VirtualHost>