开发者

403 Forbidden trying to execute php scripts

开发者 https://www.devze.com 2023-01-26 16:34 出处:网络
Fresh install of a Debian server. Apache2, PHP5. When I try to browse a PHP file I get 403 Forbidden. I am able to browse to html files.

Fresh install of a Debian server. Apache2, PHP5.

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

I have tried the following:

  • Reinstalled Apache, PHP, libapache2-m开发者_Go百科od-php5
  • Restarted Apache
  • Checked the conf file thoroughly, copied from default, set the correct Directory path and allow from all
  • Checked permissions of directory, as a test have given full 777 permission to /var/www/site - still forbidden

Cant think of what else to try ?


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

After that restart the Apache/nginx server

or

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.


Check if the alow/deny pattern in your http.conf is set correctly. What's written to the apache error log?

0

精彩评论

暂无评论...
验证码 换一张
取 消