Re: CGI problems
Jon Martin <[email protected]> Sat, 09 Apr 2005 19:32:58 +0200
| Newsgroups | gmane.comp.web.fnord |
|---|---|
| Message-ID | <[email protected]> |
That works. Thanks for the help. How to run under a non-root user was my next questions. :-) Jon Felix von Leitner wrote: >Thus spake Jon Martin ([email protected]): > > >>I've compiled fnord after defining the CGI var in httpd.c >> >> > > > >>/* uncomment the following line to enable support for CGI */ >>#define CGI >> >> > > > >>but each time I call a CGI I get the "Gateway Broken or Unavailable." >>error, which I understand from looking at the source is a http 502 error. >> >> > > > >>Here is my run script in /etc/fnord >> >> > > > >>#!/bin/sh >>cd /webroot >>exec tcpserver -l 0 192.168.60.1 80 fnord-cgi >> >> > >Since your CGI is not a static binary but a script, you are probably >getting bitten by fnord's chroot. > >You should be running fnord as non-root, anyway. Try using -u with >tcpserver. If it's running as non-root, chroot will fail, and your CGI >should work. > >Felix > >