This should still work the same... Are you sure you didn't change anything in your nginx config?
Sep 30, 2019
3
Level 1
Laravel 6.0 render nginx 404 error
Upgraded my app from 5.8 to 6.0.4. The nginx config is the same:
location / {
........
try_files $uri $uri/ /index.php$is_args$args;
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include /etc/nginx/fastcgi_params;
..........
fastcgi_pass unix:/run/php/php7.3-fpm.sock;
}
wep.php config:
.....
some app routes
.....
Route::get('/{page}',[
'uses' => 'PageController@getPage',
'as' => 'page'
]);
Route::fallback('PageController@fallback');
On laravel 5.8 if the route does not exist, I get 404 error rendered by laravel.
On laravel 6.0 I get nginx 404 error.
Is it the problem with laravel routing or do I need to change something in nginx config?
Please or to participate in this conversation.