You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Christian Kuczkowski <Ch...@HeroData.com> on 2004/05/21 15:13:09 UTC
[users@httpd] Directory Directive Options & CGI script
Hello all,
Newby to this listserver & a novice at apache web server in general. I
have set up some CGI executeables in a cgi-bin directory on the
webserver, & applied the ExecCGI option for that cgi-bin directory in
the httpd.conf. The cgi executeables will only run when I also have a
scriptalias defined for that cgi-bin directory. Is that how it is
supposed to be? The apache documentation lead me to believe that all I
needed was ExecCGI options set on the directory directive.
The reason I bring this up is due to the nature of the CGI executeable.
It is placing files in a sub-directory (cgi-bin/attachements), which I
want to give users access to. However, Apache blocks permission to these
files. I tried using a separate directory directive with options set to
Indexes, but it didn't make any difference. When I remove the
scriptalias, the files are accessible again, however the cgi-bin
executeables won't run. I tried allowing override with an .htaccess
file, that also had no effect.
Anyone have any insight? Thanks.
Keep the Faith,
Christian K.
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Directory Directive Options & CGI script
Posted by Joshua Slive <jo...@slive.ca>.
On Fri, 21 May 2004, Christian Kuczkowski wrote:
> Newby to this listserver & a novice at apache web server in general. I
> have set up some CGI executeables in a cgi-bin directory on the
> webserver, & applied the ExecCGI option for that cgi-bin directory in
> the httpd.conf. The cgi executeables will only run when I also have a
> scriptalias defined for that cgi-bin directory. Is that how it is
> supposed to be? The apache documentation lead me to believe that all I
> needed was ExecCGI options set on the directory directive.
See:
http://httpd.apache.org/docs-2.0/howto/cgi.html#configuring
There you'll see that you need two things to get CGI working: Options
ExecCGI and the cgi-script handler. ScriptAlias does both of these things
for you, but if you don't want to use ScriptAlias, you'll need to do them
both yourself.
>
> The reason I bring this up is due to the nature of the CGI executeable.
> It is placing files in a sub-directory (cgi-bin/attachements), which I
> want to give users access to.
Here are two options:
1:
<Directory /path/to/cgi-bin>
Options +ExecCGI
# Add whatever extensions you want to executed:
AddHandler cgi-script .cgi .pl
</Directory>
2:
<Directory /path/to/cgi-bin>
Options +ExecCGI
Sethandler cgi-script
</Directory>
<Directory /path/to/cgi-bin/sub-directory>
Sethandler default-handler
</Directory>
Joshua.
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org