Cov txheej txheem:

Kuv yuav siv nginx Docker li cas?
Kuv yuav siv nginx Docker li cas?

Video: Kuv yuav siv nginx Docker li cas?

Video: Kuv yuav siv nginx Docker li cas?
Video: Siv Yis Neeb Leej Cawm Seej Music Video Short 2024, Kaum ib hlis
Anonim

Khiav NGINX Qhib Qhov Chaw hauv Docker Thawv

  1. Tua tawm ib qho piv txwv ntawm NGINX khiav hauv a thawv thiab siv lub neej ntawd NGINX configuration nrog cov lus txib hauv qab no: $ docker run --name mynginx1 -p 80:80 -d nginx ua .
  2. Xyuas kom tseeb tias cov thawv tau tsim thiab khiav nrog cov docker ps command:

Ib yam li ntawd, tib neeg nug, koj puas xav tau nginx nrog Docker?

Nws yog ib qho uas muaj SSH nkag mus rau NGINX piv txwv, tab sis Docker Cov thawv ntim feem ntau yog tsim los rau ib lub hom phiaj (hauv qhov no khiav NGINX ) yog li ntawd NGINX duab ua tsis muaj OpenSSH ntsia thiab rau kev ua haujlwm ib txwm muaj tsis muaj xav tau kom tau plhaub nkag ncaj qha mus rau lub NGINX thawv.

Kuj Paub, Kuv yuav siv nginx li cas? Koj tsis paub yuav siv NGINX li cas.

  1. Kauj ruam 1: Tau txais lub server lossis VM. Koj yuav xav tau lub plhaub nkag mus ua raws li phau ntawv qhia no.
  2. Kauj ruam 2: taw tes koj lub npe sau rau lub server tshiab.
  3. Kauj ruam 3: Nruab NGINX.
  4. Kauj ruam 4: Txav koj lub vev xaib cov ntaub ntawv zoo li qub rau lub server.
  5. Kauj Ruam 4: Kho NGINX los ua haujlwm rau koj lub vev xaib.

Kuj paub yog, Docker Nginx yog dab tsi?

NGINX yog ib daim ntawv thov lub vev xaib nrov uas siv los tsim cov ntawv thov sab server. Nws yog qhov qhib qhov web server uas tsim los khiav ntawm ntau yam kev khiav haujlwm. Txij li thaum nginx ua yog lub vev xaib nrov rau kev txhim kho, Docker tau ua kom nws muaj kev txhawb nqa rau nginx ua.

Nginx yog dab tsi nws txoj haujlwm yog dab tsi?

NGINX yog qhib qhov software rau kev pabcuam hauv web, thim rov qab proxying, caching, load balancing, media streaming, thiab ntau dua. Ntxiv rau nws HTTP server muaj peev xwm, NGINX kuj muaj nuj nqi raws li lub npe neeg rau zaub mov rau email (IMAP, POP3, thiab SMTP) thiab rov qab tso npe thiab thauj khoom sib npaug rau HTTP, TCP, thiab UDP servers.

Pom zoo: