aboutsummaryrefslogtreecommitdiffstats
path: root/deployment/websites
diff options
context:
space:
mode:
Diffstat (limited to 'deployment/websites')
-rw-r--r--deployment/websites/manifests/init.pp8
-rw-r--r--deployment/websites/templates/vhost_donate.conf16
2 files changed, 24 insertions, 0 deletions
diff --git a/deployment/websites/manifests/init.pp b/deployment/websites/manifests/init.pp
new file mode 100644
index 00000000..96ae58d9
--- /dev/null
+++ b/deployment/websites/manifests/init.pp
@@ -0,0 +1,8 @@
+class websites {
+ # should expire on June 2011
+ class donate {
+ apache::vhost_other_app { "donate.$domain":
+ vhost_file => "websites/vhost_donate.conf",
+ }
+ }
+}
diff --git a/deployment/websites/templates/vhost_donate.conf b/deployment/websites/templates/vhost_donate.conf
new file mode 100644
index 00000000..c2f5c551
--- /dev/null
+++ b/deployment/websites/templates/vhost_donate.conf
@@ -0,0 +1,16 @@
+<VirtualHost *:80>
+ ServerName donate.<%= domain %>
+ ServerAlias donation.<%= domain %>
+
+ RewriteEngine on
+ RewriteRule ^/?$ http://www.<%= domain %>/en/donate/ [R=permanent,L]
+ RewriteRule ^/(.*)$ http://www.<%= domain %>/$1/donate/ [R=permanent,L]
+ #DocumentRoot /dev/null
+ CustomLog /var/log/httpd/donate_log combined
+ ErrorLog /var/log/httpd/error_donate_log
+
+ <Location />
+ Allow from all
+ </Location>
+
+</VirtualHost>