how to solve 'Test for .htaccess rewrites failed'?

I have been trying to install Sugar Enterprise 7.9x on an Ubuntu 14.04 LTS approximately 10 times using a new VM each and so far i have only been able to make it work 1/10. 'Luckily' for me that single time that it worked i was documenting it as i was doing the installation but at the end when i try to replicate my documentation i can't get pass through the .htaccess rewrite failed. Maybe i missed a step on my documentation.

Installed apache, php and all the required modules, including JSMin 1.1.0

After the installation i've enabled the modules that aren't enabled by default like mcrypt, jsmin, imap, etc, also, i've modified php.ini according to installation guide (i validate all this w/ phpinfo)

enabled apache modules rewrite, headers and expires

modified apache2.conf AllowOverride from None to All under directory /var/www, i even went and added a new directory to include /var/www/html with the same configuration as the previous one on some of my tests.

changed the owner of the folder and everything inside it to the apache user 'www-data'

changed permissions to all the files and folders per installation documentation

I even tested rewrite mod creating a test .htaccess and it does work therefore the rewriting is working

checked the hosts file as recommended in some questions here with no success either

I'm on a virtual machine (Ubuntu 16) and I was using a private host in my /etc/hosts. Upon adding mycustom.host.com to the "127.0.0.1" entry and restarting my virtual machine I was able to pass this check for .htaccess.