Blame view

conf/nginx.conf 1.83 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
8
9
10
11
         fastcgi_buffers 64 4K;
  
         rewrite ^/caldav(.*)$ /remote.php/caldav$1 redirect;
         rewrite ^/carddav(.*)$ /remote.php/carddav$1 redirect;
         rewrite ^/webdav(.*)$ /remote.php/webdav$1 redirect;
03e52840d   Kload   Init
12
         index index.php;
cd76ae3c7   lunarok   Update nginx.conf
13
14
15
         error_page 403 /core/templates/403.php;
         error_page 404 /core/templates/404.php;
         
d75a41ea1   lunarok   Update nginx.conf
16
17
         rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
         rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last;
cd76ae3c7   lunarok   Update nginx.conf
18

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

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

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

cd76ae3c7   lunarok   Update nginx.conf
27

d75a41ea1   lunarok   Update nginx.conf
28
29
         location ~ ^/(?:\.htaccess|data|config|db_structure\.xml|README) {
                deny all;
cd76ae3c7   lunarok   Update nginx.conf
30
         }
d75a41ea1   lunarok   Update nginx.conf
31

03e52840d   Kload   Init
32
         location ~ [^/]\.php(/|$) {
0400c1279   lunarok   Update nginx.conf
33
             fastcgi_split_path_info ^(.+\.php)(/.+)$;
03e52840d   Kload   Init
34
             include fastcgi_params;
0400c1279   lunarok   Update nginx.conf
35
             fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
1b87c3257   Kload   Increase file upl...
36
37
             fastcgi_param PATH_INFO $fastcgi_path_info;
             fastcgi_param HTTPS on;
0400c1279   lunarok   Update nginx.conf
38
39
             fastcgi_param REMOTE_USER $remote_user;
             fastcgi_pass unix:/var/run/php5-fpm-NAMETOCHANGE.sock;
03e52840d   Kload   Init
40
         }
ea047c57d   opi   Include SSOWAT us...
41
42
         
         # Include SSOWAT user panel.
8ac2193a3   Alexis Gavoty   Correct user pane...
43
44
         sub_filter </head> '<script type="text/javascript" src="/ynhpanel.js"></script></head>';
         sub_filter_once on;
cd76ae3c7   lunarok   Update nginx.conf
45
         }
1b87c3257   Kload   Increase file upl...
46

cd76ae3c7   lunarok   Update nginx.conf
47
48
49
50
51
52
         # Optional: set long EXPIRES header on static assets
         location ~* \.(?:jpg|jpeg|gif|bmp|ico|png|css|js|swf)$ {
                expires 30d;
                # Optional: Don't log access to assets
                access_log off;
         }
d75a41ea1   lunarok   Update nginx.conf
53
54
  
  }