'lighttpd'

This page deals with lighttpd under Windows Subsystem for Linux (WSL), used for testing XDHBrwQ under Windows.

To install lighttpd with PHP:

  • install the lighttpd and the php5-cgi packages:
    • sudo aptitude install lighttpd php5-cgi,
  • enable the fastcgi module and the PHP configuration:
    • sudo lighty-enable-mod fastcgi
    • sudo lighty-enable-mod fastcgi-php
  • reload the lighttpd daemon:
    • sudo service lighttpd force-reload

To sum up:

sudo aptitude install lighttpd php5-cgi
sudo lighty-enable-mod fastcgi
sudo lighty-enable-mod fastcgi-php
sudo service lighttpd force-reload

On some documentation, even in the default index page displayed by lighttpd, the server document root is not /var/www/ but /var/www/html/.

When you close the last WSL console, lighttpd will also be closed. To relaunch, type sudo service lighttpd start.

For lighttpd to be accessible from network, you have to create a rule for the port 80 in the firewall.