From d75a41ea164055f37cd92d5e35ab5a190e6fdc93 Mon Sep 17 00:00:00 2001 From: lunarok Date: Thu, 7 Aug 2014 17:18:13 +0200 Subject: [PATCH] Update nginx.conf Configuration for OC7 --- conf/nginx.conf | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 512e45d..bd42599 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -14,29 +14,23 @@ location PATHTOCHANGE { error_page 403 /core/templates/403.php; error_page 404 /core/templates/404.php; - location = /robots.txt { - allow all; - log_not_found off; - access_log off; - } + rewrite ^/.well-known/host-meta /public.php?service=host-meta last; + rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last; - location ~ ^/(?:\.htaccess|data|config|db_structure\.xml|README) { - deny all; - } + rewrite ^/.well-known/carddav /remote.php/carddav/ redirect; + rewrite ^/.well-known/caldav /remote.php/caldav/ redirect; - location / { - # The following 2 rules are only needed with webfinger - rewrite ^/.well-known/host-meta /public.php?service=host-meta last; - rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last; + rewrite ^(/core/doc/[^\/]+/)$ $1/index.html; - rewrite ^/.well-known/carddav /remote.php/carddav/ redirect; - rewrite ^/.well-known/caldav /remote.php/caldav/ redirect; + try_files $uri $uri/ index.php; + - rewrite ^(/core/doc/[^\/]+/)$ $1/index.html; - try_files $uri $uri/ index.php; + location ~ ^/(?:\.htaccess|data|config|db_structure\.xml|README) { + deny all; } + location ~ [^/]\.php(/|$) { fastcgi_split_path_info ^(.+?\.php)(/.*)$; fastcgi_pass unix:/var/run/php5-fpm-NAMETOCHANGE.sock; @@ -57,3 +51,5 @@ location PATHTOCHANGE { # Optional: Don't log access to assets access_log off; } + +} -- 2.0.0