ScriptAlias​​指令的配置不工作的Apache2 [英] ScriptAlias configuration not working in apache2

查看:332
本文介绍了ScriptAlias​​指令的配置不工作的Apache2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我安装在Ubuntu的Apache2。我添加以下内容 /etc/apache2/httpd.conf 文件

I installed apache2 on ubuntu. I added the following to /etc/apache2/httpd.conf file

的ScriptAlias​​ / cgi-bin目录//家庭/项目/ cgi-bin目录/

我能够打开文件的cgi,如果我复制CGI文件 /usr/lib/cgi-bin/hello.cgi [DocumentRoot的目录],并访问网址 HTTP://localhost/cgi-bin/hello.cgi ,但我得到无法访问该文件,如果我把它放在 /家庭/ PROJECT /cgi-bin/hello.cgi 即使的ScriptAlias​​ 设置并重新启动的Apache2

I am able to open the cgi file if i copy the cgi file to /usr/lib/cgi-bin/hello.cgi[DocumentRoot directory] and access the URL http://localhost/cgi-bin/hello.cgi, but i get cannot access the file if i put it in /home/PROJECT/cgi-bin/hello.cgi even though ScriptAlias is set and apache2 restarted.

,我很想念这里的任何东西?

Any thing that i am missing here ?

推荐答案

我有同样的问题。原因是在httpd.conf中,我不得不删除全局

I had the same problem. The reason was in httpd.conf, I had to remove global

ScriptAlias /cgi-bin/ /var/www/cgi-bin/

否则一切开始/ cgi-bin目录/跌入/无功/网络/ cgi-bin目录/.

otherwise everything starting /cgi-bin/ fell into /var/www/cgi-bin/.

这篇关于ScriptAlias​​指令的配置不工作的Apache2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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