httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Leader <br...@ideaslive.com>
Subject Re: [users@httpd] Default Index File as CGI script
Date Thu, 11 Sep 2003 19:17:01 GMT
OK, some progress I think.

I changed the permission of the fake404.cgi file to 755.  It still gives 
the same error in the browser, but now in the error log I get:

[error] (8)Exec format error: exec of /var/www/cgi-bin/fake404.cgi failed

When I run it from the command line I get:

: No such file or directory
: command not found
Content-Type: text/html
Status: 404 Not Found

<!DOCTYPE HTML PUBLIC -//IETF//DTD HTML 2.0//EN>
<HTML><HEAD>
<TITLE>404 Not Found</TITLE>
</HEAD><BODY>
<H1>Not Found</H1>
  The requested URL  was not found on this server.<P>
</BODY></HTML>


Perhaps it is related to the first line of the file?

!/bin/sh

-- Brian

At 11:59 AM 9/11/2003, you wrote:

>On Thu, 11 Sep 2003, Brian Leader wrote:
>
> > Yes, sorry.  Here are the errors from the log:
> >
> > [Thu Sep 11 11:31:00 2003] [error] (13)Permission denied: exec of
> > /var/www/cgi-bin/fake404.cgi failed
> > [Thu Sep 11 11:31:00 2003] [error] [client 66.121.171.115] Premature end of
> > script headers: /var/www/cgi-bin/fake404.cgi
> >
> > I'm not sure which permissions to set.  Is the "Premature end.." message
> > valid or is it just complaining about permissions?
>
>Well, what are the permissions now?  Is fake404.cgi executable for all
>users?   If you do "cd /var/www/cgi-bin; ./fake404.cgi", does the script
>run correctly?  If not, then it won't run correctly under apache.
>
>"Premature end of script headers" just means that the script died
>before sending the proper Content-Type header.
>
>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

Brian J. Leader
brian@mythicwave.com
818-957-4950



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


Mime
View raw message