Nginx Unit 1.27.0 Release: HTTPS Redirection, Configurable Filenames, and Platform Updates
The Nginx Unit 1.27.0 release introduces HTTP‑to‑HTTPS redirection using $request_uri, configurable default filenames for pure‑path URIs, numerous bug fixes, expanded Linux distribution support, and updated Docker images with the latest language runtimes.
Nginx Unit is a dynamic application server that can run alongside or independently of Nginx Plus and the open‑source Nginx, offering a RESTful JSON API for configuration changes without service interruption and designed for distributed applications.
Redirect HTTP requests to HTTPS
With TLS support and certificate management added to Unit, plain HTTP requests can now be redirected to a TLS‑enabled listener by setting the location value in a route action. The new $request_uri variable contains the original URI path and query, as shown in the example below:
{
"listeners": {
"*:443": {
"tls": {
"certificate": "example.com"
},
"pass": "routes"
},
"*:80": {
"pass": "routes"
}
},
"routes": [
{
"match": {
"scheme": "http"
},
"action": {
"return": 301,
"location": "
{host}${request_uri}"
}
}
]
}This configuration enables Unit to listen on both plain‑text and TLS ports, ensuring any request received on the plain‑text port is redirected to the TLS port.
Provide configurable filenames for pure‑path URIs
You can now specify an index in a route action to use a different default filename. The following example demonstrates serving default.html for URIs matching /cms/* while falling back to index.html for other paths:
"routes": [
{
"match": {
"uri": "/cms/*"
},
"action": {
"share": "/var/cms$uri",
"index": "default.html"
}
},
{
"action": {
"share": "/var/www$uri"
}
}
]This configuration makes Unit serve default.html for pure‑path URIs under /cms/* and index.html for all other pure‑path URIs.
Other
Compatible with GCC 12
Bug fix: some Spring Boot applications failed to start
Bug fix: incorrect auto‑detection of the Python protocol
Bug fix: ECMAScript modules incompatible with recent Node.js versions
Platform updates
Official packages are now available for the following Linux distributions:
Fedora 36
RHEL 9
Ubuntu 22.04
Docker images have been updated to use the latest language versions:
Go 1.18
PHP 8.1
Ruby 3.
Laravel Tech Community
Specializing in Laravel development, we continuously publish fresh content and grow alongside the elegant, stable Laravel framework.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.