403禁止试图执行PHP脚本 [英] 403 Forbidden trying to execute php scripts

查看:93
本文介绍了403禁止试图执行PHP脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

新鲜安装Debian服务器。的Apache2,PHP5。

Fresh install of a Debian server. Apache2, PHP5.

当我试图浏览一个PHP文件,我得到403禁止。我能够浏览到HTML文件。

When I try to browse a PHP file I get 403 Forbidden. I am able to browse to html files.

我曾尝试以下内容:


  • 重新安装了Apache,PHP中的libapache2-MOD-PHP5

  • 重启动Apache的

  • 彻底检查conf文件,从默认的复制,设置正确的目录路径,并从所有
  • 允许
  • 目录经过许可,作为测试都给予充分的权限777到/ var /网络/网站 - 仍然禁止

想不出什么尝试?

推荐答案

执行行chmod 755 其中PHP脚本所在的目录。

Perform chmod 755 of the directory in which the PHP scripts reside.

之后重新启动Apache / nginx的服务器

After that restart the Apache/nginx server

如果以上方法不行,请联系您的托管服务提供商到白名单这个URL phpscript因为它可以与问题的mod_security。它最讨厌的事H​​ostGator的用户所面临的。

if above method not work then contact your hosting provider to whitelist that url to phpscript because it can be issue with mod_security. Its the most annoying thing hostgator user are facing.

这篇关于403禁止试图执行PHP脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆