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.

已提問 1 年前檢視次數 2225 次
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
專家
已回答 1 年前
  • 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?

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南