]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/examples/apache/eg.conf
Staff Client Build/Update Enhancements patch from Thomas Berezansky
[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 # Updates folder
70 # ----------------------------------------------------------------------------------
71 Alias /updates/ "/openils/var/updates/pub/"
72 <Directory "/openils/var/updates/pub">
73         <Files check>
74                 ForceType cgi-script
75         </Files>
76         <Files update.rdf>
77                 ForceType cgi-script
78         </Files>
79         <Files manualupdate.html>
80                 ForceType cgi-script
81         </Files>
82         <Files download>
83                 ForceType cgi-script
84         </Files>
85         AllowOverride None
86         Options None
87         Allow from all
88         Options ExecCGI
89 </Directory>
90
91
92 # ----------------------------------------------------------------------------------
93 # OPTIONAL: Set how long the client will cache our content.  Change to suit
94 # ----------------------------------------------------------------------------------
95 ExpiresActive On
96 ExpiresDefault A2592000
97 ExpiresByType text/html A64800
98 ExpiresByType application/xhtml+xml A64800
99 ExpiresByType application/x-javascript A64800
100 ExpiresByType text/css A3000
101
102
103
104
105 # ----------------------------------------------------------------------------------
106 # Set up our main virtual host
107 # ----------------------------------------------------------------------------------
108 NameVirtualHost *:80
109 <VirtualHost *:80>
110         ServerName localhost:80
111         ServerAlias 127.0.0.1:80
112         DocumentRoot /openils/var/web/
113         DirectoryIndex index.xml index.html index.xhtml
114     # - absorb the shared virtual host settings
115     Include eg_vhost.conf
116 </VirtualHost>
117
118
119
120
121
122 # ----------------------------------------------------------------------------------
123 # Set up our SSL virtual host
124 # ----------------------------------------------------------------------------------
125 Listen 443
126 NameVirtualHost *:443
127 <VirtualHost *:443>
128         DocumentRoot "/openils/var/web"
129         ServerName localhost:443
130         ServerAlias 127.0.0.1:443
131         SSLEngine on
132         SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
133
134     # If you don't have an SSL cert, you can create self-signed 
135     # certificate and key with:
136     # openssl req -new -x509 -nodes -out server.crt -keyout server.key
137         SSLCertificateFile ssl/server.crt
138         SSLCertificateKeyFile ssl/server.key
139
140     # - absorb the shared virtual host settings
141     Include eg_vhost.conf
142
143     # help IE along with SSL pages
144     BrowserMatch ".*MSIE.*" \
145         nokeepalive ssl-unclean-shutdown \
146         downgrade-1.0 force-response-1.0
147
148 </VirtualHost>
149
150