Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel Not loading inner pages in Ubuntu -- Not found with 404

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..

like image 842
Jishad Avatar asked Apr 04 '15 14:04

Jishad


People also ask

How do I fix error 404 in laravel?

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?

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.

What does 404 not found mean in laravel?

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 .

How do you fix the requested URL was not found on this server in laravel?

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.


1 Answers

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. !!!!!

like image 137
Jishad Avatar answered Sep 29 '22 05:09

Jishad