Revision of lighttpd from Fri, 12/17/2010 - 11:39

Revisions allow you to track differences between multiple versions of your content, and revert back to older versions.

Installing PHP with the lighttpd web server.

Compiling and Installing
At a minimum, for installing the lighttpd, PHP needs to be configured with these options:

./configure \
--enable-mbstring \
--with-gd \
--with-gettext \
--enable-fastcgi \
--enable-discard-path \
--enable-force-cgi-redirect

The --with-apxs2 and --with-apxs configuration options are not required. Add any other PHP options that you need.
MySQL, add:

--with-mysql=/usr/local/mysql

If you want to include LDAP support, add:

--with-ldap

If it configures correctly, make and install the binaries:

make
make install

Copy the included .ini file to the proper location:

cp php.ini-dist /usr/local/lib/php.ini

Edit /usr/local/lib/php.ini and add:

cgi.fix_pathinfo = 1

Make sure mod_fastcgi is loaded in your 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 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

Recent Updates

  • 5 months 3 weeks ago
    1.27.2 update
  • 6 months 2 days ago
    Drupal 10/11 config
  • 6 months 4 days ago
  • PHP
    6 months 4 days ago
    PHP 8.3.11 and AlmaLinux
  • 6 months 4 days ago
    New version of Pound