在linux(以UBUNTU, CENTOS为例)下安装完成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.
根据这种提示可以知道是由于服务器的配置文件有问题, 经过查看资料可以发现, 出现这种问题的原因如下:
<Files> sections are processed in the order they appear in the configuration file, after the <Directory> sections and .htaccess files are read, but before <Location> sections. Note that <Files> can be nested inside <Directory> sections to restrict the portion of the filesystem they apply to.
简单地说, <Files>的优先级排在<Directory>和.htaccess之后, 而在<Location>之前;
具体的解决方案如下:
在centos下, 找到如下的路径: /etc/httpd/conf/httpd.conf //注: 此为编译安装模式下, 如果是一键安装版本的, 可以找到对应的配置文件然后修改
找到<Directory "/var/www/html"> //这个是网站对应的根目录.
修改AllowOverride None 为 AllowOverride All
保存, 然后重启apache服务器:
service httpd restart
生效即可;
在UBUNTU下, 找到如下的路径: /etc/apache2/sites-available/default, 也要注意检查更新 /etc/apache2/sites-enabled/default确保相关内容更新
找到<Directory "/var/www/html"> //这个是网站对应的根目录.
修改AllowOverride None 为 AllowOverride All ////这个是网站对应的根目录.
保存, 然后重启apache服务器:
service apache2 restart
至此,
Your web server is configured incorrectly. As a result, configuration files with sensitive information are accessible from the outside. Please contact your hosting provider.
这个问题解决. 该文章的解决方案借签这篇文章: http://blog.****.net/xinhaozheng/article/details/6311482
source: http://www.cnblogs.com/wwufengg/p/web-server-is-configured-incorrectly.html