# :vim set syntax apache Listen 80 # - 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 AliasMatch ^/opac/.*/extras/slimpac/(.*) /openils/var/web/opac/extras/slimpac/$1 # ---------------------------------------------------------------------------------- # 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 192.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 /etc/apache2/vhosts.d/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 # 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 /etc/apache2/ssl/server.crt SSLCertificateKeyFile /etc/apache2/ssl/server.key # - absorb the shared virtual host settings Include /etc/apache2/vhosts.d/eg_vhost.conf # help IE along with SSL pages BrowserMatch ".*MSIE.*" \ nokeepalive ssl-unclean-shutdown \ downgrade-1.0 force-response-1.0 CustomLog /var/log/apache2/ssl_access.log combined ErrorLog /var/log/apache2/ssl_error.log