Hi,
I'm having a problem getting mod_cgi (/var/html/cgi-bin)to work correctly on Apache 1.3.23 under Red Hat Linux 7.2
The apache error log shows,
[Mon Feb 4 13:45:13 2002] [error] (2)No such file or directory: exec of /var/ failed
[Mon Feb 4 13:45:14 2002] [error] [client 192.168.1.1] Premature end of script headers: /var/
I also have several other scripts I've tried and I get the same thing on all of them.
Here's where I'm lost.
When I run these scripts under mod_perl (/var/html/perl), most of the perl scripts run just fine. I would just continue to run under mod_perl, except some of the scripts wont work under mod_perl. Their seem to be some syntax that doesn't work under mod_perl, but does work under mod_cgi.
All the good stuff is their:
shebang in the script files (#!/usr/bin/perl)
the cgi-bin directory and perl scripts have read and execute permissions
some of them work under the /var/ directory just fine yet none of them work under /var/
The httpd.conf contains,
for mod_cgi
ScriptAlias /cgi-bin/ "/var/
<Directory "/var/ AllowOverride None
Options ExecCGI
Order allow,deny
Allow from all
</Directory>
AddHandler cgi-script .cgi .pl
for mod_perl
<IfModule mod_perl.c>
Alias /perl/ /var/ <Location /perl>
SetHandler perl-script
PerlHandler Apache::Registry
Options +ExecCGI
</Location>
</IfModule>
User apache
Group apache
I've also tried changing the owner and group of the cgi-bin directory and the script files to apache. Still know luck. I'm out of ideas.
If anyone has any suggestions, please let me know...I stumped
Thank You,
Jon
I'm having a problem getting mod_cgi (/var/html/cgi-bin)to work correctly on Apache 1.3.23 under Red Hat Linux 7.2
The apache error log shows,
[Mon Feb 4 13:45:13 2002] [error] (2)No such file or directory: exec of /var/ failed
[Mon Feb 4 13:45:14 2002] [error] [client 192.168.1.1] Premature end of script headers: /var/
I also have several other scripts I've tried and I get the same thing on all of them.
Here's where I'm lost.
When I run these scripts under mod_perl (/var/html/perl), most of the perl scripts run just fine. I would just continue to run under mod_perl, except some of the scripts wont work under mod_perl. Their seem to be some syntax that doesn't work under mod_perl, but does work under mod_cgi.
All the good stuff is their:
shebang in the script files (#!/usr/bin/perl)
the cgi-bin directory and perl scripts have read and execute permissions
some of them work under the /var/ directory just fine yet none of them work under /var/
The httpd.conf contains,
for mod_cgi
ScriptAlias /cgi-bin/ "/var/
<Directory "/var/ AllowOverride None
Options ExecCGI
Order allow,deny
Allow from all
</Directory>
AddHandler cgi-script .cgi .pl
for mod_perl
<IfModule mod_perl.c>
Alias /perl/ /var/ <Location /perl>
SetHandler perl-script
PerlHandler Apache::Registry
Options +ExecCGI
</Location>
</IfModule>
User apache
Group apache
I've also tried changing the owner and group of the cgi-bin directory and the script files to apache. Still know luck. I'm out of ideas.
If anyone has any suggestions, please let me know...I stumped
Thank You,
Jon