host a php web app on aws amplify

0

I'm trying to build a laravel web app on aws amplify. I've configured an ECR with php, nodejs, npm, composer etc to handle laravel. I then use this image to build an aws amplify app. Although it deploys successfully it does not load php pages.

I can tell .htaccess is an issue because aws amplify doesn't appear to use it. Is there a way to convert .htaccess to amplify redirects/custom headers?

Is it even possible to run a laravel app on amplify?

Loading mysite.amplify.com/index.php only downloads the index.php file rather than loading.

질문됨 일 년 전2232회 조회
1개 답변
0

Hi,

Thought I never tried as it differs from typical supported flows (React, Angular, etc..) you can try advanced workflows: https://docs.amplify.aws/cli/usage/containers/#getting-started, which integrates Amplify with NodeJs-dockerized apps deployed in ECS Fargate.

Hope it helps

profile picture
전문가
답변함 일 년 전
  • this is what i've done. I've created a Dockerfile that installs php, httpd, npm, and all the necessary packages for laravel. I then use this as an ECR image to build on amplify. But it does not load php.

  • Does your container work locally?

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠