Error 403 Forbidden ( P.S I searched all topics and tried them all )
-
2017/12/07 06:50:36 [error] 6704#7024: *107 directory index of "C:/laragon/www/oto/public/panel/" is forbidden, client: 127.0.0.1, server: oto.dev, request: "GET /panel/ HTTP/1.1", host: "oto.dev"
I took it from error.log from nginx. Its laravel project. I can connect home or login but not that one. I don't understand and dont know what to do. I tried lots of things and checked all 403 errors. Nothing happened. Please let me know. If you have any idea.
-
@erenergul :
Please check your Laravel's routes. Also, the error means there is noindex.php
inpanel
dir. Can you show me the content ofpanel
dir?
-
server {
listen 80;
server_name oto.dev *.oto.dev;
root "C:/laragon/www/oto/public/";index index.html index.htm index.php; location / { try_files $uri $uri/ /index.php$is_args$args; } location ~ \.php$ { include snippets/fastcgi-php.conf; fastcgi_pass php_upstream; #fastcgi_pass unix:/run/php/php7.0-fpm.sock; } charset utf-8; location = /favicon.ico { access_log off; log_not_found off; } location = /robots.txt { access_log off; log_not_found off; } location ~ /\.ht { deny all; }
}
And I also tried -> allow all; but didn't work.
-
Add
autoindex on;
tolocation
directive:location / { try_files $uri $uri/ /index.php$is_args$args; autoindex on; }
-
No It didn't work. Still same. I can see other pages but I can't see admin panel.
-
Please help me its really annoying.
I remove all data from laragon and install fresh laragon. And then I changed director name because I couldn't fix it. Now I changed panel -> admin but after few days. I have got same error again and again..
[Sun Dec 10 07:05:41.300000 2017] [autoindex:error] [pid 8172:tid 916] [client 127.0.0.1:53024] AH01276: Cannot serve directory C:/laragon/www/oto/public/admin/: No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive
I dont want to move my project another folder again. Why is this happen to me ?
-
Hi @erenergul : I don't think the issue is related to Laragon but your routes code. Do you have a github repo for it so I can check further?
-
Nope Its fresh laravel. I am sure. Its not about route but thanks anyway. I am just unlucky person as always. everything found me..
I deleted everything. Absolutely everything. Still when I click admin. It has to say. Page couldnt find etc. but it says forbidden..