Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
zh-cn:doc:howto:http.uhttpd [2022/11/03 15:12] – ↷ Links adapted because of a move operation tmomaszh-cn:doc:howto:http.uhttpd [2022/12/26 12:13] (current) – 同步 heybrowhatsup
Line 1: Line 1:
 ====== uHTTPd ====== ====== uHTTPd ======
-**uHTTPd** 是一个 OpenWrt/LUCI 开发者从头编写的 Web 服务器。 它着力于实现一个稳定高效的服务器,能够满足嵌入式设备的轻量级任务需求,且能够与 OpenWrt 的配置框架 (UCI) 整合。默认情况下它被用于 OpenWrt 的 Web 管理接口 [[zh:docs:techref:luci|LuCI]]。当然,uHTTPd 也能提供一个常规 Web 服务器所需要的所有功能。+**uHTTPd** 是一个 OpenWrt/LUCI 开发者从头编写的 Web 服务器。 它着力于实现一个稳定高效的服务器,能够满足嵌入式设备的轻量级任务需求,且能够与 OpenWrt 的配置框架 (UCI) 整合。默认情况下它被用于 OpenWrt 的 Web 管理接口 [[zh:docs:techref:luci|LuCI]]。 
 +当然,uHTTPd 也能提供一个常规 Web 服务器所需要的所有功能。 
 + 
 +其源代码可在以下 git 存储库中找到: 
 + 
 +  * https://git.openwrt.org/project/uhttpd.git
  
 ===== 特性 ===== ===== 特性 =====
 uHTTPd 作为一个通用的 HTTP 服务,并不只满足于运行 OpenWrt 的 Web 管理界面,而是提供了媲美其他现代 Web 服务器的功能。这包括 TLS (SSL)、CGI 以及 Lua。uHTTPd 是单线程的,但是支持多个实例 (例如,支持监听多个端口,每个端口都可以使用独立的文档根目录以及其他功能)。  uHTTPd 作为一个通用的 HTTP 服务,并不只满足于运行 OpenWrt 的 Web 管理界面,而是提供了媲美其他现代 Web 服务器的功能。这包括 TLS (SSL)、CGI 以及 Lua。uHTTPd 是单线程的,但是支持多个实例 (例如,支持监听多个端口,每个端口都可以使用独立的文档根目录以及其他功能)。 
  
-要使用 TLS (HTTPS 支持),需要 ''uhttpd-mod-tls'' +uHTTPd is built by default (since r35295 in Jan2013) to support the usage of TLS (HTTPS) via a libustream-* SSL library (on top of an actual SSL library: mbedtls (formerly polarssl), openssl, wolfssl (formerly cyassl)). 
 +Previously the package ''uhttpd-mod-tls'' was required, but it is not needed any more as long as you have installed a libustream library variant. 
 +In Dec2016 luci-ssl installed by default libustream-mbedtls. 
 +自2020 年 8 月起,luci-ssl 切换到 WolfSSL,默认安装 libustream-wolfssl
  
 与其他很多 Web 服务器相比, uHTTPd 支持[[zh-cn/doc:uci:uhttpd#luci.with.embedded.lua.interpreter|进程内执行 Lua]],可以提高 Lua CGI 脚本的执行效率。需要注意的是,LuCI,虽然依赖于 Lua,默认并不是以此方式配置的。 与其他很多 Web 服务器相比, uHTTPd 支持[[zh-cn/doc:uci:uhttpd#luci.with.embedded.lua.interpreter|进程内执行 Lua]],可以提高 Lua CGI 脚本的执行效率。需要注意的是,LuCI,虽然依赖于 Lua,默认并不是以此方式配置的。
Line 21: Line 29:
  
 uHTTPd 提供了一个启动脚本 /etc/init.d/uhttpd 以控制服务的运行状态,并运行在 OpenWrt 启动时启动。 uHTTPd 提供了一个启动脚本 /etc/init.d/uhttpd 以控制服务的运行状态,并运行在 OpenWrt 启动时启动。
 +
 +==== Using the default installation for publishing files ====
 +One could use the default installation for publishing files.
 +A quick example is to disable the redirect to luci scripts.
 +
 +<code bash>
 +mv /www/index.html /www/index.html.orig
 +</code>
 +
 +Done this anything is shown as list of file and even symbolic links works.
  • Last modified: 2022/12/26 12:13
  • by heybrowhatsup