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("") }} proxy_pass: {{ vhost.proxy_pass|default("") }}
cache: {{ vhost.cache|default(true) }} cache: {{ vhost.cache|default(true) }}
autoindex: {{ vhost.autoindex|default(false) }} autoindex: {{ vhost.autoindex|default(false) }}
webdav: {{ vhost.webdav|default(false) }}
root_dir: {{ vhost.root_dir|default(none) }} root_dir: {{ vhost.root_dir|default(none) }}
internal: {{ vhost.internal|default(false) }} internal: {{ vhost.internal|default(false) }}
auth: {{ vhost.auth|default(false) }} auth: {{ vhost.auth|default(false) }}

View File

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

View File

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

View File

@ -43,9 +43,16 @@ server {
{%- if autoindex %} {%- if autoindex %}
autoindex on; autoindex on;
autoindex_localtime on; autoindex_localtime on;
autoindex_exact_size on;
{%- else %} {%- else %}
index index.html; index index.html;
{% endif %} {% 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 %} {%- for dir in dirs %}