Commit 2c110bb521d0a5494bd3705509a71334dad3ffeb
Exists in
master
Merge pull request #25 from julienmalik/patch-3
Update nginx.conf
Showing 1 changed file 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 | #fastcgi_buffers 64 4K; | 6 | #fastcgi_buffers 64 4K; |
7 | 7 | ||
8 | rewrite ^PATHTOCHANGE/caldav(.*)$ /remote.php/caldav$1 redirect; | 8 | rewrite ^PATHTOCHANGE/caldav(.*)$ /remote.php/caldav$1 redirect; |
9 | rewrite ^PATHTOCHANGE/carddav(.*)$ /remote.php/carddav$1 redirect; | 9 | rewrite ^PATHTOCHANGE/carddav(.*)$ /remote.php/carddav$1 redirect; |
10 | rewrite ^PATHTOCHANGE/webdav(.*)$ /remote.php/webdav$1 redirect; | 10 | rewrite ^PATHTOCHANGE/webdav(.*)$ /remote.php/webdav$1 redirect; |
11 | 11 | ||
12 | error_page 403 PATHTOCHANGE/core/templates/403.php; | 12 | error_page 403 PATHTOCHANGE/core/templates/403.php; |
13 | error_page 404 PATHTOCHANGE/core/templates/404.php; | 13 | error_page 404 PATHTOCHANGE/core/templates/404.php; |
14 | 14 | ||
15 | rewrite ^PATHTOCHANGE/.well-known/host-meta /public.php?service=host-meta last; | 15 | rewrite ^PATHTOCHANGE/.well-known/host-meta /public.php?service=host-meta last; |
16 | rewrite ^PATHTOCHANGE/.well-known/host-meta.json /public.php?service=host-meta-json last; | 16 | rewrite ^PATHTOCHANGE/.well-known/host-meta.json /public.php?service=host-meta-json last; |
17 | 17 | ||
18 | rewrite ^PATHTOCHANGE/.well-known/carddav /remote.php/carddav/ redirect; | 18 | rewrite ^PATHTOCHANGE/.well-known/carddav /remote.php/carddav/ redirect; |
19 | rewrite ^PATHTOCHANGE/.well-known/caldav /remote.php/caldav/ redirect; | 19 | rewrite ^PATHTOCHANGE/.well-known/caldav /remote.php/caldav/ redirect; |
20 | 20 | ||
21 | rewrite ^(PATHTOCHANGE/core/doc/[^\/]+/)$ $1/index.html; | 21 | rewrite ^(PATHTOCHANGE/core/doc/[^\/]+/)$ $1/index.html; |
22 | 22 | ||
23 | client_max_body_size 10G; | 23 | client_max_body_size 10G; |
24 | index index.php; | 24 | index index.php; |
25 | try_files $uri $uri/ /index.php; | 25 | try_files $uri $uri/ /index.php; |
26 | location ~ [^/]\.php(/|$) { | 26 | location ~ [^/]\.php(/|$) { |
27 | fastcgi_split_path_info ^(.+?\.php)(/.*)$; | 27 | fastcgi_split_path_info ^(.+?\.php)(/.*)$; |
28 | fastcgi_pass unix:/var/run/php5-fpm-NAMETOCHANGE.sock; | 28 | fastcgi_pass unix:/var/run/php5-fpm-NAMETOCHANGE.sock; |
29 | include fastcgi_params; | 29 | include fastcgi_params; |
30 | fastcgi_param REMOTE_USER $remote_user; | 30 | fastcgi_param REMOTE_USER $remote_user; |
31 | fastcgi_param PATH_INFO $fastcgi_path_info; | 31 | fastcgi_param PATH_INFO $fastcgi_path_info; |
32 | fastcgi_param HTTPS on; | 32 | fastcgi_param HTTPS on; |
33 | fastcgi_param SCRIPT_FILENAME $request_filename; | ||
33 | } | 34 | } |
34 | 35 | ||
35 | # Include SSOWAT user panel. | 36 | # Include SSOWAT user panel. |
36 | sub_filter </head> '<script type="text/javascript" src="/ynhpanel.js"></script></head>'; | 37 | sub_filter </head> '<script type="text/javascript" src="/ynhpanel.js"></script></head>'; |
37 | sub_filter_once on; | 38 | sub_filter_once on; |
38 | |||
39 | |||
40 | } | 39 | } |
41 | 40 | ||
42 | location ~ ^PATHTOCHANGE/(data|config|\.ht|db_structure\.xml|README) { | 41 | location ~ ^PATHTOCHANGE/(data|config|\.ht|db_structure\.xml|README) { |
43 | deny all; | 42 | deny all; |
44 | } | 43 | } |