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
질문됨 일 년 전690회 조회
1개 답변
0
수락된 답변

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
답변함 일 년 전
  • Which permission are talking about? I didn't see any article with the steps.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠