Commit d75a41ea164055f37cd92d5e35ab5a190e6fdc93
1 parent
cd76ae3c72
Exists in
master
Update nginx.conf
Configuration for OC7
Showing 1 changed file with 12 additions and 16 deletions Side-by-side Diff
conf/nginx.conf
| ... | ... | @@ -14,29 +14,23 @@ location PATHTOCHANGE { |
| 14 | 14 | error_page 403 /core/templates/403.php; |
| 15 | 15 | error_page 404 /core/templates/404.php; |
| 16 | 16 | |
| 17 | - location = /robots.txt { | |
| 18 | - allow all; | |
| 19 | - log_not_found off; | |
| 20 | - access_log off; | |
| 21 | - } | |
| 17 | + rewrite ^/.well-known/host-meta /public.php?service=host-meta last; | |
| 18 | + rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last; | |
| 22 | 19 | |
| 23 | - location ~ ^/(?:\.htaccess|data|config|db_structure\.xml|README) { | |
| 24 | - deny all; | |
| 25 | - } | |
| 20 | + rewrite ^/.well-known/carddav /remote.php/carddav/ redirect; | |
| 21 | + rewrite ^/.well-known/caldav /remote.php/caldav/ redirect; | |
| 26 | 22 | |
| 27 | - location / { | |
| 28 | - # The following 2 rules are only needed with webfinger | |
| 29 | - rewrite ^/.well-known/host-meta /public.php?service=host-meta last; | |
| 30 | - rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last; | |
| 23 | + rewrite ^(/core/doc/[^\/]+/)$ $1/index.html; | |
| 31 | 24 | |
| 32 | - rewrite ^/.well-known/carddav /remote.php/carddav/ redirect; | |
| 33 | - rewrite ^/.well-known/caldav /remote.php/caldav/ redirect; | |
| 25 | + try_files $uri $uri/ index.php; | |
| 26 | + | |
| 34 | 27 | |
| 35 | - rewrite ^(/core/doc/[^\/]+/)$ $1/index.html; | |
| 36 | 28 | |
| 37 | - try_files $uri $uri/ index.php; | |
| 29 | + location ~ ^/(?:\.htaccess|data|config|db_structure\.xml|README) { | |
| 30 | + deny all; | |
| 38 | 31 | } |
| 39 | 32 | |
| 33 | + | |
| 40 | 34 | location ~ [^/]\.php(/|$) { |
| 41 | 35 | fastcgi_split_path_info ^(.+?\.php)(/.*)$; |
| 42 | 36 | fastcgi_pass unix:/var/run/php5-fpm-NAMETOCHANGE.sock; |
| ... | ... | @@ -57,3 +51,5 @@ location PATHTOCHANGE { |
| 57 | 51 | # Optional: Don't log access to assets |
| 58 | 52 | access_log off; |
| 59 | 53 | } |
| 54 | + | |
| 55 | +} |