Search code examples
apache.htaccessubuntularavel-4routes

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


I have developed a laravel web application and running fine on live server, now I am trying to migrate that project to a local server,

I am using Ubuntu 14.04 with built-in php, apache, and MySQL.

When I pointed in a browser like a localhost/xxxxxxx/ (Login page) that worked finely, after entering values in the login form it showed the 404 Not Found error.

How can I solve this, anybody please help?


Solution

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