1
votes

I tried to follow this doc ( https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/java-se-nginx.html ) but couldn't build the custom nginx conf. I am able to deploy an application and environment and it works. After testing a working environment I wanted to modify some nginx configurations and I followed the steps as:

cd WS
mkdir -p .ebextensions/nginx/conf.d
cp ~/dozee.conf .ebextensions/nginx/conf.d
eb deploy

WS is a directory from where eb deploy works perfectly. After logging(ssh) into the instance created by eb environment I could see the dozee.conf present at /var/app/current/.ebextensions/nginx/conf.d/ but was not present at /etc/nginx/conf.d/.

What I might be missing here? Any help is appreciated :)

1

1 Answers

0
votes

The most likely problem is that your .ebextensions folder is not being included in your build. Can you post your buildspec.yml? To give you an idea what needs to happen, here is one of mine:

version: 0.2

phases:
  install:
    commands:
      - echo Entering install phase...
      - echo Nothing to do in the install phase...
  pre_build:
    commands:
       - echo Entering pre_build phase...
       - echo Running tests...
       - mvn test
  build:
    commands:
      - echo Entering build phase...
      - echo Build started on `date`
      - mvn package -Dmaven.test.skip=true
  post_build:
    commands:
      - echo Entering post_build phase...
      - echo Build completed on `date`
      - mv target/app.war app.war
artifacts:
  type: zip
  files:
    - app.war
    - .ebextensions/**/*