From 1a0de16a91a97178369ad4510c1f2061476cee0a Mon Sep 17 00:00:00 2001 From: Luke Murphy Date: Tue, 7 Apr 2020 09:31:09 +0200 Subject: [PATCH] Set Nginx tweaks according to Minio docs --- ansible/post-deploy.yml | 10 +++++++--- ansible/templates/headers.conf | 1 + ansible/templates/proxy.conf | 1 + ansible/templates/upload.conf | 1 + ansible/templates/upload.conf.j2 | 1 - ansible/vars/all.yml | 1 - 6 files changed, 10 insertions(+), 5 deletions(-) create mode 100644 ansible/templates/headers.conf create mode 100644 ansible/templates/proxy.conf create mode 100644 ansible/templates/upload.conf delete mode 100644 ansible/templates/upload.conf.j2 diff --git a/ansible/post-deploy.yml b/ansible/post-deploy.yml index 69cee8a..c74cc69 100644 --- a/ansible/post-deploy.yml +++ b/ansible/post-deploy.yml @@ -55,14 +55,18 @@ - name: Copy over the Nginx custom upload file template: - src: upload.conf.j2 - dest: /home/dokku/minio/nginx.conf.d/upload.conf + src: "{{ item }}" + dest: "/home/dokku/minio/nginx.conf.d/{{ item }}" owner: dokku group: dokku + with_items: + - upload.conf + - proxy.conf + - headers.conf become: true - name: Restart Nginx to set upload configuration become: true service: name: nginx - state: restarted + state: reloaded diff --git a/ansible/templates/headers.conf b/ansible/templates/headers.conf new file mode 100644 index 0000000..e0c93d3 --- /dev/null +++ b/ansible/templates/headers.conf @@ -0,0 +1 @@ +ignore_invalid_headers off; diff --git a/ansible/templates/proxy.conf b/ansible/templates/proxy.conf new file mode 100644 index 0000000..77e928a --- /dev/null +++ b/ansible/templates/proxy.conf @@ -0,0 +1 @@ +proxy_buffering off; diff --git a/ansible/templates/upload.conf b/ansible/templates/upload.conf new file mode 100644 index 0000000..8737ec1 --- /dev/null +++ b/ansible/templates/upload.conf @@ -0,0 +1 @@ +client_max_body_size 0; diff --git a/ansible/templates/upload.conf.j2 b/ansible/templates/upload.conf.j2 deleted file mode 100644 index 52c4a7e..0000000 --- a/ansible/templates/upload.conf.j2 +++ /dev/null @@ -1 +0,0 @@ -client_max_body_size {{ nginx_max_body_size }}; diff --git a/ansible/vars/all.yml b/ansible/vars/all.yml index e3cee94..d2c19cc 100644 --- a/ansible/vars/all.yml +++ b/ansible/vars/all.yml @@ -2,4 +2,3 @@ autonomic_admin_mail: "helo@autonomic.zone" domain: "minio.autonomic.zone" http_port: "9000" -nginx_max_body_size: "3000m"