简体   繁体   English

错误403禁止

[英]Error 403 Forbidden

I am developing a project locally and at the time of upload to hosting (both Apache server), there are two files that give me problems, one of them the server returns me the error '403 forbidden 'and the other does not I absolutely return anything. 我正在本地开发一个项目,并且在上载到主机(均为Apache服务器)时,有两个文件给我带来了问题,其中一个服务器向我返回了错误“ 403 forbidden”,而另一个我没有绝对返回任何东西。

These two files are in a directory that contains the drivers for the actions of users of the website, along with 17 others are PHP scripts that work properly. 这两个文件位于一个目录中,该目录包含用于网站用户操作的驱动程序,另外17个是可以正常运行的PHP脚本。

I thought it was due to lack of permissions, so I changed to 777 in the directory so that affected all sub-directories and files stored in it, but still failing. 我认为这是由于权限不足所致,因此我将目录更改为777,从而影响了存储在其中的所有子目录和文件,但仍然失败。

Then I thought it would be a rule file. 然后我认为这将是一个规则文件。 Htaccess but neither. htaccess,但都不行。 I deleted all the rules and still failing just those two. 我删除了所有规则,但仍然没有通过这两个规则。

Anyone would think that may be happening? 有人会认为这可能正在发生吗?

A greeting. 一声问候。

PS: I've been doing some of the solutions that have already been answered in another post, but no solution. PS:我一直在做一些已经在另一篇文章中得到解答的解决方案,但是没有解决方案。

SOLVED 解决了

I looked at the error logs and everything came caused by 'Modsegurity' module so I disabled it and I do not need and everything returned to run correctly. 我查看了错误日志,发现一切都是由“ Modsegurity”模块引起的,因此我禁用了它,并且不需要,一切都可以正常运行。

Thank you all for the answers. 谢谢大家的回答。

Your apache server not allowed the directory to access via the network. 您的apache服务器不允许目录通过网络访问。 default is deny from all. 默认为全部拒绝。

You should edit your /etc/httpd/conf/httpd.conf file and change deny from all to allow from all under your web directory section 您应该编辑您的/etc/httpd/conf/httpd.conf文件,并将deny from all更改为在Web目录下的deny from all allow from all

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

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