# :vim set syntax apache
LogLevel notice
#LogLevel debug
PerlChildInitHandler OpenILS::WWW::Reporter::child_init
PerlChildInitHandler OpenILS::WWW::SuperCat::child_init
PerlChildInitHandler OpenILS::WWW::AddedContent::child_init;
Order allow,deny
Allow from all
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
ExpiresActive On
ExpiresByType image/jpg "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType text/html "access plus 250 minutes"
ExpiresByType application/x-javascript "access plus 240 minutes"
ExpiresByType text/css "access plus 230 minutes"
AliasMatch ^/opac/.*/skin/(.*)/(.*)/(.*) /openils/var/web/opac/skin/$1/$2/$3
AliasMatch ^/opac/slimpac/.*/skin/(.*)/xml/(.*) /openils/var/web/opac/skin/$1/xml/$2
# ----------------------------------------------------------------------------------
# Set up image caching - only works with apache2.2
# ----------------------------------------------------------------------------------
CacheRoot "/opt/cache/"
CacheEnable disk /opac/extras/jacket/
CacheMaxFileSize 1073741824
CacheIgnoreCacheControl On
CacheStorePrivate On
CacheStoreNoStore On
CacheIgnoreNoLastMod On
CacheMaxExpire 604800
CacheLastModifiedFactor 0.5
CacheDefaultExpire 604800
NameVirtualHost *:80
ServerName dev.gapines.org:80
ServerAlias 10.4.0.122:80
DocumentRoot /openils/var/web/
DirectoryIndex index.xml index.html
# ----------------------------------------------------------------------------------
# Set up the Perl
# ----------------------------------------------------------------------------------
PerlRequire /opt/conf/startup.pl
PassEnv PERL5LIB
# ----------------------------------------------------------------------------------
# Configure the gateways
# ----------------------------------------------------------------------------------
OSRFGatewayConfig /openils/conf/opensrf_core.xml
# ----------------------------------------------------------------------------------
# Point / to the opac
# ----------------------------------------------------------------------------------
RedirectMatch 301 ^/$ /opac/en-US/skin/default/xml/index.xml
# ----------------------------------------------------------------------------------
# Deflate whatever we can
# ----------------------------------------------------------------------------------
AddOutputFilterByType DEFLATE application/x-javascript text/html text/plain text/xml text/css
# ----------------------------------------------------------------------------------
# Send them to the OPAC
# ----------------------------------------------------------------------------------
RedirectMatch 301 ^/$ /opac/en-US/skin/default/xml/index.xml
# ----------------------------------------------------------------------------------
# Set up the book jackets URL
# ----------------------------------------------------------------------------------
RewriteEngine on
RewriteRule /opac/extras/jacket/small/(.*) \
http://syndetics.com/index.aspx?isbn=$1/sc.gif&client=evertestt&type=rw12 [P,L]
RewriteRule /opac/extras/jacket/large/(.*) \
http://syndetics.com/index.aspx?isbn=$1/lc.gif&client=evertestt&type=rw12 [P,L]
AddType application/xhtml+xml .xml
ExpiresByType text/xml "access plus 1 hour"
Options +Includes
XBitHack Full
RewriteEngine on
BrowserMatchNoCase MSIE IE
BrowserMatchNoCase mozilla mozilla
BrowserMatchNoCase safari safari
XMLEntStripPI "yes"
XMLEntEscapeScript "no"
XMLEntStripComments "yes"
XMLEntContentType "text/html; charset=utf-8"
# forces quirks mode which we want for now
XMLEntStripDoctype "yes"
AddOutputFilter INCLUDES .xsl
AddOutputFilter INCLUDES;XMLENT .xml
# add languages as necessary
SetEnvIf Request_URI "^/opac/slimpac/" slimpac=true
SetEnvIf Request_URI "/en-US/" locale=en-US
SetEnvIf Request_URI "/fr/" locale=fr
SetEnvIf Request_URI ".*" OILS_OPAC_BASE=/opac/
# ----------------------------------------------------------------------------------
# Force SSL on the OPAC's "My Account" page
# ----------------------------------------------------------------------------------
SSLRequireSSL
# ----------------------------------------------------------------------------------
# Run server-side XUL through xmlent to load the correct XML entities
# ----------------------------------------------------------------------------------
Options +Includes
XMLEntContentType "application/vnd.mozilla.xul+xml"
AddOutputFilter INCLUDES;XMLENT .xul
allow from all
# ----------------------------------------------------------------------------------
# Added content generator
# ----------------------------------------------------------------------------------
SetHandler perl-script
PerlHandler OpenILS::WWW::AddedContent
Options +ExecCGI
PerlSendHeader On
allow from all
AddType application/xhtml+xml .xml
# ----------------------------------------------------------------------------------
# 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
XMLEntContentType "text/html"
SetOutputFilter XMLENT
SetHandler perl-script
PerlHandler OpenILS::WWW::SuperCat::opensearch_feed
Options +ExecCGI
PerlSendHeader On
allow from all
XMLEntContentType "text/html"
SetOutputFilter XMLENT
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
# ----------------------------------------------------------------------------------
# System config CGI scripts go here
# ----------------------------------------------------------------------------------
Alias /cgi-bin/ "/openils/var/cgi-bin/"
AddHandler cgi-script .cgi .pl
AllowOverride None
Options None
Order deny,allow
Deny from all
Allow from 10.0.0.0/8
Options FollowSymLinks ExecCGI Indexes
# ----------------------------------------------------------------------------------
# Module for processing staff-client offline scripts lives here
# ----------------------------------------------------------------------------------
AddHandler cgi-script .pl
AllowOverride None
Options FollowSymLinks ExecCGI
allow from all
# ----------------------------------------------------------------------------------
# OpenSRF JSON gateway
# ----------------------------------------------------------------------------------
SetHandler osrf_json_gateway_module
allow from all
# ----------------------------------------------------------------------------------
# The reporting engine lives here
# ----------------------------------------------------------------------------------
RedirectMatch ^/reporter/?$ /reporter/dashboard
SetHandler perl-script
PerlHandler OpenILS::WWW::Reporter
Options +ExecCGI
PerlSendHeader On
allow from all
SetHandler perl-script
PerlHandler OpenILS::WWW::XMLRPCGateway
Options +ExecCGI
PerlSendHeader On
allow from all