Commit 541ce3a117c488e0d6146cc17620b9822342491b
1 parent
6d9380f966
Exists in
master
Update nginx.conf
Showing 1 changed file with 11 additions and 26 deletions Inline Diff
conf/nginx.conf
1 | location PATHTOCHANGE { | 1 | location PATHTOCHANGE { |
2 | alias ALIASTOCHANGE; | 2 | alias ALIASTOCHANGE; |
3 | if ($scheme = http) { | 3 | if ($scheme = http) { |
4 | rewrite ^ https://$server_name$request_uri? permanent; | 4 | rewrite ^ https://$server_name$request_uri? permanent; |
5 | } | 5 | } |
6 | client_max_body_size 10G; | 6 | client_max_body_size 10G; |
7 | fastcgi_buffers 64 4K; | ||
8 | |||
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 | |||
13 | index index.php; | 7 | index index.php; |
14 | error_page 403 PATHTOCHANGE/core/templates/403.php; | 8 | try_files $uri $uri/ /index.php; |
15 | error_page 404 PATHTOCHANGE/core/templates/404.php; | ||
16 | |||
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 | |||
20 | rewrite ^PATHTOCHANGE/.well-known/carddav /remote.php/carddav/ redirect; | ||
21 | rewrite ^PATHTOCHANGE/.well-known/caldav /remote.php/caldav/ redirect; | ||
22 | |||
23 | rewrite ^(PATHTOCHANGE/core/doc/[^\/]+/)$ $1/index.html; | ||
24 | |||
25 | try_files $uri $uri/ index.php; | ||
26 | |||
27 | |||
28 | location ~ [^/]\.php(/|$) { | 9 | location ~ [^/]\.php(/|$) { |
29 | fastcgi_split_path_info ^(.+\.php)(/.+)$; | 10 | fastcgi_split_path_info ^(.+?\.php)(/.*)$; |
11 | fastcgi_pass unix:/var/run/php5-fpm-NAMETOCHANGE.sock; | ||
30 | include fastcgi_params; | 12 | include fastcgi_params; |
31 | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | 13 | fastcgi_param REMOTE_USER $remote_user; |
32 | fastcgi_param PATH_INFO $fastcgi_path_info; | 14 | fastcgi_param PATH_INFO $fastcgi_path_info; |
33 | fastcgi_param HTTPS on; | 15 | fastcgi_param HTTPS on; |
34 | fastcgi_param REMOTE_USER $remote_user; | ||
35 | fastcgi_pass unix:/var/run/php5-fpm-NAMETOCHANGE.sock; | ||
36 | } | 16 | } |
37 | 17 | ||
18 | # Include SSOWAT user panel. | ||
19 | sub_filter </head> '<script type="text/javascript" src="/ynhpanel.js"></script></head>'; | ||
20 | sub_filter_once on; | ||
38 | } | 21 | } |
39 | 22 |