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.ugly26
-rw-r--r--conf/general-example6
-rw-r--r--conf/httpd.conf105
-rw-r--r--conf/httpd.conf-example68
-rw-r--r--conf/packages4
7 files changed, 86 insertions, 126 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..a5a5f2300 100644
--- a/conf/crontab.ugly
+++ b/conf/crontab.ugly
@@ -12,24 +12,18 @@ 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?"
!!(* } *)!!
diff --git a/conf/general-example b/conf/general-example
index 7e750de96..6401528a9 100644
--- a/conf/general-example
+++ b/conf/general-example
@@ -30,11 +30,11 @@ 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');
+
+# this should be the same as the OPTION_BASE_URL for historical reasons
define('OPTION_EMAIL_VHOST', 'www.example.com');
define('OPTION_EMAIL_VHOST_EMPTYHOMES', 'www.example.com');
@@ -65,8 +65,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)
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..54c4b90ac
--- /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 tilma 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 /tilma/(.*) http://tilma.mysociety.org/$1 [P,L]
+ProxyPassReverse /tilma/ http://tilma.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..ecd6c18bc 100644
--- a/conf/packages
+++ b/conf/packages
@@ -28,4 +28,8 @@ libmath-bigint-gmp-perl
libtext-template-perl
gettext
libtest-exception-perl
+libipc-run3-perl
+libyaml-perl
+liblist-moreutils-perl
libhaml-ruby
+libtemplate-perl