VirtualHost Apache yog dab tsi?
VirtualHost Apache yog dab tsi?

Video: VirtualHost Apache yog dab tsi?

Video: VirtualHost Apache yog dab tsi?
Video: Setting Up Virtual Hosts for the Apache Web Server - Tutorial 2024, Tej zaum
Anonim

Dab tsi yog Apache Virtual Host ? Apache Virtual Hosts A. K. A Virtual Host ( Vhost ) yog siv los khiav ntau tshaj ib lub vev xaib (domain) siv ib tus IP chaw nyob. Hauv lwm lo lus koj tuaj yeem muaj ntau lub vev xaib (domains) tab sis ib tus server. Cov chaw sib txawv yuav pom nyob ntawm tus neeg siv qhov URL thov.

Tom qab ntawd, Apache ServerName yog dab tsi?

ServerName : hostname thiab chaw nres nkoj uas lub server siv los txheeb xyuas nws tus kheej. ServerAlias : Hloov npe rau tus tswv tsev siv thaum sib txuas thov rau lub npe-virtual hosts. Cov neeg feem coob tsuas yog siv xwb ServerName los teeb qhov 'lub ntsiab' chaw nyob ntawm lub vev xaib (xws li.

Tsis tas li ntawd, tus tswv tsev virtual ua haujlwm li cas? Virtual hosting yog ib txoj hauv kev rau hosting ntau lub npe sau npe (nrog kev sib cais ntawm txhua lub npe) ntawm ib leeg server (los yog pas dej ua ke ntawm servers). Qhov no tso cai rau ib tug server los qhia nws cov peev txheej, xws li lub cim xeeb thiab lub voj voog ntawm cov txheej txheem, tsis tas yuav tsum muaj txhua qhov kev pabcuam muab los siv tib yam tus tswv tsev npe.

Khaws qhov no hauv kev txiav txim siab, Apache VirtualHost cov ntaub ntawv nyob qhov twg?

Los ntawm lub neej ntawd ntawm Ubuntu systems, Apache Virtual Hosts kev teeb tsa cov ntaub ntawv yog khaws cia rau hauv /etc/ apache 2 /sites-muaj cov npe thiab tuaj yeem qhib los ntawm kev tsim cov cim txuas rau /etc/ apache 2 /sites-enabled directory. ServerName: Lub npe uas yuav tsum phim rau qhov no virtual host kev teeb tsa.

Dab tsi yog hom virtual hosting?

Virtual hosting yog ib txoj kev rau hosting ntau lub vev xaib ntawm ib lub tshuab. Muaj ob hom virtual hosting : Raws li lub npe virtual hosting thiab IP-based virtual hosting . IP raws virtual hosting yog ib txoj kev los thov txawv cov lus qhia raws li qhov chaw nyob IP thiab chaw nres nkoj tau txais kev thov.

Pom zoo: