aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config/httpd-force-ssl.conf-example5
-rw-r--r--config/httpd-vhost.conf-example10
2 files changed, 8 insertions, 7 deletions
diff --git a/config/httpd-force-ssl.conf-example b/config/httpd-force-ssl.conf-example
new file mode 100644
index 000000000..0e89afe62
--- /dev/null
+++ b/config/httpd-force-ssl.conf-example
@@ -0,0 +1,5 @@
+# Rewrite all proxied HTTP requests to HTTPS.
+# Only include if FORCE_SSL: true is set in general.yml
+# Expected to be found at /etc/apache2/vhost.d/alaveteli
+RewriteCond %{HTTP:X-Forwarded-Proto} !https
+RewriteRule /(.*) https://www.example.com/$1 [L,R=permanent]
diff --git a/config/httpd-vhost.conf-example b/config/httpd-vhost.conf-example
index a01f58089..00a681536 100644
--- a/config/httpd-vhost.conf-example
+++ b/config/httpd-vhost.conf-example
@@ -43,13 +43,6 @@
RewriteEngine On
- # Rewrite all proxied HTTP requests to HTTPS.
- # Uncomment the following two lines if you have set `FORCE_SSL: true` in
- # general.yml:
- # ---
- # RewriteCond %{HTTP:X-Forwarded-Proto} !https
- # RewriteRule /(.*) https://www.example.com/$1 [L,R=permanent]
-
# TODO: 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
@@ -148,6 +141,9 @@
ExpiresDefault "access plus 1 day"
</LocationMatch>
+ # Include optional configuration
+ Include vhost.d/alaveteli
+
</VirtualHost>
# Large / static files for WhatDoTheyKnow. Used for manual sysadmin uploads.