aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/crontab.ugly2
-rw-r--r--config/environment.rb8
-rw-r--r--config/general.yml-example9
-rw-r--r--config/httpd.conf2
-rw-r--r--config/packages1
-rw-r--r--config/test.yml8
-rw-r--r--config/varnish-alaveteli.vcl6
7 files changed, 27 insertions, 9 deletions
diff --git a/config/crontab.ugly b/config/crontab.ugly
index fdfd9f171..43b191fd4 100644
--- a/config/crontab.ugly
+++ b/config/crontab.ugly
@@ -10,7 +10,7 @@ PATH=/usr/local/bin:/usr/bin:/bin
MAILTO=cron-!!(*= $site *)!!@mysociety.org
# Every 5 minutes
-*/5 * * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/update-xapian-index.lock /data/vhost/!!(*= $vhost *)!!/!!(*= $vcspath *)!!/script/update-xapian-index verbose=true >> /data/vhost/!!(*= $vhost *)!!/logs/update-xapian-index.log || echo "stalled?"
+*/5 * * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/update-xapian-index.lock "/data/vhost/!!(*= $vhost *)!!/!!(*= $vcspath *)!!/script/update-xapian-index verbose=true" >> /data/vhost/!!(*= $vhost *)!!/logs/update-xapian-index.log || echo "stalled?"
# Every 10 minutes
5,15,25,35,45,55 * * * * !!(*= $user *)!! /etc/init.d/foi-alert-tracks check
diff --git a/config/environment.rb b/config/environment.rb
index d15ee9a0e..f2164f1c8 100644
--- a/config/environment.rb
+++ b/config/environment.rb
@@ -131,6 +131,9 @@ I18n.locale = default_locale
I18n.available_locales = available_locales.map {|locale_name| locale_name.to_sym}
I18n.default_locale = default_locale
+# Customise will_paginate URL generation
+WillPaginate::ViewHelpers.pagination_options[:renderer] = 'WillPaginateExtension::LinkRenderer'
+
# Load monkey patches and other things from lib/
require 'ruby19.rb'
require 'tmail_extensions.rb'
@@ -139,10 +142,13 @@ require 'timezone_fixes.rb'
require 'use_spans_for_errors.rb'
require 'make_html_4_compliant.rb'
require 'activerecord_errors_extensions.rb'
-require 'willpaginate_hack.rb'
+require 'willpaginate_extension.rb'
require 'sendmail_return_path.rb'
require 'tnef.rb'
require 'i18n_fixes.rb'
require 'rack_quote_monkeypatch.rb'
require 'world_foi_websites.rb'
require 'alaveteli_external_command.rb'
+
+ExceptionNotification::Notifier.sender_address = MySociety::Config::get('EXCEPTION_NOTIFICATIONS_FROM')
+ExceptionNotification::Notifier.exception_recipients = MySociety::Config::get('EXCEPTION_NOTIFICATIONS_TO')
diff --git a/config/general.yml-example b/config/general.yml-example
index ec4529b2b..86399f0bc 100644
--- a/config/general.yml-example
+++ b/config/general.yml-example
@@ -129,4 +129,11 @@ FORWARD_NONBOUNCE_RESPONSES_TO: user-support@localhost
# http://code.google.com/p/wkhtmltopdf/downloads/list
# If the command is not present, a text-only version will be rendered
# instead.
-HTML_TO_PDF_COMMAND: /usr/local/bin/wkhtmltopdf-amd64 \ No newline at end of file
+HTML_TO_PDF_COMMAND: /usr/local/bin/wkhtmltopdf-amd64
+
+# Exception notifications
+EXCEPTION_NOTIFICATIONS_FROM: do-not-reply-to-this-address@example.com
+EXCEPTION_NOTIFICATIONS_TO:
+ - robin@example.org
+ - seb@example.org
+
diff --git a/config/httpd.conf b/config/httpd.conf
index 47e7f9c72..14197d8e4 100644
--- a/config/httpd.conf
+++ b/config/httpd.conf
@@ -34,7 +34,7 @@ RewriteRule /files/(.+) http://files.whatdotheyknow.com/$1
<IfModule mod_passenger.c>
# Set this to something like 100 if you have memory leak issues
- PassengerMaxRequests 0
+ PassengerMaxRequests 20
PassengerResolveSymlinksInDocumentRoot on
# Recommend setting this to 3 or less on servers with 512MB RAM
PassengerMaxPoolSize 6
diff --git a/config/packages b/config/packages
index a42785824..76a5c29d6 100644
--- a/config/packages
+++ b/config/packages
@@ -41,3 +41,4 @@ rubygems
libfcgi-dev
gettext
python-yaml
+wkhtmltopdf-static
diff --git a/config/test.yml b/config/test.yml
index c13b9c9db..693cdd6b8 100644
--- a/config/test.yml
+++ b/config/test.yml
@@ -10,7 +10,7 @@
SITE_NAME: 'Alaveteli'
# Domain used in URLs generated by scripts (e.g. for going in some emails)
-DOMAIN: 'localhost:3000'
+DOMAIN: 'test.localdomain'
# ISO country code of country currrently deployed in
# (http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)
@@ -115,4 +115,8 @@ GAZE_URL: http://gaze.mysociety.org
# take two arguments: the URL, and a path to an output file. A static
# binary of wkhtmltopdf is recommended:
# http://code.google.com/p/wkhtmltopdf/downloads/list
-HTML_TO_PDF_COMMAND: /usr/local/bin/wkhtmltopdf-amd64 \ No newline at end of file
+HTML_TO_PDF_COMMAND: /usr/local/bin/wkhtmltopdf-amd64
+
+# Exception notifications
+EXCEPTION_NOTIFICATIONS_FROM: do-not-reply-to-this-address@example.com
+EXCEPTION_NOTIFICATIONS_TO:
diff --git a/config/varnish-alaveteli.vcl b/config/varnish-alaveteli.vcl
index 3312c381b..d6c42e750 100644
--- a/config/varnish-alaveteli.vcl
+++ b/config/varnish-alaveteli.vcl
@@ -27,9 +27,9 @@ sub vcl_recv {
remove req.http.X-Forwarded-For;
set req.http.X-Forwarded-For = client.ip;
- # Remove has_js and Google Analytics cookies.
- set req.http.Cookie = regsuball(req.http.Cookie, "(^|;\s*)(__[a-z]+|has_js)=[^;]*", "");
-
+ # Remove Google Analytics, has_js, and last-seen cookies
+ set req.http.Cookie = regsuball(req.http.Cookie, "(^|;\s*)(__[a-z]+|has_js|last_body_id|last_request_id|seen_foi2)=[^;]*", "");
+
# Normalize the Accept-Encoding header
if (req.http.Accept-Encoding) {
if (req.url ~ "\.(jpg|jpeg|png|gif|gz|tgz|bz2|tbz|mp3|ogg|swf|flv|pdf|ico)$") {