PLEASE NOTE: Native Lighttpd Windows builds are available at en.wlmp-project.net/
The last available Lighttpd for Windows build that I created using Cygwin was Lighttpd for Windows 1.4.17.
Updated September 29, 2009.

Let’s say that you want to run one Lighttpd web server on two different ports. Port 80 for the production site and Port 81 for development.

1. Set your port for production use, either by leaving server.port
commented or set:
server.port = 80
AND
set your standard document root:
server.document-root = “/path/to/production/version”

2. Add these lines to your config:
$SERVER[“socket”] == “:81” {
server.document-root = “/path/to/testing/version”
}

3. Restart lighttpd.

4. Connect to http://hostname:81 or http://[your IP]:81 (http://192.168.1.1:81)

TROUBLESHOOTING TIPS:
If you still can’t connect, check your firewall settings. RedHat Enterprise Linux and Windows XP with Service Pack 2 are covered below.

For RedHat Enterprise Linux, do:
[root@localhost ~]# iptables -F
to flush all firewall rules as a test. Connecting to port 81 should not be a problem after that. A safer option is to just open up that port rather than dumping all your rules, if you are running a production box.

On Windows XP with SP2, go to Start->Settings->Control Panel->Windows Firewall. If ‘On’ is selected, click the ‘Exceptions’ tab at the top, and then click the ‘Add Port…’ button and type in 81. If you are using another firewall, do the equivalent for that firewall. Although I do not recommend it, you could turn off all firewalls momentarily to see if the config is set up properly, but that is very dangerous.

(This Mini-HOWTO inspired by the answer I provided here: http://forum.lighttpd.net/topic/958)

Here is a quick tip to decrease Firefox memory consumption on Windows, when Firefox is minimized:

1. Open Firefox and go to the Address Bar. Type in about:config and then press Enter.
2. Right Click in the page and select New -> Boolean.
3. In the box that pops up enter config.trim_on_minimize. Press Enter.
4. Now select True and then press Enter.
5. Restart Firefox.

When I first tried it, I had 12 open tabs, using about 62 Megabytes of memory, and it did not change when minimized. After applying the above instructions, the ~61 Megabytes of memory shrunk to ~11 Megabytes when minimized. These numbers were all obtained through the Task Manager, and the same tabs were all used thanks to SessionSaver. If you want to conduct this test using my described method, make sure that you have SessionSaver installed first, and also note that the installation of SessionSaver requires Firefox to be restarted. Have fun…