Fix “The requested URL was not found on this server.” on Apache2

I was trying to use the routes that I have configured in Laravel but Apache always respond me with “The requested URL was not found on this server.” Even when I have the proper .htaccess

To fix this “problem” just enable the rewrite module and allow the override configurations, to do so run the following command

sudo a2enmod rewrite

And update the /etc/apache2/apache2.conf under the directory that contains your application files

<Directory "/var/www/">
 Options Indexes FollowSymLinks
 AllowOverride All
 Require all granted
</Directory>

Make sure that AllowOverride All it’s there and restart Apache.

sudo service apache2 restart

That should fix the problem, also check that the Apache user, by default www-data has access to the files and directories that you are using

Advertisements

One thought on “Fix “The requested URL was not found on this server.” on Apache2

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s