From 3159042c92177c334dcd4541b028731fb50f468d Mon Sep 17 00:00:00 2001 From: erickson Date: Wed, 21 Feb 2007 20:35:41 +0000 Subject: [PATCH] adding some default configs git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_0@6975 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/examples/apache/eg.conf | 132 ++++++++++++++++++++ Open-ILS/examples/apache/eg_vhost.conf | 217 +++++++++++++++++++++++++++++++++ Open-ILS/examples/apache/startup.pl | 10 ++ 3 files changed, 359 insertions(+) create mode 100644 Open-ILS/examples/apache/eg.conf create mode 100644 Open-ILS/examples/apache/eg_vhost.conf create mode 100644 Open-ILS/examples/apache/startup.pl diff --git a/Open-ILS/examples/apache/eg.conf b/Open-ILS/examples/apache/eg.conf new file mode 100644 index 0000000000..c028f4c501 --- /dev/null +++ b/Open-ILS/examples/apache/eg.conf @@ -0,0 +1,132 @@ +# :vim set syntax apache + +LogLevel debug +# - 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 +SetEnv PERL5LIB /openils/lib/perl5 +PerlRequire /etc/apache2/startup.pl +PerlChildInitHandler OpenILS::WWW::Reporter::child_init +PerlChildInitHandler OpenILS::WWW::SuperCat::child_init +PerlChildInitHandler OpenILS::WWW::AddedContent::child_init; + + +# ---------------------------------------------------------------------------------- +# Set some defaults for our working directories +# ---------------------------------------------------------------------------------- + + Order allow,deny + Allow from all + + + +# ---------------------------------------------------------------------------------- +# XUL directory +# ---------------------------------------------------------------------------------- + + Options Indexes FollowSymLinks + AllowOverride None + Order allow,deny + Allow from all + + + +# ---------------------------------------------------------------------------------- +# Remove the language portion from the URL +# ---------------------------------------------------------------------------------- +AliasMatch ^/opac/.*/skin/(.*)/(.*)/(.*) /openils/var/web/opac/skin/$1/$2/$3 + + +# ---------------------------------------------------------------------------------- +# 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 + + + + +# ---------------------------------------------------------------------------------- +# OPTIONAL: Set up image caching - some of these options only work with apache2.2 +# ---------------------------------------------------------------------------------- +CacheRoot "/opt/cache/" +CacheEnable disk /opac/extras/jacket/ +CacheMaxFileSize 1073741824 +CacheIgnoreCacheControl On +CacheStorePrivate On +CacheStoreNoStore On +CacheIgnoreNoLastMod On +CacheMaxExpire 86400 +CacheLastModifiedFactor 0.5 +CacheDefaultExpire 604800 + + +# ---------------------------------------------------------------------------------- +# OPTIONAL: Set how long the client will cache our content. Change to suit +# ---------------------------------------------------------------------------------- +ExpiresActive On +ExpiresDefault A2592000 +ExpiresByType text/html A64800 +ExpiresByType application/xhtml+xml A64800 +ExpiresByType application/x-javascript A64800 +ExpiresByType text/css A3000 + + + + +# ---------------------------------------------------------------------------------- +# Set up our main virtual host +# ---------------------------------------------------------------------------------- +NameVirtualHost *:80 + + ServerName localhost:80 + ServerAlias 127.0.0.1:80 + DocumentRoot /openils/var/web/ + DirectoryIndex index.xml index.html + # - absorb the shared virtual host settings + Include eg_vhost.conf + + + + + + +# ---------------------------------------------------------------------------------- +# Set up our SSL virtual host +# ---------------------------------------------------------------------------------- +Listen 443 +NameVirtualHost *:443 + + DocumentRoot "/openils/var/web" + ServerName localhost:443 + ServerAlias 127.0.0.1:443 + SSLEngine on + SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL + + # Create self-signed certificate and key with and put them into SERVER_ROOT/ssl/: + # openssl req -new -x509 -nodes -out server.crt -keyout server.key + SSLCertificateFile ssl/server.crt + SSLCertificateKeyFile ssl/server.key + + # - absorb the shared virtual host settings + Include eg_vhost.conf + + + diff --git a/Open-ILS/examples/apache/eg_vhost.conf b/Open-ILS/examples/apache/eg_vhost.conf new file mode 100644 index 0000000000..105a0c06bc --- /dev/null +++ b/Open-ILS/examples/apache/eg_vhost.conf @@ -0,0 +1,217 @@ +# ---------------------------------------------------------------------------------- +# 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 +# ---------------------------------------------------------------------------------- +RedirectMatch 301 ^/$ /opac/en-US/skin/default/xml/index.xml + + +# ---------------------------------------------------------------------------------- +# Configure the gateway +# ---------------------------------------------------------------------------------- +OSRFGatewayConfig /openils/conf/opensrf_core.xml + + +# ---------------------------------------------------------------------------------- +# Set up the book jackets URL +# XXX This pulls images from Amazon, don't use this in a production environment +# ---------------------------------------------------------------------------------- +RewriteEngine on +ProxyTimeout 2 +RewriteRule /opac/extras/jacket/small/(.*) \ + http://images.amazon.com/images/P/$1.01._SCMZZZZZZZ_.jpg [P,L] +RewriteRule /opac/extras/jacket/large/(.*) \ + http://images.amazon.com/images/P/$1.01._SCLZZZZZZZ_.jpg [P,L] + + + +# ---------------------------------------------------------------------------------- +# Added content plugin +# ---------------------------------------------------------------------------------- + + SetHandler perl-script + PerlHandler OpenILS::WWW::AddedContent + Options +ExecCGI + PerlSendHeader On + allow from all + + + +# ---------------------------------------------------------------------------------- +# Configure the OPAC +# ---------------------------------------------------------------------------------- + + 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 + + # add languages as necessary + 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 + + + + AddType application/xhtml+xml .xml + + + + AddOutputFilter INCLUDES .html + + +# ---------------------------------------------------------------------------------- +# 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 + + +# ---------------------------------------------------------------------------------- +# 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::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 processing staff-client offline scripts lives here +# ---------------------------------------------------------------------------------- + + AddHandler cgi-script .pl + AllowOverride None + Options +ExecCGI + allow from all + + + +# ---------------------------------------------------------------------------------- +# OpenSRF JSON gateway +# ---------------------------------------------------------------------------------- + + SetHandler osrf_json_gateway_module + allow from all + + + +# ---------------------------------------------------------------------------------- +# Reporting output lives here +# ---------------------------------------------------------------------------------- + + SetHandler perl-script + PerlHandler OpenILS::Reporter::Proxy + Options +ExecCGI + PerlSendHeader On + allow from all + + +# ---------------------------------------------------------------------------------- +# Reports GUI +# ---------------------------------------------------------------------------------- + + Options +Includes + AddOutputFilter INCLUDES .xhtml + + +# ---------------------------------------------------------------------------------- +# XML-RPC gateway +# ---------------------------------------------------------------------------------- + + SetHandler perl-script + PerlHandler OpenILS::WWW::XMLRPCGateway + Options +ExecCGI + PerlSendHeader On + allow from all + + + +# ---------------------------------------------------------------------------------- +# Django admin interface (experimental) +# - requires mod_python and django +# - requires a symlink from WEBROOT/media to +# /usr/lib/python2.4/site-packages/django/contrib/admin/media/ (or similar) +# ---------------------------------------------------------------------------------- +# +# Order deny,allow +# Deny from all +# Allow from 10.0.0.0/8 +# SetHandler mod_python +# PythonHandler django.core.handlers.modpython +# SetEnv DJANGO_SETTINGS_MODULE ils_admin.settings +# PythonDebug On +# PythonPath "['/openils/var/admin/', '/usr/lib/python2.4/site-packages/'] +sys.path" +# PythonAutoReload On +# + + diff --git a/Open-ILS/examples/apache/startup.pl b/Open-ILS/examples/apache/startup.pl new file mode 100644 index 0000000000..9296f31273 --- /dev/null +++ b/Open-ILS/examples/apache/startup.pl @@ -0,0 +1,10 @@ +#!/usr/bin/perl +use lib qw( /openils/lib/perl5 ); +use OpenILS::WWW::SuperCat qw( /openils/conf/bootstrap.conf ); +use OpenILS::WWW::AddedContent qw( /openils/conf/bootstrap.conf ); +use OpenILS::Reporter::Proxy ('/openils/conf/bootstrap.conf'); + + + +1; + -- 2.11.0