Production Web server: Lighttpd: Difference between revisions
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...") |
m (Added internal link to lighttpd; added See also: File Sharing System; added Category: Server, PHP) |
||
Line 1: | Line 1: | ||
To setup lighttpd to use PHP, simply follow the instruction on the [[Setting_Up_Lighttpd_With_FastCGI|Setting Up Lighttpd With FastCGI]] wiki page. | To setup [[lighttpd]] to use PHP, simply follow the instruction on the [[Setting_Up_Lighttpd_With_FastCGI|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: | 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: | ||
Line 8: | Line 8: | ||
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. | 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 = | |||
* [[File Sharing System]] | |||
[[Category:Server]] | |||
[[Category:PHP]] |
Revision as of 15:21, 16 September 2017
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.