updated nginx state
This commit is contained in:
parent
7e35a90b19
commit
6a032dc5b1
@ -3,4 +3,6 @@ nginx-service:
|
|||||||
service.running:
|
service.running:
|
||||||
- name: nginx
|
- name: nginx
|
||||||
- enable: true
|
- enable: true
|
||||||
- reload: true
|
- reload: true
|
||||||
|
- check_cmd:
|
||||||
|
- nginx -t
|
||||||
|
@ -14,24 +14,25 @@ server {
|
|||||||
index index.php;
|
index index.php;
|
||||||
error_page 403 /core/templates/403.php;
|
error_page 403 /core/templates/403.php;
|
||||||
error_page 404 /core/templates/404.php;
|
error_page 404 /core/templates/404.php;
|
||||||
rewrite ^/caldav(.*)$ /remote.php/caldav$1 redirect;
|
|
||||||
rewrite ^/carddav(.*)$ /remote.php/carddav$1 redirect;
|
|
||||||
rewrite ^/webdav(.*)$ /remote.php/webdav$1 redirect;
|
|
||||||
client_max_body_size 4G;
|
client_max_body_size 4G;
|
||||||
fastcgi_buffers 64 4K;
|
fastcgi_buffers 64 4K;
|
||||||
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
|
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
|
||||||
{%- for key,value in headers.items() %}
|
{%- for key,value in headers.items() %}
|
||||||
add_header {{ key }} "{{ value }}";
|
add_header {{ key }} "{{ value }}";
|
||||||
{% endfor -%}
|
{% endfor -%}
|
||||||
|
rewrite ^/caldav(.*)$ https://$server_name/remote.php/dav$1 redirect;
|
||||||
|
rewrite ^/carddav(.*)$ https://$server_name/remote.php/dav$1 redirect;
|
||||||
|
rewrite ^/webdav(.*)$ https://$server_name/remote.php/webdav$1 redirect;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
|
rewrite ^/caldav(.*)$ https://$server_name/remote.php/dav$1 redirect;
|
||||||
rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last;
|
rewrite ^/carddav(.*)$ https://$server_name/remote.php/dav$1 redirect;
|
||||||
rewrite ^/.well-known/carddav /remote.php/carddav/ redirect;
|
rewrite ^/webdav(.*)$ https://$server_name/remote.php/webdav$1 redirect;
|
||||||
rewrite ^/.well-known/caldav /remote.php/caldav/ redirect;
|
rewrite ^/.well-known/host-meta https://$server_name/public.php?service=host-meta last;
|
||||||
rewrite ^/.well-known/webfinger /public.php?service=webfinger last;
|
rewrite ^/.well-known/host-meta.json https://$server_name/public.php?service=host-meta-json last;
|
||||||
rewrite ^/.well-known/nodeinfo /public.php?service=nodeinfo last;
|
rewrite ^/.well-known/webfinger https://$server_name/public.php?service=webfinger last;
|
||||||
rewrite ^(/core/doc/[^\/]+/)$ $1/index.html;
|
rewrite ^/.well-known/nodeinfo https://$server_name/public.php?service=nodeinfo last;
|
||||||
|
rewrite ^(/core/doc/[^\/]+/)$ $1/index.html;
|
||||||
try_files $uri $uri/ index.php;
|
try_files $uri $uri/ index.php;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -46,12 +47,12 @@ server {
|
|||||||
}
|
}
|
||||||
|
|
||||||
location ~ ^(.+?\.php)(/.*)?$ {
|
location ~ ^(.+?\.php)(/.*)?$ {
|
||||||
include fastcgi_params;
|
include fastcgi_params;
|
||||||
fastcgi_pass unix:{{ php_socket_file }};
|
fastcgi_pass unix:{{ php_socket_file }};
|
||||||
fastcgi_index index.php;
|
fastcgi_index index.php;
|
||||||
fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
|
fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
|
||||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||||
try_files $1 =404;
|
try_files $1 =404;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /robots.txt {
|
location /robots.txt {
|
||||||
|
Loading…
Reference in New Issue
Block a user