Skip to content
This repository has been archived by the owner on Oct 19, 2023. It is now read-only.

Setting nginx configuration "client_max_body_size" results in error #456

Open
FaHuSchmidt opened this issue Jul 25, 2018 · 3 comments
Open

Comments

@FaHuSchmidt
Copy link

I have to increase the "client_max_body_size" of nginx, so i added a "nginx-http.conf" to my root dir with one line:

client_max_body_size 200m;

But this prevents nginx from starting, with the following message:
"nginx: [emerg] "client_max_body_size" directive is duplicate in /etc/nginx/conf.d/nginx-http.conf:1

The configuration is already set at

client_max_body_size 32m;

Maybe this directive could be moved to the default "nginx-http.conf" to make it overwritable.

@tmatsuo
Copy link
Contributor

tmatsuo commented Jul 25, 2018

@FaHuSchmidt
I'm ok moving it to the default "nginx-http.conf". @chingor13 WDYT? In the meantime, you can have the whole nginx.conf.

@chingor13
Copy link
Member

It's possible it might break users that are already providing their own nginx-http.conf file without that entry?

@tmatsuo
Copy link
Contributor

tmatsuo commented Jul 25, 2018

The default value for client_max_body_size is 1m, so yeah it will break. One option is to add client_max_body_size 32m; to user-provided nginx-http.conf if it doesn't have it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants