From 63b1ecd671b5c0d8390fb2f233ab9001fb949490 Mon Sep 17 00:00:00 2001 From: Markus Hauschild Date: Fri, 8 Apr 2016 07:43:23 +0200 Subject: [PATCH] Add redirect for owncloud to web host. --- roles/web/files/vhost | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/roles/web/files/vhost b/roles/web/files/vhost index 6d25533..b971da0 100644 --- a/roles/web/files/vhost +++ b/roles/web/files/vhost @@ -4,9 +4,9 @@ server { server_name binary-kitchen.de www.binary-kitchen.de binary-kitchen.com www.binary-kitchen.com binary-kitchen.net www.binary-kitchen.net binary.kitchen www.binary.kitchen; - location /.well-known/acme-challenge/ { + location /.well-known/acme-challenge { default_type "text/plain"; - alias /var/www/acme-challenge/; + alias /var/www/acme-challenge; } location / { @@ -29,6 +29,14 @@ server { index index.php; + location = / { + return 301 https://www.binary-kitchen.de/wiki/; + } + + location /owncloud { + rewrite ^/owncloud(/.*)$ https://oc.binary-kitchen.de$1; + } + location ~ /wiki/(data/|conf/|bin/|inc/|install.php) { deny all; }