Jump to content
MakeWebGames

Laravel


Shades

Recommended Posts

Hope all is well.

I just need the right guidance; I have a Laravel project that works on my offline environment. 

When I try deploying it on Almalinux 8 (Nginx). There is a lot of errors and there isn't much resource out there on how to fix the issues such as Server Error 500. 

Now I am thinking, maybe I need to use an easier Linux server that is compatible with Laravel. 

Anyone have any suggestions?

Link to comment
Share on other sites

Have you generated the application key? To check, check your .env file and confirm it's set at the top of the file. The constant is APP_KEY.

Outside of that, check server error logs - which I don't know the location of off-hand.

Link to comment
Share on other sites

Check Laravel first because logging to the file should be the default, I believe.

If nothing is there, then try Nginx logs.

Also, I just remembered storage permissions are sometimes wrong, which can be remedied with the following:

https://dev.to/alexandrefreire/fix-permissions-errors-from-laravel-2p1f

Not sure about your willingness or position to install external SaaS projects for logging errors etc, but at work, we use https://flareapp.io which we hook into a development slack channel, so we know about errors as they happen - that'd also cover these errors. However, at $9 a month, it's not free which some people prefer.

Edited by SRB
Duplicate merged post
Link to comment
Share on other sites

cd /code/laravel_project
php artisan cache:clear
php artisan config:clear
sudo service php8.0-fpm stop
sudo service nginx stop
sudo chown -R $USER:www-data storage
sudo chown -R $USER:www-data bootstrap/cache
chmod -R 775 storage
chmod -R 755 bootstrap/cache
sudo service php8.0-fpm start && sudo service nginx start (i don't know your php's package version )

 

Edited by rockwood
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...