How to Set AllowOverride all

AllowOverride directive is used to allow the use of .htaccess within the web server to allow overriding of the Apache config on a per directory basis.

To allow it for apache on Ubuntu, edit the file /etc/apache2/apache2.conf. An example has been given below:

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

Once you have changed the file as given above, restart the apache server by running the command below:

sudo service apache2 restart

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: