AWS Elasticbeanstalk .ebextensions not deploying to /etc/httpd

In deploying a new app to EB, I found that the .ebextensions files that concern httpd are not being deployed to /etc.

The files as such are the same as the ones from another app, like this one:


    mode: "000644"
    owner: webapp
    group: webapp
    content: |
        SetEnvIf Origin "^https?://localhost:[0-9]+.*|https?://[:[0-9]+]?|" REQUEST_ORIGIN=$0
        Header always add Access-Control-Allow-Origin %{REQUEST_ORIGIN}e env=REQUEST_ORIGIN
        Header add Access-Control-Allow-Headers "content-type, authorization"
        Header add Access-Control-Allow-Methods "GET, OPTIONS, POST, PUT, PATCH, DELETE"
        Header add Access-Control-Max-Age "86400"

Otherwise are identical to the ones provided by AWS in this depository

Note that I do have a file that is correctly deployed to /etc/php.d, so it would seem that the .ebextensions deployment overall is working.

The issue seems to be related to Apache. When configuring the environment I did notice a new selection to be made between Apache and Nginx. I did select Apache.

I am a bit out of ideas at this stage.

Source: Ask PHP