]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/apache_24/eg.conf.in
LP#1817645: configurable HTTP API for patron auth/retrieval
[working/Evergreen.git] / Open-ILS / examples / apache_24 / eg.conf.in
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 PerlRequire /etc/apache2/eg_startup
18 PerlChildInitHandler OpenILS::WWW::Reporter::child_init
19 PerlChildInitHandler OpenILS::WWW::SuperCat::child_init
20 PerlChildInitHandler OpenILS::WWW::AddedContent::child_init
21 PerlChildInitHandler OpenILS::WWW::AutoSuggest::child_init
22 PerlChildInitHandler OpenILS::WWW::PhoneList::child_init
23 PerlChildInitHandler OpenILS::WWW::EGWeb::child_init
24 PerlChildInitHandler OpenILS::WWW::RemoteAuth::child_init
25
26 # ----------------------------------------------------------------------------------
27 # Set some defaults for our working directories
28 # ----------------------------------------------------------------------------------
29 <Directory @localstatedir@/web>
30    Require all granted
31 </Directory>
32
33
34 # ----------------------------------------------------------------------------------
35 # XUL directory
36 # ----------------------------------------------------------------------------------
37 <Directory @localstatedir@/web/xul>
38    Options Indexes FollowSymLinks
39    AllowOverride None
40    Require all granted
41 </Directory>
42
43
44 # ----------------------------------------------------------------------------------
45 # Remove the language portion from the URL
46 # ----------------------------------------------------------------------------------
47 AliasMatch ^/opac/.*/skin/(.*)/(.*)/(.*) @localstatedir@/web/opac/skin/$1/$2/$3
48 AliasMatch ^/opac/.*/extras/slimpac/(.*) @localstatedir@/web/opac/extras/slimpac/$1
49 AliasMatch ^/opac/.*/extras/selfcheck/(.*) @localstatedir@/web/opac/extras/selfcheck/$1
50
51
52
53 # ----------------------------------------------------------------------------------
54 # System config CGI scripts go here
55 # ----------------------------------------------------------------------------------
56 Alias /cgi-bin/offline/ "@localstatedir@/cgi-bin/offline/"
57 <Directory "@localstatedir@/cgi-bin/offline">
58         AddHandler cgi-script .cgi .pl
59         AllowOverride None
60         Options None
61     Require host 10.0.0.0/8
62         Options FollowSymLinks ExecCGI Indexes
63 </Directory>
64
65
66 # ----------------------------------------------------------------------------------
67 # Updates folder
68 # ----------------------------------------------------------------------------------
69 Alias /updates/ "@localstatedir@/updates/pub/"
70 <Directory "@localstatedir@/updates/pub">
71         <Files check>
72                 ForceType cgi-script
73         </Files>
74         <Files update.rdf>
75                 ForceType cgi-script
76         </Files>
77         <Files manualupdate.html>
78                 ForceType cgi-script
79         </Files>
80         <Files download>
81                 ForceType cgi-script
82         </Files>
83         AllowOverride None
84         Options None
85         Options ExecCGI
86     Require all granted
87 </Directory>
88
89 # ----------------------------------------------------------------------------------
90 # OPTIONAL: Set how long the client will cache our content.
91 # We set a long expires time for CSS, JavaScript, and images (default) because
92 # you can change the cache-key in opac/parts/config.tt2 to force browsers to
93 # reload them immediately.
94 # ----------------------------------------------------------------------------------
95 ExpiresActive On
96 ExpiresDefault "access plus 1 year"
97 ExpiresByType text/html "access plus 18 hours"
98 ExpiresByType application/xhtml+xml "access plus 18 hours"
99 ExpiresByType application/x-javascript "access plus 1 year"
100 ExpiresByType application/javascript "access plus 1 year"
101 ExpiresByType text/css "access plus 1 year"
102
103 # ----------------------------------------------------------------------------------
104 # Set up our SSL virtual host
105 # ----------------------------------------------------------------------------------
106 #Listen 443
107 <VirtualHost *:443>
108         DocumentRoot "@localstatedir@/web"
109         ServerName localhost:443
110         ServerAlias 127.0.0.1:443
111         SSLEngine on
112     SSLProxyEngine on # required for ErrorDocument 404 on SSL connections
113         SSLHonorCipherOrder On
114         SSLCipherSuite ECDHE-RSA-AES256-SHA384:AES256-SHA256:RC4:HIGH:!MD5:!aNULL:!EDH:!AESGCM
115
116     # If you don't have an SSL cert, you can create self-signed 
117     # certificate and key with:
118     # openssl req -new -x509 -nodes -out server.crt -keyout server.key
119         SSLCertificateFile ssl/server.crt
120         SSLCertificateKeyFile ssl/server.key
121
122     # - absorb the shared virtual host settings
123     Include eg_vhost.conf
124
125     # help IE along with SSL pages
126     SetEnvIf User-Agent ".*MSIE [1-5].*" \
127         nokeepalive ssl-unclean-shutdown \
128         downgrade-1.0 force-response-1.0
129
130     SetEnvIf User-Agent ".*MSIE [6-9].*" \
131         ssl-unclean-shutdown
132
133 </VirtualHost>
134
135 # ----------------------------------------------------------------------------------
136 # Set up our main virtual host
137 # Port 80 comes after 443 to avoid "unknown protocol speaking not SSL to HTTPS port!?" 
138 # errors, per http://wiki.apache.org/httpd/InternalDummyConnection
139 # ----------------------------------------------------------------------------------
140
141 <VirtualHost *:80>
142         ServerName localhost:80
143         ServerAlias 127.0.0.1:80
144         DocumentRoot @localstatedir@/web/
145         DirectoryIndex index.html index.xhtml
146     # - absorb the shared virtual host settings
147     Include eg_vhost.conf
148 </VirtualHost>
149