简体   繁体   English

Ubuntu 2上的Apache 2显示禁止在某些URL上使用403

[英]Apache 2 on Ubuntu shows 403 forbidden on certain urls

I have a Zend Framework application. 我有一个Zend Framework应用程序。 Almost all of my urls work fine. 我的所有网址几乎都可以正常工作。 However, any url that starts with /resources gives me a 403 forbidden error (eg: /resources/add, /resources/edit). 但是,任何以/ resources开头的网址都会给我一个403禁止的错误(例如:/ resources / add,/ resources / edit)。 The strange thing is, when I tested it on my Windows machine via XAMP, everything worked fine. 奇怪的是,当我通过XAMP在Windows计算机上对其进行测试时,一切正常。 Is there something special about urls starting with /resources that makes Apache2 think it should not allow access? 以/ resources开头的url是否有特殊之处,使Apache2认为它不应允许访问?

Your issue seems a permissions problem, nothing related to URLs. 您的问题似乎是权限问题,与URL无关。 Check directories to be 755 and files 644 in the Ubuntu server where you deployed your application. 在部署应用程序的Ubuntu服务器中,检查目录为755,文件为644。

Run this in the root directory of your application and should get you going: 在您的应用程序的根目录中运行此命令,即可开始:

find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM