获取“规则禁止访问”;nginx server /app/etc/local.xml中magento错误


Getting "access forbidden by rule" error at magento in nginx server /app/etc/local.xml

我的网站是建立在magento-1.9.0.

2015/07/13 05:50:44 [error] 1371#0: *491517 access forbidden by rule, client: **.***.***.***, server: www.example.com, request: "POST /app/etc/local.xml HTTP/1.1", host: "www.example.com"

告诉你:IP地址永远是我自己的服务器。这只发生在我试图编辑或更新"购物车价格规则"的任何项目时。有购物车价格规则的magento bug,我已经使用了这里提到的扩展https://github.com/husseycoding/cartrulefix。这个扩展在我的本地环境中完美地工作,但是它也不能在现场工作。我猜这个错误是阻止扩展完美地工作。我的服务器运行在nginx上。

有人能帮帮我吗?

在这里找到我的解决方案https://magento.stackexchange.com/questions/74146/getting-access-forbidden-by-rule-error-at-magento-in-nginx-server-app-etc-loc?noredirect=1#comment98149_74146 .

总之,Magento试图通过HTTP访问app/etc/local.xml,但失败了,所以你得到了这个错误日志。关键是,它应该失败!否则所有人都能看到你的数据库凭据。