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