user9730609
user9730609

Reputation:

403 Forbidden Error while deploying a laravel website on shared hosting

I had a complete laravel project and I decided to deploy it. I bought a server and a domain and configured the server to be used by the domain. Then I compressed my local project and extracted it in a folder named explore in the root folder. I researched and copied the contents of public folder into a folder named explore in the public_html folder. Then, I changed the index.php's line saying: require __DIR__.'/../../explore/vendor/autoload.php'; and another line that says: $app = require_once __DIR__.'/../../explore/bootstrap/app.php'; as suggested by the blog posts which I found by searching How to deploy a laravel website on shared hosting. But I get an error saying

403 Forbidden Access to this resource on the server is denied!

So, what might be the problem and what should I do to make this website up and running? For a note, The permissions of the explore and public html folder are 0777 and 0750 respectively. I guess the problems might be due to folder permissions, so what should I do to solve me this problem?

Upvotes: 2

Views: 5379

Answers (2)

Mohammad_Hosseini
Mohammad_Hosseini

Reputation: 2599

Have you changed bootstrap/config/cache.php contents? You need to change this file content before you actually run your project. In this file, you need to change all project paths and urls.

Upvotes: 1

Yogesh Salvi
Yogesh Salvi

Reputation: 1212

I think you need to give read and execute permission to other, so give 0755 to public html folder, it might resolve your issue.

Upvotes: 0

Related Questions