uhttpd.config 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  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. # List of prefix->Lua handler mappings.
  42. # Any request to an URL beneath the prefix
  43. # will be dispatched to the associated Lua
  44. # handler script. Lua support is disabled when
  45. # no handler mappings are specified. Lua prefix
  46. # matches have precedence over the CGI prefix.
  47. list lua_prefix "/cgi-bin/luci=/usr/lib/lua/luci/sgi/uhttpd.lua"
  48. # Specify the ubus-rpc prefix and socket path.
  49. # option ubus_prefix /ubus
  50. # option ubus_socket /var/run/ubus.sock
  51. # CGI/Lua timeout, if the called script does not
  52. # write data within the given amount of seconds,
  53. # the server will terminate the request with
  54. # 504 Gateway Timeout response.
  55. option script_timeout 60
  56. # Network timeout, if the current connection is
  57. # blocked for the specified amount of seconds,
  58. # the server will terminate the associated
  59. # request process.
  60. option network_timeout 30
  61. # HTTP Keep-Alive, specifies the timeout for persistent
  62. # HTTP/1.1 connections. Setting this to 0 will disable
  63. # persistent HTTP connections.
  64. option http_keepalive 20
  65. # TCP Keep-Alive, send periodic keep-alive probes
  66. # over established connections to detect dead peers.
  67. # The value is given in seconds to specify the
  68. # interval between subsequent probes.
  69. # Setting this to 0 will disable TCP keep-alive.
  70. option tcp_keepalive 1
  71. # Basic auth realm, defaults to local hostname
  72. # option realm libreCMC
  73. # Configuration file in busybox httpd format
  74. # option config /etc/httpd.conf
  75. # Do not follow symlinks that point outside of the
  76. # home directory.
  77. # option no_symlinks 0
  78. # Do not produce directory listings but send 403
  79. # instead if a client requests an url pointing to
  80. # a directory without any index file.
  81. # option no_dirlists 0
  82. # Do not authenticate any ubus-rpc requests against
  83. # the ubus session/access procedure.
  84. # This is dangerous and should be always left off
  85. # except for development and debug purposes!
  86. # option no_ubusauth 0
  87. # For this instance of uhttpd use the listed httpauth
  88. # sections to require Basic auth to the specified
  89. # resources.
  90. # list httpauth prefix_user
  91. # Defaults for automatic certificate and key generation
  92. config cert defaults
  93. # Validity time
  94. option days 730
  95. # RSA key size
  96. option bits 2048
  97. # Location
  98. option country ZZ
  99. option state Somewhere
  100. option location Unknown
  101. # Common name
  102. option commonname '%D'
  103. # config httpauth prefix_user
  104. # option prefix /protected/url/path
  105. # option username user
  106. # option password 'plaintext_or_md5_or_$p$user_for_system_user'