2

I've been through the AWS docs and pretty much every stackoverflow answer on this topic and they all pretty much say the same thing. To configure NGINX for a Java Elastic Beanstalk app you create a folder called .platform in the root of your repository that looks like this:

.platform/
--| nginx/
----| conf.d/
------ my_custom_config.conf

And Elastic Beanstalk will put those files in /etc/nginx/conf.d.

However, I'm trying this and it's not doing anything. I just see 00_application.conf and healthd.conf in that folder.

I've also tried using .ebextensions as opposed to .platform even though I knew that wouldn't work because I'm running Amazon Linux 2.

I tried making it look like this as well:

.platform/
--| nginx/
----| conf.d/
------| elasticbeanstalk
-------- my_custom_config.conf

This didn't work either.

It occured to me that I was specifying my JAR file in build/libs as opposed to having the JAR file build to the root of my repo, so I tried copying the JAR file to the root and changing the .elasticbeanstalk/config.yml to point there instead, but this also did nothing.

At this point I'm out of ideas.

Platform is Corretto 11 running on 64bit Amazon Linux 2/3.2.6.

1 Answer 1

1

Ultimately this just goes to show that sometimes you need to step away from the computer to actually figure something out.

In my CI, when I originally switched to using .platform from .ebextensions, I forgot to change that reference everywhere in the script. I was passing .ebextensions to zip even though the folder didn't exist, as opposed to .platform.

Sign up to request clarification or add additional context in comments.

1 Comment

You save my day, same problem :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.