NGINX Unit 1.18.0 Application Server Release

Took place application server release NGINX Unit 1.18, which develops a solution to ensure the launch of web applications in various programming languages ​​(Python, PHP, Perl, Ruby, Go, JavaScript / Node.js and Java). Under the control of NGINX Unit, several applications in different programming languages ​​can run simultaneously, the launch parameters of which can be changed dynamically without the need to edit configuration files and restart. The code is written in C language and spreads licensed under Apache 2.0. You can get acquainted with the features of NGINX Unit in announcement first release.

In the new version:

  • Isolation mode implementedrootfs' to limit the application's access to only a certain part of the file system. To change the FS root visible to the application, the pivot_root() call is used, which, unlike the unsafe chroot() system call, does not simply shift the FS root, but uses isolation at the namespace level, similar to that used in containers. Moreover, in addition to the directly specified application directory, Unit also automatically mounts all specific language dependencies into the isolated FS tree (works only for a limited number of languages).

    {
    "type": "python 2.7",
    "path": "/",
    "home": "/venv/",
    "module": "wsgi",
    isolation: {
    "rootfs": "/var/app/sandbox/"
    }
    }

  • Possibility to specify several schemes for calling handlers in the configuration using the new section "targets". This feature makes it easier to set up mixed addressing schemes, when, for example, most requests are processed through index.php regardless of the requested URI, and the admin interface directly leads to script calls. Previously, such settings were made through the definitions of two applications, but now you can get by with one. For example, instead of:

    {
    "wp_index": {
    "type": "php",
    "user": "wp_user",
    "group": "wp_user",
    "root": "/path/to/wordpress/",
    "script": "index.php"
    },

    "wp_direct": {
    "type": "php",
    "user": "wp_user",
    "group": "wp_user",
    "root": "/path/to/wordpress/"
    }
    }

    you can specify

    {
    "wp": {
    "type": "php",
    "user": "wp_user",
    "group": "wp_user",

    targets: {
    "index": {
    "root": "/path/to/wordpress/",
    "script": "index.php"
    },

    direct: {
    "root": "/path/to/wordpress/"
    }
    }
    }
    }

  • Added support coding characters in the form "%xx" in the "uri" and "arguments" match options, as well as in the "pass" option.

Source: opennet.ru

Add a comment