uhttpd: don't redirect to HTTPS by default
[openwrt/openwrt.git] / package / network / services / uhttpd / files / uhttpd.config
index 61f8a49b6f00ed3d1d189283744f100c101b55b3..40ce67fd010f75c100a1573137fcd2faea241f4c 100644 (file)
@@ -10,7 +10,7 @@ config uhttpd main
        list listen_https       [::]:443
 
        # Redirect HTTP requests to HTTPS if possible
-       option redirect_https   1
+       option redirect_https   0
 
        # Server document root
        option home             /www
@@ -49,14 +49,17 @@ config uhttpd main
 #      list interpreter        ".php=/usr/bin/php-cgi"
 #      list interpreter        ".cgi=/usr/bin/perl"
 
-       # Lua url prefix and handler script.
-       # Lua support is disabled if no prefix given.
-#      option lua_prefix       /luci
-#      option lua_handler      /usr/lib/lua/luci/sgi/uhttpd.lua
+       # List of prefix->Lua handler mappings.
+       # Any request to an URL beneath the prefix
+       # will be dispatched to the associated Lua
+       # handler script. Lua support is disabled when
+       # no handler mappings are specified. Lua prefix
+       # matches have precedence over the CGI prefix.
+       list lua_prefix         "/cgi-bin/luci=/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
+#      option ubus_socket      /var/run/ubus/ubus.sock
 
        # CGI/Lua timeout, if the called script does not
        # write data within the given amount of seconds,
@@ -103,20 +106,38 @@ config uhttpd main
        # except for development and debug purposes!
 #      option no_ubusauth      0
 
+       # For this instance of uhttpd use the listed httpauth
+       # sections to require Basic auth to the specified
+       # resources.
+#      list httpauth prefix_user
 
-# Certificate defaults for px5g key generator
-config cert px5g
+
+# Defaults for automatic certificate and key generation
+config cert defaults
 
        # Validity time
        option days             730
 
+       # key type: rsa or ec
+       option key_type         ec
+
        # RSA key size
-       option bits             1024
+       option bits             2048
+
+       # EC curve name
+       # Curve names vary between px5g-{wolfssl,mbedtls} and openssl
+       # P-256 or P-384 are guaranteed to work
+       option ec_curve         P-256
 
        # Location
        option country          ZZ
        option state            Somewhere
-       option location         Uknown
+       option location         Unknown
 
        # Common name
-       option commonname       OpenWrt
+       option commonname       '%D'
+
+# config httpauth prefix_user
+#      option prefix /protected/url/path
+#      option username user
+#      option password 'plaintext_or_md5_or_$p$user_for_system_user'