|
mini_httpd and phpmini_httpd is a great web server - fast, easy to install, uncluttered and with a really small footprint. This makes mini_httpd ideal for serving php pages such as my eximadm script. In the past there have been issues with mini_httpd and php, mainly because php relies on the presence of certain environment variables which, while not strictly demanded by the RFCs, are provided by Apache and many other 'major' web servers. To make a long story short, I wrote a small patch for mini_httpd-1.19. For those shy of patching software, here's the pre-patched source code. Please bear in mind that this is not meant as some kind of code forking, and when in doubt, please download and use the source on the official mini_httpd web site. In order to make php run as a .cgi, there's two possibilities - either put the path_to_php at the beginning of each php script (like #!/bin/sh # Register PHP as binary handler for .php files /sbin/modprobe binfmt_misc if [ -z "$(/sbin/mount | /usr/bin/grep "binfmt_misc")" ]; then /sbin/mount -t binfmt_misc none /proc/sys/fs/binfmt_misc fi echo ":PHP:E::php::/usr/bin/php:" > /proc/sys/fs/binfmt_misc/register # end Now all that remains to do is to make all .php files executable: find /some_path -name "*.php" -exec chmod a+x {} \;
HintIf you run mini_httpd with SSL and chroot, then you must create/copy a |
|
Page visit count: 11344
Your IP address: 38.107.191.115
This site is running pmwiki-2.2.14 on PHP 5.2.12
Page last modified on 03 July 2008 23:26
|