updated nginx state

This commit is contained in:
Paul 2023-11-10 13:26:06 +01:00
parent d577a9b420
commit ba93fbe43c
4 changed files with 12 additions and 0 deletions

View File

@ -59,6 +59,7 @@ nginx-sites-available-{{ name }}:
proxy_pass: {{ vhost.proxy_pass|default("") }}
cache: {{ vhost.cache|default(true) }}
autoindex: {{ vhost.autoindex|default(false) }}
webdav: {{ vhost.webdav|default(false) }}
root_dir: {{ vhost.root_dir|default(none) }}
internal: {{ vhost.internal|default(false) }}
auth: {{ vhost.auth|default(false) }}

View File

@ -7,6 +7,7 @@ nginx:
config:
dir: /etc/nginx
geoip: false
webdav: false
user: www-data
group: www-data
workers: 4

View File

@ -4,6 +4,9 @@
{%- if nginx.config.geoip %}
load_module modules/ngx_http_geoip2_module.so;
{%- endif%}
{%- if nginx.config.webdav %}
load_module modules/ngx_http_dav_ext_module.so;
{%- endif%}
user {{ nginx.config.user }};

View File

@ -43,9 +43,16 @@ server {
{%- if autoindex %}
autoindex on;
autoindex_localtime on;
autoindex_exact_size on;
{%- else %}
index index.html;
{% endif %}
{% if webdav %}
dav_methods PUT DELETE MKCOL COPY MOVE;
dav_ext_methods PROPFIND OPTIONS;
dav_access user:rw group:r all:r;
create_full_put_path on;
{% endif %}
}
{%- for dir in dirs %}