0

I want to add max-upload-size.conf file to /etc/nginx/conf.d directory in elastic beanstalk but it was not working.

My environment is Java 8 running on 64bit Amazon Linux/2.11.3

All ways below are not copied my config file.

  1. .platform/nginx/conf.d/max-upload-size.conf

enter image description here

client_max_body_size 50M;
  1. .ebextensions/nginx/conf.d/max-upload-size.conf

enter image description here

client_max_body_size 50M;

I followed the processes below

  1. check documentation.
  2. create max-upload-size.conf
  3. ./gradlew clean & ./gradlew bootJar
  4. eb deploy
  5. eb ssh and check nginx directory (/etc/nginx/conf.d)

I already checked https://stackoverflow.com/a/63626941/7770508 and https://stackoverflow.com/a/51888100/7770508. Is there really no way to extend it?

TylerH
  • 20,799
  • 66
  • 75
  • 101
Lanon
  • 259
  • 3
  • 15
  • Do you want to copy your custom `nginx.conf`? – majurageerthan Feb 02 '21 at 06:32
  • @majurageerthan No, I want to extend Elastic Beanstalk's default nginx configuration, partially, not completely. – Lanon Feb 02 '21 at 20:18
  • great, I also wanted your same requirements for my nginx node.js, but the none of the things in the internet works, I found another approach to solve this problem by replacing current configs, If you want i can post that as answer, It may be the last approach... – majurageerthan Feb 03 '21 at 03:00

1 Answers1

1

Your platform 64bit Amazon Linux/2.11.3 is Amazon Linux 1 (AL1), not AL2. From your post its not clear if you checked offcial AWS documentation for nginx in Java for AL1. So the example on how to setup nginx for AL1 for Java is in:

with full config file on github.

Marcin
  • 215,873
  • 14
  • 235
  • 294
  • Thank you for answer. I check the docs but it is the way I tried already.. :( – Lanon Feb 02 '21 at 00:39
  • 1
    @Lanon It would be better if you updated the question and describe exactly what you tried, how you tried (exact config files used), what errors did you get. Otherwise its only a speculation regarding what exactly are these "ways" in "using many ways". – Marcin Feb 02 '21 at 00:49
  • @Lanon Your nginx in `.ebextetions` is incorrect. Please check github link i provided. – Marcin Feb 02 '21 at 22:52