Index: /luci/trunk/contrib/package/uhttpd/files/uhttpd.init
===================================================================
--- /luci/trunk/contrib/package/uhttpd/files/uhttpd.init	(revision 5876)
+++ /luci/trunk/contrib/package/uhttpd/files/uhttpd.init	(revision 5896)
@@ -19,8 +19,9 @@
 	local var="$2"
 	local opt="$3"
+	local def="$4"
 	local val
 
 	config_get val "$cfg" "$var"
-	[ -n "$val" ] && append UHTTPD_ARGS "$opt $val"
+	[ -n "$val" -o -n "$def" ] && append UHTTPD_ARGS "$opt ${val:-$def}"
 }
 
@@ -30,8 +31,11 @@
 
 	local cfg="$1"
+	local realm="$(uci get system.@system[0].hostname 2>/dev/null)"
 	local ssl
 
 	append_arg "$cfg" home "-h"
-	append_arg "$cfg" cgi_prefix "-c"
+	append_arg "$cfg" realm "-r" "${realm:-OpenWrt}"
+	append_arg "$cfg" config "-c"
+	append_arg "$cfg" cgi_prefix "-x"
 	append_arg "$cfg" lua_prefix "-l"
 	append_arg "$cfg" lua_handler "-L"
Index: /luci/trunk/contrib/package/uhttpd/files/uhttpd.config
===================================================================
--- /luci/trunk/contrib/package/uhttpd/files/uhttpd.config	(revision 5876)
+++ /luci/trunk/contrib/package/uhttpd/files/uhttpd.config	(revision 5896)
@@ -11,5 +11,5 @@
 	# CGI url prefix, will be searched in docroot.
 	# Default is /cgi-bin
-	option cgi_prefix       /cgi-bin
+	option cgi_prefix	/cgi-bin
 
 	# Lua url prefix and handler script.
@@ -26,2 +26,7 @@
 #	list listen_https	[::]:443
 
+	# Basic auth realm, defaults to local hostname
+#	option realm	OpenWrt
+
+	# Configuration file in busybox httpd format
+#	option config	/etc/httpd.conf
