Production Web server: Lighttpd

From Alpine Linux
Revision as of 10:33, 31 December 2013 by Ginjachris (talk | contribs) (Created page with "To setup lighttpd to use PHP, simply follow the instruction on the Setting Up Lighttpd With FastCGI wiki page. You will then need a simpl...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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.