2010-03-25 15:46:16 +00:00
|
|
|
# Server configuration
|
|
|
|
config uhttpd main
|
|
|
|
|
2010-03-27 00:00:33 +00:00
|
|
|
# HTTP listen addresses, multiple allowed
|
|
|
|
list listen_http 0.0.0.0:80
|
2014-06-11 12:11:55 +00:00
|
|
|
list listen_http [::]:80
|
2010-03-27 00:00:33 +00:00
|
|
|
|
|
|
|
# HTTPS listen addresses, multiple allowed
|
|
|
|
list listen_https 0.0.0.0:443
|
2014-06-11 12:11:55 +00:00
|
|
|
list listen_https [::]:443
|
2010-03-27 00:00:33 +00:00
|
|
|
|
2015-05-30 20:55:14 +00:00
|
|
|
# Redirect HTTP requests to HTTPS if possible
|
|
|
|
option redirect_https 1
|
|
|
|
|
2010-03-25 15:46:16 +00:00
|
|
|
# Server document root
|
|
|
|
option home /www
|
|
|
|
|
2010-08-11 00:05:34 +00:00
|
|
|
# Reject requests from RFC1918 IP addresses
|
|
|
|
# directed to the servers public IP(s).
|
|
|
|
# This is a DNS rebinding countermeasure.
|
|
|
|
option rfc1918_filter 1
|
|
|
|
|
2012-05-28 00:52:24 +00:00
|
|
|
# Maximum number of concurrent requests.
|
|
|
|
# If this number is exceeded, further requests are
|
|
|
|
# queued until the number of running requests drops
|
|
|
|
# below the limit again.
|
2019-04-23 06:12:49 +00:00
|
|
|
option max_requests 3
|
2012-05-28 00:52:24 +00:00
|
|
|
|
2013-06-13 11:55:12 +00:00
|
|
|
# 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
|
|
|
|
|
2010-03-25 15:46:16 +00:00
|
|
|
# Certificate and private key for HTTPS.
|
|
|
|
# If no listen_https addresses are given,
|
|
|
|
# the key options are ignored.
|
|
|
|
option cert /etc/uhttpd.crt
|
|
|
|
option key /etc/uhttpd.key
|
|
|
|
|
|
|
|
# CGI url prefix, will be searched in docroot.
|
|
|
|
# Default is /cgi-bin
|
|
|
|
option cgi_prefix /cgi-bin
|
|
|
|
|
2010-08-14 00:54:24 +00:00
|
|
|
# List of extension->interpreter mappings.
|
|
|
|
# Files with an associated interpreter can
|
|
|
|
# be called outside of the CGI prefix and do
|
|
|
|
# not need to be executable.
|
|
|
|
# list interpreter ".php=/usr/bin/php-cgi"
|
|
|
|
# list interpreter ".cgi=/usr/bin/perl"
|
|
|
|
|
2018-08-23 07:07:23 +00:00
|
|
|
# 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"
|
2010-03-25 15:46:16 +00:00
|
|
|
|
2013-06-13 11:55:12 +00:00
|
|
|
# Specify the ubus-rpc prefix and socket path.
|
|
|
|
# option ubus_prefix /ubus
|
|
|
|
# option ubus_socket /var/run/ubus.sock
|
|
|
|
|
2010-03-27 00:00:33 +00:00
|
|
|
# CGI/Lua timeout, if the called script does not
|
|
|
|
# write data within the given amount of seconds,
|
2010-04-15 19:46:35 +00:00
|
|
|
# the server will terminate the request with
|
2010-03-27 00:00:33 +00:00
|
|
|
# 504 Gateway Timeout response.
|
|
|
|
option script_timeout 60
|
2010-03-25 15:46:16 +00:00
|
|
|
|
2010-04-15 19:46:35 +00:00
|
|
|
# Network timeout, if the current connection is
|
|
|
|
# blocked for the specified amount of seconds,
|
|
|
|
# the server will terminate the associated
|
|
|
|
# request process.
|
|
|
|
option network_timeout 30
|
|
|
|
|
2013-06-13 11:55:12 +00:00
|
|
|
# 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
|
|
|
|
|
2011-01-09 23:35:45 +00:00
|
|
|
# TCP Keep-Alive, send periodic keep-alive probes
|
|
|
|
# over established connections to detect dead peers.
|
|
|
|
# The value is given in seconds to specify the
|
|
|
|
# interval between subsequent probes.
|
|
|
|
# Setting this to 0 will disable TCP keep-alive.
|
|
|
|
option tcp_keepalive 1
|
|
|
|
|
2010-03-25 15:46:16 +00:00
|
|
|
# Basic auth realm, defaults to local hostname
|
2017-11-07 08:45:54 +00:00
|
|
|
# option realm OpenWrt
|
2010-03-25 15:46:16 +00:00
|
|
|
|
|
|
|
# Configuration file in busybox httpd format
|
|
|
|
# option config /etc/httpd.conf
|
|
|
|
|
2013-06-13 11:55:12 +00:00
|
|
|
# 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
|
|
|
|
|
2016-08-13 23:24:59 +00:00
|
|
|
# For this instance of uhttpd use the listed httpauth
|
|
|
|
# sections to require Basic auth to the specified
|
|
|
|
# resources.
|
|
|
|
# list httpauth prefix_user
|
|
|
|
|
2010-03-25 15:46:16 +00:00
|
|
|
|
2016-10-06 09:27:09 +00:00
|
|
|
# Defaults for automatic certificate and key generation
|
|
|
|
config cert defaults
|
2010-03-25 15:46:16 +00:00
|
|
|
|
|
|
|
# Validity time
|
|
|
|
option days 730
|
|
|
|
|
2019-08-05 18:34:39 +00:00
|
|
|
# key type: rsa or ec
|
|
|
|
option key_type rsa
|
|
|
|
|
2010-03-25 15:46:16 +00:00
|
|
|
# RSA key size
|
2016-01-25 17:42:25 +00:00
|
|
|
option bits 2048
|
2010-03-25 15:46:16 +00:00
|
|
|
|
2019-08-05 18:34:39 +00:00
|
|
|
# EC curve name
|
|
|
|
# Curve names vary between mbedtls/px5g and openssl
|
|
|
|
# P-256 or P-384 are guaranteed to work
|
|
|
|
option ec_curve P-256
|
|
|
|
|
2010-03-25 15:46:16 +00:00
|
|
|
# Location
|
2015-08-19 08:20:11 +00:00
|
|
|
option country ZZ
|
|
|
|
option state Somewhere
|
2016-01-19 23:27:14 +00:00
|
|
|
option location Unknown
|
2010-03-25 15:46:16 +00:00
|
|
|
|
|
|
|
# Common name
|
2016-05-21 10:42:44 +00:00
|
|
|
option commonname '%D'
|
2016-08-13 23:24:59 +00:00
|
|
|
|
|
|
|
# config httpauth prefix_user
|
|
|
|
# option prefix /protected/url/path
|
|
|
|
# option username user
|
|
|
|
# option password 'plaintext_or_md5_or_$p$user_for_system_user'
|