so i was trying to deploy Laravel web application on AWS elastic beanstalk, although it appeared to be easy it wasn't. some obstacles were hidden o...
For further actions, you may consider blocking this person and/or reporting abuse
If you are using git for the laravel code, you might want to use elastic beanstalk cli tools. Then you can deploy the changes immediately with
eb deploy
command.Actually i did that after deployment 😅
I have the same problem
I was able to fix it. This is what I did.
cd /etc/nginx/conf.d/elasticbeanstalk - Navigate to the php.conf file
sudo nano php.conf - open the file
location / {
try_files $uri $uri/ /index.php?$query_string;
gzip_static on;
}
Insert the following after index and before location, then save and restart.
There has been a change in Elastic beanstalk. It is now configured to nginx instead of apache so the .htaccess file no longer works. All laravel routes are getting 404 Not Found Nginx error except for the landing page.
Thank you for your answer but it didn't work...
😯😯... how about this? morioh.com/p/d676c8f9ab31
or
stackoverflow.com/questions/616407...
Tried both but didn't work :/
Anyway, I created a brand new Laravel app and pulled a repo on it called rennokki/laravel-aws-eb and I was able to deploy without any problem. There might be something wrong in my app, not in the deployment process itself. Since it's still a small app I think that I'll recreate it...
Thanks for trying to help!
nice :)
Sorry but this is so wrong.
You should never "log in" and install anything on an ec2 instance that is built by Elastic Beanstalk.
The configuration of your elastic beanstalk environment should be done using the .ebextensions and .platform directories. Look it up.
Otherwise, the moment you do an update or scale out and EB build a new instance, you have to log in and do it all over again.
You can also set all your settings as environment variables in the elastic beanstalk config.
Please let me know if you are able to fix this. I also have the same problem. thanks :)
i am facing this issue when running php artisan migrate:
SQLSTATE[HY000] [2002] Connection timed out (SQL: select * from information_schema.tables where table_schema = ebdb and
table_name = migrations and table_type = 'BASE TABLE')
please help anyone
Awesome guide man!
though, whats so special about Elastic Beanstalk anyways?
It connects all the services in one place..think about it as the boiler plate
If you have more than one instance you will need a centralized cache, and not running separately on each instance as they will become out of sync === different content on different instances.
Thanks, man your explanation solved my problem.