Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Laravel returns 500 internal server and 404 on routes after deploying to Amazon EC2

I like to ask help on how to fix the 500 internal server and 404 when using laravel routes after deploying it to Amazon AWS.

enter image description here

I tried to clear the cache and restarting the apache2 but no luck.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Also I do change the permissions of the folders
enter image description here

I also change the 000-default.conf file
enter image description here

Until now, no luck on my side. Did I miss something or do I need change some configurations? Please let me know and Thanks in Advance!

>Solution :

The main reason is that composer is using your localhost configuration you’ve to reconfigure your laravelapp on your ec2 instance. Try these commands in order:

1. composer dump-autoload

2. PHP artisan config:cache

3. PHP artisan optimize

and then check your laravel application for your ec2 instance.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading