NGINX Unit 1.18.0 Ho lokolloa ha Seva ea Kopo

etsahetse tlhahiso ea seva ea kopo Yuniti ea NGINX 1.18, moo tharollo e ntseng e ntlafatsoa ho netefatsa ho qalisoa ha lits'ebetso tsa webo ka lipuo tse fapaneng tsa lenaneo (Python, PHP, Perl, Ruby, Go, JavaScript/Node.js le Java). Setsi sa NGINX se ka tsamaisa lits'ebetso tse ngata ka nako e le 'ngoe ka lipuo tse fapaneng tsa mananeo, litekanyo tsa ho qala tse ka fetoloang ka matla ntle le tlhoko ea ho hlophisa lifaele tsa tlhophiso le ho qala bocha. Khoutu e ngotsoe ka C le ajoa ke e nang le tumello tlas'a Apache 2.0. U ka tloaelana le likarolo tsa NGINX Unit ho phatlalatso khatiso ea pele.

Khatisong e ncha:

  • Mokhoa oa ho itšehla thajana o kentsoe "rootfs»ho fokotsa phihlello ea ts'ebeliso ho karolo e itseng feela ea sistimi ea faele. Ho fetola motso oa FS o bonahalang ts'ebelisong, pivot_root() call e sebelisoa, eo, ho fapana le mohala o sa sireletsehang oa chroot() system, ha o fetole motso oa FS feela, empa o sebelisa ho itšehla thajana boemong ba sebaka sa mabitso, se ts'oanang le se sebelisitsoeng ho. lijana. Ho feta moo, ntle le bukana ea kopo e boletsoeng ka ho toba, Yuniti e boetse e beha litšepiso tsohle tse ikhethileng ka puo sefateng se ikhethileng sa faele (e sebetsa feela bakeng sa lipuo tse fokolang).

    {
    "type": "python 2.7",
    "tsela": "/",
    "hae": "/venv/",
    "module": "wsgi",
    "ho behwa ka thoko": {
    "rootfs": "/var/app/sandbox/"
    }
    }

  • Bokhoni ba ho hlakisa merero e mengata ea ho letsetsa ba sebetsang ho tlhophiso u sebelisa karolo e ncha "sepheo". Tšobotsi ena e u lumella ho nolofatsa ho hlophisoa ha merero e tsoakiloeng ea ho rarolla mathata, ha, ka mohlala, likopo tse ngata li sebetsoa ka index.php ho sa tsotellehe URI e kōptjoang, 'me sebopeho sa mookameli se lebisa ka ho toba ho letsetsa mangolo. Pejana, litlhophiso tse joalo li ne li etsoa ka litlhaloso tsa lits'ebetso tse peli, empa joale u ka khona ho feta ka e le 'ngoe feela. Ka mohlala, sebakeng sa:

    {
    "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/"
    }
    }

    e ka hlalosoa

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

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

    "ka ho toba": {
    "root": "/path/to/wordpress/"
    }
    }
    }
    }

  • Tšehetso e ekelitsoeng khouto litlhaku ka mokhoa oa "%xx" likhethong tsa "uri" le "arguments", hammoho le khetho ea "pass".

Source: opennet.ru

Eketsa ka tlhaloso