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.

asked a year ago2138 views
1 Answer
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
EXPERT
answered a year ago
  • 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?

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions