The NGINX Unit 1.27.0 application server has been published, within which a solution is being developed to ensure the launch of web applications in various programming languages (Python, PHP, Perl, Ruby, Go, JavaScript/Node.js and Java). NGINX Unit can simultaneously run multiple applications in different programming languages, the launch parameters of which can be changed dynamically without the need to edit configuration files and restart. The code is written in C and distributed under the Apache 2.0 license. You can get acquainted with the features of NGINX Unit in the announcement of the first release.
In the new version:
- Added the ability to use variables and empty values in the "location" directive, bound to "return" actions.
- Simplified redirection of HTTP requests to HTTPS. Added a new $request_uri variable containing the request URI, which can be used when defining a route as a parameter to the "location" directive inside the "action" block: { "listeners": { "*:443": { "tls": { "certificate" : "example.com" }, "pass": "routes" }, "*:80": { "pass": "routes" } }, "routes": [ { "match": { "scheme": " http" }, "action": { "return": 301, "location": "https://${host}${request_uri}" } } }
- It is possible to configure a file name other than index.html, which will be given when accessing with only a directory (for example, site.com/cms/). "routes": [ { "match": { "uri": "/cms/*" }, "action": { "share": "/var/cms$uri", "index": "default.html" } }, { "action": { "share": "/var/www$uri" } } ]
- For Ruby Rack, the environment variable “SCRIPT_NAME” has been set.
- Compatibility with GCC 12 is provided.
Source: opennet.ru
