summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>2013-06-13 11:55:12 +0000
committerjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>2013-06-13 11:55:12 +0000
commit1f7a1d0877125e684b6686f433b1c3823ac3fd44 (patch)
tree83621c4fbfb29ec0d7210fcf07482f3c6630ff73
parent7f37048095a7692c518c8a3c54b226f28dbc68f9 (diff)
uhttpd: expose missing options to uci
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36932 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--package/network/services/uhttpd/files/uhttpd.config30
-rwxr-xr-xpackage/network/services/uhttpd/files/uhttpd.init5
2 files changed, 35 insertions, 0 deletions
diff --git a/package/network/services/uhttpd/files/uhttpd.config b/package/network/services/uhttpd/files/uhttpd.config
index b33411e970..683e032fb4 100644
--- a/package/network/services/uhttpd/files/uhttpd.config
+++ b/package/network/services/uhttpd/files/uhttpd.config
@@ -23,6 +23,12 @@ config uhttpd main
# below the limit again.
option max_requests 3
+ # Maximum number of concurrent connections.
+ # If this number is exceeded, further TCP connection
+ # attempts are queued until the number of active
+ # connections drops below the limit again.
+ option max_connections 100
+
# Certificate and private key for HTTPS.
# If no listen_https addresses are given,
# the key options are ignored.
@@ -45,6 +51,10 @@ config uhttpd main
# option lua_prefix /luci
# option lua_handler /usr/lib/lua/luci/sgi/uhttpd.lua
+ # Specify the ubus-rpc prefix and socket path.
+# option ubus_prefix /ubus
+# option ubus_socket /var/run/ubus.sock
+
# CGI/Lua timeout, if the called script does not
# write data within the given amount of seconds,
# the server will terminate the request with
@@ -57,6 +67,11 @@ config uhttpd main
# request process.
option network_timeout 30
+ # HTTP Keep-Alive, specifies the timeout for persistent
+ # HTTP/1.1 connections. Setting this to 0 will disable
+ # persistent HTTP connections.
+ option http_keepalive 20
+
# TCP Keep-Alive, send periodic keep-alive probes
# over established connections to detect dead peers.
# The value is given in seconds to specify the
@@ -70,6 +85,21 @@ config uhttpd main
# Configuration file in busybox httpd format
# option config /etc/httpd.conf
+ # Do not follow symlinks that point outside of the
+ # home directory.
+# option no_symlinks 0
+
+ # Do not produce directory listings but send 403
+ # instead if a client requests an url pointing to
+ # a directory without any index file.
+# option no_dirlists 0
+
+ # Do not authenticate any ubus-rpc requests against
+ # the ubus session/access procedure.
+ # This is dangerous and should be always left off
+ # except for development and debug purposes!
+# option no_ubusauth 0
+
# Certificate defaults for px5g key generator
config cert px5g
diff --git a/package/network/services/uhttpd/files/uhttpd.init b/package/network/services/uhttpd/files/uhttpd.init
index ad46d2c9b7..26fb0422a2 100755
--- a/package/network/services/uhttpd/files/uhttpd.init
+++ b/package/network/services/uhttpd/files/uhttpd.init
@@ -67,12 +67,17 @@ start_instance()
append_arg "$cfg" cgi_prefix "-x"
append_arg "$cfg" lua_prefix "-l"
append_arg "$cfg" lua_handler "-L"
+ append_arg "$cfg" ubus_prefix "-u"
+ append_arg "$cfg" ubus_socket "-U"
append_arg "$cfg" script_timeout "-t"
append_arg "$cfg" network_timeout "-T"
+ append_arg "$cfg" http_keepalive "-k"
append_arg "$cfg" tcp_keepalive "-A"
append_arg "$cfg" error_page "-E"
append_arg "$cfg" max_requests "-n" 3
+ append_arg "$cfg" max_connections "-N"
+ append_bool "$cfg" no_ubusauth "-a" 0
append_bool "$cfg" no_symlinks "-S" 0
append_bool "$cfg" no_dirlists "-D" 0
append_bool "$cfg" rfc1918_filter "-R" 0