2

My project works fine in local. When I upload it to my Debian 8 server, I face an error like:

Forbidden

You don't have permission to access / on this server.

I searched about my issue and find out two questions, Laravel - Forbidden You don't have permission to access / on this server and Error message "Forbidden You don't have permission to access / on this server". I tested every solution that they suggested as answers but, not worked in my case.

Here is a list of what I did:

  • Testing many permissions for project folder such as 777, 775 or 755 by this command: chmod -R 777 /path/to/my/project/
  • Adding a new .htaccess to the project root and putting this codes in it:

    <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{REQUEST_URI} !^public RewriteRule ^(.*)$ public/$1 [L] </IfModule>

  • Change server.php to index.php and move /public/.htaccess to root of the project.

Is there any solution?!

Behnam Azimi
  • 2,260
  • 3
  • 34
  • 52

0 Answers0