7 months ago

Laravel 6.0 render nginx 404 error

Posted 7 months ago by Timbertlt

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
    'uses'  => '[email protected]',
    'as'    => 'page'

Route::fallback('[email protected]');

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 sign in or create an account to participate in this conversation.