You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Selmer Ausland <se...@shawcable.com> on 2003/04/15 23:41:34 UTC

[users@httpd] CGI outside of ScriptAlias directories

Hello Group;

     I am running Apache 2.0.45 on Win NT 4.0. I am trying to set up
cgi-bin in  a clients VirtualHost and I cannot get it to work. I have
set it up as per the Apache tutorial at
http://httpd.apache.org/docs-2.0/howto/cgi.html#configuring (I hope,
correctly)

ScriptAlias /cgi-bin/ "D:/Apache2/cgi-bin/"
AddHandler cgi-script cgi pl

<VirtualHost *>
     ServerAdmin webmaster@somedomain.com
     DocumentRoot "D:/Apache2/htdocs/directory"
     ServerName www.somedomain.com
     ServerAlias somedomain.com
     <Directory "D:/Apache2/htdocs/directory">
     Options Indexes 
     AllowOverride AuthConfig Options Fileinfo
     Order Allow,Deny
     Allow from all
     </Directory>
     <Directory "D:/Apache2/htdocs/directory/cgi-bin">
     Options +ExecCGI
     AllowOverride none
     Order allow,deny
     Allow from all 
     </Directory>
</VirtualHost>

I have added the following first.pl script to
"D:/Apache2/htdocs/clientdirectory/cgi-bin"

#!D:/perl/bin/perl.exe
print "Content-type: text/html\n\n";
print "Hello, World."; 

However, I get the following message in my error log when I go to
http://www.domain.com/cgi-bin/first.pl 

[Tue Apr 15 16:06:39 2003] [error] [client xx.xx.xxx.xxx] script not
found or unable to stat: D:/Apache2/cgi-bin/first.pl

The first.pl works when it is placed in my D:/Apache2/cgi-bin but not in
the D:/Apache2/htdocs/clientdirectory/cgi-bin. 

Since I am inexperienced with cgi-bin in Apache (or anywhere else for
that matter), I'm sure that it is something relatively simple, but I
can't seem to figure out the answer. Perhaps it is the shebang line???

Yes, I restarted Apache.

Any help would be appreciated.

Thanks. Selmer Ausland

---------------------------------------------------------------------
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