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
gefragt vor einem Jahr691 Aufrufe
1 Antwort
0
Akzeptierte Antwort

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
beantwortet vor einem Jahr
  • Which permission are talking about? I didn't see any article with the steps.

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen