Apache yog dab tsi? Dawb web server Apache HTTP Server

Cov txheej txheem:

Apache yog dab tsi? Dawb web server Apache HTTP Server
Apache yog dab tsi? Dawb web server Apache HTTP Server
Anonim

Apache yog lub server muaj zog uas nws lub npe los ntawm cov kab lus Askiv cuam tshuam nrog lub npe Apache pawg neeg ntawm North American Indians. Ntawm cov neeg siv Lavxias, nws muaj lub npe "Apache". Qhov no yog qhib qhov software nrog daim ntawv tso cai GPL. Ib qho ntawm nws qhov zoo tshaj plaws yog nws cov neeg rau zaub mov hla lub platform, txhais tau tias nws tuaj yeem khiav ntawm ntau yam kev khiav haujlwm thaum tswj kev ua haujlwm zoo.

Txij li xyoo 1996, qhov no yog cov neeg siv khoom nyiam tshaj plaws hauv ntiaj teb vim nws ruaj khov thiab ruaj ntseg. Apache yog tsim los ntawm ib lub zej zog ntawm cov neeg siv tsim tawm, uas yog coj los ntawm Apache Software Foundation.

History of Apache

Keeb kwm ntawm Apache
Keeb kwm ntawm Apache

Lub Peb Hlis 1989, Tim Berners Lee, tus kws tshawb fawb Askiv ua haujlwm ntawm CERN (Switzerland), tau thov txoj hauv kev tshiab los tswj cov ntaub ntawv loj hauv CERN cov haujlwm. Thaum ntawd tsis muaj leej twg paub tias Apache yog dab tsi. Thawj qhov kev txhim kho ntawm cov ntaub ntawv sib txuas sib txuas, raws li Ted Nelson tau hu lawv hauv xyoo 1965, coj mus rau kev tsim WWW.- thawj software uas tau tso tawm thaum lub Kaum Ib Hlis 1990 nyob rau hauv lub npe World Wide Web, nrog lub web browser, graphical interface thiab WYSIWYG editor. Ob xyoos tom qab, tsuas muaj li ntawm peb caug nkag hauv cov npe ntawm WWW servers, ntawm cov uas yog HTTPs NCSA.

Zaj dab neeg Apache tiag tiag pib thaum Lub Peb Hlis 1995 nrog kev tso tawm Apache 0.2 raws li NCSA HTTPD 1.3 server. Ntau tus neeg siv xav paub seb Apache yog dab tsi niaj hnub no thiab qhov kev pab cuam zoo li cas hauv thawj lub hlis ntawm nws lub neej. Nws tsuas yog ib txheej ntawm kev hloov kho siv rau NCSA server. Tom ntej no, Robert Thau tso Shambhala 0.1 nrog APIs rau cov qauv uas ua pov thawj ua tau zoo heev.

Txoj haujlwm tseem ceeb tshaj plaws tau ua raws li HTTP 1.1 tus qauv, uas tau suav nrog lub Plaub Hlis 1997 raws li version 1.2. Cov version no twb suav nrog Windows NT platform, uas tau pib thaum Lub Xya Hli 1997. Kev sib txuas cov ntaub ntawv teeb tsa tau ua tiav hauv kev tso tawm 1.3.3.

Apache Pawg yog lub luag haujlwm rau kev hloov pauv ntawm lub vev xaib server thiab kev txiav txim siab tshwj xeeb. Cov pab pawg no yuav tsum txawv ntawm cov neeg tsim tawm tseem ceeb - pawg tub ntxhais. Qhov kev yeem siab ntawm cov neeg tsim khoom feem ntau ua rau nws tsis zoo li tias lawv txhua tus ua haujlwm hauv Apache tib lub sijhawm, yog li cov ntsiav yog lub luag haujlwm khaws cia thiab khiav haujlwm. Feem ntau, cov kev txiav txim siab tsim tawm yuav tsum tau koom nrog cov ntsiav thiab txwv rau kev pov npav kom suav nrog cov cai. Ntawm qhov tod tes, lawv feem ntau muaj kev nkag mus rau CVS lub chaw cia khoom, yog li lawv ua raws li lub rooj vag mus rau txoj cai, kom ntseeg tau tias nws yog qhov tseeb thiab zoo.

yam tsawg kawg nkaus thiabkev pab cuam

Apache tau txais kev lees paub dav hauv lub vev xaib, thiab tau siv HTTP server ntau tshaj plaws txij li xyoo 1996. Mus txog nws qhov kev lag luam siab tshaj plaws hauv xyoo 2005 thaum lub server tau siv los ntawm 70% ntawm cov chaw thoob ntiaj teb. Nyob rau hauv xyoo tas los no, nws txoj kev lag luam feem tau poob qis. Nws yog qhov tsim nyog hais tias rau Apache, qhov kev poob qis no tsis qhia txog qhov tsis muaj npe thiab kev puas tsuaj ntawm thev naus laus zis.

Yam tsawg kawg nkaus rau kev ua haujlwm:

  1. Processor - Pentium.
  2. RAM - 64 MB.
  3. OS-Microsoft Windows, GNU/Linux.
  4. Installation size - 50 MB.

txiaj ntsig:

  1. Modular tsim.
  2. Open source.
  3. Multiplatform tsim.
  4. Extensibility.
  5. Popular - yooj yim tau txais kev pab thiab kev txhawb nqa.

Server architecture

Server architecture
Server architecture

Apache modular server muaj cov ntu tseem ceeb thiab ntau lub modules uas muab feem ntau ntawm cov haujlwm yooj yim. Qee qhov ntawm cov qauv no:

  1. mod_ssl - kev sib txuas lus ruaj ntseg ntawm TLS;
  2. mod_rewrite - chaw nyob rov sau dua, feem ntau siv los hloov cov nplooj ntawv dynamic xws li php mus rau nplooj ntawv zoo li qub los dag kev tshawb nrhiav cav txog qhov lawv tau tsim;
  3. mod_dav - WebDAV raws tu qauv txhawb nqa (RFC 2518);
  4. mod_deflate - lub compression algorithm yog pob tshab thaum cov ntsiab lus xa mus rau tus neeg siv khoom;
  5. mod_auth_ldap - tso cai rau cov neeg siv kom lees paub rau LDAP server;
  6. mod_proxy_ajp -connector los sib txuas lus nrog Jakarta Tomcat dynamic nplooj ntawv hauv Java (servlets thiab JSP).

Lub hauv paus server tuaj yeem nthuav dav kom suav nrog cov qauv sab nraud, suav nrog:

  • mod_cband - kev tswj tsheb thiab kev txwv bandwidth;
  • mod_perl - dynamic hauv Perl;
  • mod_php - dynamic hauv PHP;
  • mod_python - dynamic hauv Python;
  • mod_rexx - dynamic hauv REXX thiab REXX khoom;
  • mod_ruby - dynamic hauv Ruby;
  • mod asp dot net - dynamic hauv Microsoft. NET;
  • mod_mono - dynamic rau mono;
  • mod_security - daim ntawv thov qib lim rau kev ruaj ntseg.

Kev teeb tsa thiab kev ruaj ntseg

Configuration thiab kev ruaj ntseg
Configuration thiab kev ruaj ntseg

Txhawm rau nkag siab tias Apache yog dab tsi ntawm kev ruaj ntseg, koj yuav tsum xav txog nws qhov kev teeb tsa. Feem ntau ntawm kev teeb tsa yog ua tiav hauv apache2.conf thiab httpd.conf cov ntaub ntawv, nyob ntawm qhov system uas software tau khiav. Txhua qhov kev hloov pauv rau cov ntaub ntawv no yuav tsum muaj lub server rov pib dua lossis yuam kom nyeem dua.

Daim ntawv tso cai software raws li qhov tseem ceeb Apache software tau muab faib yog lub cim ntawm keeb kwm ntawm Apache HTTP Server thiab qhib lub zej zog. Daim ntawv tso cai tso cai faib cov khoom qhib thiab kaw.

Lub Free Software Foundation tsis xav txog Apache Daim Ntawv Tso Cai tau sib xws nrog version 2 ntawm GNU General Public License (GPL), uas cov software tau tso cai thiab tsis koom nrog software. Qhov no yuav tsum tau coj mus rau hauv tus account ua ntejteeb tsa Apache web server faib raws li GPL daim ntawv tso cai. Txawm li cas los xij, version 3 ntawm GPL suav nrog cov kev cai uas tso cai rau nws sib haum nrog cov ntawv tso cai uas muaj patent indemnity clauses.

Feem ntau ntawm qhov tsis muaj kev ruaj ntseg pom thiab kho tau tsuas yog siv los ntawm cov neeg siv hauv zos, tsis nyob deb. Txawm li cas los xij, qee qhov tseem khiav deb ntawm qee qhov xwm txheej. Los yog yog tias lawv tau siv los ntawm cov neeg siv tsis zoo hauv zos los ua txhaum kev sib koom hosting kev pom zoo siv PHP ua ib qho module ntawm Apache web server dawb.

Tshuaj xyuas kev ua haujlwm ntawm Apache

Apache Function Check
Apache Function Check

Kom paub meej tias Apache ua haujlwm zoo, qhib lub vev xaib thiab ntaus hauv qhov chaw nyob hauv qab no: https://localhost. Tom qab ntawd nias Enter, nplooj ntawv dawb tshwm nrog cov lus "Qhov no ua haujlwm", uas yog pov thawj tias lub vev xaib server ua haujlwm zoo.

Apache tso cai rau koj los tsim kev cai teeb tsa los hloov kho thiab hloov kho raws li koj xav tau. Ua li no, nrhiav cov ntaub ntawv http.conf hauv C:appserv Apache2.2 conf. Nws yog thaub qab kom tsis txhob runtime yuam kev, ces nws qhib nrog ib tug editor thiab cov kab tsim nyog tau hloov.

Txhawm rau ua cov kauj ruam no kom raug, koj yuav tsum muaj kev paub zoo ntawm tus neeg ua haujlwm Apache, vim tias txhua qhov kev hloov pauv yuav tshwm sim hauv Apache kev ua haujlwm thiab kev pib ua haujlwm. Ua tsaug rau cov lus pom zoo tshiab, lub server yuav raug teeb tsa. Nws yuav ua hauj lwm nyob rau hauv ib tug yooj yim configuration uas tso cai rau koj mus download taunplooj ntawv lossis kev siv network hauv Is Taws Nem.

Information management

Kev tswj cov ntaub ntawv
Kev tswj cov ntaub ntawv

Apache yog lub vev xaib siv ntau tshaj plaws, tus thawj coj nrog kev teeb tsa ntau tshaj plaws hauv ntiaj teb, ua ntej ntawm lwm cov kev daws teeb meem xws li Microsoft Internet Information Server (IIS). Qhov project no tau qhib rau kev siv vim tias nws yog ntau lub platform, muaj cov qauv rau txhua qhov kev ua haujlwm loj, muaj kev ntseeg siab heev thiab sawv tawm rau nws txoj kev ruaj ntseg thiab kev ua haujlwm.

Lub khoos phis tawj uas lub software no tab tom khiav yog muab tib lub npe. Qhov no yog qhov tseem ceeb vim nws yog lub luag haujlwm rau kev lees txais nplooj ntawv thov los ntawm cov neeg tuaj saib uas nkag mus rau ntawm lub xaib thiab tswj hwm lawv cov khoom xa lossis tsis lees txais raws li txoj cai ruaj ntseg tsim. Txawm hais tias cov txheej txheem no yuav zoo li yooj yim, nws suav nrog ntau yam thiab kev ua haujlwm uas yuav tsum ua kom tiav:

  1. Qhia kev ua tau zoo.
  2. Ntau tus HTTP thov, suav nrog kev ua haujlwm ntau, tuaj yeem tso cov kev pabcuam ploj mus.
  3. Txoj kev txwv ntawm kev nkag mus rau cov ntaub ntawv, tswj cov neeg siv kev lees paub lossis lim cov lus thov raws li lawv lub hauv paus.
  4. Kev ua yuam kev ntawm nplooj ntawv cov ntaub ntawv tuaj xyuas thiab xa rov qab mus rau nplooj ntawv uas tau hais tseg.
  5. Tswj cov ntaub ntawv kom xa mus raws li nws hom thiab qhia kom txaus rau qhov browser thov cov peev txheej teev tseg.
  6. Kev tswj xyuas cov ntaub ntawv khaws cia tau txais, yuam kev uas tshwm sim, thiabFeem ntau, tag nrho cov ntaub ntawv uas tau sau npe thiab tshuaj xyuas kom tau txais kev txheeb xyuas qhov chaw nkag.

Apache tso cai rau koj teeb tsa virtual hosting raws li IP chaw nyob lossis npe, uas yog, kom muaj ntau lub vev xaib ntawm ib lub computer.

File apache2.conf

Undoubtedly, apache2.conf yog cov ntaub ntawv tseem ceeb tshaj plaws, vim nws txhais cov cwj pwm dav dav ntawm nplooj ntawv web thiab tseem yog lub luag haujlwm rau kev nkag mus rau ntau lub modules uas txuas ntxiv kev ua haujlwm ntawm lub server.

Nws nyob hauv /etc/apache2 directory thiab vim nws yog cov ntawv nyeem nws tuaj yeem kho tau yooj yim nrog cov ntawv nyeem. Configuration File Properties - Server Global Variables and Functionality Extensions.

Ntiaj teb tus neeg rau zaub mov hloov pauv yog qhov hloov pauv uas txhais tau tias kev ua haujlwm tag nrho:

  1. Table of Apache cov lus qhia. Lub npe neeg rau zaub mov yog qhia los ntawm ServerName hloov pauv, yog li txhua qhov kev hloov pauv lossis txuas uas muaj nyob hauv HTML cov ntaub ntawv ua haujlwm zoo. Feem ntau cov kev hloov pauv tau muab faib rau lwm cov ntaub ntawv me me khaws cia hauv mods-muaj.
  2. .htaccess yog cov ntaub ntawv zais zais uas tso cai rau koj los hloov kho lub server ua haujlwm li cas.
  3. "Apache" yog cov npe tshwj xeeb yam tsis tas yuav hloov kho cov ntaub ntawv tseem ceeb apache2.conf teeb tsa. Thaum tus neeg siv lub vev xaib thov cov ntaub ntawv los ntawm tus neeg rau zaub mov, nws saib los ntawm lub hauv paus directory mus rau lub subdirectory uas muaj cov thov.htaccess thiab coj mus rau hauv tus account cov lus qhia nws muaj ua ntej thov.

Principle.htaccess:

  1. txwv tsis pub sau cov ntaub ntawv hauv phau ntawv teev npe.
  2. Redirects web traffic.
  3. Set up error pages.
  4. txwv tsis pub nkag mus rau qee cov ntaub ntawv.
  5. Tsis kam nkag mus rau qee qhov chaw nyob IP lossis thaj chaw ntawm IP chaw nyob.
  6. Txuas kev ua haujlwm ntsig txog lwm yam kev hu xov tooj thiab cov ntaub ntawv teeb tsa. Tag nrho cov lus qhia cuam tshuam nrog cov khoom no yuav ua ntej los ntawm lo lus "Enable".

Installing the Apache Web Server

Apache web server installation
Apache web server installation

Apache yog Ameslikas tsim los ua haujlwm nrog PHP thev naus laus zis, tab sis nws kuj tuaj yeem ua haujlwm nrog. NET yam tsis muaj teeb meem, ua rau nws muaj kev vam meej dua li Microsoft's IIS, uas yog kev sib koom tes rau servers siv IIS thiab muab kev txhawb nqa tag nrho PHP yam tsis tas yuav hloov lub configuration.

Txhawm rau nruab thiab khiav lub vev xaib, koj yuav tsum xub rub tawm los ntawm lub vev xaib official. Nco ntsoov nrhiav qhov tseeb version ntawm cov software muaj thiab xyuas seb nws puas yuav raug txheeb xyuas raws li Win32 Binary suav nrog OpenSSL.

Cov version muaj kev teeb tsa ua ke thiab cov ntaub ntawv tiv thaiv. Thaum xaiv, nws yog downloaded rau lub PC. Muab ob npaug rau nyem rau ntawm daim ntawv icon pib txheej txheem, uas yooj yim raws li nws tau nrog tus pab.

Ib qho ntawm thawj qhov rais uas yuav muab cov ntaub ntawv tsim nyog kom lub vev xaib server tuaj yeem txuas rau lub network yog lub qhov rai cov ntaub ntawv. Nyob ntawd, tus neeg siv sau ib daim ntawv luv luv los ntawm kev ntxiv lub network sau npe, server npe, thiab email chaw nyobtus thawj tswj hwm. Rau thawj ob txoj kev xaiv xaiv localhost.

Tom ntej no, lub qhov rais installation yuav tshwm sim, qhov twg tag nrho cov khoom muaj nyob rau hauv. Xaiv lawv tag nrho thiab xyuas seb puas muaj c:appserv Apache2.2 nplaub tshev. Tom ntej no, teeb tsa Apache web server.

Web Monitor ntawm lub taskbar

Tom qab txhim kho Apache kom paub tseeb tias nws tau ua tiav lawm. Txhawm rau ua qhov no, mus rau "Start" ntawv qhia zaub mov thiab nrhiav "Khiav" kev xaiv. Lub qhov rais pop-up yuav tshwm sim uas koj nkag mus rau cmd, qhov system pop-up screen tshwm sim. Kom paub tseeb tias tus neeg siv tab tom khiav ua tus thawj tswj hwm, right-click ntawm lub qhov rais thiab xaiv "Run as administrator".

Installation algorithm:

  1. Nrhiav Apache hauv nplaub tshev hauv Windows console, ua qhov no, sau cov kab lus hauv qab no hauv console - c: appserv Apache2.2? hauv.
  2. Tom qab nkag mus, nias Enter thiab lub kaw lus yuav zoo li no - C: appserv Apache2.2? Ib >.
  3. Nyob hauv cov ntawv tais ceev tseg, ntaus http:.exe -k nruab thiab nias Enter.
  4. Ib lus zoo ib yam li ". Apache 2.2: kev pabcuam twb tau teeb tsa" yuav tshwm sim. Cov lus no yuav txheeb xyuas tias Apache tau teeb tsa tiav.

Ib txoj hauv kev zoo tshaj plaws los xyuas seb Apache tab tom ua haujlwm zoo yog los xyuas seb daim ntawv thov saib puas ua haujlwm. Nws tuaj yeem pom ntawm lub taskbar. Yog tias nws tsis ua haujlwm, qhib nws los ntawm kev mus rau Start menu, Txhua Qhov Kev Pabcuam thiab Apache http Server 2.2., nyem rau ntawm Saib Xyuas Apache Server thiab qhib nws.

Monitor muaj txiaj ntsig vim nws tso cai rau koj nres lub server,nres thiab qhib nws kom ua tiav kev nplij siab yam tsis tau mus rau lub qhov rais console, tsuas yog nyem rau ntawm lub cim ntawm lub taskbar qhib lub qhov rais tswj.

Linux Installation Tips

Linux Installation Tips
Linux Installation Tips

Yog tias tus neeg siv muaj lub vev xaib thiab xav tau lub platform los tuav nws, koj tuaj yeem siv cov kev pabcuam ntawm ib tus neeg muab kev pabcuam lossis sim tuav koj lub vev xaib ntawm server koj tus kheej.

Installation algorithm:

  1. Download tau qhov tseeb ruaj khov version ntawm Apache.
  2. Download tau cov ntaub ntawv raws li qhov system.
  3. Extract software files.
  4. Tom qab ntawd, cov ntaub ntawv rub tawm yuav tsum tau muab tshem tawm: gunzip -d httpd-2_0_NN.tar.gz; tar xvf
  5. Qhov no tsim cov npe tshiab hauv cov npe tam sim no nrog cov ntaub ntawv hauv qhov chaw.
  6. Thaum cov ntaub ntawv tshwm sim, qhia lub tshuab nrhiav txhua qhov qub. Txoj hauv kev yooj yim tshaj plaws los ua qhov no yog lees txais txhua qhov kev ua ntej thiab tsuas yog ntaus ntawv:./configure.
  7. Teeb Apache, muab tias tsis muaj teeb meem nrog kev teeb tsa thiab tsim. Tus neeg siv kho qhov teeb tsa, uas yog sib npaug rau kev kho cov ntaub ntawv httpd.conf. Nws feem ntau yog kho nrog cov ntawv nyeem - vi PREFIX /conf/httpd.conf. Koj yuav tsum yog lub hauv paus kom hloov pauv.
  8. Khiab server ua haujlwm.

Daim Ntawv Thov Hauv Ntiaj Teb Wide Web

Daim ntawv thov hauv World Wide Web
Daim ntawv thov hauv World Wide Web

Apach feem ntau yog siv los xa cov nplooj ntawv zoo li qub thiab muaj zog rau lub Ntiaj Teb Wide Web. Ntau daim ntawv thov raug tsim nrogApache kev siv ib puag ncig lossis yuav siv cov yam ntxwv ntawm lub server no. Apach yog cov khoom siv hauv cov neeg siv khoom siv hauv LAMP nrov npe nrog rau MySQL thiab PHP, Perl, Python thiab Ruby programming lus, suav nrog Oracle database thiab IBM WebSphere daim ntawv thov server. Mac OS X integrates nws ua ib feem ntawm nws tus kheej lub web server thiab kev txhawb nqa rau WebObjects applications.

Apache yog siv rau ntau lwm yam dej num uas cov ntsiab lus yuav tsum tau nkag mus rau hauv kev nyab xeeb thiab txhim khu kev qha. Piv txwv li, thaum sib koom cov ntaub ntawv los ntawm tus kheej lub computer mus rau hauv Internet. Ib tus neeg siv uas tau nruab Apache ntawm lawv lub desktop tuaj yeem tso cov ntaub ntawv hauv cov ntaub ntawv hauv paus, los ntawm qhov chaw lawv tuaj yeem sib koom.

Web daim ntawv thov tsim tawm qee zaum siv lub vev xaib Apache hauv zos los saib ua ntej thiab ntsuas cov lej thaum txhim kho. Microsoft Internet Information Services (IIS) yog Apache tus neeg sib tw tseem ceeb, nrog rau Sun Microsystems 'Sun Java System web server thiab ntau lwm yam kev siv xws li Zeus Web-Server.

Qee lub vev xaib loj tshaj plaws hauv ntiaj teb yog siv los ntawm Apache. Lub hauv ntej kawg ntawm Google tshawb fawb cav yog raws li hloov kho version ntawm nws hu ua Google Web Server (GWS). Ntau qhov haujlwm Wikipedia kuj tseem khiav ntawm Apache servers.

Pom zoo: