Blame view

conf/nginx.conf 1.51 KB
03e52840d   Kload   Init
1
2
3
4
5
  location PATHTOCHANGE {
         alias ALIASTOCHANGE;
         if ($scheme = http) {
              rewrite ^ https://$server_name$request_uri? permanent;
         }
1b87c3257   Kload   Increase file upl...
6
         client_max_body_size 10G;
cd76ae3c7   lunarok   Update nginx.conf
7
         fastcgi_buffers 64 4K;
65df8ceac   lunarok   Update nginx.conf
8
9
10
         rewrite ^PATHTOCHANGE/caldav(.*)$ /remote.php/caldav$1 redirect;
         rewrite ^PATHTOCHANGE/carddav(.*)$ /remote.php/carddav$1 redirect;
         rewrite ^PATHTOCHANGE/webdav(.*)$ /remote.php/webdav$1 redirect;
cd76ae3c7   lunarok   Update nginx.conf
11

03e52840d   Kload   Init
12
         index index.php;
65df8ceac   lunarok   Update nginx.conf
13
14
         error_page 403 PATHTOCHANGE/core/templates/403.php;
         error_page 404 PATHTOCHANGE/core/templates/404.php;
cd76ae3c7   lunarok   Update nginx.conf
15
         
65df8ceac   lunarok   Update nginx.conf
16
17
         rewrite ^PATHTOCHANGE/.well-known/host-meta /public.php?service=host-meta last;
         rewrite ^PATHTOCHANGE/.well-known/host-meta.json /public.php?service=host-meta-json last;
cd76ae3c7   lunarok   Update nginx.conf
18

65df8ceac   lunarok   Update nginx.conf
19
20
         rewrite ^PATHTOCHANGE/.well-known/carddav /remote.php/carddav/ redirect;
         rewrite ^PATHTOCHANGE/.well-known/caldav /remote.php/caldav/ redirect;
cd76ae3c7   lunarok   Update nginx.conf
21

65df8ceac   lunarok   Update nginx.conf
22
         rewrite ^(PATHTOCHANGE/core/doc/[^\/]+/)$ $1/index.html;
cd76ae3c7   lunarok   Update nginx.conf
23

d75a41ea1   lunarok   Update nginx.conf
24
         try_files $uri $uri/ index.php;
cd76ae3c7   lunarok   Update nginx.conf
25

d75a41ea1   lunarok   Update nginx.conf
26

03e52840d   Kload   Init
27
         location ~ [^/]\.php(/|$) {
0400c1279   lunarok   Update nginx.conf
28
             fastcgi_split_path_info ^(.+\.php)(/.+)$;
03e52840d   Kload   Init
29
             include fastcgi_params;
0400c1279   lunarok   Update nginx.conf
30
             fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
1b87c3257   Kload   Increase file upl...
31
32
             fastcgi_param PATH_INFO $fastcgi_path_info;
             fastcgi_param HTTPS on;
0400c1279   lunarok   Update nginx.conf
33
34
             fastcgi_param REMOTE_USER $remote_user;
             fastcgi_pass unix:/var/run/php5-fpm-NAMETOCHANGE.sock;
03e52840d   Kload   Init
35
         }
1b87c3257   Kload   Increase file upl...
36

65df8ceac   lunarok   Update nginx.conf
37
  }
d75a41ea1   lunarok   Update nginx.conf
38

65df8ceac   lunarok   Update nginx.conf
39
40
  location ~ ^PATHTOCHANGE/(data|config|\.ht|db_structure\.xml|README) {
  deny all;
d75a41ea1   lunarok   Update nginx.conf
41
  }