I am developed a laravel web application and running fine in live server, now I am trying to migrate that project to local server,
I am using Ubuntu 14.04 with build in php, apache, and mysql.
When I pointed in browser like localhost/xxxxxxx/ (Login page) that working finely, after entering values in login form it showing the 404 Not Found error.
How can i solve this, any body please help..
It should be enough to just run php artisan vendor:publish --tag=laravel-errors and then edit the newly created resources/views/errors/404.
How do I fix 404 Not Found in laravel 9? It should be enough to just run php artisan vendor:publish –tag=laravel-errors and then edit the newly created resources/views/errors/404.
Error 404 is a client-side issue indicating the requested URL can't be found on the server. It may occur because of several reasons, such as the domain is not pointed correctly, a broken .
Best option is to set /laravel/public as your document root. If you can't do that for whatever reason, you'll need to add a . htaccess file in the laravel directory to rewrite all your requests to the public folder - see here for more info.
This issue due to htaccess.
run
sudo a2enmod rewrite
Also change this in apache2.conf file located at /etc/apache2
nano /etc/apache2/apache2.conf
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
Finally Restart Apache
sudo service apache2 restart
Working great. !!!!!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With