こんにちは、鯨井貴博@opensourcetechです。
nginx のアプリケーションサーバ unit の最新バージョン、1.2がリリースされました!
https://unit.nginx.org/?_ga=2.150532918.1633740603.1528419486-601047674.1446458460
Updates(English)
Changes with Unit 1.2 07 Jun 2018
*) Feature: configuration of environment variables for application
processes.
*) Feature: customization of php.ini path.
*) Feature: setting of individual PHP configuration options.
*) Feature: configuration of execution arguments for Go applications.
*) Bugfix: keep-alive connections might hang after reconfiguration.
Here's an example of new configuration parameters of application objects:
{
"args-example": {
"type": "go",
"executable": "/path/to/compiled/go/binary",
"arguments": ["arg1", "arg2", "arg3"]
},
"opts-example": {
"type": "php",
"root": "/www/site",
"script": "phpinfo.php",
"options": {
"file": "/path/to/php.ini",
"admin": {
"memory_limit": "256M",
"variables_order": "EGPCS",
"short_open_tag": "1"
},
"user": {
"display_errors": "0"
}
}
},
"env-example": {
"type": "python",
"path": "/www/django",
"module": "wsgi",
"environment": {
"DB_ENGINE": "django.db.backends.postgresql_psycopg2",
"DB_NAME": "mydb",
"DB_HOST": "127.0.0.1"
}
}
}
Please note that "environment" can be configured for any type of application.
From Unit 1.2 release
Updates(日本語訳)
Unit 1.2の変更点 2018年6月07日
*)機能追加:アプリケーションプロセスのための環境変数の設定
*)機能追加:php.ini Pathのカスタマイズ
*)機能追加:個々のPHP設定オプションの設定
*)機能追加:Goアプリケーションの実行引数の設定
*)バグ修正:再構成後にキープアライブ接続がハングすることがある
アプリケーションオブジェクトの新しい設定パラメータの例を次に示します。
{
"args-example": {
"type": "go",
"executable": "/path/to/compiled/go/binary",
"arguments": ["arg1", "arg2", "arg3"]
},
"opts-example": {
"type": "php",
"root": "/www/site",
"script": "phpinfo.php",
"options": {
"file": "/path/to/php.ini",
"admin": {
"memory_limit": "256M",
"variables_order": "EGPCS",
"short_open_tag": "1"
},
"user": {
"display_errors": "0"
}
}
},
"env-example": {
"type": "python",
"path": "/www/django",
"module": "wsgi",
"environment": {
"DB_ENGINE": "django.db.backends.postgresql_psycopg2",
"DB_NAME": "mydb",
"DB_HOST": "127.0.0.1"
}
}
}
※「enviroment」は、どのようなタイプのアプリケーションにも設定できることに注意してください。
From Unit 1.2 release