2014-07-09 57 views
1

我正在使用Magento 1.8。在管理员中,我收到此警告Magento中的配置警告

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

我试图解决它,但无法做到这一点。 如果有人知道这一点,请帮助我。

谢谢!

+2

我已经回答了,但尝试张贴 – domokun

+0

之前搜索堆栈溢出虽然你可以通过'http:// your.web /应用程序的/ etc/local.xml'你会看到这个通知。目录'app'必须包含文件'.htaccess',否则不能访问这个目录,或者如果你使用nginx,你应该使用下一个建议[magento nginx](http://www.magentocommerce.com/wiki/1_-_installation_and_configuration/configuring_nginx_for_magento) – Aleksandr

+0

[Magento Apache配置]可能的重复(http://stackoverflow.com/questions/11492039/magento-apache-configuration) –

回答

6

当用户惨败实验室指出:

Magento的使用.htaccess文件在不同的目录拒绝访问的目录树。你会在应用程序,媒体,var和Magento认为合适的地方找到它们。他们做各种事情,如拒绝查看(应用程序,变种),执行(媒体.htaccess)。要使这些.htaccess文件起作用,在doc根.htaccess或虚拟服务器配置中设置以下内容非常重要。

Options FollowSymLinks 
AllowOverride All 

更可能的,Magento的检测到的应用程序目录的.htaccess文件没有被允许拒绝您的应用程序的/ etc/local.xml文件,网络接入,让你所有的数据库凭据和加密密钥是可见给任何使用网络浏览器的人。

整个答案请参阅本:Magento Apache configuration (app/etc/local.xml accessible warning)

+0

尝试几乎所有其他解决方案后,我都可以在网上找到 - 这一个工作。谢谢。这应该被标记为答案。 –

+0

您绝对正确,先生。但是,我建议只让.htaccess文件覆盖他们需要的内容,如[示例配置](https://gist.github.com/enderandpeter/cdab20bd5683383d1ee1)所示。 –