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年前2234ビュー
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?

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ