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.