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.

gefragt vor einem Jahr2237 Aufrufe
1 Antwort
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
EXPERTE
beantwortet vor einem Jahr
  • 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?

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen