Elgg cannot connect to itself to test rewrite rules properly.

after reboot I am getting the below error

Elgg cannot connect to itself to test rewrite rules properly. Check that curl is working and there are no IP restrictions preventing localhost connections.

I didn't make any changes, just rebooted. 

Most of the articles point to enabling AllowOverRide to All and I have done that

my Elgg.conf - /etc/apache2/sites-available/elgg.conf

<VirtualHost *:80>

ServerAdmin admin@domain.com

DocumentRoot /var/www/html/elgg/

ServerName domain.com

 

<Directory /var/www/html/elgg/>

Options FollowSymLinks

AllowOverRide All

 

 

</Directory>

ErrorLog /var/log/apache2/elgg-error_log

CustomLog /var/log/apache2/elgg-access_log common

 

</VirtualHost>

 

 

Anyone have any ideas?

  • The AllowOverride option can't be set in .htaccess. It has to be configured in the Apache config. The AllowOverride setting allows to set directory specific permissions to set certain options in the .htaccess files in these directories. It would be rather contradiction if you would be able to circumvent these permissions by setting AllowOverride directly in .htaccess. In your case you would possibly add in /etc/apache2/sites-available/elgg.conf

    <Directory "/path/to/elgg/installation">
       AllowOverride All
    </Directory>

    between <VirtualHost *:80> and </VirtualHost> (adjusting the path accordingly).

    Maybe this is not the real problem on your server though. First question is if the mod_rewrite Apache module is installed on your server and if it's enabled. If this is not the case the rewrite rules won't work (and testing them neither).

    If you want to install Elgg into a subdirectory, you most likely also have to adjust the RewriteBase value in Elgg's .htaccess file accordingly (there's a comment in the file that explain what to do).

  • Hello iikonly - thank you for your recommendation. I have looked at my /etc/apache2/sites-available/elgg.conf and I see the AllowOverride All comment. below is what I have 

     <Directory /var/www/html/elgg/>

            Options +FollowSymlinks

            AllowOverride All

            Require all granted

         </Directory

    Also I have confirmed mod_rewrite is enabled and already running. 

    Any further ideas?

  • Actually it seems to be specific to just my Mac and iPhone, the site works perfectly on my Windows PC :0 so I assume its something with Safari 

  • Not sure what's going on for you. The virtual server config is a server-side configuration. It either works or not and it shouldn't matter which OS is used on client side to access the Elgg site. Also, the rewrite check is also done during the installation of the Elgg site. Once the installation is finished the error shouldn't occur anymore at all as the test is no longer performed when accessing the Elgg site (as you wouldn't try to run the install.php script).