FastCGI使用apache-不是脚本或错误的权限?
我为apache编译了fcgi,如下所示:FastCGI使用apache-不是脚本或错误的权限?,apache,permissions,fastcgi,Apache,Permissions,Fastcgi,我为apache编译了fcgi,如下所示: g++ fcgistart.c -lfcgi 我得到了一个a.out,并使用 a2enmod fastcgi 现在我看了报纸 分配给处理程序fcgid脚本的任何程序都使用FastCGI协议进行处理 这是否意味着二进制文件是一个脚本?可怜的!无论如何,我把a.out放在/var/www/html上 因为处理程序(/etc/apache2/mods enabled/fastcgi.conf)绑定到.fcgiI将a.out复制到a.fcgi。现在我浏览到
g++ fcgistart.c -lfcgi
我得到了一个a.out
,并使用
a2enmod fastcgi
现在我看了报纸
分配给处理程序fcgid脚本的任何程序都使用FastCGI协议进行处理
这是否意味着二进制文件是一个脚本?可怜的!无论如何,我把a.out
放在/var/www/html
上
因为处理程序(/etc/apache2/mods enabled/fastcgi.conf)绑定到.fcgi
I将a.out
复制到a.fcgi
。现在我浏览到http://localhost/a.fcgi
和a403禁止occourse
xx@xx:/var/www/html$ ls -la
drwxr-xr-x 2 root root 4096 Feb 6 13:44 .
drwxr-xr-x 3 root root 4096 Feb 6 12:56 ..
-rwxr-xr-x 1 root root 8696 Feb 6 13:44 a.fcgi
-rwxr-xr-x 1 root root 8696 Feb 6 13:16 a.out
-rw-r--r-- 1 root root 11321 Feb 6 12:57 index.html
怎么了?我知道了:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<Directory /var/www/html>
Options +ExecCGI
</Directory>
</VirtualHost>