Add default_type
templating option (#299)
This commit is contained in:
parent
fc4640bd4a
commit
0922304b12
@ -25,6 +25,7 @@ nginx_main_template:
|
|||||||
worker_connections: 1024
|
worker_connections: 1024
|
||||||
http_enable: true
|
http_enable: true
|
||||||
http_settings:
|
http_settings:
|
||||||
|
default_type: application/octet-stream
|
||||||
access_log_format:
|
access_log_format:
|
||||||
- name: main
|
- name: main
|
||||||
format: |-
|
format: |-
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
worker_connections: 1024
|
worker_connections: 1024
|
||||||
http_enable: true
|
http_enable: true
|
||||||
http_settings:
|
http_settings:
|
||||||
|
default_type: application/octet-stream
|
||||||
access_log_format:
|
access_log_format:
|
||||||
- name: main
|
- name: main
|
||||||
format: |
|
format: |
|
||||||
|
@ -60,7 +60,9 @@ events {
|
|||||||
{% if nginx_main_template.http_enable %}
|
{% if nginx_main_template.http_enable %}
|
||||||
http {
|
http {
|
||||||
include /etc/nginx/mime.types;
|
include /etc/nginx/mime.types;
|
||||||
default_type application/octet-stream;
|
{% if nginx_main_template.http_settings.default_type is defined and nginx_main_template.http_settings.default_type %}
|
||||||
|
default_type {{ nginx_main_template.http_settings.default_type }};
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% for access_log in nginx_main_template.http_settings.access_log_format %}
|
{% for access_log in nginx_main_template.http_settings.access_log_format %}
|
||||||
log_format {{ access_log.name }} {{ access_log.format }};
|
log_format {{ access_log.name }} {{ access_log.format }};
|
||||||
|
Loading…
Reference in New Issue
Block a user