SugarCRM 12.3.0 preview installation problem

I tried installing SugarCRM 12.3.0 through GUI after placing sugar files in the /var/www/html/ path. But it is throwing error such as AllowOverride setup for .htaccess Test for .htaccess rewrites failed. This usually means you do not have AllowOverride set up for Sugar directory. I tried below steps editing 000-default.conf file and apache2.conf.

  1. sudo vi /etc/apache2/sites-available/000-default.conf
    <Directory /var/www/>
         Options Indexes FollowSymLinks MultiViews
         AllowOverride All
         Order allow,deny
         allow from all
    </Directory>    <Directory /var/www/html/>
         Options Indexes FollowSymLinks MultiViews
         AllowOverride All
         Order allow,deny
         allow from all
     </Directory>2. sudo vi /etc/apache2/apache2.conf
<Directory /var/www/>
        AllowOverride All
</Directory><Directory /var/www/html/>
        AllowOverride All
</Directory>
Please let me know of any solution to proceed with the successful installation.