Apache report error: [error] (13)Permission denied: exec of ‘/cgi-bin/signup.php’ failed

Apache report error: [error] (13)Permission denied: exec of ‘/cgi-bin/signup.php’ failed

在桌面版本Ubuntu上,通过Apache2测试PHP程序时,会遇到几个问题:

(1)Apache2把PHP文件当成普通文档,没有执行php文件,反而提示文件下载并询问存放路径。

(2)Apache2提示无权读取cgi-bin目录的文件。

问题(1)是由于没有安装Apache2的php模块导致的,而问题(2)是由于Apache2没有足够的权限操作cgi-bin目录中的php文件。安装以下模块可以解决:

sudo apt-get install libapache2-mod-php5

sudo apt-get install libapache2-mod-suphp

Comments are closed.