You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by timo ochmann <pu...@carukia.net> on 2003/05/15 03:37:26 UTC
[users@httpd] 500 internal server error, Apache/1.3.26
i am encountering an '500 internal server error' under Apache/1.3.26.
httpd runs as user 'www'. i've included paths, the script, error log
and httpd.conf entries below. could someone please take a look?
what am i missing here?
thanks!
path to cgi bin and executable:
/var/www
drwxr-xr-x 3 root daemon 512 May 14 07:33 DOMAIN-cgi
/var/www/DOMAIN-cgi
-rwxr-xr-x 1 root bin 268 Oct 28 2002 printenv
content of Apache's sample script 'printenv':
#!/usr/bin/perl
##
## printenv -- demo CGI program which just prints its environment
##
print "Content-type: text/plain\n\n";
foreach $var (sort(keys(%ENV))) {
$val = $ENV{$var};
$val =~ s|\n|\\n|g;
$val =~ s|"|\\"|g;
print "${var}=\"${val}\"\n";
}
note:
'printenv' executes from command line without problems.
error log:
[Wed May 14 08:26:05 2003] [error] (2)No such file or directory: exec of
/DOMAIN-cgi/printenv failed
[Wed May 14 08:26:05 2003] [error] [client 198.238.193.254] Premature en
d of script headers: /DOMAIN-cgi/printenv
httpd.conf:
<VirtualHost www.DOMAIN.net>
DocumentRoot /var/www/www-html/DOMAIN.net
ServerName www.DOMAIN.net
ErrorLog /var/www/logs/www.DOMAIN.net-error_log
CustomLog /var/www/logs/www.DOMAIN.net-access_log common
ScriptAlias /cgi-bin/ /var/www/DOMAIN-cgi/
</VirtualHost>
OR (this seemed redundant, but i thought i'll give it try):
<VirtualHost DOMAIN.net>
DocumentRoot /var/www/www-html/DOMAIN.net
ServerName DOMAIN.net
ErrorLog /var/www/logs/www.DOMAIN.net-error_log
CustomLog /var/www/logs/www.DOMAIN.net-access_log common
ScriptAlias /cgi-bin/ /var/www/DOMAIN-cgi/
<Directory "/var/www/DOMAIN-cgi">
AllowOverride None
Options +ExecCGI
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
---------------------------------------------------------------------
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] 500 internal server error, Apache/1.3.26
Posted by timo ochmann <pu...@carukia.net>.
Thanks for your reply, but like I stated in my original post 'printenv'
executes just fine from the command line. There's nothing wrong with
the perl path.
On Wednesday, May 14, 2003, at 07:15 PM, Jeff Cohen wrote:
> Check the first line:
> #!/usr/bin/perl
> Maybe you have the perl executable somewhere else.
>
> All the best,
> Jeff Cohen
> Jeff@GEJ-IT.com
> Tel. (416) 917-2324
> www.GEJ-IT.com
> GEJ-IT Networks!
>
>> -----Original Message-----
>> From: timo ochmann [mailto:public@carukia.net]
>> Sent: Wednesday, May 14, 2003 9:37 PM
>> To: users@httpd.apache.org
>> Subject: [users@httpd] 500 internal server error, Apache/1.3.26
>>
>> i am encountering an '500 internal server error' under Apache/1.3.26.
>> httpd runs as user 'www'. i've included paths, the script, error log
>> and httpd.conf entries below. could someone please take a look?
>> what am i missing here?
>>
>> thanks!
>>
>> path to cgi bin and executable:
>> /var/www
>> drwxr-xr-x 3 root daemon 512 May 14 07:33 DOMAIN-cgi
>> /var/www/DOMAIN-cgi
>> -rwxr-xr-x 1 root bin 268 Oct 28 2002 printenv
>>
>> content of Apache's sample script 'printenv':
>> #!/usr/bin/perl
>> ##
>> ## printenv -- demo CGI program which just prints its environment
>> ##
>>
>> print "Content-type: text/plain\n\n";
>> foreach $var (sort(keys(%ENV))) {
>> $val = $ENV{$var};
>> $val =~ s|\n|\\n|g;
>> $val =~ s|"|\\"|g;
>> print "${var}=\"${val}\"\n";
>> }
>>
>> note:
>> 'printenv' executes from command line without problems.
>>
>> error log:
>> [Wed May 14 08:26:05 2003] [error] (2)No such file or directory: exec
>> of
>> /DOMAIN-cgi/printenv failed
>> [Wed May 14 08:26:05 2003] [error] [client 198.238.193.254] Premature
>> en
>> d of script headers: /DOMAIN-cgi/printenv
>>
>> httpd.conf:
>> <VirtualHost www.DOMAIN.net>
>> DocumentRoot /var/www/www-html/DOMAIN.net
>> ServerName www.DOMAIN.net
>> ErrorLog /var/www/logs/www.DOMAIN.net-error_log
>> CustomLog /var/www/logs/www.DOMAIN.net-access_log common
>> ScriptAlias /cgi-bin/ /var/www/DOMAIN-cgi/
>> </VirtualHost>
>>
>> OR (this seemed redundant, but i thought i'll give it try):
>>
>> <VirtualHost DOMAIN.net>
>> DocumentRoot /var/www/www-html/DOMAIN.net
>> ServerName DOMAIN.net
>> ErrorLog /var/www/logs/www.DOMAIN.net-error_log
>> CustomLog /var/www/logs/www.DOMAIN.net-access_log common
>> ScriptAlias /cgi-bin/ /var/www/DOMAIN-cgi/
>> <Directory "/var/www/DOMAIN-cgi">
>> AllowOverride None
>> Options +ExecCGI
>> Order allow,deny
>> Allow from all
>> </Directory>
>> </VirtualHost>
>>
>>
>> ---------------------------------------------------------------------
>> 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
>
>
> ---------------------------------------------------------------------
> 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
>
---------------------------------------------------------------------
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] 500 internal server error, Apache/1.3.26
Posted by Jeff Cohen <su...@gej-it.com>.
Check the first line:
#!/usr/bin/perl
Maybe you have the perl executable somewhere else.
All the best,
Jeff Cohen
Jeff@GEJ-IT.com
Tel. (416) 917-2324
www.GEJ-IT.com
GEJ-IT Networks!
> -----Original Message-----
> From: timo ochmann [mailto:public@carukia.net]
> Sent: Wednesday, May 14, 2003 9:37 PM
> To: users@httpd.apache.org
> Subject: [users@httpd] 500 internal server error, Apache/1.3.26
>
> i am encountering an '500 internal server error' under Apache/1.3.26.
> httpd runs as user 'www'. i've included paths, the script, error log
> and httpd.conf entries below. could someone please take a look?
> what am i missing here?
>
> thanks!
>
> path to cgi bin and executable:
> /var/www
> drwxr-xr-x 3 root daemon 512 May 14 07:33 DOMAIN-cgi
> /var/www/DOMAIN-cgi
> -rwxr-xr-x 1 root bin 268 Oct 28 2002 printenv
>
> content of Apache's sample script 'printenv':
> #!/usr/bin/perl
> ##
> ## printenv -- demo CGI program which just prints its environment
> ##
>
> print "Content-type: text/plain\n\n";
> foreach $var (sort(keys(%ENV))) {
> $val = $ENV{$var};
> $val =~ s|\n|\\n|g;
> $val =~ s|"|\\"|g;
> print "${var}=\"${val}\"\n";
> }
>
> note:
> 'printenv' executes from command line without problems.
>
> error log:
> [Wed May 14 08:26:05 2003] [error] (2)No such file or directory: exec of
> /DOMAIN-cgi/printenv failed
> [Wed May 14 08:26:05 2003] [error] [client 198.238.193.254] Premature en
> d of script headers: /DOMAIN-cgi/printenv
>
> httpd.conf:
> <VirtualHost www.DOMAIN.net>
> DocumentRoot /var/www/www-html/DOMAIN.net
> ServerName www.DOMAIN.net
> ErrorLog /var/www/logs/www.DOMAIN.net-error_log
> CustomLog /var/www/logs/www.DOMAIN.net-access_log common
> ScriptAlias /cgi-bin/ /var/www/DOMAIN-cgi/
> </VirtualHost>
>
> OR (this seemed redundant, but i thought i'll give it try):
>
> <VirtualHost DOMAIN.net>
> DocumentRoot /var/www/www-html/DOMAIN.net
> ServerName DOMAIN.net
> ErrorLog /var/www/logs/www.DOMAIN.net-error_log
> CustomLog /var/www/logs/www.DOMAIN.net-access_log common
> ScriptAlias /cgi-bin/ /var/www/DOMAIN-cgi/
> <Directory "/var/www/DOMAIN-cgi">
> AllowOverride None
> Options +ExecCGI
> Order allow,deny
> Allow from all
> </Directory>
> </VirtualHost>
>
>
> ---------------------------------------------------------------------
> 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
---------------------------------------------------------------------
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