Debug School

rakesh kumar
rakesh kumar

Posted on • Updated on

Laravel 9 Route problem return 404 Page NOT FOUND

why-am-i-getting-an-error-404-when-i-run-this-code-in-laravel-9
laravel-9-create-custom-404-error-page-example
laravel-9-route-problem-return-404-not-found

Image description

Image description

Client error: `POST http://wizbrand.com/wz-influencer-ms/oauth/token` resulted in a `404 Not Found` response
Enter fullscreen mode Exit fullscreen mode

Image description

Image description

Image description

Solution1

Image description

In Laravel, a "404 Not Found" status code is typically returned when a user attempts to access a route or resource that doesn't exist.

Here is an example of how to create a custom 404 page in Laravel 9:

  1. Create a new blade template file in the resources/views directory called 404.blade.php.

  2. Inside this file, you can add your custom 404 page HTML and styling.

  3. In your app/Exceptions/Handler.php file, you can add the following method to handle and display the custom 404 page:

Image description

Solution2

in server side microservices login and register not there
Enter fullscreen mode Exit fullscreen mode

run this commands

php artisan ui bootstrap --auth
Enter fullscreen mode Exit fullscreen mode
composer  install
composer require laravel/passport
composer require laravel/ui
php artisan ui bootstrap --auth
Enter fullscreen mode Exit fullscreen mode

Image description

Image description

Solution3

in client side env microservices

Image description

Image description

==================================
Another problems

 Alias /wz-email-access-ms /opt/lampp/htdocs/wz-email-access-ms/public
         <Directory  "/opt/lampp/htdocs/wz-email-access-ms/public">
            Options Indexes FollowSymLinks
            AllowOverride All
            Allow from all
            Require all granted
        </Directory>
Enter fullscreen mode Exit fullscreen mode

Solution:

** check folder path**

 Alias /wz-email-access-ms /opt/lampp/htdocs/wizbrand/wz-email-access-ms/public
Enter fullscreen mode Exit fullscreen mode
 Alias /wz-email-access-ms /opt/lampp/htdocs/wizbrand/wz-email-access-ms/public
         <Directory  "/opt/lampp/htdocs/wizbrand/wz-email-access-ms/public">
            Options Indexes FollowSymLinks
            AllowOverride All
            Allow from all
            Require all granted
        </Directory>
Enter fullscreen mode Exit fullscreen mode

Top comments (0)