Last active
November 11, 2022 00:03
-
-
Save nginx-gists/e5dcdc96e159e3d243fd8d16a9a34bfb to your computer and use it in GitHub Desktop.
NGINX Unit 1.18.0 Adds Filesystem Isolation and Other Enhancements
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "servers": { | |
| "192.168.0.100:8080": { | |
| "weight": 2, | |
| }, | |
| "192.168.0.101:8080": { | |
| "weight": 2, | |
| }, | |
| "192.168.0.102:8080" | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "servers": { | |
| "192.168.0.100:8080", | |
| "192.168.0.101:8080", | |
| "192.168.0.102:8080" | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "listeners": { | |
| "*:80": { | |
| "pass": "routes/slashes%2Fin%2Froute%2Fname" | |
| } | |
| }, | |
| "routes": { | |
| "slashes/in/route/name": [ | |
| ] | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "routes": { | |
| "slashes/in/route/name": [ | |
| { | |
| "match": { | |
| "uri": "/%2A", | |
| "arguments": { | |
| "%25": "%21%C3*" | |
| } | |
| }, | |
| "action": { | |
| "return": 301, | |
| "location": "http://fancyurls.example.com" | |
| } | |
| } | |
| ] | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "servers": { | |
| "192.168.0.100:8080", | |
| "192.168.0.101:8080", | |
| "192.168.0.102:8080": { | |
| "weight": 0.5 | |
| } | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "routes": [ | |
| { | |
| "match": { | |
| "uri": [ | |
| "*.php", | |
| "*.php/*" | |
| ] | |
| }, | |
| "action": { | |
| "pass": "applications/phpapp/direct" | |
| } | |
| }, | |
| { | |
| "action": { | |
| "pass": "applications/phpapp/script_index" | |
| } | |
| }, | |
| ], | |
| "applications": { | |
| "phpapp": { | |
| "type": "php", | |
| "user": "www-data", | |
| "group": "www-data", | |
| "targets": { | |
| "direct": { | |
| "root": "/var/www/app/" | |
| }, | |
| "script_index": { | |
| "root": "/var/www/app/", | |
| "script": "index.php" | |
| } | |
| } | |
| } | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "routes": [ | |
| { | |
| "match": { | |
| "uri": [ | |
| "*.php", | |
| "*.php/*" | |
| ] | |
| }, | |
| "action": { | |
| "pass": "applications/direct" | |
| } | |
| }, | |
| { | |
| "action": { | |
| "pass": "applications/script_index" | |
| } | |
| }, | |
| ], | |
| "applications": { | |
| "direct": { | |
| "type": "php", | |
| "processes": { | |
| "max": 5, | |
| "spare": 0 | |
| }, | |
| "user": "www-data", | |
| "group": "www-data", | |
| "root": "/var/www/app/", | |
| "index": "index.php" | |
| }, | |
| "script_index": { | |
| "type": "php", | |
| "processes": { | |
| "max": 20, | |
| "spare": 5 | |
| }, | |
| "user": "www-data", | |
| "group": "www-data", | |
| "root": "/var/www/app/", | |
| "script": "index.php" | |
| } | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "match": { | |
| "uri": "/legacy/*" | |
| }, | |
| "action": { | |
| "return": 301, | |
| "location": "http://legacy.example.com" | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "type": "python 2.7", | |
| "path": "/", | |
| "home": "/venv/", | |
| "module": "wsgi", | |
| "isolation": { | |
| "rootfs": "/var/app/sandbox/" | |
| } | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For a discussion of these files, see NGINX Unit 1.18.0 Adds Filesystem Isolation and Other Enhancements