updated nginx state

This commit is contained in:
Paul 2022-12-17 23:33:52 +01:00
parent 7e35a90b19
commit 6a032dc5b1
2 changed files with 20 additions and 17 deletions

View File

@ -4,3 +4,5 @@ nginx-service:
- name: nginx - name: nginx
- enable: true - enable: true
- reload: true - reload: true
- check_cmd:
- nginx -t

View File

@ -14,23 +14,24 @@ 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 ^/.well-known/nodeinfo https://$server_name/public.php?service=nodeinfo last;
rewrite ^(/core/doc/[^\/]+/)$ $1/index.html; rewrite ^(/core/doc/[^\/]+/)$ $1/index.html;
try_files $uri $uri/ index.php; try_files $uri $uri/ index.php;
} }