Friday, June 1, 2012

MBWE: lighttpd + PHP


I got PHP running with lighttpd on my Western Digital My Book World Edition (MBWE) today.

The procedure is relatively simple:
  1. Install the lighttpd, php, and php-fcgi packages
  2. Upon installation, lighttpd should be running. You may want to change the server.port or server.document-root settings in lighttpd.conf
  3. In your document-root directory, make a file called test.php with the contents:
    <?php phpinfo(); ?>
  4. Make sure lighttpd is running
  5. Point your browser to test.php - the results should make it obvious that PHP is active.
  6. If lighttpd doesn't crash (terminate) after viewing test.php, you're done.
  7. If it crashes, edit lighttpd.conf and make it have the following line:
    server.event-handler = "poll"

It's blisteringly fast - about 100 times faster (subjective perception) than apache2 on the MBWE.

I found the solution to the crashing problem HERE.

No comments:

Post a Comment