Skip to content

Commit ede4bfd

Browse files
Merge pull request #13601 from nextcloud/backport/13598/stable30
[stable30] fix(nginx): `fastcgi_request_buffering` must be `on`
2 parents 84f305e + 48e8a82 commit ede4bfd

File tree

3 files changed

+2
-8
lines changed

3 files changed

+2
-8
lines changed

admin_manual/configuration_files/big_file_upload_configuration.rst

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,6 @@ nginx
9292
* `fastcgi_read_timeout <https://nginx.org/en/docs/http/ngx_http_fastcgi_module.html#fastcgi_read_timeout>`_
9393
* `client_body_temp_path <https://nginx.org/en/docs/http/ngx_http_core_module.html#client_body_temp_path>`_
9494

95-
Since nginx 1.7.11 a new config option `fastcgi_request_buffering
96-
<https://nginx.org/en/docs/http/ngx_http_fastcgi_module.html#fastcgi_request_buffering>`_
97-
is available. Setting this option to ``fastcgi_request_buffering off;`` in your nginx config
98-
might help with timeouts during the upload. Furthermore it helps if you're running out of
99-
disc space on the tmp partition of your system.
100-
10195
.. note:: Make sure that ``client_body_temp_path`` points to a partition with
10296
adequate space for your upload file size, and on the same partition as
10397
the ``upload_tmp_dir`` or ``tempdirectory`` (see below). For optimal

admin_manual/installation/nginx-root.conf.sample

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ server {
159159
fastcgi_pass php-handler;
160160

161161
fastcgi_intercept_errors on;
162-
fastcgi_request_buffering off;
162+
fastcgi_request_buffering on; # Required as PHP-FPM does not support chunked transfer encoding and requires a valid ContentLength header.
163163

164164
fastcgi_max_temp_file_size 0;
165165
}

admin_manual/installation/nginx-subdir.conf.sample

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ server {
158158
fastcgi_pass php-handler;
159159

160160
fastcgi_intercept_errors on;
161-
fastcgi_request_buffering off;
161+
fastcgi_request_buffering on; # Required as PHP-FPM does not support chunked transfer encoding and requires a valid ContentLength header.
162162

163163
fastcgi_max_temp_file_size 0;
164164
}

0 commit comments

Comments
 (0)