Commit 65df8ceaccbe77b06f0d9c0a181aaae1176daf1f

Authored by lunarok
1 parent 0400c12799
Exists in master

Update nginx.conf

Showing 1 changed file with 13 additions and 27 deletions Side-by-side Diff

... ... @@ -6,29 +6,23 @@ location PATHTOCHANGE {
6 6 client_max_body_size 10G;
7 7 fastcgi_buffers 64 4K;
8 8  
9   - rewrite ^/caldav(.*)$ /remote.php/caldav$1 redirect;
10   - rewrite ^/carddav(.*)$ /remote.php/carddav$1 redirect;
11   - rewrite ^/webdav(.*)$ /remote.php/webdav$1 redirect;
  9 + rewrite ^PATHTOCHANGE/caldav(.*)$ /remote.php/caldav$1 redirect;
  10 + rewrite ^PATHTOCHANGE/carddav(.*)$ /remote.php/carddav$1 redirect;
  11 + rewrite ^PATHTOCHANGE/webdav(.*)$ /remote.php/webdav$1 redirect;
12 12  
13 13 index index.php;
14   - error_page 403 /core/templates/403.php;
15   - error_page 404 /core/templates/404.php;
  14 + error_page 403 PATHTOCHANGE/core/templates/403.php;
  15 + error_page 404 PATHTOCHANGE/core/templates/404.php;
16 16  
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;
  17 + rewrite ^PATHTOCHANGE/.well-known/host-meta /public.php?service=host-meta last;
  18 + rewrite ^PATHTOCHANGE/.well-known/host-meta.json /public.php?service=host-meta-json last;
19 19  
20   - rewrite ^/.well-known/carddav /remote.php/carddav/ redirect;
21   - rewrite ^/.well-known/caldav /remote.php/caldav/ redirect;
  20 + rewrite ^PATHTOCHANGE/.well-known/carddav /remote.php/carddav/ redirect;
  21 + rewrite ^PATHTOCHANGE/.well-known/caldav /remote.php/caldav/ redirect;
22 22  
23   - rewrite ^(/core/doc/[^\/]+/)$ $1/index.html;
  23 + rewrite ^(PATHTOCHANGE/core/doc/[^\/]+/)$ $1/index.html;
24 24  
25 25 try_files $uri $uri/ index.php;
26   -
27   -
28   -
29   - location ~ ^/(?:\.htaccess|data|config|db_structure\.xml|README) {
30   - deny all;
31   - }
32 26  
33 27  
34 28 location ~ [^/]\.php(/|$) {
... ... @@ -40,17 +34,9 @@ location PATHTOCHANGE {
40 34 fastcgi_param REMOTE_USER $remote_user;
41 35 fastcgi_pass unix:/var/run/php5-fpm-NAMETOCHANGE.sock;
42 36 }
43   -
44   - # Include SSOWAT user panel.
45   - sub_filter </head> '<script type="text/javascript" src="/ynhpanel.js"></script></head>';
46   - sub_filter_once on;
47   - }
48 37  
49   - # Optional: set long EXPIRES header on static assets
50   - location ~* \.(?:jpg|jpeg|gif|bmp|ico|png|css|js|swf)$ {
51   - expires 30d;
52   - # Optional: Don't log access to assets
53   - access_log off;
54   - }
  38 +}
55 39  
  40 +location ~ ^PATHTOCHANGE/(data|config|\.ht|db_structure\.xml|README) {
  41 +deny all;
56 42 }