Compiling and Installing
At a minimum, for installing the lighttpd, PHP needs to be configured with these options:
./configure \
--enable-mbstring \
--with-gd \
--with-gettextThe
--with-apxs2 and --with-apxs configuration options are not required. Add any other PHP options that you need.MySQL, add:
--with-mysql=/usr/local/mysqlIf you want to include LDAP support, add:
--with-ldapIf it configures correctly, make and install the binaries:
make
make installCopy the included .ini file to the proper location:
cp php.ini-production /usr/local/lib/php.iniEdit
/usr/local/lib/php.ini and add:cgi.fix_pathinfo = 1Make sure
mod_fastcgi is loaded in your /service/lighttpd/root/lighttpd.conf:server.modules = (
"mod_fastcgi",
)Then add this basic section to the same file:
fastcgi.server = ( ".php" => ((
"bin-path" => "/usr/local/bin/php-cgi",
"socket" => "/tmp/php.socket"
)))Add
index.php to the index-file.names in your /service/lighttpd/root/lighttpd.conf so it looks something like:index-file.names = ( "index.html", "index.php" )Restart the lighttpd server. Since we are running it under daemontools:
svc -t /service/lighttpd- Login to post comments