aboutsummaryrefslogtreecommitdiffstats
path: root/conf
diff options
context:
space:
mode:
Diffstat (limited to 'conf')
-rw-r--r--conf/.gitignore2
-rw-r--r--conf/cobrands/.gitignore1
-rw-r--r--conf/crontab.ugly29
-rw-r--r--conf/general-example14
-rw-r--r--conf/httpd.conf105
-rw-r--r--conf/httpd.conf-example68
-rw-r--r--conf/packages5
7 files changed, 92 insertions, 132 deletions
diff --git a/conf/.gitignore b/conf/.gitignore
index 10f651513..0a78c8825 100644
--- a/conf/.gitignore
+++ b/conf/.gitignore
@@ -1,2 +1,4 @@
/general
/general.deployed
+/httpd.conf
+/httpd.conf.deployed
diff --git a/conf/cobrands/.gitignore b/conf/cobrands/.gitignore
deleted file mode 100644
index 911c95650..000000000
--- a/conf/cobrands/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/cities \ No newline at end of file
diff --git a/conf/crontab.ugly b/conf/crontab.ugly
index 5e65e1cee..d1779ff73 100644
--- a/conf/crontab.ugly
+++ b/conf/crontab.ugly
@@ -12,27 +12,24 @@ MAILTO=cron-!!(*= $site *)!!@mysociety.org
# On only one server
!!(* if ($vhost eq 'reportemptyhomes.com') { *)!!
-5,10,15,20,25,30,35,40,45,50,55 * * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/send-reports.lock /data/vhost/!!(*= $vhost *)!!/fixmystreet/bin/send-reports || echo "stalled?"
-0 0-11,13-23 * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/send-reports.lock /data/vhost/!!(*= $vhost *)!!/fixmystreet/bin/send-reports || echo "stalled?"
-0 12 * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/send-reports.lock "/data/vhost/!!(*= $vhost *)!!/fixmystreet/bin/send-reports --verbose" || echo "stalled?"
-2 * * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/send-alerts.lock /data/vhost/!!(*= $vhost *)!!/fixmystreet/bin/send-alerts || echo "stalled?"
-0,30 * * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/send-questionnaires.lock /data/vhost/!!(*= $vhost *)!!/fixmystreet/bin/send-questionnaires-eha || echo "stalled?"
-
-!!(* } elsif ($vhost eq 'cities.fixmystreet.com') { *)!!
-2,7,12,17,22,27,32,37,42,47,52,57 * * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/send-reports.lock /data/vhost/!!(*= $vhost *)!!/fixmystreet/bin/send-reports || echo "stalled?"
-33 * * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/send-alerts.lock /data/vhost/!!(*= $vhost *)!!/fixmystreet/bin/send-alerts || echo "stalled?"
-5,35 * * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/send-questionnaires.lock /data/vhost/!!(*= $vhost *)!!/fixmystreet/bin/send-questionnaires || echo "stalled?"
+5,10,15,20,25,30,35,40,45,50,55 * * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/send-reports.lock "/data/vhost/!!(*= $vhost *)!!/fixmystreet/bin/cron-wrapper send-reports" || echo "stalled?"
+0 0-11,13-23 * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/send-reports.lock "/data/vhost/!!(*= $vhost *)!!/fixmystreet/bin/cron-wrapper send-reports" || echo "stalled?"
+0 12 * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/send-reports.lock "/data/vhost/!!(*= $vhost *)!!/fixmystreet/bin/cron-wrapper send-reports --verbose" || echo "stalled?"
+2 * * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/send-alerts.lock "/data/vhost/!!(*= $vhost *)!!/fixmystreet/bin/cron-wrapper send-alerts" || echo "stalled?"
+0,30 * * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/send-questionnaires.lock "/data/vhost/!!(*= $vhost *)!!/fixmystreet/bin/cron-wrapper send-questionnaires" || echo "stalled?"
!!(* } elsif (($vhost eq 'www.fixmystreet.com') || ($vhost eq 'matthew.fixmystreet.com')) { *)!!
-5,10,15,20,25,30,35,40,45,50,55 * * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/send-reports.lock /data/vhost/!!(*= $vhost *)!!/fixmystreet/bin/send-reports || echo "stalled?"
-0 0-8,10,11,13,14,16,17,19-23 * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/send-reports.lock /data/vhost/!!(*= $vhost *)!!/fixmystreet/bin/send-reports || echo "stalled?"
-0 9,12,15,18 * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/send-reports.lock "/data/vhost/!!(*= $vhost *)!!/fixmystreet/bin/send-reports --verbose" || echo "stalled?"
-15,45 * * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/import-flickr.lock /data/vhost/!!(*= $vhost *)!!/fixmystreet/bin/import-flickr || echo "stalled?"
-2 * * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/send-alerts.lock /data/vhost/!!(*= $vhost *)!!/fixmystreet/bin/send-alerts || echo "stalled?"
-0,30 * * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/send-questionnaires.lock /data/vhost/!!(*= $vhost *)!!/fixmystreet/bin/send-questionnaires || echo "stalled?"
+5,10,15,20,25,30,35,40,45,50,55 * * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/send-reports.lock "/data/vhost/!!(*= $vhost *)!!/fixmystreet/bin/cron-wrapper send-reports" || echo "stalled?"
+0 0-8,10,11,13,14,16,17,19-23 * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/send-reports.lock "/data/vhost/!!(*= $vhost *)!!/fixmystreet/bin/cron-wrapper send-reports" || echo "stalled?"
+0 9,12,15,18 * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/send-reports.lock "/data/vhost/!!(*= $vhost *)!!/fixmystreet/bin/cron-wrapper send-reports --verbose" || echo "stalled?"
+2 * * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/send-alerts.lock "/data/vhost/!!(*= $vhost *)!!/fixmystreet/bin/cron-wrapper send-alerts" || echo "stalled?"
+0,30 * * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/send-questionnaires.lock "/data/vhost/!!(*= $vhost *)!!/fixmystreet/bin/cron-wrapper send-questionnaires" || echo "stalled?"
!!(* } *)!!
+# Once an hour, update the all reports stats
+13 * * * * !!(*= $user *)!! /data/vhost/!!(*= $vhost *)!!/fixmystreet/bin/cron-wrapper update-all-reports
+
# Once a day on all servers
39 2 * * * !!(*= $user *)!! /data/vhost/!!(*= $vhost *)!!/fixmystreet/bin/problems-filed-graph
43 2 * * * !!(*= $user *)!! /data/vhost/!!(*= $vhost *)!!/fixmystreet/bin/problem-creation-graph
diff --git a/conf/general-example b/conf/general-example
index 7e750de96..65e192b4d 100644
--- a/conf/general-example
+++ b/conf/general-example
@@ -27,16 +27,9 @@ define('OPTION_BCI_DB_PASS', '');
define('OPTION_BASE_URL', 'http://www.example.org');
-# Which country are you operating in? ISO3166-alpha2 code please
-define('OPTION_COUNTRY', 'GB');
-
-define('OPTION_TESTING_EMAIL', 'testing@example.com');
define('OPTION_EMAIL_DOMAIN', 'example.org');
define('OPTION_CONTACT_EMAIL', 'team@'.OPTION_EMAIL_DOMAIN);
define('OPTION_TEST_EMAIL_PREFIX', null);
-define('OPTION_EMAIL_VHOST_CITIES', 'www.example.com');
-define('OPTION_EMAIL_VHOST', 'www.example.com');
-define('OPTION_EMAIL_VHOST_EMPTYHOMES', 'www.example.com');
define('OPTION_CONTACT_NAME', 'FixMyStreet');
define('OPTION_STAGING_SITE', 1);
@@ -51,7 +44,7 @@ define('OPTION_LONDON_REPORTIT_KEY', '');
define('OPTION_LONDON_REPORTIT_SECRET', '');
define('OPTION_MAPIT_URL', 'http://mapit.mysociety.org/');
-define('OPTION_MAP_TYPE', 'Tilma::Original::1_10k');
+define('OPTION_MAP_TYPE', 'OSM');
define('OPTION_EVEL_URL', 'http://services.mysociety.org/evel');
define('OPTION_GAZE_URL', 'http://gaze.mysociety.org/gaze');
@@ -65,8 +58,6 @@ define('OPTION_HEARFROMYOURMP_BASE_URL', '');
define('OPTION_SMTP_SMARTHOST', 'localhost');
-define('OPTION_FLICKR_API', '');
-
define('OPTION_IPHONE_URL', '');
// Log file (used in test harness, and later in admin scripts)
@@ -77,4 +68,7 @@ define('OPTION_ALLOWED_COBRANDS', 'cobrand_one|cobrand_two');
// How many items are returned in the GeoRSS feeds by default
define('OPTION_RSS_LIMIT', '20');
+// Should problem reports link to the council summary pages?
+define('OPTION_AREA_LINKS_FROM_PROBLEMS', '0');
+
?>
diff --git a/conf/httpd.conf b/conf/httpd.conf
deleted file mode 100644
index d9d564f79..000000000
--- a/conf/httpd.conf
+++ /dev/null
@@ -1,105 +0,0 @@
-# Apache configuration for FixMyStreet.
-#
-# Add lines something like this to your /etc/apache2/sites-enabled/fixmystreet -
-# replacing '/home/yourname/fixmystreet' with the path to your install
-#
-# # FixMyStreet
-# <VirtualHost *:80>
-# ServerName fixmystreet.yourservername
-# DocumentRoot /home/yourname/fixmystreet/web/
-#
-# # Pull in the specific config
-# Include /home/yourname/fixmystreet/conf/httpd.conf
-#
-# <Directory /home/yourname/fixmystreet/web>
-# # You also need to enable cgi files to run as CGI scripts. For example:
-# # on production servers these are run under fastcgi
-# Options +ExecCGI
-# AddHandler cgi-script .cgi
-# </Directory>
-#
-# <Directory /home/yourname/fixmystreet/web-admin>
-# #
-# # WARNING - enable auth here on production machine
-# #
-# Options +ExecCGI
-# AddHandler cgi-script .cgi
-# </Directory>
-#
-# Alias /admin/ /home/yourname/fixmystreet/web-admin/
-#
-# Alias /jslib/ "/home/yourname/fixmystreet/commonlib/jslib/"
-#
-# </VirtualHost>
-#
-#
-# Copyright (c) 2006 UK Citizens Online Democracy. All rights reserved. Email:
-# francis@mysociety.org; WWW: http://www.mysociety.org
-#
-# $Id: httpd.conf,v 1.40 2009-10-21 15:22:36 louise Exp $
-
-DirectoryIndex index.cgi
-
-RewriteEngine on
-#RewriteLog /var/log/apache2/rewrite.log
-#RewriteLogLevel 3
-
-# End slashes goodbye
-RewriteRule ^/admin/ - [L]
-RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
-RewriteRule ^(.+)/$ $1 [R=permanent]
-
-# Confirmation tokens
-RewriteRule ^/[Aa]/([0-9A-Za-z]{16,18}).*$ /alert.cgi?token=$1 [QSA]
-RewriteRule ^/[Cc]/([0-9A-Za-z]{16,18}).*$ /confirm.cgi?type=update;token=$1 [QSA]
-RewriteRule ^/[Pp]/([0-9A-Za-z]{16,18}).*$ /confirm.cgi?type=problem;token=$1 [QSA]
-RewriteRule ^/[Qq]/([0-9A-Za-z]{16,18}).*$ /questionnaire.cgi?token=$1 [QSA]
-RewriteRule ^/[Ff]/([0-9A-Za-z]{16,18}).*$ /flickr.cgi?token=$1
-RewriteRule ^/[Ll]/([0-9A-Za-z]{16,18}).*$ /index.cgi?partial_token=$1
-RewriteRule ^/[Tt]/([0-9A-Za-z]{16,18}).*$ /tms-signup.cgi?token=$1
-
-# RSS feeds for updates on a problem
-RewriteRule ^/rss/([0-9]+)$ /rss.cgi?type=new_updates;id=$1 [QSA]
-
-# RSS feeds for new local problems
-RewriteRule ^/rss/([0-9]+)[,/]([0-9]+)$ /rss.cgi?type=local_problems;x=$1;y=$2 [QSA]
-RewriteRule ^/rss/n/([0-9]+)[,/]([0-9]+)$ /rss.cgi?type=local_problems;e=$1;n=$2 [QSA]
-RewriteRule ^/rss/l/([0-9.-]+)[,/]([0-9.-]+)$ /rss.cgi?type=local_problems;lat=$1;lon=$2 [QSA]
-RewriteRule ^/rss/([0-9]+)[,/]([0-9]+)/([0-9]+)$ /rss.cgi?type=local_problems;x=$1;y=$2;d=$3 [QSA]
-RewriteRule ^/rss/n/([0-9]+)[,/]([0-9]+)/([0-9]+)$ /rss.cgi?type=local_problems;e=$1;n=$2;d=$3 [QSA]
-RewriteRule ^/rss/l/([0-9.-]+)[,/]([0-9.-]+)/([0-9]+)$ /rss.cgi?type=local_problems;lat=$1;lon=$2;d=$3 [QSA]
-RewriteRule ^/rss/pc/(.*)/([0-9]+)$ /rss.cgi?type=local_problems;pc=$1;d=$2 [QSA]
-RewriteRule ^/rss/pc/(.*)$ /rss.cgi?type=local_problems;pc=$1 [QSA]
-RewriteRule ^/rss/problems$ /rss.cgi?type=new_problems [QSA]
-
-# RSS feeds for voting areas
-RewriteRule ^/rss/council/([0-9]+)$ /rss/reports/$1 [R=permanent]
-RewriteRule ^/report$ /reports [R=permanent]
-RewriteRule ^/reports/([^/]+)/all$ /reports.cgi?council=$1;all=1 [QSA]
-RewriteRule ^/reports/([^/]+)/([^/]+)$ /reports.cgi?council=$1;ward=$2 [QSA]
-RewriteRule ^/rss/(reports|area)/([^/]+)/([^/]+)$ /reports.cgi?rss=$1;council=$2;ward=$3 [QSA]
-RewriteRule ^/reports/([^/]+)$ /reports.cgi?council=$1 [QSA]
-RewriteRule ^/rss/area/([0-9]+)$ /rss.cgi?type=area_problems;id=$1 [QSA]
-RewriteRule ^/rss/(reports|area)/([^/]+)$ /reports.cgi?rss=$1;council=$2 [QSA]
-
-# Fix incorrect RSS urls caused by my stupidity
-RewriteRule ^/{/rss/(.*)}$ /rss/$1 [R=permanent]
-RewriteRule ^/reports/{/rss/(.*)}$ /rss/$1 [R=permanent]
-
-RewriteRule ^/report/([0-9]+)$ /index.cgi?id=$1 [QSA]
-RewriteRule ^/report/([0-9]+) /report/$1 [R]
-RewriteRule ^/alerts/?$ /alert [R=permanent]
-
-# JSON API for summaries of reports
-RewriteRule ^/json/problems/new$ /json.cgi?type=new_problems [QSA]
-RewriteRule ^/json/problems/fixed$ /json.cgi?type=fixed_problems [QSA]
-
-ProxyPass /tilma/ http://tilma.mysociety.org/
-ProxyPassReverse /tilma/ http://tilma.mysociety.org/
-
-# CGI files can be referred without CGI
-RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI}.cgi -f
-RewriteRule /(.+) /$1.cgi
-
-# S. Cambs
-RewriteRule ^/images/southcambridgeshiredistrictcouncil/icons/internet/print.gif$ http://www.scambs.gov.uk/images/southcambridgeshiredistrictcouncil/icons/internet/print.gif [R=permanent]
diff --git a/conf/httpd.conf-example b/conf/httpd.conf-example
new file mode 100644
index 000000000..378aa88a5
--- /dev/null
+++ b/conf/httpd.conf-example
@@ -0,0 +1,68 @@
+# Apache configuration for FixMyStreet.
+#
+# Add lines something like this to your /etc/apache2/sites-enabled/fixmystreet -
+# replacing '/home/yourname/fixmystreet' with the path to your install
+#
+# # FixMyStreet
+# <VirtualHost *:80>
+# ServerName fixmystreet.yourservername
+# DocumentRoot /home/yourname/fixmystreet/web/
+#
+# # Pull in the specific config
+# Include /home/yourname/fixmystreet/conf/httpd.conf
+#
+# <Directory /home/yourname/fixmystreet/web>
+# # You also need to enable cgi files to run as CGI scripts. For example:
+# # on production servers these are run under fastcgi
+# Options +ExecCGI
+# AddHandler cgi-script .cgi
+# </Directory>
+#
+# <Directory /home/yourname/fixmystreet/web-admin>
+# #
+# # WARNING - enable auth here on production machine
+# #
+# Options +ExecCGI
+# AddHandler cgi-script .cgi
+# </Directory>
+#
+# Alias /admin/ /home/yourname/fixmystreet/web-admin/
+#
+# Alias /jslib/ "/home/yourname/fixmystreet/commonlib/jslib/"
+#
+# </VirtualHost>
+#
+#
+# Copyright (c) 2011 UK Citizens Online Democracy. All rights reserved.
+# Email: team@mysociety.org
+# WWW: http://www.mysociety.org
+
+RewriteEngine on
+# RewriteLog /var/log/apache2/rewrite.log
+# RewriteLogLevel 3
+
+# RSS feeds for voting areas
+RewriteRule ^/rss/council/([0-9]+)$ /rss/reports/$1 [R=permanent,L]
+RewriteRule ^/report$ /reports [R=permanent,L]
+# Fix incorrect RSS urls caused by my stupidity
+RewriteRule ^/{/rss/(.*)}$ /rss/$1 [R=permanent,L]
+RewriteRule ^/reports/{/rss/(.*)}$ /rss/$1 [R=permanent,L]
+# In case of misspelling
+RewriteRule ^/alerts/?$ /alert [R=permanent,L]
+
+# Proxy mapit so that our js code can make calls on the originating server. Use
+# a RewriteRule rather than ProxyPass so that Apache's processing order is more
+# predictable. ProxyPassReverse is not affected by this.
+RewriteRule /mapit/(.*) http://mapit.mysociety.org/$1 [P,L]
+ProxyPassReverse /mapit/ http://mapit.mysociety.org/
+
+# serve static files directly
+RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f
+RewriteRule /(.+) /$1 [L]
+
+# Don't want jslib being passed to Catalyst
+RewriteRule ^/jslib(.*) /jslib$1 [L,PT]
+
+# trap anything that reaches us here and send it to the Catalyst app
+RewriteRule ^(.*)$ /fixmystreet_app_fastcgi.cgi$1 [L]
+
diff --git a/conf/packages b/conf/packages
index b8324300d..c3dd5760f 100644
--- a/conf/packages
+++ b/conf/packages
@@ -28,4 +28,9 @@ libmath-bigint-gmp-perl
libtext-template-perl
gettext
libtest-exception-perl
+libipc-run3-perl
+libyaml-perl
+liblist-moreutils-perl
libhaml-ruby
+libtemplate-perl
+postgresql-server-dev-8.3