[OPEN-ILS-DEV] Installing Evergreen on Ubuntu Xenial
françois
f.posseik at riseup.net
Sun Jan 8 09:57:43 EST 2017
Dear all,
I am new to evergreen and I am trying to install it, with the aim of
using it together with VuFind at a later stage.
I started the installation on an updated and freshly installed
Ubuntu-xenial server. I install Evergreen 2.11 and openSRF 2.5.0.
I followed the installation instructions (of very good quality!) very
closely almost up to the end. I got stuck at the point where I should
start Evergreen
(http://docs.evergreen-ils.org/2.11/_starting_evergreen.html)
But let me start with the various steps of the troubleshooting page:
Now I tried the follow the troubleshooting page:
https://wiki.evergreen-ils.org/doku.php?id=troubleshooting:checking_for_errors
============== STEP 1:
Stopping apache and openSRF is ok.
============== STEP 3:
$ ps -aef | grep ejabberd
ejabberd 1176 1 0 13:52 ? 00:00:03
/usr/lib/erlang/erts-7.3/bin/beam.smp -K true -P 250000 -- -root
/usr/lib/erlang -progname erl -- -home /var/lib/ejabberd -- -sname
ejabberd -noshell -noinput -noshell -noinput -mnesia dir
"/var/lib/ejabberd" -ejabberd log_rate_limit 100 log_rotate_size 0
log_rotate_date "" -s ejabberd -smp auto start
ejabberd 1286 1176 0 13:52 ? 00:00:00 inet_gethost 4
ejabberd 1287 1286 0 13:52 ? 00:00:00 inet_gethost 4
NOTE:
/usr/lib/erlang/erts-5.5.5/bin/epmd -daemon
is missing
$ ps -aef | grep memcached
memcache 1102 1 0 13:52 ? 00:00:00 /usr/bin/memcached -m 64
-p 11211 -u memcache -l 127.0.0.1
============== STEP 5: Start the openSRF router:
$ osrf_control --localhost --start-all
* starting router and services for localhost
* starting services for localhost
* starting service pid=1832 opensrf.settings
* starting service pid=1840 open-ils.acq
* starting service pid=1853 open-ils.booking
* starting service pid=1861 open-ils.cat
* starting service pid=1869 open-ils.supercat
* starting service pid=1877 open-ils.search
* starting service pid=1885 open-ils.circ
* starting service pid=1893 open-ils.actor
* starting service pid=1901 open-ils.auth_proxy
* starting service pid=1909 open-ils.storage
* starting service pid=1917 open-ils.justintime
* starting service pid=1925 open-ils.collections
* starting service pid=1933 open-ils.reporter
* starting service pid=1941 open-ils.permacrud
* starting service pid=1949 open-ils.trigger
* starting service pid=1957 open-ils.url_verify
* starting service pid=1965 open-ils.fielder
* starting service pid=1973 open-ils.vandelay
* starting service pid=1981 open-ils.serial
* starting service pid=1990 opensrf.math
* starting service pid=2000 opensrf.dbmath
* starting service pid=2010 open-ils.auth
* starting service pid=2019 open-ils.auth_internal
* starting service pid=2028 open-ils.cstore
* starting service pid=2037 open-ils.reporter-store
* starting service pid=2047 open-ils.pcrud
$ grep ERR /openils/var/log/*router.log
grep: /openils/var/log/*router.log: No such file or directory
$ ps -aef | grep Router
opensrf 1824 1 0 14:25 ? 00:00:00 OpenSRF Router
opensrf 1825 1 0 14:25 ? 00:00:00 OpenSRF Router
============== STEP 6:
These log files do not exist:
/openils/var/log/router.log
/openils/var/log/osrfsys.log
I attached the following files, replacing passwords by Xs:
/openils/conf/opensrf.xml
/openils/conf/opensrf_core.xml
$ ps -aef | grep -i opensrf
gives a good output.
============== STEP 7:
I don't know how to open "the OpenSRF C services" as
/openils/bin/osrf_ctl.sh does not exist in my version of opensrf.
$ grep ERR /openils/var/log/*.log
I copied the output in the attached ERR_in_osrfsys.log file.
I guess the line:
"/openils/bin/osrf_control [ERR :1909:CDBI.pm:30:] Your version of
Class::DBI, 3.0.17, is too new and incompatible with Evergreen." is the
main problem. Shall I really downgrade???
$ ps -aef | grep -i opensrf
Here the line with "OpenSRF System-C" is missing!
============== STEP 8:
$ /openils/bin/autogen.sh -c /openils/conf/opensrf_core.xml -u
/openils/bin/autogen.sh: illegal option -- c
Updating Evergreen organization tree and IDL
Updating fieldmapper
-> /openils/var/web/opac/common/js//fmall.js
Updating web_fieldmapper
-> /openils/var/web/opac/common/js//fmcore.js
Updating OrgTree
removing OrgTree from the cache for locale hy-AM...
removing OrgTree from the cache for locale cs-CZ...
removing OrgTree from the cache for locale en-CA...
removing OrgTree from the cache for locale en-US...
removing OrgTree from the cache for locale fi-FI...
removing OrgTree from the cache for locale fr-CA...
removing OrgTree from the cache for locale ru-RU...
removing OrgTree from the cache for locale es-ES...
-> /openils/var/web/opac/common/js//*/OrgTree.js
Updating OrgTree HTML
-> /openils/var/web/opac/extras/slimpac//*/lib_list.inc
Updating locales selection HTML
-> /openils/var/web/opac/extras/slimpac//locales.inc
Current Evergreen cache key: aa4663
Done
============== STEP 9:
The test connection to Evergreen is successful with:
srfsh% login <admin-user> <admin-pass>
============== STEP 10:
Issuing the command:
%sudo /etc/init.d/apache2 restart
[ ok ] Restarting apache2 (via systemctl): apache2.service.
could not start apache: the web-site is down.
I found two possible sources of error. The first is a problem with
loading /etc/apache2/eg_startup
The command sudo journalctl -xe returns:
Jan 08 12:53:36 Ubuntu-1604-xenial-64-minimal apache2[8565]:
[perl:error] [pid 8565] Can't load Perl file: /etc/apache2/eg_startup
for server localhost:0, exiting...
Jan 08 12:53:36 Ubuntu-1604-xenial-64-minimal apache2[8551]: Action
'start' failed.
There might also be a problem with my ssh key, but I not sure if it is
decisive. In /var/log/apache2/error.log I get the following messages:
[Thu Jan 05 06:25:03.382097 2017] [ssl:warn] [pid 29247] AH01906:
88.99.87.170:443:0 server certificate is a CA certificate
(BasicConstraints: CA == TRUE !?)
[Thu Jan 05 06:25:03.382363 2017] [ssl:error] [pid 29247] AH02217:
ssl_stapling_init_cert: can't retrieve issuer certificate! [subject:
CN=88.99.87.170,O=Alternative Bibliotek,ST=Some-State,C=
DE / issuer: CN=88.99.87.170,O=Alternative Bibliotek,ST=Some-State,C=DE
/ serial: 82AF5F69439281BF / notbefore: Jan 4 13:05:06 2017 GMT /
notafter: Jan 4 13:05:06 2018 GMT]
[Thu Jan 05 06:25:03.382377 2017] [ssl:error] [pid 29247] AH02604:
Unable to configure certificate 88.99.87.170:443:0 for stapling
I use at the moment a self signed SSL certificate. Shall I care about
this error message?
of course, there is nothing in:
$ ps -aef | grep -i apache
I attached the files:
/etc/apache2/eg_vhost.conf
/etc/apache2/sites-available/eg.conf
I guess I stop here for now.
Thank you in advance for the support!
Best wishes
François
-------------- next part --------------
A non-text attachment was scrubbed...
Name: opensrf.xml
Type: text/xml
Size: 57621 bytes
Desc: not available
URL: <http://libmail.georgialibraries.org/pipermail/open-ils-dev/attachments/20170108/2745a57e/attachment-0002.xml>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: opensrf_core.xml
Type: text/xml
Size: 6764 bytes
Desc: not available
URL: <http://libmail.georgialibraries.org/pipermail/open-ils-dev/attachments/20170108/2745a57e/attachment-0003.xml>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ERR_in_osrfsys.log
Type: text/x-log
Size: 10559 bytes
Desc: not available
URL: <http://libmail.georgialibraries.org/pipermail/open-ils-dev/attachments/20170108/2745a57e/attachment-0001.bin>
-------------- next part --------------
# :vim set syntax apache
LogLevel info
# - log locally
# CustomLog /var/log/apache2/access.log combined
# ErrorLog /var/log/apache2/error.log
# - log to syslog
CustomLog "|/usr/bin/logger -p local7.info" common
ErrorLog syslog:local7
# ----------------------------------------------------------------------------------
# Set up Perl
# ----------------------------------------------------------------------------------
# - needed by CGIs
PerlRequire /etc/apache2/eg_startup
PerlChildInitHandler OpenILS::WWW::Reporter::child_init
PerlChildInitHandler OpenILS::WWW::SuperCat::child_init
PerlChildInitHandler OpenILS::WWW::AddedContent::child_init
PerlChildInitHandler OpenILS::WWW::AutoSuggest::child_init
PerlChildInitHandler OpenILS::WWW::PhoneList::child_init
PerlChildInitHandler OpenILS::WWW::EGWeb::child_init
# ----------------------------------------------------------------------------------
# Set some defaults for our working directories
# ----------------------------------------------------------------------------------
<Directory /openils/var/web>
Require all granted
</Directory>
# ----------------------------------------------------------------------------------
# XUL directory
# ----------------------------------------------------------------------------------
<Directory /openils/var/web/xul>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
# ----------------------------------------------------------------------------------
# Remove the language portion from the URL
# ----------------------------------------------------------------------------------
AliasMatch ^/opac/.*/skin/(.*)/(.*)/(.*) /openils/var/web/opac/skin/$1/$2/$3
AliasMatch ^/opac/.*/extras/slimpac/(.*) /openils/var/web/opac/extras/slimpac/$1
AliasMatch ^/opac/.*/extras/selfcheck/(.*) /openils/var/web/opac/extras/selfcheck/$1
# ----------------------------------------------------------------------------------
# System config CGI scripts go here
# ----------------------------------------------------------------------------------
Alias /cgi-bin/offline/ "/openils/var/cgi-bin/offline/"
<Directory "/openils/var/cgi-bin/offline">
AddHandler cgi-script .cgi .pl
AllowOverride None
Options None
#Require host 10.0.0.0/8
Require all granted
Options FollowSymLinks ExecCGI Indexes
</Directory>
# ----------------------------------------------------------------------------------
# Updates folder
# ----------------------------------------------------------------------------------
Alias /updates/ "/openils/var/updates/pub/"
<Directory "/openils/var/updates/pub">
<Files check>
ForceType cgi-script
</Files>
<Files update.rdf>
ForceType cgi-script
</Files>
<Files manualupdate.html>
ForceType cgi-script
</Files>
<Files download>
ForceType cgi-script
</Files>
AllowOverride None
Options None
Options ExecCGI
Require all granted
</Directory>
# ----------------------------------------------------------------------------------
# OPTIONAL: Set how long the client will cache our content. Change to suit
# ----------------------------------------------------------------------------------
ExpiresActive On
ExpiresDefault "access plus 1 month"
ExpiresByType text/html "access plus 18 hours"
ExpiresByType application/xhtml+xml "access plus 18 hours"
ExpiresByType application/x-javascript "access plus 18 hours"
ExpiresByType application/javascript "access plus 18 hours"
ExpiresByType text/css "access plus 50 minutes"
# ----------------------------------------------------------------------------------
# Set up our SSL virtual host
# ----------------------------------------------------------------------------------
#Listen 443
<VirtualHost *:443>
DocumentRoot "/openils/var/web"
ServerName localhost:443
ServerAlias 127.0.0.1:443
SSLEngine on
SSLProxyEngine on # required for ErrorDocument 404 on SSL connections
SSLHonorCipherOrder On
SSLCipherSuite ECDHE-RSA-AES256-SHA384:AES256-SHA256:RC4:HIGH:!MD5:!aNULL:!EDH:!AESGCM
# If you don't have an SSL cert, you can create self-signed
# certificate and key with:
# openssl req -new -x509 -nodes -out server.crt -keyout server.key
#SSLCertificateFile ssl/server.crt
#SSLCertificateKeyFile ssl/server.key
SSLCertificateFile /etc/ssl/certs/apache-selfsigned.crt
SSLCertificateKeyFile /etc/ssl/private/apache-selfsigned.key
# - absorb the shared virtual host settings
Include eg_vhost.conf
# help IE along with SSL pages
SetEnvIf User-Agent ".*MSIE [1-5].*" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
SetEnvIf User-Agent ".*MSIE [6-9].*" \
ssl-unclean-shutdown
</VirtualHost>
# ----------------------------------------------------------------------------------
# Set up our main virtual host
# Port 80 comes after 443 to avoid "unknown protocol speaking not SSL to HTTPS port!?"
# errors, per http://wiki.apache.org/httpd/InternalDummyConnection
# ----------------------------------------------------------------------------------
<VirtualHost *:80>
ServerName localhost:80
ServerAlias 127.0.0.1:80
DocumentRoot /openils/var/web/
DirectoryIndex index.html index.xhtml
# - absorb the shared virtual host settings
Include eg_vhost.conf
</VirtualHost>
-------------- next part --------------
# ----------------------------------------------------------------------------------
# This is the global Evergreen virtual host config. Anything you want published
# through all virtual hosts (port 80, port 443, etc.) should live in here.
# ----------------------------------------------------------------------------------
# ----------------------------------------------------------------------------------
# Point / to the opac - if you have a custom skin or locale, point at it here
# ----------------------------------------------------------------------------------
RedirectMatch 301 ^/$ /eg/opac/home
# ----------------------------------------------------------------------------------
# Redirect staff to the correct URL if they forget to include the final /
# ----------------------------------------------------------------------------------
RedirectMatch 301 ^/eg/staff$ /eg/staff/
# ----------------------------------------------------------------------------------
# Point / to the IP address redirector
# ----------------------------------------------------------------------------------
#<LocationMatch ^/$>
# SetHandler perl-script
# PerlHandler OpenILS::WWW::Redirect
# Options +ExecCGI
# PerlSendHeader On
# #PerlSetVar OILSRedirectSkin "default"
# # OILSRedirectDepth defaults to the depth of the branch that the OPAC was directed to
# #PerlSetVar OILSRedirectDepth "0"
# #PerlSetVar OILSRedirectLocale "en-US"
# # Use the template-toolkit opac
# #PerlSetVar OILSRedirectTpac "true"
# allow from all
#</LocationMatch>
# ----------------------------------------------------------------------------------
# Assign a default locale to the accessible OPAC
# ----------------------------------------------------------------------------------
RedirectMatch 301 ^/opac/extras/slimpac/start.html$ /opac/en-US/extras/slimpac/start.html
RedirectMatch 301 ^/opac/extras/slimpac/advanced.html$ /opac/en-US/extras/slimpac/advanced.html
# ----------------------------------------------------------------------------------
# Configure the gateway and translator
# ----------------------------------------------------------------------------------
OSRFGatewayConfig /openils/conf/opensrf_core.xml
OSRFTranslatorConfig /openils/conf/opensrf_core.xml
# Translator memcache server. Default is localhost
# OSRFTranslatorCacheServer 127.0.0.1:11211
# ----------------------------------------------------------------------------------
# Added content plugin
# ----------------------------------------------------------------------------------
<Location /opac/extras/ac/>
SetHandler perl-script
PerlHandler OpenILS::WWW::AddedContent
Options +ExecCGI
PerlSendHeader On
Require all granted
</Location>
# Lock clearing cache down to STAFF_LOGIN
<Location /opac/extras/ac/clearcache/>
PerlAccessHandler OpenILS::WWW::AccessHandler
PerlSetVar OILSAccessHandlerPermission "STAFF_LOGIN"
</Location>
# Autosuggest for searches
<Location /opac/extras/autosuggest>
SetHandler perl-script
PerlHandler OpenILS::WWW::AutoSuggest
PerlSendHeader On
Require all granted
</Location>
# Flattener service
<Location /opac/extras/flattener>
SetHandler perl-script
PerlHandler OpenILS::WWW::FlatFielder
PerlSendHeader On
Require all granted
</Location>
# ----------------------------------------------------------------------------------
# Replace broken cover images with a transparent GIF by default
# ----------------------------------------------------------------------------------
RewriteEngine ON
RewriteRule ^/opac/extras/ac/jacket/(small|medium|large)/$ \
/opac/images/blank.png [P,L]
<Location /opac/extras/ac/jacket>
ErrorDocument 404 /opac/images/blank.png
</Location>
# Uncomment one or more of these to have a "no image" image other than the blank
# image above.
# Note: There are no default images provided for these, you will need to provide
# your own "no image" image(s).
#<Location /opac/extras/ac/jacket/small>
# ErrorDocument 404 /opac/images/noimage_small.png
#</Location>
#<Location /opac/extras/ac/jacket/medium>
# ErrorDocument 404 /opac/images/noimage_medium.png
#</Location>
#<Location /opac/extras/ac/jacket/large>
# ErrorDocument 404 /opac/images/noimage_large.png
#</Location>
# ----------------------------------------------------------------------------------
# Add the row ID (RID) and date so we can make unAPI happy
# ----------------------------------------------------------------------------------
RewriteCond %{QUERY_STRING} (^r|&r)=(\d+)
RewriteRule . - [E=OILS_OPAC_RID:%2,E=OILS_TIME_YEAR:%{TIME_YEAR}]
# ----------------------------------------------------------------------------------
# Pull the locale from the URL
# ----------------------------------------------------------------------------------
RewriteCond %{REQUEST_URI} ^/opac/(.*?)/
RewriteRule . - [E=locale:%1]
# ----------------------------------------------------------------------------------
# Rewrite JSPac->TPac with redirects
# ----------------------------------------------------------------------------------
# First things first, extract useful data
# And we are going to start with a "this is the JSPac" check on each of these:
# RewriteCond %{REQUEST_URI} ^/?opac/
# Basic (overall) search type, if present
# I am cheating and grabbing RT or TP because I dunno the difference between them.
RewriteCond %{REQUEST_URI} ^/opac/
RewriteCond %{QUERY_STRING} (^|[^0-9a-zA-Z])(rt|tp)=([^;&]*)
RewriteRule . - [E=OILS_JSPAC_SEARCH_TYPE:qtype=%3;]
# Basic (overall) search term(s), if present - NOTE: Not doing advanced search.
RewriteCond %{REQUEST_URI} ^/opac/
RewriteCond %{QUERY_STRING} (^|[^0-9a-zA-Z])t=([^;&]*)
RewriteRule . - [E=OILS_JSPAC_SEARCH_TERMS:query=%2;]
# Search Location, if present
RewriteCond %{REQUEST_URI} ^/opac/
RewriteCond %{QUERY_STRING} (^|[^0-9a-zA-Z])l=([^;&]*)
RewriteRule . - [E=OILS_JSPAC_SEARCH_LOCATION:locg=%2;]
# My Account
RewriteRule /opac/[^/]*/skin/default/xml/myopac.xml /eg/opac/myopac/main?%{ENV:OILS_JSPAC_SEARCH_TYPE}%{ENV:OILS_JSPAC_SEARCH_TERMS}%{ENV:OILS_JSPAC_SEARCH_LOCATION} [NE,R,L]
# Record Pages
# /opac/en-US/skin/default/xml/rdetail.xml?r=32 -> /eg/opac/record/32
RewriteCond %{QUERY_STRING} (^|[^0-9a-zA-Z])r=([^;&]*)
RewriteRule /opac/.*/rdetail.xml /eg/opac/record/%2?%{ENV:OILS_JSPAC_SEARCH_TYPE}%{ENV:OILS_JSPAC_SEARCH_TERMS}%{ENV:OILS_JSPAC_SEARCH_LOCATION} [NE,R,L]
# Bookbag Pages
# /opac/extras/feed/bookbag/html-full/1 -> /eg/opac/results?bookbag=1;page=0;locg=1;depth=0
RewriteRule /opac/extras/feed/bookbag/html-full/(\d*) /eg/opac/results?bookbag=$1;%{ENV:OILS_JSPAC_SEARCH_TYPE}%{ENV:OILS_JSPAC_SEARCH_TERMS}%{ENV:OILS_JSPAC_SEARCH_LOCATION} [NE,R,L]
# Search Results Pages
RewriteRule /opac/[^/]*/skin/[^/]*/xml/rresult.xml /eg/opac/results?%{ENV:OILS_JSPAC_SEARCH_TYPE}%{ENV:OILS_JSPAC_SEARCH_TERMS}%{ENV:OILS_JSPAC_SEARCH_LOCATION} [NE,R,L]
# Basic Search (STILL not doing advanced)
# Fallback! But only for things that end in xml, htm, or html
# Images, CSS, etc can stick around.
RewriteRule /opac/[^/]*/skin/.*(xml|htm|html|/)$ /eg/opac/home?%{ENV:OILS_JSPAC_SEARCH_TYPE}%{ENV:OILS_JSPAC_SEARCH_TERMS}%{ENV:OILS_JSPAC_SEARCH_LOCATION} [NE,R,L]
# -----------------------------------------------------------------------------$
# Force HTTPS for /eg/circ/selfcheck
# -----------------------------------------------------------------------------$
RewriteCond %{HTTPS} off
RewriteRule ^(/eg/circ/selfcheck) https://%{HTTP_HOST}%{REQUEST_URI} [NC,R=301,L]
# ----------------------------------------------------------------------------------
# For sanity reasons, default indexes to Off
# ----------------------------------------------------------------------------------
Options -Indexes
# ----------------------------------------------------------------------------------
# Configure the OPAC
# ----------------------------------------------------------------------------------
<LocationMatch /opac/>
SSILegacyExprParser on
AddType application/xhtml+xml .xml
# - configure mod_xmlent
XMLEntStripPI "yes"
XMLEntEscapeScript "no"
XMLEntStripComments "yes"
XMLEntContentType "text/html; charset=utf-8"
# forces quirks mode which we want for now
XMLEntStripDoctype "yes"
# - set up the include handlers
Options +Includes
AddOutputFilter INCLUDES .xsl
AddOutputFilter INCLUDES;XMLENT .xml
SetEnvIf Request_URI ".*" OILS_OPAC_BASE=/opac/
# This gives you the option to configure a different host to serve OPAC images from
# Specify the hostname (without protocol) and path to the images. Protocol will
# be determined at runtime
#SetEnvIf Request_URI ".*" OILS_OPAC_IMAGES_HOST=static.example.org/opac/
# In addition to loading images from a static host, you can also load CSS and/or
# Javascript from a static host or hosts. Protocol will be determined at runtime
# and/or by configuration options immediately following.
#SetEnvIf Request_URI ".*" OILS_OPAC_CSS_HOST=static.example.org/opac/
#SetEnvIf Request_URI ".*" OILS_OPAC_JS_HOST=static.example.org/opac/
# If you are not able to serve static content via https and
# wish to force http:// (and are comfortable with mixed-content
# warnings in client browsers), set this:
#SetEnvIf Request_URI ".*" OILS_OPAC_STATIC_PROTOCOL=http
# If you would prefer to fall back to your non-static servers for
# https pages, avoiding mixed-content warnings in client browsers
# and are willing to accept some increased server load, set this:
#SetEnvIf Request_URI ".*" OILS_OPAC_BYPASS_STATIC_FOR_HTTPS=yes
# Specify a ChiliFresh account to integrate their services with the OPAC
#SetEnv OILS_CHILIFRESH_ACCOUNT
#SetEnv OILS_CHILIFRESH_PROFILE
#SetEnv OILS_CHILIFRESH_URL http://chilifresh.com/on-site/js/evergreen.js
#SetEnv OILS_CHILIFRESH_HTTPS_URL https://secure.chilifresh.com/on-site/js/evergreen.js
# Specify the initial script URL for Novelist (containing account credentials, etc.)
#SetEnv OILS_NOVELIST_URL
#
# Uncomment to force SSL any time a patron is logged in. This protects
# authentication tokens. Left commented out for backwards compat for now.
#SetEnv OILS_OPAC_FORCE_LOGIN_SSL 1
# If set, the skin uses the combined JS file at $SKINDIR/js/combined.js
#SetEnv OILS_OPAC_COMBINED_JS 1
</LocationMatch>
<Location /opac/>
# ----------------------------------------------------------------------------------
# Some mod_deflate fun
# ----------------------------------------------------------------------------------
<IfModule mod_deflate.c>
SetOutputFilter DEFLATE
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
<IfModule mod_headers.c>
Header append Vary User-Agent env=!dont-vary
</IfModule>
</IfModule>
</Location>
<Location //opac/>
# ----------------------------------------------------------------------------------
# Some mod_deflate fun
# ----------------------------------------------------------------------------------
<IfModule mod_deflate.c>
SetOutputFilter DEFLATE
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
<IfModule mod_headers.c>
Header append Vary User-Agent env=!dont-vary
</IfModule>
</IfModule>
</Location>
# ----------------------------------------------------------------------------------
# Force SSL on the OPAC's "My Account" page
# ----------------------------------------------------------------------------------
<LocationMatch .*/myopac.xml>
SSLRequireSSL
</LocationMatch>
RewriteCond %{QUERY_STRING} locale=([^&]*)
RewriteRule ^/opac/[a-z]{2}-[A-Z]{2}/extras/slimpac/(.*)$ /opac/%1/extras/slimpac/$1? [redirect]
<LocationMatch /opac/[a-z]{2}-[A-Z]{2}/extras/slimpac/>
AddOutputFilter INCLUDES;XMLENT .html
</LocationMatch>
# ----------------------------------------------------------------------------------
# Run server-side XUL and XHTML through xmlent to load the correct XML entities
# ----------------------------------------------------------------------------------
RewriteCond %{HTTP:Accept-Language} ^([a-z]{2}-[A-Z]{2})$
# Default to en-US if we haven't matched a locale of the form xx-YY
RewriteRule .? - [S=4]
RewriteRule ^/xul/ - [E=locale:en-US]
RewriteRule ^/reports/ - [E=locale:en-US]
RewriteRule .? - [E=locale:en-US]
RewriteRule .? - [S=3]
# Otherwise, set our real locale
RewriteRule ^/xul/ - [E=locale:%{HTTP:Accept-Language}]
RewriteRule ^/reports/ - [E=locale:%{HTTP:Accept-Language}]
RewriteRule .? - [E=locale:%{HTTP:Accept-Language}]
<LocationMatch /xul/.*\.x?html$>
SSILegacyExprParser on
Options +Includes
XMLEntEscapeScript "no"
XMLEntStripComments "yes"
XMLEntStripPI "yes"
XMLEntStripDoctype "yes"
XMLEntContentType "text/html; charset=utf-8"
AddOutputFilter INCLUDES;XMLENT .xhtml
AddOutputFilter INCLUDES;XMLENT .html
SetEnv no-gzip
Require all granted
</LocationMatch>
<LocationMatch /xul/.*\.xul$>
SSILegacyExprParser on
Options +Includes
XMLEntContentType "application/vnd.mozilla.xul+xml"
AddOutputFilter INCLUDES;XMLENT .xul
SetEnv no-gzip
Require all granted
</LocationMatch>
# ----------------------------------------------------------------------------------
# Supercat feeds
# ----------------------------------------------------------------------------------
<Location /opac/extras/oisbn>
SetHandler perl-script
PerlHandler OpenILS::WWW::SuperCat::oisbn
Options +ExecCGI
PerlSendHeader On
Require all granted
</Location>
<Location /opac/extras/supercat>
SetHandler perl-script
PerlHandler OpenILS::WWW::SuperCat::supercat
Options +ExecCGI
PerlSendHeader On
Require all granted
</Location>
<Location /opac/extras/unapi>
SetHandler perl-script
PerlHandler OpenILS::WWW::SuperCat::unapi
Options +ExecCGI
PerlSendHeader On
Require all granted
</Location>
<Location /opac/extras/feed/bookbag>
SetHandler perl-script
PerlHandler OpenILS::WWW::SuperCat::bookbag_feed
Options +ExecCGI
PerlSendHeader On
Require all granted
</Location>
<Location /opac/extras/opensearch>
SetHandler perl-script
PerlHandler OpenILS::WWW::SuperCat::opensearch_feed
Options +ExecCGI
PerlSendHeader On
Require all granted
</Location>
<Location /opac/extras/sru>
SetHandler perl-script
PerlHandler OpenILS::WWW::SuperCat::sru_search
Options +ExecCGI
PerlSendHeader On
Require all granted
</Location>
<Location /opac/extras/sru_auth>
SetHandler perl-script
PerlHandler OpenILS::WWW::SuperCat::sru_auth_search
Options +ExecCGI
PerlSendHeader On
Require all granted
</Location>
<Location /opac/extras/feed/freshmeat>
SetHandler perl-script
PerlHandler OpenILS::WWW::SuperCat::changes_feed
Options +ExecCGI
PerlSendHeader On
Require all granted
</Location>
<Location /opac/extras/browse>
SetHandler perl-script
PerlHandler OpenILS::WWW::SuperCat::string_browse
Options +ExecCGI
PerlSendHeader On
Require all granted
</Location>
<Location /opac/extras/startwith>
SetHandler perl-script
PerlHandler OpenILS::WWW::SuperCat::string_startwith
Options +ExecCGI
PerlSendHeader On
Require all granted
</Location>
# ----------------------------------------------------------------------------------
# Module for displaying OpenSRF API documentation
# ----------------------------------------------------------------------------------
<Location /opac/extras/docgen.xsl>
AddOutputFilter INCLUDES .xsl
</Location>
# ----------------------------------------------------------------------------------
# Module for processing staff-client offline scripts lives here
# ----------------------------------------------------------------------------------
<Directory "/openils/var/cgi-bin/offline">
AddHandler cgi-script .pl
AllowOverride None
Options +ExecCGI
Require all granted
</Directory>
# ----------------------------------------------------------------------------------
# XXX Note, it's important to explicitly set the JSON encoding style
# (OSRFGatewayLegacyJSON), since the default encoding style will likely change
# with OpenSRF 1.0
# ----------------------------------------------------------------------------------
# OpenSRF JSON legacy gateway
# ----------------------------------------------------------------------------------
<Location /gateway>
SetHandler osrf_json_gateway_module
OSRFGatewayLegacyJSON "true"
Require all granted
</Location>
# ----------------------------------------------------------------------------------
# New-style OpenSRF JSON gateway
# ----------------------------------------------------------------------------------
<Location /osrf-gateway-v1>
SetHandler osrf_json_gateway_module
OSRFGatewayLegacyJSON "false"
Require all granted
</Location>
# ----------------------------------------------------------------------------------
# OpenSRF-over-HTTP translator
# (http://open-ils.org/dokuwiki/doku.php?id=opensrf_over_http)
# ----------------------------------------------------------------------------------
<Location /osrf-http-translator>
SetHandler osrf_http_translator_module
Require all granted
</Location>
# ----------------------------------------------------------------------------------
# The exporter lives here
# ----------------------------------------------------------------------------------
<Location /exporter>
SetHandler perl-script
AuthType Basic
AuthName "Exporter Login"
PerlOptions +GlobalRequest
PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
PerlAuthenHandler OpenILS::WWW::Proxy::Authen
Require valid-user
PerlHandler OpenILS::WWW::Exporter
Options +ExecCGI
PerlSendHeader On
</Location>
<Location /opac/extras/merge_template>
SetHandler perl-script
AuthType Basic
AuthName "Batch Update Login"
PerlOptions +GlobalRequest
PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
PerlAuthenHandler OpenILS::WWW::Proxy::Authen
Require valid-user
PerlHandler OpenILS::WWW::TemplateBatchBibUpdate
PerlSendHeader On
Options +ExecCGI
</Location>
<Location /opac/extras/circ>
AuthType Basic
AuthName "Circ Extras Login"
PerlOptions +GlobalRequest
PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
PerlAuthenHandler OpenILS::WWW::Proxy::Authen
Require valid-user
Options +ExecCGI
PerlSendHeader On
</Location>
<Location /collections>
SetHandler perl-script
AuthType Basic
AuthName "Collections Login"
PerlOptions +GlobalRequest
PerlSetVar OILSProxyPermissions "money.collections_tracker.create"
PerlAuthenHandler OpenILS::WWW::Proxy::Authen
Require valid-user
Options +ExecCGI
PerlSendHeader On
</Location>
# ----------------------------------------------------------------------------------
# Protect Standalone/Offline mode files from public view
# ----------------------------------------------------------------------------------
<Location /standalone/>
AuthType Basic
AuthName "Standalone Mode Login"
PerlOptions +GlobalRequest
PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
PerlAuthenHandler OpenILS::WWW::Proxy::Authen
Require valid-user
PerlSendHeader On
allow from all
SSLRequireSSL
</Location>
# ----------------------------------------------------------------------------------
# Reporting output lives here
# ----------------------------------------------------------------------------------
<Location /reporter/>
AuthType Basic
AuthName "Report Login"
PerlOptions +GlobalRequest
PerlSetVar OILSProxyPermissions "VIEW_REPORT_OUTPUT"
PerlAuthenHandler OpenILS::WWW::Proxy::Authen
Require valid-user
Options +ExecCGI
PerlSendHeader On
</Location>
# ----------------------------------------------------------------------------------
# Reports GUI
# ----------------------------------------------------------------------------------
<LocationMatch /reports.*\.x?html>
SSILegacyExprParser on
Options +Includes
XMLEntContentType "text/html; charset=utf-8"
AddOutputFilter INCLUDES;XMLENT .xhtml
AddOutputFilter INCLUDES;XMLENT .html
</LocationMatch>
<LocationMatch /reports>
SSILegacyExprParser on
Options +Includes
AddOutputFilter INCLUDES;XMLENT .xhtml
</LocationMatch>
# capture locale CGI param for /reports/fm_IDL.xml
RewriteCond %{REQUEST_URI} ^/reports/fm_IDL.xml
RewriteCond %{QUERY_STRING} locale=([^&;]*)
RewriteRule . - [E=locale:%1]
<LocationMatch /reports/fm_IDL.xml>
IDLChunkStripPI "yes"
IDLChunkEscapeScript "no"
IDLChunkStripComments "yes"
IDLChunkStripDoctype "yes"
IDLChunkContentType "application/xml; charset=utf-8"
AddOutputFilter INCLUDES;IDLCHUNK .xml
SetEnv no-gzip
</LocationMatch>
# ----------------------------------------------------------------------------------
# EDI Message viewer
# ----------------------------------------------------------------------------------
<Location /edi>
SetHandler perl-script
PerlHandler OpenILS::WWW::EDI
Options +ExecCGI
PerlSendHeader On
Require all granted
</Location>
# ----------------------------------------------------------------------------------
# XML-RPC gateway
# ----------------------------------------------------------------------------------
<Location /xml-rpc>
SetHandler perl-script
PerlHandler OpenILS::WWW::XMLRPCGateway
Options +ExecCGI
PerlSendHeader On
Require all granted
<IfModule mod_headers.c>
Header onsuccess set Cache-Control no-cache
</IfModule>
</Location>
# ----------------------------------------------------------------------------------
# Conify - next-generation Evergreen administration interface
# ----------------------------------------------------------------------------------
RewriteRule ^/conify/([a-z]{2}-[A-Z]{2})/global/(.*)$ /conify/global/$2 [E=locale:$1,L]
<Location /conify>
SSILegacyExprParser on
Options +Includes
XMLEntStripPI "yes"
XMLEntEscapeScript "no"
XMLEntStripComments "no"
XMLEntContentType "text/html; charset=utf-8"
AddOutputFilter INCLUDES;XMLENT .html
AuthType Basic
AuthName "Dojo Admin Login"
PerlOptions +GlobalRequest
PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
PerlAuthenHandler OpenILS::WWW::Proxy::Authen
Require valid-user
Options +ExecCGI
PerlSendHeader On
</Location>
# ----------------------------------------------------------------------------------
# The PhoneList lives here
# ----------------------------------------------------------------------------------
<Location /phonelist>
SetHandler perl-script
AuthType Basic
AuthName "PhoneList Login"
Require valid-user
PerlOptions +GlobalRequest
PerlSetVar OILSProxyPermissions "STAFF_LOGIN"
PerlHandler OpenILS::WWW::PhoneList
PerlAuthenHandler OpenILS::WWW::Proxy::Authen
Options +ExecCGI
PerlSendHeader On
<IfModule mod_headers.c>
Header onsuccess set Cache-Control no-cache
</IfModule>
</Location>
<Location /vandelay-upload>
SetHandler perl-script
PerlHandler OpenILS::WWW::Vandelay::spool_marc
Options +ExecCGI
Require all granted
</Location>
# OpenURL 0.1 searching based on OpenSearch
RewriteMap openurl prg:/openils/bin/openurl_map.pl
RewriteCond %{QUERY_STRING} (^.*$)
RewriteRule ^/openurl$ ${openurl:%1} [NE,PT]
# General Evergreen web template processor
<Location /eg>
SetHandler perl-script
PerlHandler OpenILS::WWW::EGWeb
Options +ExecCGI
PerlSendHeader On
Require all granted
PerlSetVar OILSWebBasePath "/eg"
PerlSetVar OILSWebWebDir "/openils/var/web"
PerlSetVar OILSWebDefaultTemplateExtension "tt2"
# Enable Template-Toolkit error debugging messages (apache error log)
PerlSetVar OILSWebDebugTemplate "false"
# local cache of compiled Template Toolkit templates
PerlSetVar OILSWebCompiledTemplateCache "/tmp/eg_template_cache"
# template TTL - how long, in seconds, that Template Toolkit
# waits to check for updated template files
#PerlSetVar OILSWebTemplateStatTTL 60
# -------------------------------------------------------
# Media Prefix. In the 3rd example, the protocol (http) is enforced
#PerlSetVar OILSWebMediaPrefix "/media"
#PerlSetVar OILSWebMediaPrefix "static.example.com/media"
#PerlSetVar OILSWebMediaPrefix "http://static.example.com/media"
# Locale messages files:
#
# These appear in pairs; the first represents the user agent
# Accept-Language header locale, and the second represents
# the fully-qualified path for the corresponding PO file that
# contains the messages.
#
# If you enable two or more locales, then users will be able to
# select their preferred locale from a locale picker in the TPAC.
#
#PerlAddVar OILSWebLocale "en"
#PerlAddVar OILSWebLocale "/openils/var/data/locale/opac/messages.en.po"
#PerlAddVar OILSWebLocale "en_ca"
#PerlAddVar OILSWebLocale "/openils/var/data/locale/opac/en-CA.po"
#PerlAddVar OILSWebLocale "fr_ca"
#PerlAddVar OILSWebLocale "/openils/var/data/locale/opac/fr-CA.po"
# Set the default locale: defaults to en-US
#PerlAddVar OILSWebDefaultLocale "fr_ca"
# Templates will be loaded from the following paths in reverse order.
PerlAddVar OILSWebTemplatePath "/openils/var/templates"
#PerlAddVar OILSWebTemplatePath "/openils/var/templates_localskin"
#-------------------------------------------------
# Added Content Configuration
#-------------------------------------------------
# Content Cafe
#SetEnv OILS_CONTENT_CAFE_USER MYUSER
#SetEnv OILS_CONTENT_CAFE_PASS MYPASS
# LibraryThing
#SetEnv OILS_LIBRARYTHING_URL http://ltfl.librarything.com/forlibraries/widget.js?id=MYID
#SetEnv OILS_LIBRARYTHING_HTTPS_URL https://ltfl.librarything.com/forlibraries/widget.js?id=MYID
# ChiliFresh
#SetEnv OILS_CHILIFRESH_ACCOUNT
#SetEnv OILS_CHILIFRESH_URL http://chilifresh.com/on-site/js/evergreen.js
#SetEnv OILS_CHILIFRESH_HTTPS_URL https://secure.chilifresh.com/on-site/js/evergreen.js
# Novelist
# SetEnv OILS_NOVELIST_URL http://imageserver.ebscohost.com/novelistselect/ns2init.js
# SetEnv OILS_NOVELIST_PROFILE <profile>
# SetEnv OILS_NOVELIST_PASSWORD <password>
#-------------------------------------------------
<IfModule mod_deflate.c>
SetOutputFilter DEFLATE
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
<IfModule mod_headers.c>
Header append Cache-Control "public"
Header append Vary User-Agent env=!dont-vary
</IfModule>
</IfModule>
</Location>
<LocationMatch ^/(images|css|js)/>
# should pick up the default expire time from eg.conf...
<IfModule mod_deflate.c>
SetOutputFilter DEFLATE
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
<IfModule mod_headers.c>
Header append Cache-Control "public"
Header append Vary User-Agent env=!dont-vary
</IfModule>
</IfModule>
</LocationMatch>
<Location /eg/opac>
PerlSetVar OILSWebContextLoader "OpenILS::WWW::EGCatLoader"
# Expire the HTML quickly since we're loading dynamic data for each page
ExpiresActive On
ExpiresByType text/html "access plus 5 seconds"
</Location>
<Location /eg/kpac>
PerlSetVar OILSWebContextLoader "OpenILS::WWW::EGKPacLoader"
PerlSetVar KPacConfigFile "/openils/conf/kpac.xml.example"
ExpiresActive On
ExpiresByType text/html "access plus 5 seconds"
</Location>
# Note: the template processor will decline handling anything it does not
# have an explicit configuration for, which means it will fall back to
# Apache to serve the file. However, in the interest of speed, go ahead
# and tell Apache to avoid asking OpenILS::WWW::EGWeb for static content.
# Add more exemptions as needed.
<LocationMatch ^/eg/.*(\.js|\.html|\.xhtml|\.xml|\.jpg|\.png|\.gif)$>
SetHandler None
</LocationMatch>
# ----------------------------------------------------------------------------------
# Some mod_deflate setup
# ----------------------------------------------------------------------------------
<IfModule mod_deflate.c>
## optional logging for mod_deflate debugging
##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
# There are problems with XMLENT and mod_deflate - so lets disable it
# This is where we don't have a pre-existing LocationMatch directive earlier
<LocationMatch /opac/.*\.xml$>
SetEnv no-gzip
</LocationMatch>
<LocationMatch /opac/[a-z]{2}-[A-Z]{2}/extras/slimpac/.*\.html$>
SetEnv no-gzip
</LocationMatch>
<LocationMatch /reports/.*\.xhtml$>
SetEnv no-gzip
</LocationMatch>
<LocationMatch /conify/.*\.html$>
SetEnv no-gzip
</LocationMatch>
</IfModule>
<Location /IDL2js>
SetHandler perl-script
PerlHandler OpenILS::WWW::IDL2js
Options +ExecCGI
PerlSendHeader On
Require all granted
<IfModule mod_headers.c>
Header append Cache-Control "public"
</IFModule>
<IfModule mod_deflate.c>
SetOutputFilter DEFLATE
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
<IfModule mod_headers.c>
Header append Vary User-Agent env=!dont-vary
</IfModule>
</IfModule>
</Location>
<LocationMatch /eg/staff/>
SSLRequireSSL
Options -MultiViews
PerlSetVar OILSWebStopAtIndex "true"
RewriteCond %{HTTPS} off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [NE,R,L]
# sample staff-specific translation files
#PerlAddVar OILSWebLocale "en_ca"
#PerlAddVar OILSWebLocale "/openils/var/data/locale/staff/en-CA.po"
#PerlAddVar OILSWebLocale "fr_ca"
#PerlAddVar OILSWebLocale "/openils/var/data/locale/staff/fr-CA.po"
</LocationMatch>
<Location /js/>
<IfModule mod_headers.c>
Header append Cache-Control "public"
</IFModule>
<IfModule mod_deflate.c>
SetOutputFilter DEFLATE
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
<IfModule mod_headers.c>
Header append Vary User-Agent env=!dont-vary
</IfModule>
</IfModule>
</Location>
# Uncomment the following to force SSL for everything. Note that this defeats caching
# and you will suffer a performance hit.
#RewriteCond %{HTTPS} off
#RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [NE,R,L]
More information about the Open-ils-dev
mailing list