--- lib/setuplib.php	2009-08-27 14:24:02.000000000 +0800
+++ lib/setuplib.php	2009-08-27 14:23:35.000000000 +0800
@@ -493,6 +493,11 @@
         $rurl['scheme']   = empty($_SERVER['HTTPS']) ? 'http' : 'https';
         $rurl['fullpath'] = $_SERVER['REQUEST_URI']; // TODO: verify this is always properly encoded
 
+    } else if (stripos($_SERVER['SERVER_SOFTWARE'], 'nginx') !== false) {
+        //lighttpd
+        $rurl['scheme']   = empty($_SERVER['HTTPS']) ? 'http' : 'https';
+        $rurl['fullpath'] = $_SERVER['REQUEST_URI']; // TODO: verify this is always properly encoded
+
     } else if (stripos($_SERVER['SERVER_SOFTWARE'], 'iis') !== false) {
         //IIS
         $rurl['scheme']   = ($_SERVER['HTTPS'] == 'off') ? 'http' : 'https';

