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
.htaccessto 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.phptoindex.phpand move/public/.htaccessto root of the project.
Is there any solution?!