Production Web server: Lighttpd

From Alpine Linux
Revision as of 19:56, 1 March 2020 by Mckaygerhard (talk | contribs) (Mckaygerhard moved page Setting Up Lighttpd with PHP to Production Web server: Lighttpd: use as own lighttpd professional page part of alpine newbie series well made documents, due inactivity on that page)

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