Laravel deploying 403 Access Forbideen - laravel

I'm trying to deploy my laravel 8 project in my hosting.
After I publich whole files of the projct, I got the 403 Access Forbidden.
My websites on the server work perfectly, but this project I don't know what's is the problem.
And I'm sure that the problem in the project files not in the server.
This is the website: [Sheeks] (http://manage-sheek.manarat-free.com/)

If all of your configurations at server is correct then it's because of cached data. Run commands:
php artisan config:cache
php artisan route:cache

Related

Class '\App\User' not found after updating laravel 7 to 8.47

I have tried everything I found regarding this issue... I am still getting that error
"Class '\App\User' not found" in
Illuminate\Auth\EloquentUserProvider::createModel
vendor/laravel/framework/src/Illuminate/Auth/EloquentUserProvider.php:183.
The web project was initially developed in Laravel 7. So I uploaded both composer.json and composer.lock on the web server and upgraded to Laravel 8 with composer install.
I then sync the following folders from local to web :
app, public, resources, routes & vendor.
Finally I run the following commands :
php artisan cache:clear,
php artisan config:clear &
php artisan config:cache.
I get the error after login in on my web project. On the local project it works 100%, with all the table controllers in App/Models including App/Models/User and properly referenced in all the files using it.
I don't know what else I can do... and I need this project www.fairtradetourism.org running by the end of this day. Please help...

How To Upload Laravel with vuejs To Shared Hosting

I upload my laravel project in Host domain i work with laravel and vuejs, any easy way to deploy it?
Just follow the following steps to deploy your Laravel and vue.js application to a shared hosting.
generate your product vue build using npm run prod
upload all the changes and project to a git repository.
clone your git repository to your shared hosting, mainly via integrated terminal in some shared hosting or via ssh key access.
redirect your domain or subdomain directory to /public folder.
run composer install
run cp .env.example .env
setup .env files according to database configuration and emails etc.
run php artisan migrate
run php artisan key:generate
run php artisan storage:link if you want media uploading to your server.

From Local to Live, which files to edit - Laravel

strangely I have never programmed locally, I am a beginner but unfortunately I have always created my little scripts directly live. I am using Laravel with Xampp, but now I would like to put my script online.
My question is, what files do I need to edit to make it effective online? At the moment I edit the .env file locally to connect to the database, but is it the same even if I put it online?
Thanks
Here you can find some basic information: https://laravel.com/docs/7.x/installation and https://laravel.com/docs/7.x/deployment
In general, to have a site in production (Laravel or not) it is better to manage your code with git (through Github, Gilab, etc.)
to have a clean version management (the alternative is to use Ftp trought Cpanel, ...).
If you are a beginner, you can go to https://forge.laravel.com/ which is a portal that greatly facilitates the production of a Laravel project.
Otherwise, a generic hosting is better that has the possibility to connect via ssh, in order to easily execute the commands
(composer install, php artisan, ...).
You can do many optimizations in production (I leave out the ones on the .env file you know):
When you do maintenance on the site it is always best to disable it first(status 503):
php artisan down
Upload the latest version of the code from the git repository:
git pull
Clean the item cache on the server:
php artisan cache:clear
Clean the route cache and recreate it (to do if there is no static code in web.php, but only references to code in the controller):
php artisan route:clear
php artisan route:cache
Clean and optimize the config file (reduces the number of files to be read from ten to one):
php artisan config:clear
php artisan config:cache
Clean up expired passwords and reset tokens (clean up tokens when a user requests a password reset):
php artisan auth:clear-resets
Recreate the framework classes or update the application:
composer dump-autoload or composer install
Activate the site:
php artisan up

Api auth middleware is not working on serve but working in local

Api auth middleware is not working on serve
I have an exactly same problem. Please help me.
Did you run php artisan passport:install on server? Do you have valid oauth keys in storage folder on server??
if not then run the command on server by using ssh or any other accessible server terminal:
php artisan passport:install

bluehost error : domain.com is currently unable to handle this request. HTTP ERROR 500

I have uploaded my laravel project successfully in my Namecheap cPanel and the website is showing without any error but while uploading in bluehost cPanel and run that website into browser it shows error
domain.com is currently unable to handle this request.
HTTP ERROR 500
though I have followed same steps for uplaod my project in bluehost cPanel as I upload in Namecheap cPanel.
I have check the folder permission also. It is 755
Do the basic:
check if you included .env file in your app
clear chache: php artisan config:cache
clear routes: php artisan route:cache
generate app key: php artisan key:generate

Resources