From 586b90867d25e8695d9660d30a3464434cac3254 Mon Sep 17 00:00:00 2001 From: dbs Date: Mon, 15 Feb 2010 04:51:28 +0000 Subject: [PATCH] Get our Apache configuration into SVN in case of disaster git-svn-id: svn://svn.open-ils.org/ILS-Contrib/conifer/branches/rel_1_6_0@785 6d9bc8c9-1ec2-4278-b937-99fde70a366f --- apache/eg_vhost.conf | 521 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 521 insertions(+) create mode 100644 apache/eg_vhost.conf diff --git a/apache/eg_vhost.conf b/apache/eg_vhost.conf new file mode 100644 index 0000000000..1caab88de6 --- /dev/null +++ b/apache/eg_vhost.conf @@ -0,0 +1,521 @@ +# ---------------------------------------------------------------------------------- +# 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. +# ---------------------------------------------------------------------------------- + +# ---------------------------------------------------------------------------------- +# Assign a default locale to the accessible OPAC +# ---------------------------------------------------------------------------------- +RedirectMatch 301 ^/opac/extras/slimpac/start.html$ /opac/en-CA/extras/slimpac/start.html +RedirectMatch 301 ^/opac/extras/slimpac/advanced.html$ /opac/en-CA/extras/slimpac/advanced.html + +# ---------------------------------------------------------------------------------- +# Configure the gateway +# ---------------------------------------------------------------------------------- +OSRFGatewayConfig /openils/conf/opensrf_core.xml +OSRFTranslatorCacheServer 131.104.100.166:11211 + +# ---------------------------------------------------------------------------------- +# Added content plugin +# ---------------------------------------------------------------------------------- + + SetHandler perl-script + PerlHandler OpenILS::WWW::AddedContent + Options +ExecCGI + PerlSendHeader On + allow from all + + +# ---------------------------------------------------------------------------------- +# 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] + +# Catch changes due to organizational hierarchy +RewriteCond %{QUERY_STRING} ^(.*?)(^l|&l)=(105|114)&d=2(\D.*)?$ +RewriteRule ^(.*)$ $1?%1%2=%3%4 [redirect=permanent,last,noescape] + +#RewriteCond %{QUERY_STRING} ^l=105&d=2$ +#RewriteRule - /opac/%1/skin/lul/xml/index.xml?l=105 [R=permanent] + +# ---------------------------------------------------------------------------------- +# Wildcard cert means that concat.ca _isn't_ valid, but anything else is +# Redirect to www.concat.ca +# ---------------------------------------------------------------------------------- +RewriteCond %{HTTP_HOST} ^concat\.ca +RewriteRule ^(.*)$ http://www.concat.ca/$1 [R=permanent,L] + +# ---------------------------------------------------------------------------------- +# Algoma skin +# ---------------------------------------------------------------------------------- +RewriteCond %{HTTP_HOST} ^algoma.concat\.ca +RewriteRule ^/?$ http://algoma.concat.ca/opac/en-CA/skin/algoma/xml/index.xml?l=111 [R=permanent,L] + +# ---------------------------------------------------------------------------------- +# LU English School of Education skin +# ---------------------------------------------------------------------------------- +RewriteCond %{HTTP_HOST} ^crc.concat\.ca +RewriteRule ^/?$ http://crc.concat.ca/opac/en-CA/skin/default/xml/index.xml?l=130 [R=permanent,L] + +# ---------------------------------------------------------------------------------- +# Sudbury Regional Hospital skin +# ---------------------------------------------------------------------------------- +RewriteCond %{HTTP_HOST} ^hrsrh.concat\.ca +RewriteRule ^/?$ http://hrsrh.concat.ca/opac/en-CA/skin/hrsrh/xml/index.xml?l=115 [R=permanent,L] + +# ---------------------------------------------------------------------------------- +# LU French School of Education skin +# ---------------------------------------------------------------------------------- +RewriteCond %{HTTP_HOST} ^ldcr.concat\.ca +RewriteRule ^/?$ http://ldcr.concat.ca/opac/en-CA/skin/default/xml/index.xml?l=132 [R=permanent,L] + +# ---------------------------------------------------------------------------------- +# Huntington College skin +# ---------------------------------------------------------------------------------- +RewriteCond %{HTTP_HOST} ^huntington.concat\.ca +RewriteRule ^/?$ http://huntington.concat.ca/opac/en-CA/skin/default/xml/index.xml?l=104 [R=permanent,L] + +# ---------------------------------------------------------------------------------- +# Laurentian skin +# ---------------------------------------------------------------------------------- +RewriteCond %{HTTP_HOST} ^laurentian.concat\.ca +RewriteRule ^/?$ http://laurentian.concat.ca/opac/en-CA/skin/lul/xml/index.xml?l=105 [R=permanent,L] + +# ---------------------------------------------------------------------------------- +# Laurentienne skin +# ---------------------------------------------------------------------------------- +RewriteCond %{HTTP_HOST} ^laurentienne.concat\.ca +RewriteRule ^/?$ http://laurentienne.concat.ca/opac/fr-CA/skin/lul/xml/index.xml?l=105 [R=permanent,L] + +# ---------------------------------------------------------------------------------- +# Music Resource Centre skin +# ---------------------------------------------------------------------------------- +RewriteCond %{HTTP_HOST} ^mrc.concat\.ca +RewriteRule ^/?$ http://mrc.concat.ca/opac/en-CA/skin/lul/xml/index.xml?l=131 [R=permanent,L] + +# ---------------------------------------------------------------------------------- +# NOSM skin +# ---------------------------------------------------------------------------------- +RewriteCond %{HTTP_HOST} ^nosm.concat\.ca +RewriteRule ^/?$ http://nosm.concat.ca/opac/en-CA/skin/nosm/xml/index.xml?l=125 [R=permanent,L] + +# ---------------------------------------------------------------------------------- +# Université de Hearst skin +# ---------------------------------------------------------------------------------- +RewriteCond %{HTTP_HOST} ^uhearst.concat\.ca +RewriteRule ^/?$ http://uhearst.concat.ca/opac/fr-CA/skin/uhearst/xml/index.xml?l=114 [R=permanent,L] + +# ---------------------------------------------------------------------------------- +# Université of Sudbury skin +# ---------------------------------------------------------------------------------- +RewriteCond %{HTTP_HOST} ^usudbury.concat\.ca +RewriteRule ^/?$ http://usudbury.concat.ca/opac/en-CA/skin/default/xml/index.xml?l=107 [R=permanent,L] + +# ---------------------------------------------------------------------------------- +# Vale Inco skin +# ---------------------------------------------------------------------------------- +RewriteCond %{HTTP_HOST} ^vale.concat\.ca +RewriteRule ^/?$ http://vale.concat.ca/opac/en-CA/skin/default/xml/index.xml?l=120 [R=permanent,L] + +# ---------------------------------------------------------------------------------- +# XStrata skin +# ---------------------------------------------------------------------------------- +RewriteCond %{HTTP_HOST} ^xstrata.concat\.ca +RewriteRule ^/?$ http://xstrata.concat.ca/opac/en-CA/skin/default/xml/index.xml?l=119 [R=permanent,L] + +# ---------------------------------------------------------------------------------- +# Windsor skin +# ---------------------------------------------------------------------------------- +RewriteCond %{HTTP_HOST} ^windsor.concat\.ca +RewriteRule ^/?$ http://windsor.concat.ca/opac/en-CA/skin/uwin/xml/index.xml?l=106 [R=permanent,L] + +# ---------------------------------------------------------------------------------- +# Point / to the opac +# ---------------------------------------------------------------------------------- +RedirectMatch 301 ^/$ /opac/en-CA/skin/default/xml/index.xml + +# ---------------------------------------------------------------------------------- +# Add the row ID (RID) and date so we can make unAPI happy +# ---------------------------------------------------------------------------------- +RewriteEngine ON +RewriteCond %{QUERY_STRING} (^r|&r)=(\d+) +RewriteRule - - [E=OILS_OPAC_RID:%2] +RewriteRule - - [E=OILS_TIME_YEAR:%{TIME_YEAR}] [L] + +# ---------------------------------------------------------------------------------- +# Pull the locale from the URL +# ---------------------------------------------------------------------------------- +RewriteEngine ON +RewriteCond %{REQUEST_URI} ^/opac/(.*?)/ +RewriteRule - - [E=locale:%1] [L] + +# ---------------------------------------------------------------------------------- +# Configure the OPAC +# ---------------------------------------------------------------------------------- + +AddOutputFilterByType DEFLATE text/css text/javascript application/javascript + + + + 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 + + + + +# ---------------------------------------------------------------------------------- +# Force SSL on the OPAC's "My Account" page +# ---------------------------------------------------------------------------------- + +# Removed to test load balancer +# SSLRequireSSL + + + + # Force to en-CA for now to satisfy bbags.xml + SetEnv locale en-CA + Options +Includes + AddOutputFilter INCLUDES .xml + AddType application/xhtml+xml .xml + + +RewriteEngine ON +RewriteCond %{QUERY_STRING} locale=([^&]*) +RewriteRule ^/opac/[a-z]{2}-[A-Z]{2}/extras/slimpac/(.*)$ /opac/%1/extras/slimpac/$1? [redirect] + + AddOutputFilter INCLUDES;XMLENT .html + + +# ---------------------------------------------------------------------------------- +# Run server-side XUL and XHTML through xmlent to load the correct XML entities +# ---------------------------------------------------------------------------------- +RewriteEngine ON +RewriteCond %{HTTP:Accept-Language} ([a-z]{2}-[A-Z]{2}) +RewriteRule ^/xul/ - [E=locale:%1] +RewriteRule ^/reports/ - [E=locale:%1] [L] + +# Default to en-CA if we haven't matched a locale of the form xx-YY +RewriteEngine ON +RewriteCond %{HTTP:Accept-Language} !([a-z]{2}-[A-Z]{2}) +RewriteRule ^/xul/ - [E=locale:en-CA] +RewriteRule ^/reports/ - [E=locale:en-CA] [L] + +# Default to en-CA if we are just given en +RewriteEngine ON +RewriteCond %{ENV:locale} ^$ [OR] +RewriteCond %{ENV:locale} ^en$ +RewriteRule - - [E=locale:en-CA] [L] + + + Options +Includes + XMLEntEscapeScript "no" + XMLEntStripComments "yes" + XMLEntStripPI "yes" + XMLEntStripDoctype "yes" + XMLEntContentType "text/html; charset=utf-8" + AddOutputFilter INCLUDES;XMLENT .xhtml + AddOutputFilter INCLUDES;XMLENT .html + allow from all + + + + + Options +Includes + XMLEntContentType "application/vnd.mozilla.xul+xml" + AddOutputFilter INCLUDES;XMLENT .xul + allow from all + + + +# ---------------------------------------------------------------------------------- +# Supercat feeds +# ---------------------------------------------------------------------------------- + + SetHandler perl-script + PerlHandler OpenILS::WWW::SuperCat::oisbn + Options +ExecCGI + PerlSendHeader On + allow from all + + + SetHandler perl-script + PerlHandler OpenILS::WWW::SuperCat::supercat + Options +ExecCGI + PerlSendHeader On + allow from all + + + SetHandler perl-script + PerlHandler OpenILS::WWW::SuperCat::unapi + Options +ExecCGI + PerlSendHeader On + allow from all + + + SetHandler perl-script + PerlHandler OpenILS::WWW::SuperCat::bookbag_feed + Options +ExecCGI + PerlSendHeader On + allow from all + + + SetHandler perl-script + PerlHandler OpenILS::WWW::SuperCat::opensearch_feed + Options +ExecCGI + PerlSendHeader On + allow from all + + + SetHandler perl-script + PerlHandler OpenILS::WWW::SuperCat::sru_search + Options +ExecCGI + PerlSendHeader On + allow from all + + + SetHandler perl-script + PerlHandler OpenILS::WWW::SuperCat::changes_feed + Options +ExecCGI + PerlSendHeader On + allow from all + + + SetHandler perl-script + PerlHandler OpenILS::WWW::SuperCat::string_browse + Options +ExecCGI + PerlSendHeader On + allow from all + + +# ---------------------------------------------------------------------------------- +# Module for displaying OpenSRF API documentation +# ---------------------------------------------------------------------------------- + + AddOutputFilter INCLUDES .xsl + + +# ---------------------------------------------------------------------------------- +# Module for processing staff-client offline scripts lives here +# ---------------------------------------------------------------------------------- + + AddHandler cgi-script .pl + AllowOverride None + Options +ExecCGI + allow from all + + + +# ---------------------------------------------------------------------------------- +# 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 +# ---------------------------------------------------------------------------------- + + SetHandler osrf_json_gateway_module + OSRFGatewayLegacyJSON "true" + allow from all + +# ---------------------------------------------------------------------------------- +# New-style OpenSRF JSON gateway +# ---------------------------------------------------------------------------------- + + SetHandler osrf_json_gateway_module + OSRFGatewayLegacyJSON "false" + allow from all + + +# ---------------------------------------------------------------------------------- +# OpenSRF-over-HTTP translator +# (http://open-ils.org/dokuwiki/doku.php?id=opensrf_over_http) +# ---------------------------------------------------------------------------------- + + SetHandler osrf_http_translator_module + allow from all + + +# ---------------------------------------------------------------------------------- +# The exporter lives here +# ---------------------------------------------------------------------------------- + + SetHandler perl-script + PerlSetVar OILSProxyTitle "Exporter Login" + PerlSetVar OILSProxyDescription "Please log in to export records" + PerlSetVar OILSProxyPermissions "STAFF_LOGIN" + PerlHandler OpenILS::WWW::Proxy OpenILS::WWW::Exporter + Options +ExecCGI + allow from all + + +# ---------------------------------------------------------------------------------- +# Reporting output lives here +# ---------------------------------------------------------------------------------- + + SetHandler perl-script + PerlSetVar OILSProxyTitle "Report Login" + PerlSetVar OILSProxyDescription "Please log in to view this report" + PerlSetVar OILSProxyPermissions "VIEW_REPORT_OUTPUT" + PerlHandler OpenILS::WWW::Proxy + Options +ExecCGI + PerlSendHeader On + allow from all + + +# ---------------------------------------------------------------------------------- +# Selfcheck interface +# ---------------------------------------------------------------------------------- + + SetHandler perl-script + PerlSetVar OILSProxyTitle "Selfcheck Login" + PerlSetVar OILSProxyDescription "Please log in to activate the selfcheck interface" + PerlSetVar OILSProxyPermissions "STAFF_LOGIN" + PerlHandler OpenILS::WWW::Proxy + Options +ExecCGI + PerlSendHeader On + allow from all + + + +# ---------------------------------------------------------------------------------- +# Reports GUI +# ---------------------------------------------------------------------------------- + + Options +Includes + AddOutputFilter INCLUDES;XMLENT .xhtml + + + Options +Includes + XMLEntStripDoctype "yes" + XMLEntStripComments "no" + XMLEntContentType "text/xml; charset=utf-8" + AddOutputFilter INCLUDES;XMLENT .xml + + +# ---------------------------------------------------------------------------------- +# XML-RPC gateway +# ---------------------------------------------------------------------------------- + + SetHandler perl-script + PerlHandler OpenILS::WWW::XMLRPCGateway + Options +ExecCGI + PerlSendHeader On + allow from all + + +# ---------------------------------------------------------------------------------- +# Conify - next-generation Evergreen administration interface +# ---------------------------------------------------------------------------------- +RewriteEngine on +RewriteRule ^/conify/([a-z]{2}-[A-Z]{2})/global/(.*)$ /conify/global/$2 [E=locale:$1,L] + + XMLEntStripPI "yes" + XMLEntEscapeScript "no" + XMLEntStripComments "no" + XMLEntContentType "text/html; charset=utf-8" + AddOutputFilter INCLUDES;XMLENT .html + + SetHandler perl-script + PerlSetVar OILSProxyTitle "Dojo Admin Login" + PerlSetVar OILSProxyDescription "Please log in to administer Evergreen" + PerlSetVar OILSProxyPermissions "STAFF_LOGIN" + PerlHandler OpenILS::WWW::Proxy + Options +ExecCGI + PerlSendHeader On + allow from all + + +# ---------------------------------------------------------------------------------- +# Vandelay importers / exporters (your Web interface to bibliographic travel) +# ---------------------------------------------------------------------------------- +RedirectMatch 301 ^/vandelay/vandelay.xml(.*)$ /vandelay/en-CA/vandelay.xml$1 + +RewriteEngine on +RewriteRule ^/vandelay/([a-z]{2}-[A-Z]{2})/(.*)$ /vandelay/$2 [E=locale:$1] + + + XMLEntStripPI "yes" + XMLEntEscapeScript "no" + XMLEntStripComments "yes" + XMLEntContentType "text/html; charset=utf-8" + XMLEntStripDoctype "yes" + AddOutputFilter INCLUDES;XMLENT .xml + SetHandler perl-script + PerlSetVar OILSProxyTitle "Vandelay Login" + PerlSetVar OILSProxyDescription "Please log in to import MARC records" + PerlSetVar OILSProxyPermissions "IMPORT_MARC" + PerlHandler OpenILS::WWW::Proxy + Options +ExecCGI + PerlSendHeader On + allow from all + + + SetHandler perl-script + PerlHandler OpenILS::WWW::Vandelay::spool_marc + Options +ExecCGI + allow from all + + +# OpenURL 0.1 searching based on OpenSearch +RewriteEngine on +RewriteMap openurl prg:/openils/bin/openurl_map.pl +RewriteCond %{QUERY_STRING} (^.*$) +RewriteRule ^/openurl$ ${openurl:%1} [NE,PT] + + + +# General Evergreen web template processor + + SetHandler perl-script + PerlHandler OpenILS::WWW::EGWeb + Options +ExecCGI + PerlSendHeader On + allow from all + +# 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. + + SetHandler None + + + -- 2.11.0