adding some default configs
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 21 Feb 2007 20:35:41 +0000 (20:35 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 21 Feb 2007 20:35:41 +0000 (20:35 +0000)
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 [new file with mode: 0644]
Open-ILS/examples/apache/eg_vhost.conf [new file with mode: 0644]
Open-ILS/examples/apache/startup.pl [new file with mode: 0644]

diff --git a/Open-ILS/examples/apache/eg.conf b/Open-ILS/examples/apache/eg.conf
new file mode 100644 (file)
index 0000000..c028f4c
--- /dev/null
@@ -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
+# ----------------------------------------------------------------------------------
+<Directory /openils/var/web>
+    Order allow,deny
+    Allow from all
+</Directory>
+
+
+# ----------------------------------------------------------------------------------
+# XUL directory
+# ----------------------------------------------------------------------------------
+<Directory /openils/var/web/xul>
+   Options Indexes FollowSymLinks
+   AllowOverride None
+   Order allow,deny
+   Allow from all
+</Directory>
+
+
+# ----------------------------------------------------------------------------------
+# 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/"
+<Directory "/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
+</Directory>
+
+
+
+# ----------------------------------------------------------------------------------
+# 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
+<VirtualHost *: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
+</VirtualHost>
+
+
+
+
+
+# ----------------------------------------------------------------------------------
+# Set up our SSL virtual host
+# ----------------------------------------------------------------------------------
+Listen 443
+NameVirtualHost *:443
+<VirtualHost *: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
+</VirtualHost>
+
+
diff --git a/Open-ILS/examples/apache/eg_vhost.conf b/Open-ILS/examples/apache/eg_vhost.conf
new file mode 100644 (file)
index 0000000..105a0c0
--- /dev/null
@@ -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
+# ----------------------------------------------------------------------------------
+<Location /opac/extras/ac/>
+    SetHandler perl-script
+    PerlHandler OpenILS::WWW::AddedContent
+    Options +ExecCGI
+    PerlSendHeader On
+    allow from all
+</Location>
+
+       
+# ----------------------------------------------------------------------------------
+# Configure the OPAC
+# ----------------------------------------------------------------------------------
+<LocationMatch /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/
+</LocationMatch>
+
+
+# ----------------------------------------------------------------------------------
+# Force SSL on the OPAC's "My Account" page
+# ----------------------------------------------------------------------------------
+<LocationMatch .*/myopac.xml>
+    SSLRequireSSL
+</LocationMatch>
+
+<LocationMatch /opac/extras/>
+    AddType application/xhtml+xml .xml
+</LocationMatch>
+
+<LocationMatch /opac/extras/slimpac/>
+    AddOutputFilter INCLUDES .html
+</LocationMatch>
+       
+# ----------------------------------------------------------------------------------
+# Run server-side XUL through xmlent to load the correct XML entities
+# ----------------------------------------------------------------------------------
+<LocationMatch /xul/.*\.xul$>
+    Options +Includes
+    XMLEntContentType "application/vnd.mozilla.xul+xml"
+    AddOutputFilter INCLUDES;XMLENT .xul
+    allow from all
+</LocationMatch>
+
+# ----------------------------------------------------------------------------------
+# Supercat feeds
+# ----------------------------------------------------------------------------------
+<Location /opac/extras/oisbn>
+    SetHandler perl-script
+    PerlHandler OpenILS::WWW::SuperCat::oisbn
+    Options +ExecCGI
+    PerlSendHeader On
+    allow from all
+</Location>
+<Location /opac/extras/supercat>
+    SetHandler perl-script
+    PerlHandler OpenILS::WWW::SuperCat::supercat
+    Options +ExecCGI
+    PerlSendHeader On
+    allow from all
+</Location>
+<Location /opac/extras/unapi>
+    SetHandler perl-script
+    PerlHandler OpenILS::WWW::SuperCat::unapi
+    Options +ExecCGI
+    PerlSendHeader On
+    allow from all
+</Location>
+<Location /opac/extras/feed/bookbag>
+    SetHandler perl-script
+    PerlHandler OpenILS::WWW::SuperCat::bookbag_feed
+    Options +ExecCGI
+    PerlSendHeader On
+    allow from all
+</Location>
+<Location /opac/extras/opensearch>
+    SetHandler perl-script
+    PerlHandler OpenILS::WWW::SuperCat::opensearch_feed
+    Options +ExecCGI
+    PerlSendHeader On
+    allow from all
+</Location>
+<Location /opac/extras/feed/freshmeat>
+    SetHandler perl-script
+    PerlHandler OpenILS::WWW::SuperCat::changes_feed
+    Options +ExecCGI
+    PerlSendHeader On
+    allow from all
+</Location>
+<Location /opac/extras/browse>
+    SetHandler perl-script
+    PerlHandler OpenILS::WWW::SuperCat::string_browse
+    Options +ExecCGI
+    PerlSendHeader On
+    allow from all
+</Location>    
+       
+# ----------------------------------------------------------------------------------
+# Module for processing staff-client offline scripts lives here
+# ----------------------------------------------------------------------------------
+<Directory "/openils/var/cgi-bin/offline">
+    AddHandler cgi-script .pl
+    AllowOverride None
+    Options +ExecCGI
+    allow from all
+</Directory>
+       
+       
+# ----------------------------------------------------------------------------------
+# OpenSRF JSON gateway
+# ----------------------------------------------------------------------------------
+<Location /gateway>
+    SetHandler osrf_json_gateway_module
+    allow from all
+</Location>
+
+       
+# ----------------------------------------------------------------------------------
+# Reporting output lives here
+# ----------------------------------------------------------------------------------
+<Location /reporter/>
+    SetHandler perl-script
+    PerlHandler OpenILS::Reporter::Proxy
+    Options +ExecCGI
+    PerlSendHeader On
+    allow from all
+</Location>
+
+# ----------------------------------------------------------------------------------
+# Reports GUI
+# ----------------------------------------------------------------------------------
+<LocationMatch /reports/>
+    Options +Includes
+    AddOutputFilter INCLUDES .xhtml
+</LocationMatch>
+
+# ----------------------------------------------------------------------------------
+# XML-RPC gateway
+# ----------------------------------------------------------------------------------
+<Location /xml-rpc>
+    SetHandler perl-script
+    PerlHandler OpenILS::WWW::XMLRPCGateway
+    Options +ExecCGI
+    PerlSendHeader On
+    allow from all
+</Location>
+
+
+# ----------------------------------------------------------------------------------
+# 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)
+# ----------------------------------------------------------------------------------
+#<Location /ils_setup/>
+#   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
+#</Location>
+
+
diff --git a/Open-ILS/examples/apache/startup.pl b/Open-ILS/examples/apache/startup.pl
new file mode 100644 (file)
index 0000000..9296f31
--- /dev/null
@@ -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;
+