]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/apache/eg.conf
17eb787bc7491a10f7842cb148ada6a07bdf935c
[working/Evergreen.git] / Open-ILS / examples / apache / eg.conf
1 # :vim set syntax apache
2
3 LogLevel info 
4 # - log locally
5 CustomLog /var/log/apache2/access.log combined
6 ErrorLog /var/log/apache2/error.log
7 # - log to syslog 
8 # CustomLog "|/usr/bin/logger -p local7.info" common
9 # ErrorLog syslog:local7
10
11
12 # ----------------------------------------------------------------------------------
13 # Set up Perl 
14 # ----------------------------------------------------------------------------------
15
16 # - needed by CGIs
17 SetEnv PERL5LIB /openils/lib/perl5
18 PerlRequire /etc/apache2/startup.pl
19 PerlChildInitHandler OpenILS::WWW::Reporter::child_init
20 PerlChildInitHandler OpenILS::WWW::SuperCat::child_init
21 PerlChildInitHandler OpenILS::WWW::AddedContent::child_init
22 PerlChildInitHandler OpenILS::WWW::PasswordReset::child_init
23
24 # ----------------------------------------------------------------------------------
25 # Set some defaults for our working directories
26 # ----------------------------------------------------------------------------------
27 <Directory /openils/var/web>
28     Order allow,deny
29     Allow from all
30 </Directory>
31
32
33 # ----------------------------------------------------------------------------------
34 # XUL directory
35 # ----------------------------------------------------------------------------------
36 <Directory /openils/var/web/xul>
37    Options Indexes FollowSymLinks
38    AllowOverride None
39    Order allow,deny
40    Allow from all
41 </Directory>
42
43
44 # ----------------------------------------------------------------------------------
45 # Remove the language portion from the URL
46 # ----------------------------------------------------------------------------------
47 AliasMatch ^/opac/.*/skin/(.*)/(.*)/(.*) /openils/var/web/opac/skin/$1/$2/$3
48 AliasMatch ^/opac/.*/extras/slimpac/(.*) /openils/var/web/opac/extras/slimpac/$1
49 AliasMatch ^/opac/.*/extras/selfcheck/(.*) /openils/var/web/opac/extras/selfcheck/$1
50
51
52
53 # ----------------------------------------------------------------------------------
54 # System config CGI scripts go here
55 # ----------------------------------------------------------------------------------
56 Alias /cgi-bin/ "/openils/var/cgi-bin/"
57 <Directory "/openils/var/cgi-bin">
58         AddHandler cgi-script .cgi .pl
59         AllowOverride None
60         Options None
61         Order deny,allow
62         Deny from all
63         Allow from 10.0.0.0/8
64         Options FollowSymLinks ExecCGI Indexes
65 </Directory>
66
67
68
69 # ----------------------------------------------------------------------------------
70 # OPTIONAL: Set how long the client will cache our content.  Change to suit
71 # ----------------------------------------------------------------------------------
72 ExpiresActive On
73 ExpiresDefault A2592000
74 ExpiresByType text/html A64800
75 ExpiresByType application/xhtml+xml A64800
76 ExpiresByType application/x-javascript A64800
77 ExpiresByType text/css A3000
78
79
80
81
82 # ----------------------------------------------------------------------------------
83 # Set up our main virtual host
84 # ----------------------------------------------------------------------------------
85 NameVirtualHost *:80
86 <VirtualHost *:80>
87         ServerName localhost:80
88         ServerAlias 127.0.0.1:80
89         DocumentRoot /openils/var/web/
90         DirectoryIndex index.xml index.html index.xhtml
91     # - absorb the shared virtual host settings
92     Include eg_vhost.conf
93 </VirtualHost>
94
95
96
97
98
99 # ----------------------------------------------------------------------------------
100 # Set up our SSL virtual host
101 # ----------------------------------------------------------------------------------
102 Listen 443
103 NameVirtualHost *:443
104 <VirtualHost *:443>
105         DocumentRoot "/openils/var/web"
106         ServerName localhost:443
107         ServerAlias 127.0.0.1:443
108         SSLEngine on
109         SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
110
111     # If you don't have an SSL cert, you can create self-signed 
112     # certificate and key with:
113     # openssl req -new -x509 -nodes -out server.crt -keyout server.key
114         SSLCertificateFile ssl/server.crt
115         SSLCertificateKeyFile ssl/server.key
116
117     # - absorb the shared virtual host settings
118     Include eg_vhost.conf
119
120     # help IE along with SSL pages
121     BrowserMatch ".*MSIE.*" \
122         nokeepalive ssl-unclean-shutdown \
123         downgrade-1.0 force-response-1.0
124
125 </VirtualHost>
126
127