1
0

uhttpd.config 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. # Server configuration
  2. config uhttpd main
  3. # HTTP listen addresses, multiple allowed
  4. list listen_http 0.0.0.0:80
  5. list listen_http [::]:80
  6. # HTTPS listen addresses, multiple allowed
  7. list listen_https 0.0.0.0:443
  8. list listen_https [::]:443
  9. # Redirect HTTP requests to HTTPS if possible
  10. option redirect_https 1
  11. # Server document root
  12. option home /www
  13. # Reject requests from RFC1918 IP addresses
  14. # directed to the servers public IP(s).
  15. # This is a DNS rebinding countermeasure.
  16. option rfc1918_filter 1
  17. # Maximum number of concurrent requests.
  18. # If this number is exceeded, further requests are
  19. # queued until the number of running requests drops
  20. # below the limit again.
  21. option max_requests 3
  22. # Maximum number of concurrent connections.
  23. # If this number is exceeded, further TCP connection
  24. # attempts are queued until the number of active
  25. # connections drops below the limit again.
  26. option max_connections 100
  27. # Certificate and private key for HTTPS.
  28. # If no listen_https addresses are given,
  29. # the key options are ignored.
  30. option cert /etc/uhttpd.crt
  31. option key /etc/uhttpd.key
  32. # CGI url prefix, will be searched in docroot.
  33. # Default is /cgi-bin
  34. option cgi_prefix /cgi-bin
  35. # List of extension->interpreter mappings.
  36. # Files with an associated interpreter can
  37. # be called outside of the CGI prefix and do
  38. # not need to be executable.
  39. # list interpreter ".php=/usr/bin/php-cgi"
  40. # list interpreter ".cgi=/usr/bin/perl"
  41. # Lua url prefix and handler script.
  42. # Lua support is disabled if no prefix given.
  43. # option lua_prefix /luci
  44. # option lua_handler /usr/lib/lua/luci/sgi/uhttpd.lua
  45. # Specify the ubus-rpc prefix and socket path.
  46. # option ubus_prefix /ubus
  47. # option ubus_socket /var/run/ubus.sock
  48. # CGI/Lua timeout, if the called script does not
  49. # write data within the given amount of seconds,
  50. # the server will terminate the request with
  51. # 504 Gateway Timeout response.
  52. option script_timeout 60
  53. # Network timeout, if the current connection is
  54. # blocked for the specified amount of seconds,
  55. # the server will terminate the associated
  56. # request process.
  57. option network_timeout 30
  58. # HTTP Keep-Alive, specifies the timeout for persistent
  59. # HTTP/1.1 connections. Setting this to 0 will disable
  60. # persistent HTTP connections.
  61. option http_keepalive 20
  62. # TCP Keep-Alive, send periodic keep-alive probes
  63. # over established connections to detect dead peers.
  64. # The value is given in seconds to specify the
  65. # interval between subsequent probes.
  66. # Setting this to 0 will disable TCP keep-alive.
  67. option tcp_keepalive 1
  68. # Basic auth realm, defaults to local hostname
  69. # option realm Lede
  70. # Configuration file in busybox httpd format
  71. # option config /etc/httpd.conf
  72. # Do not follow symlinks that point outside of the
  73. # home directory.
  74. # option no_symlinks 0
  75. # Do not produce directory listings but send 403
  76. # instead if a client requests an url pointing to
  77. # a directory without any index file.
  78. # option no_dirlists 0
  79. # Do not authenticate any ubus-rpc requests against
  80. # the ubus session/access procedure.
  81. # This is dangerous and should be always left off
  82. # except for development and debug purposes!
  83. # option no_ubusauth 0
  84. # For this instance of uhttpd use the listed httpauth
  85. # sections to require Basic auth to the specified
  86. # resources.
  87. # list httpauth prefix_user
  88. # Defaults for automatic certificate and key generation
  89. config cert defaults
  90. # Validity time
  91. option days 730
  92. # RSA key size
  93. option bits 2048
  94. # Location
  95. option country ZZ
  96. option state Somewhere
  97. option location Unknown
  98. # Common name
  99. option commonname '%D'
  100. # config httpauth prefix_user
  101. # option prefix /protected/url/path
  102. # option username user
  103. # option password 'plaintext_or_md5_or_$p$user_for_system_user'