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
<?xml version="1.0"?>
<!-- 
Example opensrf config file for OpenILS
vim:et:ts=4:sw=4:
-->
<opensrf version="0.0.3">

    <default>

        <!-- unless otherwise overidden, use this locale -->
        <default_locale>en-US</default_locale>

        <dirs>
            <log>/openils/var/log</log> <!-- unix::server log files -->
            <sock>/openils/var/lock</sock> <!-- unix::server sock files -->
            <pid>/openils/var/run</pid>
            <xsl>/openils/var/xsl</xsl>
            <script>/openils/var</script>
            <script_lib>/openils/var</script_lib>
            <templates>/openils/var/templates</templates>
        </dirs>

        <!-- global data visibility settings -->
        <share>
            <user>
                <!-- Set to "true" to require patron opt-in for foreign (non-home_ou) transactions -->
                <opt_in>false</opt_in>
            </user>
        </share>

        <IDL>/openils/conf/fm_IDL.xml</IDL> <!-- top level IDL file -->
        <IDL2js>fm_IDL2js.xsl</IDL2js> <!-- IDL JS XSLT -->


        <server_type>prefork</server_type> <!-- net::server type -->

        <ils_events>/openils/var/data/ils_events.xml</ils_events> <!-- ILS events description file -->

        <email_notify> <!-- this will eventually move into the notifications section below... -->
            <!-- global email notification settings -->
            <template>/openils/var/data/hold_notification_template.example</template>
            <smtp_server>localhost</smtp_server>

            <!--
            in most cases, this is overridden by location 
            specific config settings.  this is just the default
            -->
            <sender_address>evergreen@localhost</sender_address>
        </email_notify>


      <notifications>
        <!-- global mail server settings -->
        <smtp_server>localhost</smtp_server>
        <sender_address>evergreen@localhost</sender_address>

        <!-- global telephony (asterisk) settings -->
        <telephony>
            <!-- replace all values below when telephony server is configured -->
            <enabled>0</enabled>
            <driver>SIP</driver>    <!-- SIP (default) or multi -->
            <channels>              <!-- explicit list of channels used if multi -->
                                    <!-- A channel specifies technology/resource -->
                <channel>Zap/1</channel>
                <channel>Zap/2</channel>
                <channel>IAX/user:sec...@widgets.biz</channel>
            </channels>
            <host>localhost</host>
            <port>10080</port>
            <user>evergreen</user>
            <pw>evergreen</pw>
            <!--
                The overall composition of callfiles is determined by the
                relevant template, but this section can be invoked for callfile
                configs common to all outbound calls.
                callfile_lines will be inserted into ALL generated callfiles
                after the Channel line.  This content mat be overridden
                (in whole) by the org unit setting callfile_lines.
                Warning: Invalid syntax may break ALL outbound calls.
            -->
            <!-- <callfile_lines>
                MaxRetries: 3
                RetryTime: 60
                WaitTime: 30
                Archive: 1
                Extension: 10
            </callfile_lines> -->
        </telephony>

        <!-- Overdue notices: DEPRECATED in 2.0 in favour of Action/Trigger Notifications -->
        <overdue>

            <!-- optionally, you can define a sender address per notice type -->
            <sender_address>overdue@localhost</sender_address>

            <!-- The system can generate an XML file of overdue notices.  This is the
                directory where they are stored.  Files are named overdue.YYYY-MM-DD.xml -->
            <notice_dir>/openils/var/data/overdue</notice_dir>
            <combined_template>/openils/var/data/templates/overdue_combined_xml.example</combined_template>

            <notice>
                <!-- Notify at 7 days overdue -->
                <notify_interval>7 days</notify_interval>
                <!-- Options include always, noemail, and never.  'noemail' means a notice
                     will be appended to the notice file only if the patron has no valid email address.  -->
                <file_append>noemail</file_append>
                <!-- do we attempt email notification? -->
                <email_notify>false</email_notify>
                <!-- notice template file -->
                <email_template>/openils/var/data/templates/overdue_7day.example</email_template>
            </notice>
        </overdue>

        <!-- Courtesy notices: DEPRECATED in 2.0 in favour of Action/Trigger Notifications -->
        <predue>
            <notice>
                <!-- All circulations that circulate between 5 and 13 days -->
                <circ_duration_range>
                    <from>5 days</from>
                    <to>13 days</to>
                </circ_duration_range>
                <!-- notify at 1 day before the due date -->
                <notify_interval>1 day</notify_interval>
                <file_append>false</file_append>
                <email_notify>false</email_notify>
                <email_template>/openils/var/data/templates/predue_1day.example</email_template>
            </notice>
        </predue>
      </notifications>

        <!-- Settings for the hold targeter cron job -->
        <hold_targeter>
            <!-- number of parallel processes to use during hold targeting;
                 increasing can speed up (re)targeting a large number of
                 hold requests, but with diminishing returns after a point;
                 if increasing this value, it is recommend to do so slowly
            -->
            <parallel>1</parallel>
        </hold_targeter>

        <!-- Settings for the fine generator cron job -->
        <fine_generator>
            <!-- number of parallel processes to use during fine generation -->
            <parallel>1</parallel>
        </fine_generator>
        
        <reporter>
            <!--
            Settings for the reporter daemon process 
            -->
            <setup>
                <base_uri>https://localhost/reporter/</base_uri>
                <database>
                    <driver>Pg</driver>
                    <host>localhost</host>
                    <port>5432</port>
                    <db>EGdatabase2</db>
                    <user>evergreen</user>
                    <pw>xxxxxxxxxx</pw>
                    <application_name>Clark Kent (reports)</application_name>
                </database>
                <state_store>
                    <driver>Pg</driver>
                    <host>localhost</host>
                    <port>5432</port>
                    <db>EGdatabase2</db>
                    <user>evergreen</user>
                    <pw>xxxxxxxxx</pw>
                    <application_name>Clark Kent (state)</application_name>
                </state_store>
                <files>
                    <!-- successful report outputs go here -->
                    <output_base>/openils/var/web/reporter</output_base>
                    <success_template>/openils/var/data/report-success</success_template>
                    <fail_template>/openils/var/data/report-fail</fail_template>
                </files>
                <!-- Number of reports that can be processed simultaneously.  This
                     value can overriden by the -c/-concurrency command-line switch
                     of clark-kent.pl.
                -->
                <parallel>1</parallel>
                <!-- Maximum number of rows in the query results allowed before
                     Clark will refuse to draw a pie, bar, or line chart.  This
                     value can be overriden by the -max-rows-for-charts command-line
                     switch of clark-kent.pl.
                -->
                <max_rows_for_charts>1000</max_rows_for_charts>
                <!-- Maximum amount of time (in minutes) that an SQL query initiated
                     by Clark Kent will be allowed to run before it is terminated.
                     This value can be overriden by the -statement-timeout
                     command-line switch of clark-kent.pl.
                -->
                <statement_timeout>60</statement_timeout>
                <!-- Maximum number of results permitted.  If set to a numeric value,
                     Clark will limit the number of rows returned by report queries
                     to this value.  Note that it will not be apparent to a user
                     running a report from the staff interface that their report
                     has been limited in this fashion.  This setting can be
                     overriden by the -resultset-limit command-line switch of
                     clark-kent.pl.

                     A value of 0 means that no limit should be set.
                -->
                <resultset_limit>1048575</resultset_limit>
            </setup>
        </reporter>



        <xml-rpc>
            <!-- XML-RPC gateway.  Do NOT publish unprotected services here -->
            <allowed_services>
                <!-- list of published services -->
                <service>opensrf.math</service>
                <service>opensrf.dbmath</service>
                <service>open-ils.cat</service>
                <service>open-ils.search</service>
                <service>open-ils.circ</service>
                <service>open-ils.actor</service>
                <service>open-ils.auth</service>
                <service>open-ils.auth_proxy</service>
                <service>open-ils.collections</service>
                <service>open-ils.justintime</service>
            </allowed_services>
        </xml-rpc>

        <!--
        Once upon a time, Z39.50 servers were defined here. As of Evergreen 2.2,
        they are now defined in the database. See the Release Notes for
        instructions on mapping the old XML entries to database tables.
        -->

        <added_content>
            <!-- load the OpenLibrary added content module -->
            <module>OpenILS::WWW::AddedContent::OpenLibrary</module>

            <!--
            Max number of seconds to wait for an added content request to 
            return data.  Data not returned within the timeout is considered
            a failure.

            Note that the pool of Apache processes used by the AddedContent
            module is the same pool used by core Evergreen processes such as
            search, circulation, etc. Therefore, the higher you set this
            timeout value, the more likely you are to run out of available
            Apache processes resulting in an accidental (or purposeful) denial
            of service - particularly if the added content server starts
            responding abnormally slowly.

            The safest option is to disable the AddedContent module completely,
            but 3 seconds is a compromise between the threat of a denial of
            service and the enhanced user experience offered by successful added
            content requests.
            -->
            <timeout>3</timeout>

            <!--
            After added content lookups have been disabled due to too many
            lookup failures, this is the amount of time to wait before
            we try again
            -->
            <retry_timeout>600</retry_timeout>

            <!--
            maximum number of consecutive lookup errors a given process can 
            have before added content lookups are disabled for everyone
            -->
            <max_errors>15</max_errors>

            <!-- If a userid is required to access the added content.. -->
            <userid>MY_USER_ID</userid>

            <!--
            Base URL for Amazon added content fetching. Not needed by OpenLibrary
            <base_url>http://images.amazon.com/images/P/</base_url>
            -->

            <!--
            Segregating the details for ContentCafe out for easier use.  At some point, we
            may want to support multiple services at one time.
            -->
            <ContentCafe>
                <userid>MY_USER_ID</userid>
                <password>MY_PASSWORD</password>

                <!--
                Which order to put identifiers in.
                Default is "isbn,upc", ignoring currently unsupported issn.
                Should be all lowercase.
                Remove an identifier from the list to skip it.
                -->
                <identifier_order>isbn,upc</identifier_order>
            </ContentCafe>

            <!--
 
            You can add free-form settings here and they will be accessible
            within the added content module
            -->

        </added_content>

        <!-- Config section for acq_order_reader.pl script.
             It reads MARC order record files from disk (presumably
             an FTP destination) and pushes the order records into ACQ.
             THIS IS NOT EDI. -->
        <acq_order_reader>

            <!-- Root directory for all FTP'd ACQ order record files .
                 If the script is configured to talk to a remote acq server,
                 this directory has to be a read/write NFS share.  -->
            <base_dir>/openils/var/data/acq_orders/</base_dir>

            <!-- any files found in the shared subdir must be inspected
                 (e.g. file name prefix) to determine the provider. -->
            <shared_subdir>ALL</shared_subdir><!-- SUPPORT PENDING -->

            <!-- providers that don't provide a mechanism to inspect the file
                 have to push their files to provider-specific locations -->
            <provider>
                <ordering_agency>BR1</ordering_agency> <!-- who gets/manages the order -->
                <provider_code>BAB</provider_code>   
                <provider_owner>CONS</provider_owner>  <!-- provider provider_owner; org unit shortname -->
                <subdir>CONS-BAB</subdir> <!-- file directory;  full path = base_dir + subdir -->
                <activate_po>false</activate_po> <!-- activate PO at upload? -->
                <vandelay>
                    <import_no_match>true</import_no_match>
                    <!-- Most Vandelay options are supported.  For bools, use true/false.
                        match_quality_ratio 
                        match_set 
                        bib_source 
                        merge_profile
                        create_assets
                        import_no_match 
                        auto_overlay_exact 
                        auto_overlay_1match 
                        auto_overlay_best_match
                    -->
                </vandelay>
            </provider>

            <!-- Add more as needed...
            <provider>
                ...
            </provider>
            -->

        </acq_order_reader>


        <!-- no apps are enabled globally by default -->
        <activeapps/> 

        <cache>
            <!-- memcache servers -->
            <global>
                <servers>
                    <server>127.0.0.1:11211</server>
                </servers>
                <max_cache_time>86400</max_cache_time>
            </global>
            <anon>
                <!-- anonymous cache.  currently, primarily used for web session caching -->
                <servers>
                    <server>127.0.0.1:11211</server>
                </servers>
                <max_cache_time>1800</max_cache_time>
                <!-- maximum size of a single cache entry / default = 100k-->
                <max_cache_size>102400</max_cache_size>
            </anon>
        </cache>

        <apps>
            <!-- Acquisitions server -->
            <open-ils.acq>
                <!-- how long to wait between stateful requests before the child process re-joins the pool -->
                <keepalive>5</keepalive>
                <!-- true if this service support stateless requests -->
                <stateless>1</stateless>
                <!-- implementation language -->
                <language>perl</language>
                <!-- name of the library that implements this application -->
                <implementation>OpenILS::Application::Acq</implementation>
                <!-- maximum OpenSRF REQUEST within a stateful connection -->
                <max_requests>100</max_requests>
                <unix_config>
                    <!--
                    maximum number of top level requests coming to 
                    this child before the child is recycled
                    -->
                    <max_requests>100</max_requests>
                    <!-- min children to fork -->
                    <min_children>1</min_children>
                    <!-- max possible children to fork -->
                    <max_children>15</max_children>
                    <!--
                    C forking implementation does not support 
                    min/max idle children, but may in the future
                    -->

                    <!-- min idle children -->
                    <min_spare_children>1</min_spare_children>
                    <!-- max idle children -->
                    <max_spare_children>5</max_spare_children>
                    <!-- currently, only Perl uses the following 3 settings -->
                    <unix_sock>open-ils.acq_unix.sock</unix_sock>
                    <unix_pid>open-ils.acq_unix.pid</unix_pid>
                    <unix_log>open-ils.acq_unix.log</unix_log>
                </unix_config>
            </open-ils.acq>

            <!-- Authentication server -->
            <open-ils.auth>
                <keepalive>5</keepalive>
                <stateless>1</stateless>
                <language>c</language>
                <implementation>oils_auth.so</implementation>
                <unix_config>
                    <max_requests>1000</max_requests>
                    <min_children>1</min_children>
                    <max_children>15</max_children>
                    <min_spare_children>1</min_spare_children>
                    <max_spare_children>5</max_spare_children>
                </unix_config>
                <app_settings>
                    <!-- defined app-specific settings here -->
                    <auth_limits>
                        <seed>30</seed> <!-- amount of time a seed request is valid for -->
                        <block_time>90</block_time> <!-- amount of time since last auth or seed request to save failure counts -->
                        <block_count>10</block_count> <!-- number of failures before blocking access -->
                    </auth_limits>
                </app_settings>
            </open-ils.auth>

            <!-- Internal authentication server -->
            <open-ils.auth_internal>
                <keepalive>5</keepalive>
                <stateless>1</stateless>
                <language>c</language>
                <implementation>oils_auth_internal.so</implementation>
                <unix_config>
                    <max_requests>1000</max_requests>
                    <min_children>1</min_children>
                    <max_children>15</max_children>
                    <min_spare_children>1</min_spare_children>
                    <max_spare_children>5</max_spare_children>
                </unix_config>
                <app_settings>
                    <!-- defined app-specific settings here -->
                    <default_timeout>
                        <!-- default login timeouts based on login type -->
                        <opac>420</opac>
                        <staff>7200</staff>
                        <temp>300</temp>
                        <persist>2 weeks</persist>
                    </default_timeout>
                </app_settings>
            </open-ils.auth_internal>



            <!-- Authentication proxy server -->
            <open-ils.auth_proxy>
                <keepalive>5</keepalive>
                <stateless>1</stateless>
                <language>perl</language>
                <implementation>OpenILS::Application::AuthProxy</implementation>
                <max_requests>93</max_requests>

                <unix_config>
                    <max_requests>1000</max_requests>
                    <unix_log>open-ils.auth-proxy_unix.log</unix_log>
                    <unix_sock>open-ils.auth-proxy_unix.sock</unix_sock>
                    <unix_pid>open-ils.auth-proxy_unix.pid</unix_pid>
                    <min_children>1</min_children>
                    <max_children>15</max_children>
                    <min_spare_children>1</min_spare_children>
                    <max_spare_children>5</max_spare_children>
                </unix_config>

                <app_settings>
                    <!-- 'enabled' is the master switch; set to 'true' to enable proxied logins -->
                    <enabled>false</enabled>
                    <authenticators>
                        <!-- the following is a sample configuration for the LDAP_Auth module; please adjust as needed -->
                        <!--
                        <authenticator>
                            <name>ldap</name>
                            <module>OpenILS::Application::AuthProxy::LDAP_Auth</module>
                            <hostname>name.domain.com</hostname>
                            <basedn>ou=people,dc=domain,dc=com</basedn>
                            <authid>cn=username,ou=specials,dc=domain,dc=com</authid>
                            <id_attr>uid</id_attr>
                            <password>my_ldap_password_for_authid_user</password>
                            <login_types>
                                <type>staff</type>
                                <type>opac</type>
                                <type>persist</type>
                            </login_types>
                            <org_units>
                                <unit>103</unit>
                                <unit>104</unit>
                            </org_units>
                        </authenticator>
                        -->
                        <!-- 'native' is a proxied version of Evergreen's standard authentication -->
                        <authenticator>
                            <name>native</name>
                            <!-- you can add 'login_types' and 'org_units' limits to this authenticator as well, if needed -->
                        </authenticator>
                    </authenticators>
                </app_settings>
            </open-ils.auth_proxy>

            <!-- Generic search server -->
            <open-ils.search>
                <keepalive>5</keepalive>
                <stateless>1</stateless>
                <language>perl</language>
                <implementation>OpenILS::Application::Search</implementation>
                <max_requests>93</max_requests>
                <unix_config>
                    <unix_sock>open-ils.search_unix.sock</unix_sock>
                    <unix_pid>open-ils.search_unix.pid</unix_pid>
                    <unix_log>open-ils.search_unix.log</unix_log>

                    <max_requests>1000</max_requests>
                    <min_children>1</min_children>
                    <max_children>15</max_children>
                    <min_spare_children>1</min_spare_children>
                    <max_spare_children>5</max_spare_children>
                </unix_config>
                <app_settings>
                    <marc_html_xsl>oilsMARC21slim2HTML.xsl</marc_html_xsl>
                    <marc_html_xsl_slim>oilsMARC21slim2HTMLslim.xsl</marc_html_xsl_slim>

                    <spelling_dictionary>
                        <!-- 
                            Optionally configure different dictionaries depending on search context.  
                            If no dictionaries are defined, the default Aspell dictionary is used.
                        -->
                        <!--
                        <default>/openils/var/data/default_dict.txt</default>
                        <title>/openils/var/data/title_dict.txt</title>
                        <author>/openils/var/data/author_dict.txt</author>
                        <subject>/openils/var/data/subject_dict.txt</subject>
                        <series>/openils/var/data/series_dict.txt</series>
                        -->
                    </spelling_dictionary>

                    <!-- Default to using staged search -->
                    <use_staged_search>true</use_staged_search>

                    <!--
                        For staged search, we estimate hits based on inclusion or exclusion.

                        Valid settings:
                            inclusion - visible ratio on superpage
                            exclusion - excluded ratio on superpage
                            delete_adjusted_inclusion - included ratio on superpage, ratio adjusted by deleted count
                            delete_adjusted_exclusion - excluded ratio on superpage, ratio adjusted by deleted count

                        Under normal circumstances, inclusion is the best strategy, and both delete_adjusted variants
                        will return the same value +/- 1.  The exclusion strategy is the original, and works well
                        when there are few deleted or excluded records, in other words, when the superpage is not
                        sparsely populated with visible records.
                    -->
                    <estimation_strategy>inclusion</estimation_strategy>

                    <!--
                        Evergreen uses a cover density algorithm for calculating relative ranking of matches.  There
                        are several tuning parameters and options available.  By default, no document length normalization
                        is applied.  From the Postgres documentation on ts_rank_cd() (the function used by Evergreen):

                            Since a longer document has a greater chance of containing a query term it is reasonable 
                            to take into account document size, e.g., a hundred-word document with five instances of 
                            a search word is probably more relevant than a thousand-word document with five instances. 
                            Both ranking functions take an integer normalization option that specifies whether and how 
                            a document's length should impact its rank. The integer option controls several behaviors, 
                            so it is a bit mask: you can specify one or more behaviors using | (for example, 2|4).

                                0 (the default) ignores the document length

                                1 divides the rank by 1 + the logarithm of the document length

                                2 divides the rank by the document length

                                4 divides the rank by the mean harmonic distance between extents (this is implemented only by ts_rank_cd)

                                8 divides the rank by the number of unique words in document

                                16 divides the rank by 1 + the logarithm of the number of unique words in document

                                32 divides the rank by itself + 1

                            If more than one flag bit is specified, the transformations are applied in the order listed.

                            It is important to note that the ranking functions do not use any global information, so it 
                            is impossible to produce a fair normalization to 1% or 100% as sometimes desired. Normalization 
                            option 32 (rank/(rank+1)) can be applied to scale all ranks into the range zero to one, but of 
                            course this is just a cosmetic change; it will not affect the ordering of the search results.

                        In Evergreen, these options are set via search modifiers.  The modifiers are mapped in the
                        following way:

                            * #CD_logDocumentLength  => 1  :: rank / (1 + LOG(total_word_count))   :: Longer documents slightly less relevant
                            * #CD_documentLength     => 2  :: rank / total_word_count              :: Longer documents much less relevant
                            * #CD_meanHarmonic       => 4  :: Word Proximity                       :: Greater matched-word distance is less relevant
                            * #CD_uniqueWords        => 8  :: rank / unique_word_count             :: Documents with repeated words much less relevant
                            * #CD_logUniqueWords     => 16 :: rank / (1 + LOG(unique_word_count))  :: Documents with repeated words slightly less relevant
                            * #CD_selfPlusOne        => 32 :: rank / (1 + rank)                    :: Cosmetic normalization of rank value between 0 and 1

                        Adding one or more of these to the default_CD_modifiers list will cause all searches that use QueryParser to apply them.
                    -->
                    <default_CD_modifiers>#CD_documentLength #CD_meanHarmonic #CD_uniqueWords</default_CD_modifiers>

                    <!--
                        default_preferred_language
                            Set the global, default preferred languange
                    -->
                    <default_preferred_language>eng</default_preferred_language>

                    <!--
                        default_preferred_language_weight
                            Set the weight (higher is "better") for the preferred language. Comment out to remove all lanuage weighting by default.
                    -->
                    <default_preferred_language_weight>5</default_preferred_language_weight>

                    <!-- Baseline number of records to check for hit estimation. -->
                    <superpage_size>1000</superpage_size>

                    <!-- How many superpages to consider for searching overall. -->
                    <max_superpages>10</max_superpages>

                    <!-- zip code database file -->
                    <!--<zips_file>/openils/var/data/zips.txt</zips_file>-->
                </app_settings>
            </open-ils.search>

            <!-- server for accessing user info -->
            <open-ils.actor>
                <keepalive>5</keepalive>
                <stateless>1</stateless>
                <language>perl</language>
                <implementation>OpenILS::Application::Actor</implementation>
                <max_requests>93</max_requests>
                <unix_config>
                    <unix_sock>open-ils.actor_unix.sock</unix_sock>
                    <unix_pid>open-ils.actor_unix.pid</unix_pid>
                    <max_requests>1000</max_requests>
                    <unix_log>open-ils.actor_unix.log</unix_log>
                    <min_children>1</min_children>
                    <max_children>15</max_children>
                    <min_spare_children>1</min_spare_children>
                    <max_spare_children>5</max_spare_children>
                </unix_config>
                <!-- set this to 'true' to have barcode search also search patron records by unique ID -->
                <app_settings>
                    <id_as_barcode>false</id_as_barcode>
                </app_settings>

            </open-ils.actor>

            <open-ils.booking>
                <keepalive>5</keepalive>
                <stateless>1</stateless>
                <language>perl</language>
                <implementation>OpenILS::Application::Booking</implementation>
                <max_requests>199</max_requests>
                <unix_config>
                    <unix_sock>open-ils.booking_unix.sock</unix_sock>
                    <unix_pid>open-ils.booking_unix.pid</unix_pid>
                    <max_requests>1000</max_requests>
                    <unix_log>open-ils.booking_unix.log</unix_log>
                    <min_children>1</min_children>
                    <max_children>15</max_children>
                    <min_spare_children>1</min_spare_children>
                    <max_spare_children>5</max_spare_children>
                </unix_config>
                <app_settings>
                </app_settings>
            </open-ils.booking>

            <open-ils.cat>
                <keepalive>5</keepalive>
                <stateless>1</stateless>
                <language>perl</language>
                <implementation>OpenILS::Application::Cat</implementation>
                <max_requests>199</max_requests>
                <unix_config>
                    <unix_sock>open-ils.cat_unix.sock</unix_sock>
                    <unix_pid>open-ils.cat_unix.pid</unix_pid>
                    <max_requests>1000</max_requests>
                    <unix_log>open-ils.cat_unix.log</unix_log>
                    <min_children>1</min_children>
                    <max_children>15</max_children>
                    <min_spare_children>1</min_spare_children>
                    <max_spare_children>5</max_spare_children>
                </unix_config>
                <app_settings>
                    <marctemplates>
                        <K_book>/openils/var/templates/marc/k_book.xml</K_book>
                    </marctemplates>
                </app_settings>
            </open-ils.cat>

            <open-ils.supercat>
                <keepalive>5</keepalive>
                <stateless>1</stateless>
                <language>perl</language>
                <implementation>OpenILS::Application::SuperCat</implementation>
                <max_requests>199</max_requests>
                <unix_config>
                    <unix_sock>open-ils.supercat_unix.sock</unix_sock>
                    <unix_pid>open-ils.supercat_unix.pid</unix_pid>
                    <max_requests>1000</max_requests>
                    <unix_log>open-ils.supercat_unix.log</unix_log>
                    <min_children>1</min_children>
                    <max_children>15</max_children>
                    <min_spare_children>1</min_spare_children>
                    <max_spare_children>5</max_spare_children>
                </unix_config>
            </open-ils.supercat>

            <!-- server for accessing user info -->
            <open-ils.trigger>
                <keepalive>5</keepalive>
                <stateless>1</stateless>
                <language>perl</language>
                <implementation>OpenILS::Application::Trigger</implementation>
                <max_requests>93</max_requests>
                <unix_config>
                    <unix_sock>open-ils.trigger_unix.sock</unix_sock>
                    <unix_pid>open-ils.trigger_unix.pid</unix_pid>
                    <max_requests>1000</max_requests>
                    <unix_log>open-ils.trigger_unix.log</unix_log>
                    <min_children>1</min_children>
                    <max_children>15</max_children>
                    <min_spare_children>1</min_spare_children>
                    <max_spare_children>5</max_spare_children>
                </unix_config>
                <app_settings>
                    <!-- number of parallel open-ils.trigger processes to use for collection and reaction -->
                    <!--
                    <parallel>
                        <collect>3</collect>
                        <react>3</react>
                    </parallel>
                    -->
                </app_settings>
            </open-ils.trigger>

            <open-ils.url_verify>
                <keepalive>5</keepalive>
                <stateless>1</stateless>
                <language>perl</language>
                <implementation>OpenILS::Application::URLVerify</implementation>
                <max_requests>199</max_requests>
                <unix_config>
                    <unix_sock>open-ils.url_verify_unix.sock</unix_sock>
                    <unix_pid>open-ils.url_verify_unix.pid</unix_pid>
                    <max_requests>1000</max_requests>
                    <unix_log>open-ils.url_verify_unix.log</unix_log>
                    <min_children>1</min_children>
                    <max_children>15</max_children>
                    <min_spare_children>1</min_spare_children>
                    <max_spare_children>5</max_spare_children>
                </unix_config>
                <app_settings>
                    <user_agent>Evergreen %s Link Checker</user_agent>
                </app_settings>
            </open-ils.url_verify>

            <opensrf.math>
                <keepalive>3</keepalive>
                <stateless>1</stateless>
                <language>c</language>
                <implementation>osrf_math.so</implementation>
                <unix_config>
                    <unix_sock>opensrf.math_unix.sock</unix_sock>
                    <unix_pid>opensrf.math_unix.pid</unix_pid>
                    <max_requests>1000</max_requests>
                    <unix_log>opensrf.math_unix.log</unix_log>
                    <min_children>1</min_children>
                    <max_children>15</max_children>
                    <min_spare_children>1</min_spare_children>
                    <max_spare_children>5</max_spare_children>
                </unix_config>
            </opensrf.math>

            <opensrf.dbmath> 
                <keepalive>3</keepalive>
                <stateless>1</stateless>
                <language>c</language>
                <implementation>osrf_dbmath.so</implementation>
                <unix_config>
                    <max_requests>1000</max_requests>
                    <unix_log>opensrf.dbmath_unix.log</unix_log>
                    <unix_sock>opensrf.dbmath_unix.sock</unix_sock>
                    <unix_pid>opensrf.dbmath_unix.pid</unix_pid>
                    <min_children>1</min_children>
                    <max_children>15</max_children>
                    <min_spare_children>1</min_spare_children> 
                    <max_spare_children>5</max_spare_children>
                </unix_config>
            </opensrf.dbmath>

            <open-ils.justintime>
                <keepalive>5</keepalive>
                <stateless>1</stateless>
                <language>perl</language>
                <implementation>OpenILS::Application::JustInTime</implementation>
                <max_requests>199</max_requests>
                <unix_config>
                    <unix_sock>open-ils.justintime_unix.sock</unix_sock>
                    <unix_pid>open-ils.justintime_unix.pid</unix_pid>
                    <max_requests>1000</max_requests>
                    <unix_log>open-ils.justintime_unix.log</unix_log>
                    <min_children>1</min_children>
                    <max_children>15</max_children>
                    <min_spare_children>1</min_spare_children>
                    <max_spare_children>5</max_spare_children>
                </unix_config>
                <app_settings>
                </app_settings>
            </open-ils.justintime>

            <open-ils.circ> 
                <keepalive>3</keepalive>
                <stateless>1</stateless>
                <language>perl</language>
                <implementation>OpenILS::Application::Circ</implementation>
                <max_requests>99</max_requests>
                <unix_config>
                    <max_requests>1000</max_requests>
                    <unix_log>open-ils.circ_unix.log</unix_log>
                    <unix_sock>open-ils.circ_unix.sock</unix_sock>
                    <unix_pid>open-ils.circ_unix.pid</unix_pid>
                    <min_children>1</min_children>
                    <max_children>15</max_children>
                    <min_spare_children>1</min_spare_children> 
                    <max_spare_children>5</max_spare_children>
                </unix_config>
                <app_settings>
                    <notify_hold>
                        <email>false</email> <!-- set to false to disable hold notice emails -->
                    </notify_hold>
                </app_settings>
            </open-ils.circ>

            <open-ils.storage>
                <keepalive>10</keepalive>
                <stateless>1</stateless>
                <language>perl</language>
                <implementation>OpenILS::Application::Storage</implementation>
                <unix_config>
                    <max_requests>1000</max_requests>
                    <unix_log>open-ils.storage_unix.log</unix_log>
                    <unix_sock>open-ils.storage_unix.sock</unix_sock>
                    <unix_pid>open-ils.storage_unix.pid</unix_pid>
                    <min_children>1</min_children>
                    <max_children>10</max_children>
                    <min_spare_children>1</min_spare_children>
                    <max_spare_children>5</max_spare_children>
                </unix_config>
                <app_settings>
                    <script_path>/openils/lib/javascript/</script_path>
                    <script_path>/openils/var/catalog/</script_path>
                    <scripts>
                        <biblio_fingerprint>biblio_fingerprint.js</biblio_fingerprint>
                    </scripts>
                    <databases>
                        <driver>Pg</driver>
                        <database>
                            <type>master</type>
                            <weight>2</weight>
                            <user>evergreen</user>
                            <host>localhost</host>
                            <port>5432</port>
                            <pw>xxxxxxxxxx</pw>
                            <db>EGdatabase2</db>
                            <client_encoding>UTF-8</client_encoding>
                            <application_name>open-ils.storage</application_name>
                        </database>
                    </databases>
                </app_settings>
            </open-ils.storage>

            <open-ils.cstore>
                <keepalive>6</keepalive>
                <stateless>1</stateless>
                <language>C</language>
                <implementation>oils_cstore.so</implementation>
                <unix_config>
                    <max_requests>1000</max_requests>
                    <min_children>1</min_children>
                    <max_children>15</max_children>
                    <min_spare_children>1</min_spare_children>
                    <max_spare_children>5</max_spare_children>
                </unix_config>
                <app_settings>
                    <max_query_recursion>100</max_query_recursion>
                    <driver>pgsql</driver>
                    <database>
                        <type>master</type>
                        <weight>2</weight>
                        <user>evergreen</user>
                        <host>localhost</host>
                        <port>5432</port>
                        <pw>xxxxxxxxxxx</pw>
                        <db>EGdatabase2</db>
                        <client_encoding>UTF-8</client_encoding>
                        <application_name>open-ils.cstore</application_name>
                    </database>
                </app_settings>
            </open-ils.cstore>

            <open-ils.pcrud>
                <keepalive>6</keepalive>
                <migratable>1</migratable>
                <stateless>1</stateless>
                <language>C</language>
                <implementation>oils_pcrud.so</implementation>

                <unix_config>
                    <unix_log>open-ils.pcrud.log</unix_log>
                    <unix_sock>open-ils.pcrud.sock</unix_sock>
                    <unix_pid>open-ils.pcrud.pid</unix_pid>
                    <max_requests>1000</max_requests>
                    <min_children>1</min_children>
                    <max_children>15</max_children>
                    <min_spare_children>1</min_spare_children>
                    <max_spare_children>5</max_spare_children>
                </unix_config>

                <app_settings>
                    <IDL>/openils/conf/fm_IDL.xml</IDL>
                    <driver>pgsql</driver>
                    <database>
                        <type>master</type>
                        <weight>2</weight>
                        <user>evergreen</user>
                        <host>localhost</host>
                        <port>5432</port>
                        <pw>xxxxxxxxxxxxx</pw>
                        <db>EGdatabase2</db>
                        <client_encoding>UTF-8</client_encoding>
                        <application_name>open-ils.pcrud</application_name>
                    </database>
                </app_settings>
            </open-ils.pcrud>

            <open-ils.qstore>
                <keepalive>6</keepalive>
                <stateless>1</stateless>
                <language>C</language>
                <implementation>oils_qstore.so</implementation>
                <unix_config>
                    <max_requests>1000</max_requests>
                    <min_children>1</min_children>
                    <max_children>15</max_children>
                    <min_spare_children>1</min_spare_children>
                    <max_spare_children>5</max_spare_children>
                </unix_config>
                <app_settings>
                    <driver>pgsql</driver>
                    <database>
                        <type>master</type>
                        <weight>2</weight>
                        <user>postgres</user>
                        <host>localhost</host>
                        <port>5432</port>
                        <pw>postgres</pw>
                        <db>evergreen</db>
                        <client_encoding>UTF-8</client_encoding>
                        <application_name>open-ils.qstore</application_name>
                    </database>
                </app_settings>
            </open-ils.qstore>

            <opensrf.settings>
                <keepalive>1</keepalive>
                <stateless>1</stateless>
                <language>perl</language>
                <implementation>OpenSRF::Application::Settings</implementation>
                <max_requests>17</max_requests>
                <unix_config>
                    <unix_sock>opensrf.settings_unix.sock</unix_sock>
                    <unix_pid>opensrf.settings_unix.pid</unix_pid>
                    <max_requests>300</max_requests>
                    <unix_log>opensrf.settings_unix.log</unix_log>
                    <min_children>5</min_children>
                    <max_children>15</max_children>
                    <min_spare_children>3</min_spare_children>
                    <max_spare_children>5</max_spare_children>
                </unix_config>
            </opensrf.settings>

            <open-ils.collections>
                <keepalive>3</keepalive>
                <stateless>1</stateless>
                <language>perl</language>
                <implementation>OpenILS::Application::Collections</implementation>
                <max_requests>17</max_requests>
                <unix_config>
                    <unix_sock>open-ils.collections_unix.sock</unix_sock>
                    <unix_pid>open-ils.collections_unix.pid</unix_pid>
                    <max_requests>1000</max_requests>
                    <unix_log>open-ils.collections_unix.log</unix_log>
                    <min_children>1</min_children>
                    <max_children>10</max_children>
                    <min_spare_children>1</min_spare_children>
                    <max_spare_children>5</max_spare_children>
                </unix_config>
                <app_settings>
                    <!-- batch_file_dir must be a protected, web-accessible, shared directory -->
                    <batch_file_dir>/openils/var/web/collections</batch_file_dir>
                </app_settings>
            </open-ils.collections>

            <open-ils.reporter>
                <keepalive>3</keepalive>
                <stateless>1</stateless>
                <language>perl</language>
                <implementation>OpenILS::Application::Reporter</implementation>
                <max_requests>99</max_requests>
                <unix_config>
                    <unix_sock>open-ils.reporter_unix.sock</unix_sock>
                    <unix_pid>open-ils.reporter_unix.pid</unix_pid>
                    <max_requests>1000</max_requests>
                    <unix_log>open-ils.reporter_unix.log</unix_log>
                    <min_children>1</min_children>
                    <max_children>10</max_children>
                    <min_spare_children>1</min_spare_children>
                    <max_spare_children>5</max_spare_children>
                </unix_config>
            </open-ils.reporter>

            <open-ils.reporter-store>
                <keepalive>6</keepalive>
                <stateless>1</stateless>
                <language>C</language>
                <implementation>oils_rstore.so</implementation>
                <unix_config>
                    <max_requests>400</max_requests>
                    <min_children>1</min_children>
                    <max_children>10</max_children>
                    <min_spare_children>1</min_spare_children>
                    <max_spare_children>5</max_spare_children>
                </unix_config>
                <app_settings>
                    <driver>pgsql</driver>
                    <database>
                        <type>master</type>
                        <weight>2</weight>
                        <user>evergreen</user>
                        <host>localhost</host>
                        <port>5432</port>
                        <pw>xxxxxxxxxxxxxxxx</pw>
                        <db>EGdatabase2</db>
                        <client_encoding>UTF-8</client_encoding>
                        <application_name>open-ils.reporter-store</application_name>
                    </database>
                </app_settings>
            </open-ils.reporter-store>

<!-- resolver_type defaults to sfx but can also be cufts -->
<!--
           <open-ils.resolver>
               <keepalive>3</keepalive>
               <stateless>1</stateless>
               <language>perl</language>
               <implementation>OpenILS::Application::ResolverResolver</implementation>
               <max_requests>93</max_requests>
               <unix_config>
                  <unix_sock>open-ils.resolver_unix.sock</unix_sock>
                  <unix_pid>open-ils.resolver_unix.pid</unix_pid>
                  <max_requests>1000</max_requests>
                  <unix_log>open-ils.resolver_unix.log</unix_log>
                  <min_children>5</min_children>
                  <max_children>15</max_children>
                  <min_spare_children>3</min_spare_children>
                  <max_spare_children>5</max_spare_children>
               </unix_config>
               <app_settings>
                  <cache_timeout>86400</cache_timeout>
                  <request_timeout>10</request_timeout>
                  <default_url_base>http://path/to/sfx_or_cufts</default_url_base>
                  <resolver_type>sfx</resolver_type>
               </app_settings>
            </open-ils.resolver>
-->

            <open-ils.permacrud>
               <keepalive>3</keepalive>
               <stateless>1</stateless>
               <language>perl</language>
               <implementation>OpenILS::Application::PermaCrud</implementation>
               <max_requests>17</max_requests>
               <unix_config>
                  <unix_sock>open-ils.permacrud_unix.sock</unix_sock>
                  <unix_pid>open-ils.permacrud_unix.pid</unix_pid>
                  <max_requests>1000</max_requests>
                  <unix_log>open-ils.permacrud_unix.log</unix_log>
                  <min_children>5</min_children>
                  <max_children>15</max_children>
                  <min_spare_children>3</min_spare_children>
                  <max_spare_children>5</max_spare_children>
               </unix_config>
            </open-ils.permacrud>

            <open-ils.fielder>
               <keepalive>3</keepalive>
               <stateless>1</stateless>
               <language>perl</language>
               <implementation>OpenILS::Application::Fielder</implementation>
               <max_requests>17</max_requests>
               <unix_config>
                  <unix_sock>open-ils.fielder_unix.sock</unix_sock>
                  <unix_pid>open-ils.fielder_unix.pid</unix_pid>
                  <max_requests>1000</max_requests>
                  <unix_log>open-ils.fielder_unix.log</unix_log>
                  <min_children>5</min_children>
                  <max_children>15</max_children>
                  <min_spare_children>3</min_spare_children>
                  <max_spare_children>5</max_spare_children>
               </unix_config>
            </open-ils.fielder>

            <open-ils.vandelay>
                <keepalive>5</keepalive>
                <stateless>1</stateless>
                <language>perl</language>
                <implementation>OpenILS::Application::Vandelay</implementation>
                <max_requests>100</max_requests>
                <unix_config>
                    <unix_sock>vandelay_unix.sock</unix_sock>
                    <unix_pid>vandelay_unix.pid</unix_pid>
                    <unix_log>vandelay_unix.log</unix_log>
                    <max_requests>100</max_requests>
                    <min_children>1</min_children>
                    <max_children>15</max_children>
                    <min_spare_children>1</min_spare_children>
                    <max_spare_children>5</max_spare_children>
                </unix_config>
                <app_settings>
                    <databases>
                        <!-- temporary location for MARC import files.  
                            Files will be deleted after records are spooled.
                            *note:  in a multi-brick environment, this will need to
                            be on a write-able NFS share.  -->
                        <importer>/tmp</importer>
                    </databases>
                </app_settings>
            </open-ils.vandelay>

            <open-ils.serial>
                <keepalive>3</keepalive>
                <stateless>1</stateless>
                <language>perl</language>
                <implementation>OpenILS::Application::Serial</implementation>
                <max_requests>17</max_requests>
                <unix_config>
                    <unix_sock>open-ils.serial_unix.sock</unix_sock>
                    <unix_pid>open-ils.serial_unix.pid</unix_pid>
                    <max_requests>1000</max_requests>
                    <unix_log>open-ils.serial_unix.log</unix_log>
                    <min_children>5</min_children>
                    <max_children>15</max_children>
                    <min_spare_children>3</min_spare_children>
                    <max_spare_children>5</max_spare_children>
                </unix_config>
                <app_settings>
                </app_settings>
            </open-ils.serial>

        </apps>
    </default>

    <hosts>

        <localhost> 
            <!-- ^-=- 
            Should match the fully qualified domain name of the host.

            On Linux, the output of the following command is authoritative:
            $ perl -MNet::Domain -e 'print Net::Domain::hostfqdn() . "\n";'

            To use 'localhost' instead, run osrf_control with the 'localhost' flag
            -->

            <activeapps>
                <!-- services hosted on this machine -->
                <appname>opensrf.settings</appname> 
                <appname>opensrf.math</appname> 
                <appname>opensrf.dbmath</appname> 
                <appname>open-ils.acq</appname> 
                <appname>open-ils.booking</appname>
                <appname>open-ils.cat</appname> 
                <appname>open-ils.supercat</appname> 
                <appname>open-ils.search</appname> 
                <appname>open-ils.circ</appname> 
                <appname>open-ils.actor</appname> 
                <appname>open-ils.auth</appname> 
                <appname>open-ils.auth_internal</appname>
                <appname>open-ils.auth_proxy</appname> 
                <appname>open-ils.storage</appname>  
                <appname>open-ils.justintime</appname>  
                <appname>open-ils.cstore</appname>  
                <appname>open-ils.collections</appname>  
                <appname>open-ils.reporter</appname>  
                <appname>open-ils.reporter-store</appname>  
                <!-- <appname>open-ils.resolver</appname> -->
                <appname>open-ils.permacrud</appname>  
                <appname>open-ils.pcrud</appname>  
                <appname>open-ils.trigger</appname>  
                <appname>open-ils.url_verify</appname>
                <appname>open-ils.fielder</appname>  
                <appname>open-ils.vandelay</appname>  
                <appname>open-ils.serial</appname>  
            </activeapps>
        </localhost>
    </hosts>

</opensrf>
<?xml version="1.0"?>
<!-- 
Example OpenSRF bootstrap configuration file for Evergreen
-->
<config>
  <!-- Options for <loglevel>: 0 None, 1 Error, 2 Warning, 3 Info, 4 debug -->
  <opensrf>
    <routers>

      <!-- define the list of routers our services will register with -->
      <router>
        <!-- 
          This is the public router.  On this router, we only register
          applications which should be accessible to everyone on the OpenSRF
          network
        -->
        <name>router</name>
        <domain>public.localhost</domain>

        <services>
          <service>opensrf.math</service>
          <service>open-ils.actor</service>
          <service>open-ils.acq</service>
          <service>open-ils.auth</service>
          <service>open-ils.auth_proxy</service>
          <service>open-ils.booking</service>
          <service>open-ils.cat</service>
          <service>open-ils.circ</service>
          <service>open-ils.collections</service>
          <service>open-ils.fielder</service>
          <service>open-ils.pcrud</service>
          <service>open-ils.permacrud</service>
          <service>open-ils.reporter</service>
          <service>open-ils.resolver</service>
          <service>open-ils.search</service>
          <service>open-ils.supercat</service>
          <service>open-ils.url_verify</service>
          <service>open-ils.vandelay</service>
          <service>open-ils.serial</service>
        </services>
      </router>

      <router>
        <!--
          This is the private router.  All applications must register with 
          this router, so no explicit <services> section is required
        -->
        <name>router</name>
        <domain>private.localhost</domain>
      </router>
    </routers>

    <!-- Our domain should match that of the private router -->
    <domain>private.localhost</domain>
    <username>opensrf</username>
    <passwd>xxxxxxxxxxxxxx</passwd>
    <port>5222</port>

    <!-- 
      Name of the router used on our private domain.  
      This should match one of the <name> of the private router above.
     -->
    <router_name>router</router_name>

    <logfile>/openils/var/log/osrfsys.log</logfile>
    <!--
      <logfile>syslog</logfile>
      <syslog>local0</syslog>
      <actlog>local1</actlog>
     -->
    <loglevel>4</loglevel>
    <settings_config>/openils/conf/opensrf.xml</settings_config>
  </opensrf>
  <!-- 
    The section between <gateway>...</gateway> is a standard OpenSRF C
    stack configuration file
  -->
  <gateway>
    <client>true</client>
    <router_name>router</router_name>

    <!-- The gateway connects to the public domain for security -->
    <domain>public.localhost</domain>

    <!-- This section will be soon deprecated for multi-domain mode... -->
    <services>
      <service>opensrf.math</service>
      <service>opensrf.dbmath</service>
      <service>open-ils.cat</service>
      <service>open-ils.search</service>
      <service>open-ils.circ</service>
      <service>open-ils.actor</service>
      <service>open-ils.auth</service>
      <service>open-ils.auth_proxy</service>
      <service>open-ils.collections</service>
      <service>open-ils.reporter</service>
    </services>

    <!-- jabber login info -->
    <username>opensrf</username>
    <passwd>xxxxxxxxxxxx</passwd>
    <port>5222</port>
    <loglevel>3</loglevel>
    <logfile>/openils/var/log/gateway.log</logfile>
    <!--
      <logfile>syslog</logfile>
      <syslog>local6</syslog>
      <actlog>local1</actlog>
    -->
  </gateway>
  <!-- ======================================================================================== -->
  <routers>
    <router>
      <!-- public router -->
      <trusted_domains>
        <!-- 
          Allow private services to register with this router 
          and public client to send requests to this router. 
        -->
        <server>private.localhost</server>

        <!-- 
          Also allow private clients to send to the router so it
          can receive error messages
        -->
        <client>private.localhost</client>
        <client>public.localhost</client>

      </trusted_domains>
      <transport>
        <server>public.localhost</server>
        <port>5222</port>
        <unixpath>/openils/var/sock/unix_sock</unixpath>
        <username>router</username>
        <password>xxxxxxxxxxxxxxxxx</password>
        <resource>router</resource>
        <connect_timeout>10</connect_timeout>
        <max_reconnect_attempts>5</max_reconnect_attempts>
      </transport>
      <logfile>/openils/var/log/router-public.log</logfile>
      <!--
        <logfile>syslog</logfile>
        <syslog>local2</syslog>
      -->
      <loglevel>2</loglevel>
    </router>
    <router>
      <!-- private router -->
      <trusted_domains>
        <server>private.localhost</server>
        <!-- 
          Only clients on the private domain can send requests to this router
         -->
        <client>private.localhost</client>
      </trusted_domains>
      <transport>
        <server>private.localhost</server>
        <port>5222</port>
        <username>router</username>
        <password>xxxxxxxxxxxx</password>
        <resource>router</resource>
        <connect_timeout>10</connect_timeout>
        <max_reconnect_attempts>5</max_reconnect_attempts>
      </transport>
      <logfile>/openils/var/log/router-private.log</logfile>
      <!--
        <logfile>syslog</logfile>
        <syslog>local2</syslog>
      -->
      <loglevel>2</loglevel>
    </router>
  </routers>
  <!-- ======================================================================================== -->

  <!-- Any methods which match any of these match_string node values will     
       have their params redacted from lower-level input logging.             
       Adjust these examples as needed. -->      
  <shared>
    <log_protect>
      <match_string>open-ils.auth.authenticate.verify</match_string>
      <match_string>open-ils.auth.authenticate.complete</match_string>
      <match_string>open-ils.auth_proxy.login</match_string>
      <match_string>open-ils.actor.patron.password_reset.commit</match_string>
      <match_string>open-ils.actor.user.password</match_string>
      <match_string>open-ils.actor.user.username</match_string>
      <match_string>open-ils.actor.user.email</match_string>
      <match_string>open-ils.actor.patron.update</match_string>
      <match_string>open-ils.cstore.direct.actor.user.create</match_string>
      <match_string>open-ils.cstore.direct.actor.user.update</match_string>
      <match_string>open-ils.cstore.direct.actor.user.delete</match_string>
      <match_string>open-ils.search.z3950.apply_credentials</match_string>
    </log_protect>
  </shared>
</config>
/openils/var/log/osrfsys.log:[2017-01-08 14:25:42] /openils/bin/osrf_control [ERR :1909:CDBI.pm:30:] Your version of Class::DBI, 3.0.17, is too new and incompatible with Evergreen.  You will need to downgrade to version 3.0.1 or install Class::DBI::Frozen::301
/openils/var/log/osrfsys.log:[2017-01-08 14:25:42] /openils/bin/osrf_control [ERR :1909:Application.pm:116:] Error loading application_implementation: OpenILS::Application::Storage -> Your version of Class::DBI, 3.0.17, is too new and incompatible with Evergreen.  You will need to downgrade to version 3.0.1 or install Class::DBI::Frozen::301 at /usr/local/share/perl/5.22.1/OpenILS/Application/Storage/CDBI.pm line 31.
/openils/var/log/osrfsys.log:[2017-01-08 14:25:44] /openils/bin/osrf_control [ERR :1877:Application.pm:116:] Error loading application_implementation: OpenILS::Application::Search -> Cannot load a z39.50 client implementation!  Please install either ZOOM or Net::Z3950.
/openils/var/log/osrfsys.log:[2017-01-08 14:25:45] /openils/bin/osrf_control [ERR :1840:Application.pm:116:] Error loading application_implementation: OpenILS::Application::Acq -> Can't locate Net/SSH2.pm in @INC (you may need to install the Net::SSH2 module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.22.1 /usr/local/share/perl/5.22.1 /usr/lib/x86_64-linux-gnu/perl5/5.22 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.22 /usr/share/perl/5.22 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base .) at /usr/local/share/perl/5.22.1/OpenILS/Utils/RemoteAccount.pm line 8.
/openils/var/log/osrfsys.log:[2017-01-08 14:25:45] /openils/bin/osrf_control [ERR :1885:Application.pm:116:] Error loading application_implementation: OpenILS::Application::Circ -> Can't locate Email/Send.pm in @INC (you may need to install the Email::Send module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.22.1 /usr/local/share/perl/5.22.1 /usr/lib/x86_64-linux-gnu/perl5/5.22 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.22 /usr/share/perl/5.22 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base .) at /usr/local/share/perl/5.22.1/OpenILS/Application/Circ/HoldNotify.pm line 30.
/openils/var/log/osrfsys.log:open-ils.reporter-store 2017-01-08 14:25:46 [DEBG:2038:oils_sql.c:443:] No data found for class [ssr]: 6822153, 6822153: ERROR:  "search_result" is a composite type
/openils/var/log/osrfsys.log:open-ils.cstore 2017-01-08 14:25:46 [DEBG:2030:oils_sql.c:443:] No data found for class [ssr]: 6822153, 6822153: ERROR:  "search_result" is a composite type
/openils/var/log/osrfsys.log:open-ils.pcrud 2017-01-08 14:25:47 [DEBG:2048:oils_sql.c:443:] No data found for class [ssr]: 6822153, 6822153: ERROR:  "search_result" is a composite type
/openils/var/log/osrfsys.log:open-ils.cstore 2017-01-08 14:25:47 [DEBG:2030:oils_sql.c:443:] No data found for class [bmpc]: 6822153, 6822153: ERROR:  "marc21_physical_characteristics" is a composite type
/openils/var/log/osrfsys.log:open-ils.reporter-store 2017-01-08 14:25:47 [DEBG:2038:oils_sql.c:443:] No data found for class [bmpc]: 6822153, 6822153: ERROR:  "marc21_physical_characteristics" is a composite type
/openils/var/log/osrfsys.log:open-ils.pcrud 2017-01-08 14:25:47 [DEBG:2048:oils_sql.c:443:] No data found for class [bmpc]: 6822153, 6822153: ERROR:  "marc21_physical_characteristics" is a composite type
/openils/var/log/osrfsys.log:open-ils.cstore 2017-01-08 14:25:47 [DEBG:2030:oils_sql.c:443:] No data found for class [rccc]: 6844177, 6844177: ERROR:  relation "reporter.classic_current_circ" does not exist
/openils/var/log/osrfsys.log:open-ils.cstore 2017-01-08 14:25:47 [DEBG:2030:oils_sql.c:443:] No data found for class [rsce1]: 6844177, 6844177: ERROR:  relation "reporter.legacy_cat1" does not exist
/openils/var/log/osrfsys.log:open-ils.cstore 2017-01-08 14:25:47 [DEBG:2030:oils_sql.c:443:] No data found for class [rsce2]: 6844177, 6844177: ERROR:  relation "reporter.legacy_cat2" does not exist
/openils/var/log/osrfsys.log:open-ils.reporter-store 2017-01-08 14:25:47 [DEBG:2038:oils_sql.c:443:] No data found for class [rccc]: 6844177, 6844177: ERROR:  relation "reporter.classic_current_circ" does not exist
/openils/var/log/osrfsys.log:open-ils.cstore 2017-01-08 14:25:47 [DEBG:2030:oils_sql.c:443:] No data found for class [rccbs]: 6844177, 6844177: ERROR:  relation "reporter.classic_current_billing_summary" does not exist
/openils/var/log/osrfsys.log:open-ils.pcrud 2017-01-08 14:25:47 [DEBG:2048:oils_sql.c:443:] No data found for class [rccc]: 6844177, 6844177: ERROR:  relation "reporter.classic_current_circ" does not exist
/openils/var/log/osrfsys.log:open-ils.pcrud 2017-01-08 14:25:47 [DEBG:2048:oils_sql.c:443:] No data found for class [rsce1]: 6844177, 6844177: ERROR:  relation "reporter.legacy_cat1" does not exist
/openils/var/log/osrfsys.log:open-ils.pcrud 2017-01-08 14:25:47 [DEBG:2048:oils_sql.c:443:] No data found for class [rsce2]: 6844177, 6844177: ERROR:  relation "reporter.legacy_cat2" does not exist
/openils/var/log/osrfsys.log:open-ils.pcrud 2017-01-08 14:25:47 [DEBG:2048:oils_sql.c:443:] No data found for class [rccbs]: 6844177, 6844177: ERROR:  relation "reporter.classic_current_billing_summary" does not exist
/openils/var/log/osrfsys.log:open-ils.reporter-store 2017-01-08 14:25:47 [DEBG:2038:oils_sql.c:443:] No data found for class [rsce1]: 6844177, 6844177: ERROR:  relation "reporter.legacy_cat1" does not exist
/openils/var/log/osrfsys.log:open-ils.reporter-store 2017-01-08 14:25:47 [DEBG:2038:oils_sql.c:443:] No data found for class [rsce2]: 6844177, 6844177: ERROR:  relation "reporter.legacy_cat2" does not exist
/openils/var/log/osrfsys.log:open-ils.reporter-store 2017-01-08 14:25:47 [DEBG:2038:oils_sql.c:443:] No data found for class [rccbs]: 6844177, 6844177: ERROR:  relation "reporter.classic_current_billing_summary" does not exist
/openils/var/log/osrfsys.log:open-ils.pcrud 2017-01-08 14:25:47 [DEBG:2048:oils_sql.c:443:] No data found for class [rocit]: 6844177, 6844177: ERROR:  relation "reporter.classic_item_list" does not exist
/openils/var/log/osrfsys.log:open-ils.pcrud 2017-01-08 14:25:47 [DEBG:2048:oils_sql.c:443:] No data found for class [rmocbbol]: 6844177, 6844177: ERROR:  relation "money.open_circ_balance_by_owning_lib" does not exist
/openils/var/log/osrfsys.log:open-ils.pcrud 2017-01-08 14:25:47 [DEBG:2048:oils_sql.c:443:] No data found for class [rmobbol]: 6844177, 6844177: ERROR:  relation "money.open_balance_by_owning_lib" does not exist
/openils/var/log/osrfsys.log:open-ils.pcrud 2017-01-08 14:25:47 [DEBG:2048:oils_sql.c:443:] No data found for class [rmocbbcol]: 6844177, 6844177: ERROR:  relation "money.open_circ_balance_by_circ_and_owning_lib" does not exist
/openils/var/log/osrfsys.log:open-ils.pcrud 2017-01-08 14:25:47 [DEBG:2048:oils_sql.c:443:] No data found for class [rmobbcol]: 6844177, 6844177: ERROR:  relation "money.open_balance_by_circ_and_owning_lib" does not exist
/openils/var/log/osrfsys.log:open-ils.pcrud 2017-01-08 14:25:47 [DEBG:2048:oils_sql.c:443:] No data found for class [rmocbbhol]: 6844177, 6844177: ERROR:  relation "money.open_circ_balance_by_usr_home_and_owning_lib" does not exist
/openils/var/log/osrfsys.log:open-ils.pcrud 2017-01-08 14:25:47 [DEBG:2048:oils_sql.c:443:] No data found for class [rmobbhol]: 6844177, 6844177: ERROR:  relation "money.open_balance_by_usr_home_and_owning_lib" does not exist
/openils/var/log/osrfsys.log:open-ils.cstore 2017-01-08 14:25:47 [DEBG:2030:oils_sql.c:443:] No data found for class [rocit]: 6844177, 6844177: ERROR:  relation "reporter.classic_item_list" does not exist
/openils/var/log/osrfsys.log:open-ils.cstore 2017-01-08 14:25:47 [DEBG:2030:oils_sql.c:443:] No data found for class [rmocbbol]: 6844177, 6844177: ERROR:  relation "money.open_circ_balance_by_owning_lib" does not exist
/openils/var/log/osrfsys.log:open-ils.cstore 2017-01-08 14:25:47 [DEBG:2030:oils_sql.c:443:] No data found for class [rmobbol]: 6844177, 6844177: ERROR:  relation "money.open_balance_by_owning_lib" does not exist
/openils/var/log/osrfsys.log:open-ils.cstore 2017-01-08 14:25:47 [DEBG:2030:oils_sql.c:443:] No data found for class [rmocbbcol]: 6844177, 6844177: ERROR:  relation "money.open_circ_balance_by_circ_and_owning_lib" does not exist
/openils/var/log/osrfsys.log:open-ils.cstore 2017-01-08 14:25:47 [DEBG:2030:oils_sql.c:443:] No data found for class [rmobbcol]: 6844177, 6844177: ERROR:  relation "money.open_balance_by_circ_and_owning_lib" does not exist
/openils/var/log/osrfsys.log:open-ils.cstore 2017-01-08 14:25:47 [DEBG:2030:oils_sql.c:443:] No data found for class [rmocbbhol]: 6844177, 6844177: ERROR:  relation "money.open_circ_balance_by_usr_home_and_owning_lib" does not exist
/openils/var/log/osrfsys.log:open-ils.cstore 2017-01-08 14:25:47 [DEBG:2030:oils_sql.c:443:] No data found for class [rmobbhol]: 6844177, 6844177: ERROR:  relation "money.open_balance_by_usr_home_and_owning_lib" does not exist
/openils/var/log/osrfsys.log:open-ils.reporter-store 2017-01-08 14:25:47 [DEBG:2038:oils_sql.c:443:] No data found for class [rocit]: 6844177, 6844177: ERROR:  relation "reporter.classic_item_list" does not exist
/openils/var/log/osrfsys.log:open-ils.reporter-store 2017-01-08 14:25:47 [DEBG:2038:oils_sql.c:443:] No data found for class [rmocbbol]: 6844177, 6844177: ERROR:  relation "money.open_circ_balance_by_owning_lib" does not exist
/openils/var/log/osrfsys.log:open-ils.reporter-store 2017-01-08 14:25:47 [DEBG:2038:oils_sql.c:443:] No data found for class [rmobbol]: 6844177, 6844177: ERROR:  relation "money.open_balance_by_owning_lib" does not exist
/openils/var/log/osrfsys.log:open-ils.reporter-store 2017-01-08 14:25:47 [DEBG:2038:oils_sql.c:443:] No data found for class [rmocbbcol]: 6844177, 6844177: ERROR:  relation "money.open_circ_balance_by_circ_and_owning_lib" does not exist
/openils/var/log/osrfsys.log:open-ils.reporter-store 2017-01-08 14:25:47 [DEBG:2038:oils_sql.c:443:] No data found for class [rmobbcol]: 6844177, 6844177: ERROR:  relation "money.open_balance_by_circ_and_owning_lib" does not exist
/openils/var/log/osrfsys.log:open-ils.reporter-store 2017-01-08 14:25:47 [DEBG:2038:oils_sql.c:443:] No data found for class [rmocbbhol]: 6844177, 6844177: ERROR:  relation "money.open_circ_balance_by_usr_home_and_owning_lib" does not exist
/openils/var/log/osrfsys.log:open-ils.reporter-store 2017-01-08 14:25:47 [DEBG:2038:oils_sql.c:443:] No data found for class [rmobbhol]: 6844177, 6844177: ERROR:  relation "money.open_balance_by_usr_home_and_owning_lib" does not exist
# :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>

# 
----------------------------------------------------------------------------------
# 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]

Reply via email to