From c266ef9a0710d3930669fd7cb246ee662dc54c28 Mon Sep 17 00:00:00 2001 From: ProCycleDev <18075290+ProCycleDev@users.noreply.github.com> Date: Wed, 8 Apr 2020 13:10:56 -0700 Subject: [PATCH 1/3] Add setting to nginx configuration to allow larger file uploads Nginx defaults to only allow file uploads up to 1MB while synapse allows up to 10MB by default. Added a line to the nginx configuration to increase the limit with a note about how to use the setting and having a default value to match synapse's default. --- docs/reverse_proxy.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/reverse_proxy.md b/docs/reverse_proxy.md index af6d73927a4d..c7222f73b9fc 100644 --- a/docs/reverse_proxy.md +++ b/docs/reverse_proxy.md @@ -42,6 +42,9 @@ the reverse proxy and the homeserver. location /_matrix { proxy_pass http://localhost:8008; proxy_set_header X-Forwarded-For $remote_addr; + # Nginx by default only allows file uploads up to 1M in size + # Increase client_max_body_size to match max_upload_size defined in homeserver.yaml + client_max_body_size 10M; } } From c3acc7377e2a3940f2c0f53ac7cf57ab4eb503b4 Mon Sep 17 00:00:00 2001 From: ProCycleDev <18075290+ProCycleDev@users.noreply.github.com> Date: Wed, 8 Apr 2020 14:18:15 -0700 Subject: [PATCH 2/3] Add changelong entry for #7251 --- changelog.d/7251.doc | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/7251.doc diff --git a/changelog.d/7251.doc b/changelog.d/7251.doc new file mode 100644 index 000000000000..7bf2da30a839 --- /dev/null +++ b/changelog.d/7251.doc @@ -0,0 +1 @@ +Add setting to nginx reverse proxy configuration to allow larger file uploads. From d1d39a88a5fbb61387f8ef27834f6a98398cbf97 Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Mon, 13 Apr 2020 16:50:22 +0100 Subject: [PATCH 3/3] Update changelog entry --- changelog.d/7251.doc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.d/7251.doc b/changelog.d/7251.doc index 7bf2da30a839..596a28e65dad 100644 --- a/changelog.d/7251.doc +++ b/changelog.d/7251.doc @@ -1 +1 @@ -Add setting to nginx reverse proxy configuration to allow larger file uploads. +Modify suggested nginx reverse proxy configuration to match Synapse's default file upload size. Contributed by @ProCycleDev.