Jump to content

Recommended Posts

http://unit.nginx.org/

curl, перепакованный с опцией  --enable-unix-sockets: curl_7.61.0-3a_mipsel-3.4.ipk и libcurl_7.61.0-3a_mipsel-3.4.ipk

библиотека php: php7-lib_7.2.9-1_mipsel-3.4.ipk

сам пакет: nginx-unit_1.4-2_mipsel-3.4.ipk

пример работы:

Скрытый текст

 


~ # unitd --control 127.0.0.1:8443
~ #
~ # ps | grep unit
 4485 root      6144 S    {unitd} unit: main v1.4 [unitd --control 127.0.0.1:8443]
 4487 nobody   16388 S    {unitd} unit: controller
 4488 nobody    134m S    {unitd} unit: router
 4489 nobody   98.2m S    {unitd} unit: "example_php" application
 4490 nobody   80076 S    {unitd} unit: "example_php" application
 4491 nobody   34148 S    {unitd} unit: "example_python" application
 4492 nobody   13572 S    {unitd} unit: "example_python" application
 4493 nobody   36408 S    {unitd} unit: "example_python_3" application
 4495 nobody   15920 S    {unitd} unit: "example_python_3" application
 4496 nobody   33168 S    {unitd} unit: "example_perl" application
 4497 nobody   42732 S    {unitd} unit: "example_ruby" application
 4499 nobody   22248 S    {unitd} unit: "example_ruby" application
 5811 root      4780 S    grep unit
~ #
~ # curl 127.0.0.1:8443
{
	"certificates": {},
	"config": {
		"applications": {
			"example_php": {
				"type": "php",
				"user": "nobody",
				"processes": 2,
				"root": "/opt/share/www/unit-php/php-app",
				"index": "index.php"
			},

			"example_python": {
				"type": "python 2.7",
				"user": "nobody",
				"processes": 2,
				"path": "/opt/share/www/unit-python2.7/python-app",
				"module": "wsgi"
			},

			"example_python_3": {
				"type": "python 3.7",
				"user": "nobody",
				"processes": 2,
				"path": "/opt/share/www/unit-python3.7/python-app",
				"module": "wsgi"
			},

			"example_perl": {
				"type": "perl",
				"user": "nobody",
				"processes": 1,
				"working_directory": "/opt/share/www/unit-perl/perl-app",
				"script": "/opt/share/www/unit-perl/perl-app/index.pl"
			},

			"example_ruby": {
				"type": "ruby",
				"user": "nobody",
				"processes": 2,
				"script": "/opt/share/www/unit-ruby/ruby-app.ru"
			}
		},

		"listeners": {
			"*:8300": {
				"application": "example_php"
			},

			"*:8400": {
				"application": "example_python"
			},

			"*:8500": {
				"application": "example_python_3"
			},

			"*:8600": {
				"application": "example_perl"
			},

			"*:8700": {
				"application": "example_ruby"
			}
		}
	}
}
~ # 
~ # cat /opt/var/log/unit.log 
2018/09/27 21:40:36 [info] 4486#4486 discovery started
2018/09/27 21:40:36 [notice] 4486#4486 module: perl 5.28.0 "/opt/lib/nginx/unit/perl.unit.so"
2018/09/27 21:40:36 [notice] 4486#4486 module: php 7.2.9 "/opt/lib/nginx/unit/php7.unit.so"
2018/09/27 21:40:36 [notice] 4486#4486 module: python 2.7.15 "/opt/lib/nginx/unit/python2.7.unit.so"
2018/09/27 21:40:36 [notice] 4486#4486 module: python 3.7.0 "/opt/lib/nginx/unit/python3.7.unit.so"
2018/09/27 21:40:36 [notice] 4486#4486 module: ruby 2.5.1 "/opt/lib/nginx/unit/ruby.unit.so"
2018/09/27 21:40:37 [info] 4487#4487 controller started
2018/09/27 21:40:37 [notice] 4485#4485 process 4486 exited with code 0
2018/09/27 21:40:37 [info] 4488#4488 router started
2018/09/27 21:40:37 [info] 4488#4488 OpenSSL 1.0.2p  14 Aug 2018, 1000210f
2018/09/27 21:40:37 [info] 4489#4489 "example_php" application started
2018/09/27 21:40:37 [info] 4489#4489 (non ABS_MODE) php root: "/opt/share/www/unit-php/php-app"
2018/09/27 21:40:37 [info] 4490#4490 "example_php" application started
2018/09/27 21:40:37 [info] 4490#4490 (non ABS_MODE) php root: "/opt/share/www/unit-php/php-app"
2018/09/27 21:40:37 [info] 4491#4491 "example_python" application started
2018/09/27 21:40:37 [info] 4492#4492 "example_python" application started
2018/09/27 21:40:38 [info] 4493#4493 "example_python_3" application started
2018/09/27 21:40:38 [info] 4495#4495 "example_python_3" application started
2018/09/27 21:40:38 [info] 4496#4496 "example_perl" application started
2018/09/27 21:40:39 [info] 4497#4497 "example_ruby" application started
2018/09/27 21:40:41 [info] 4499#4499 "example_ruby" application started
cannot handle ref type 15 at /opt/lib/perl5/5.28/Data/Dumper.pm line 208.
cannot handle ref type 15 at /opt/lib/perl5/5.28/Data/Dumper.pm line 208.
cannot handle ref type 15 at /opt/lib/perl5/5.28/Data/Dumper.pm line 208.
cannot handle ref type 15 at /opt/lib/perl5/5.28/Data/Dumper.pm line 208.
~ # 

 

в картинках

Скрытый текст

screen_034.png

screen_035.png

screen_036.png

screen_037.png

screen_038.png

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...