magento server configured incorrectly配置错误解决笔记

作者:Jeen 发布于:2013-4-21 20:05 Sunday 分类:工作笔记

环境 Apache 2.2.15  mysql5.5.15  php 5.3.2  magento 1.6.0.0

安装完成后登录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.

网上搜索一番后,大概就是跟app/etc/local.xml 的访问权限有关

浏览器中输入  http://site url/app/etc/local.xml 发现确实可以直接访问,这样magento的重要数据信息就直接曝露了,问题后果很严重…

考虑修改 app/etc/  目录权限,但是会导致整站无法正常访问,检查 app 目录下的 .htaccess 文件   发现 Deny from all   但是为什么没有起作用呢。

再查 发现是跟 Apache 配置有关
Alias /mag16 “/data/www/mag16″

<Directory “/data/www/mag16″>
Order allow,deny
Allow from all
</Directory>

向Directory中添加
AllowOverride All

后  保存配置, service httpd restart

刷新后台,警告不再出现!
url访问  app/etc/local.xml   提示 403错误
You don’t have permission to access /mag16/app/etc/local.xml on this server

问题解决,记此以作备忘 :-)

标签: magento

发表评论:

©2010-2024 Jeen All Rights Reserved.Powered by emlog 京ICP备15058100号-1