Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

pankajtakale15's avatar

How to deploye laravel api at AWS EC2 Instance?

I have developed rest api using laravel and calling them from Angular 4. Its all working fine on local system as I'm running laravel using "php artisan serve". But when i host it on AWS EC2 Instance as by the same way and when I call api then it gives me 404 error.

I have put all the code in /var/www/html and accessed it like http://domain/api/report but still gives me 404. But when I access public folder like http://domain/public/index.php its working fine.

Please help me with that.

Thank you!

0 likes
1 reply

Please or to participate in this conversation.