Skip to content
This repository was archived by the owner on Oct 19, 2023. It is now read-only.
This repository was 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

Description

@FaHuSchmidt

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.

Activity

  1. tmatsuo commented on Jul 25, 2018

    @tmatsuo
    Contributor

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

  2. chingor13 commented on Jul 25, 2018

    @chingor13
    Member

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

  3. tmatsuo commented on Jul 25, 2018

    @tmatsuo
    Contributor

    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 join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions