Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Magento: Your web server is configured incorrectly

From a live magento setup I made a tar.gz, moved that to an domains of another DirectAdmin user, extracted the tar.gz, copied the database, changed the URL of domain in the database. Front-end works good.

Backend gives me the following error:

Your web server is configured incorrectly. As a result, configuration files with sensitive information are accessible from the outside. Please contact your hosting provider.”

I already check the folder and file permission. Also tried to change the rights from the user:group settings with SSH access to the same user as the DirectAdmin user name. But that did not work either.

Note that this installation is on the same server as the live environment.

Live: (working) http://imageshack.us/photo/my-images/197/nrhj.png/
Test: (not working) http://imageshack.us/photo/my-images/542/uklz.png/

like image 506
user2576151 Avatar asked Jul 12 '13 11:07

user2576151


2 Answers

Specifically check the permissions on app/etc/local.xml as usually this means it is world readable.

Also, there is supposed to be a .htaccess file in app/etc/ that denies the contents from being served out by the web server. Check just in case your tar backup didn't include it. Usually this problem comes about from using an FTP client to do the transfer that has had hidden file visibility turned off.

like image 120
Fiasco Labs Avatar answered Oct 12 '22 02:10

Fiasco Labs


For Apache 2.4.x you have to add Require all granted So it would look something like this:

<Directory /var/www/magento>
  AllowOverride All
  # New directive needed in Apache 2.4.3: 
  Require all granted
</Directory>

Source: Apache: client denied by server configuration

like image 25
John Veldboom Avatar answered Oct 12 '22 00:10

John Veldboom