Production Web server: Lighttpd

From Alpine Linux
Revision as of 15:21, 16 September 2017 by John3-16 (talk | contribs) (Added internal link to lighttpd; added See also: File Sharing System; added Category: Server, PHP)

To setup lighttpd to use PHP, simply follow the instruction on the Setting Up Lighttpd With FastCGI wiki page.

You will then need a simple test page to prove that PHP is working. Assuming you are using the default directory of /var/www/localhost/htdocs/ for serving pages, create a test page:

echo "<?php phpinfo(); ?>" > /var/www/localhost/htdocs/index.php

Note the page must have the file extension '.php' or it will not be treated as PHP. This is a simple yet very common (and infuriating) mistake to make!

Now test the page by opening your browser and requesting the index.php page, you should see an extensive page featuring a lot of PHP related information. This page should not, of course, be used in production but merely for testing.

See also