How to customize NGINX configuration to modify the "client_max_body_size" in Elastic Beanstalk

0

I'm following the recommended steps:

  • Create the client_max_body_size.conf file with the desired configuration;
  • Allocate the file under the structure:
--- .platform
       -- nginx
           -- conf.d
                 -- client_max_body_size.conf

The file client_max_body_size.conf has a path like this: my-app/.platform/nginx/conf.d/client_max_body_size.conf.

  • Including the reference in the POM.xml file:
 <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-antrun-plugin</artifactId>
        <version>1.8</version>
        <executions>
          <execution>
            <id>prepare</id>
            <phase>package</phase>
            <configuration>
              <tasks>
                <copy todir="${project.build.directory}/${project.build.finalName}/"
                  overwrite="false">
                  <fileset dir="./" includes=".platform/**"/>
                  <fileset dir="${project.build.directory}" includes="*.jar"/>
                </copy>
                <zip destfile="${project.build.directory}/${project.build.finalName}.zip"
                  basedir="${project.build.directory}/${project.build.finalName}"/>
              </tasks>
            </configuration>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

But then checking nothing changed:

[ec2-user@ip-XXXXXXX /]$ sudo nginx -T | egrep -i "client_max_body_size"
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
1 Answer
0
Accepted Answer

Can you please refer to a similar issue faced by another user that has resolution? Please ensure that the platform directory has the right file with right permissions?

https://repost.aws/questions/QUuiSo8zUaQ9etlkDeJl5DTA/java-maven-deployed-in-elastic-bean-stalk-nginx-modification-not-working

AWS
Dhilip
answered a year ago
  • Which permission are talking about? I didn't see any article with the steps.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions