blob: 3bbe50fb31102b60e574743c1aac321b7a518733 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
# Apache configuracreated_attion for FOI site.
#
# For development ignore this, you can just run ./scripts/server as for any
# Ruby on Rails application.
#
# Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved.
# Email: francis@mysociety.org; WWW: http://www.mysociety.org
#
# $Id: httpd.conf,v 1.31 2009-09-02 13:05:48 matthew Exp $
# This is needed for the PHP spell checker
<Location /fcgi>
Options +ExecCGI
SetHandler fastcgi-script
</Location>
RewriteEngine On
#RewriteLog /var/log/apache2/rewrite.log
#RewriteLogLevel 9
# XXX do we need this now we use Passenger?
# Pass through the HTTP basic authentication to mongrel. See also
# admin_http_auth_user in app/controllers/application.rb
# Note: Apache 2 only. Doesn't work in Apache 1.3, you'll need to live without
# it.
RewriteCond %{LA-U:REMOTE_USER} (.+)
RewriteRule . - [E=RU:%1]
RequestHeader add X-Forwarded-User %{RU}e
# Old /files URL to new subdomain (as can't use Alias with passenger,
# so we do it on its own domain). This is for custom admin upload
# files for archiving.
RewriteRule /files/(.+) http://files.whatdotheyknow.com/$1
<IfModule mod_passenger.c>
# Set this to something like 100 if you have memory leak issues
PassengerMaxRequests 20
PassengerResolveSymlinksInDocumentRoot on
# Recommend setting this to 3 or less on servers with 512MB RAM
PassengerMaxPoolSize 6
RailsEnv production
</IfModule>
# Gzip font resources
<IfModule mod_deflate.c>
<IfModule mod_mime.c>
Addtype font/opentype .otf
Addtype font/opentype .woff
Addtype font/eot .eot
Addtype font/truetype .ttf
</IfModule>
AddOutputFilterByType DEFLATE font/opentype font/truetype font/eot
AddOutputFilterByType DEFLATE image/svg+xml
</IFModule>
|