Home » , » Solved - Routing laravel 5 nginx "not Found 404"

Solved - Routing laravel 5 nginx "not Found 404"

Posted by E-Learning on Saturday, January 30, 2016

This simple problem,maybe :p
if you get error in laravel 5 with web server is nginx and using php version 5. That error is " Not Found 404 ", i get this error when implement of routing.

route.php

Route::get('/halo',function(){
return 'Hallo laravel';

});
Route::get('/', function(){
return "Halo, bro";
});

this view browser :

laravel error

so i change configuration nginx in /etc/nginx/nginx.conf.
like this :

location /larablog{
alias /usr/share/nginx/html/larablog/;
index index.php;
try_files $uri $uri/ /larablog/public/index.php;
}

#Comment out:
# try_files $uri $uri/ =404;

Solved


Hosting Unlimited Indonesia

0 comments:

Donate Bitcoin :
19QsXRcfUEKW9AVbGkJFB6WJPvn6uRboNr