Mar 31, 2014 0 Comments in Debian, Learning by
Running a lightweight HTTP web server with PHP

Debian OS have several web servers ready to install (Apache as the main reference) but if you wish a low memory footprint and an easy configuration task the best choice is definitely lighttpd!

On Cosino, with a Debian OS pre installed, adding lighttpd with PHP support is quite an easy task.

To install the WEB server just use command aptitude as follow:

warning Note: the command may take a while to run…

Just hit ENTER and the package will be installed. When finished you can connect via HTTP to Cosino by using a web browser pointed to Cosino’s IP address and you should see the lighttpd‘s placeholder page.

lighttpd_placeholder

Now to add PHP support you must go under the lighttpd‘s configuration directory and then adding the following symlinks:

Now just restart the daemon:

and you are ready to test your first PHP script! To do a simple test just put the following simple PHP script into the /var/www directory:

Now, as above, if you point your browser to http://192.168.32.25/phpinfo.php you should see the default PHP info page.

Facebooktwitterlinkedin
Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *

37 − 30 =