[prev in list] [next in list] [prev in thread] [next in thread] 

List:       thttpd
Subject:    Re: [THTTPD]
From:       "A.D.F." <adefacc () tin ! it>
Date:       2006-03-04 10:18:52
Message-ID: 200603040918.k249IdGX097055 () gate ! acme ! com
[Download RAW message or body]

ben syverson wrote:
> 
> Hey all,
> 
> Maybe I'm misunderstanding some step. So I have a vhost setup, and
> I'd like to run CGIs. Actually, I'd mostly like to run cgi-bin/redirect.
> 
> My thttpd_config looks like:
> dir=/usr/local/www/vhosts
> port=81
> chroot
> vhost
> globalpasswd
> cgipat=**.cgi
> logfile=/usr/local/www/vhosts/logs/thttpd_log
> pidfile=/var/run/thttpd.pid
> user=nobody
> 
> I have a script here:
> /usr/local/www/vhosts/c/criticalartware.net/cgi-bin/boom.cgi
> 
> Which is compiled C:
> #include <stdlib.h>
> int main(void) {
>         printf("Content-type: text/html\n\n");
>         printf("<html><body><h1>Hello world</h1></body></html>\n");
> }
> 
> And I get this:
> http://criticalartware.net:81/cgi-bin/boom.cgi
> 
> In case it's changed, it's a 500 Internal Error, but there's a 200 OK
> appended after the HTML error message. In other words, when you view
> source, it says:
> <HTML>
> <HEAD><TITLE>500 Internal Error</TITLE></HEAD>
> <BODY BGCOLOR="#cc9999" TEXT="#000000" LINK="#2020ff" VLINK="#4040cc">
> <H2>500 Internal Error</H2>
> There was an unusual problem serving the requested URL '/cgi-bin/
> boom.cgi'.
> <HR>
> <ADDRESS><A HREF="http://www.acme.com/software/thttpd/">thttpd/2.25b
> 29dec2003</A></ADDRESS>
> </BODY>
> </HTML>
> HTTP/1.0 200 OK
> 
> Which is really strange.
> 
> Any advice? I've checked the message archives with no luck -- I can't
> (don't want to) run as root...

Yes, usually HTTP error 500 means that something wrong has happened
inside server and this means that there should be an error message
logged in syslog files too
(i.e. /var/log/syslog, /var/log/warn, /var/log/messages, etc.).

So, please report it too, and, even better, try to discover
at what source line (inside libhttpd.c) this happens
(just add such a call:  syslog( LOG_NOTICE, "libhttpd.c: LINE %d", __LINE__
);
 before every httpd_send_err( hc, 500, err500title, ... );
 and recompile thttpd ).

-- 
Nick Name:     A.D.F.
E-Mail:        <adefacc () tin ! it>
--
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic