0

I have a working setup of the codedeploy which deploys when I commit to my repository. Following is my appspec.yml configuration -

version: 0.0
os: linux
files:
  - source: /
    destination: /var/www/html/
permissions:
  - object: /var/www/html/rentals
    pattern: "**"
    owner: apache
    mode: 777
    type:
      - directory

Problem is though i have .htaccess file on git, Codedeploy ignoring this file.

Praveen Govind
  • 2,619
  • 2
  • 32
  • 45

1 Answers1

0

Depending on where your .htaccess file is located it may not be uploaded to the remote git repository and then the file will be missing when CodeDeploy deploys your application.

The accepted answer on the stack overflow question Make .git directory web inaccessible suggests placing a .htaccess file inside the .git directory and in this case the file won't get pushed to your remote repo (e.g. GitHub).

I'd check that the .htaccess file exists in the root directory of the repository and not the .git directory and then verify the file is getting pushed to the remote repository that CodeDeploy is configured to deploy from.