"Test for .htaccess rewrites failed. This usually means you do not have AllowOverride set up for Sugar directory." error during installation

Hi,

I am setting up a new environment on a fresh Ubuntu install.
I copied the installation files for Sugar 7.2 Enterprise and I started the installation process.

During the check I get this message

Test for .htaccess rewrites failed. This usually means you do not have AllowOverride set up for Sugar directory.

I ensured that the mod_rewrite was active, I added the lines 


<Directory /var/www/>

        AllowOverride All

</Directory>

<Directory /var/www/sugar/>

        AllowOverride All

</Directory>



to the /etc/apache2/apache2.conf



and the 

<Directory /var/www/>

                Options Indexes FollowSymLinks MultiViews

                AllowOverride All

                Order allow,deny

                allow from all

</Directory>

<Directory /var/www/sugar/>

                Options Indexes FollowSymLinks MultiViews

                AllowOverride All

                Order allow,deny

                allow from all

</Directory>



To /etc/apache2/sites-available/default



But I still get the error message. I have been through several installations, but I've never seen anything like this before.

What is there left to check?
  • I had a false positive on my first install due to my server requiring https.
    installSystemCheck.php was checking the itest.txt file via http and my server didn't like that.

    in <sugarroot>/install/installSystemCheck.php
    just after line 364, before line:
    $res = file_get_contents($_SESSION['setup_site_url']."/itest.txt"); 

     I added a str_replace to change http: to https:

    This got me through the install

    $_SESSION['setup_site_url'] = str_replace("http:","https:",$_SESSION['setup_site_url']);


    HTH
    FrancescaS
  • Thanks for figuring this out! We have stumbled on this problem before. I will check out the solution.
  • This worked for me. I had not configured https in MAMP
  • My SugarCRM 7.5 Installation was on var/www/html
    I've encountered this and my fix was to update the 
    <Directory "/var/www/html">
                    Options Indexes FollowSymLinks
                    AllowOverride None
                    Order allow,deny
                    Allow From All
    </Directory>

    to

    <Directory "/var/www/html">
                    Options Indexes FollowSymLinks
                    AllowOverride All
                    Order allow,deny
                    Allow From All
    </Directory>


    I have CentOS 6.5 and this configuration can be located at /etc/httpd/conf/httpd.conf
    Francescas fix also works for me
  • Hi all, 
    I found the same issues and looking at the log I understood that were a problem of DNS. I used a private hostname in my apache virtual host and installation was unable to find dns public record. Adding related record to host file everything goes well.

  • Another thing that might cause that issue: your apache rewrite is not enable.

    In this case: # a2enmod rewrite && service apache2 restart
  • Hi,

    My SugarCRm url is localhost/live/test 

    and during installation I am getting same error. Pls help

  • Hi,

    I've tried all the suggested solutions. None works for me.

    I've followed the steps as described in this link https://support.sugarcrm.com/Resources/Environments/Development_Environments/Vagrant_Development_Environment/ to set up my local vagrant box. 

    Some technical clarification:

    I'm running on a MAC Machine

    Box Used sugarcrm/php71es56

    Any suggestions?

  • Hi mauroale mauroale,

    Did that too, I still have the same issue.

    Any other suggestion?

  • Maybe check file permissions?

    I run these as my panacea for permissions from sugar root on Unix (should work on Mac from console too) to make sure everything from root down has the right permissions:

     

    sudo chown -R  apache:apache *

    sudo find . -type d -exec chmod 775 {} \;

    sudo find . -type f -exec chmod 664 {} \;

1 2 3