bunkerweb 1.4.0

This commit is contained in:
bunkerity
2022-06-03 17:24:14 +02:00
parent 3a078326c5
commit a9f886804a
5245 changed files with 1432051 additions and 27894 deletions

View File

@@ -0,0 +1,5 @@
{% if ALLOWED_METHODS != "" +%}
if ($request_method !~ ^({{ ALLOWED_METHODS }})$) {
return 405;
}
{% endif %}

View File

@@ -0,0 +1 @@
client_max_body_size {{ MAX_CLIENT_SIZE }};

View File

@@ -0,0 +1,4 @@
open_file_cache {{ OPEN_FILE_CACHE }};
open_file_cache_errors {% if OPEN_FILE_CACHE_ERRORS == "yes" +%} on {% else +%} off {% endif +%};
open_file_cache_min_uses {{ OPEN_FILE_CACHE_MIN_USES }};
open_file_cache_valid {{ OPEN_FILE_CACHE_VALID }};

View File

@@ -0,0 +1,12 @@
{% if REDIRECT_HTTP_TO_HTTPS == "yes" +%}
if ($scheme = http) {
return 301 https://$host$request_uri;
}
{% elif AUTO_REDIRECT_HTTP_TO_HTTPS == "yes" +%}
{% if AUTO_LETS_ENCRYPT == "yes" or USE_CUSTOM_HTTPS == "yes" or GENERATE_SELF_SIGNED_SSL == "yes" +%}
if ($scheme = http) {
return 301 https://$host$request_uri;
}
{% endif +%}
{% endif +%}

View File

@@ -0,0 +1,6 @@
{% if SERVE_FILES == "yes" +%}
root {% if ROOT_FOLDER == "" %}/opt/bunkerweb/www/{% if MULTISITE == "yes" %}{{ SERVER_NAME.split(" ")[0] }}{% endif %}{% else %}{{ ROOT_FOLDER }}{% endif %};
try_files $uri $uri/ =404;
{% else +%}
root /nowhere;
{% endif %}