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