On 30.11.2003, at 21:45, Mike Maltese wrote:
> I was wondering if anyone has a working patch for thttpd that allows
> you to
> run the PHP cgi binary. I found one at
> http://www.galaxen.se/~mattias/temp/thttpd-sapi-getenv.patch, but it
> seem to work with 2.24 in the ports tree.
Here's my patch to mini_httpd-1.17beta1 as used in m0n0wall (AFAIR
somebody requested this a few days ago, too, but I forgot about it). It
comments out a few uninteresting (in the m0n0wall environment)
warnings, adds index.php to the list of default filenames, does not set
TCP_NOPUSH (because it gave me huge performance problems with SSL) and
- of course - sets up SCRIPT_FILENAME so the PHP CGI will work. If you
the first line of all your .php files and also make them executable,
you'll be able to access them directly as you would with Apache. Don't
forget to invoke mini_httpd with -c "**.php".