Apache
Apache
ä»ç¶æ¯ä¸çä¸ç¨çæå¤ç
Web
æå¡å¨ï¼å¸åºå æçè¾¾
60%
å·¦å³ãå®æºäº
NCSAhttpd
æå¡å¨ï¼å½
NCSA
WWW
æå¡å¨é¡¹ç®åæ¢åï¼é£äºä½¿ç¨
NCSA
WWW
æå¡å¨ç人们å¼å§äº¤æ¢ç¨äºæ¤æå¡å¨çè¡¥ä¸ï¼è¿ä¹æ¯
apache
å称
çç±æ¥
(pache
è¡¥ä¸
)
ãä¸çä¸å¾å¤èåçç½ç«é½æ¯
Apache
ç产ç©ï¼å®çæåä¹å¤ä¸»è¦å¨äºå®çæºä»£ç å¼æ¾ãæä¸æ¯
å¼æ¾çå¼åéä¼ãæ¯æ跨平å°çåºç¨
(
å¯ä»¥è¿è¡å¨å ä¹ææç
Unix
ã
Windows
ã
Linux
ç³»ç»å¹³å°ä¸
)
以åå®çå¯ç§»æ¤æ§
çæ¹é¢ã
å®æ¹ç½ç«ï¼
http://www.apache.orgä¸è½½å°åï¼
http://www.eryin.com/Server/Soft/200808/01245.htmlT
omcat
Tomcat
æ¯ä¸ä¸ªå¼æ¾æºä»£ç ãè¿è¡
servlet
å
JSP
Web
åºç¨è½¯ä»¶çåºäº
Java
ç
Web
åºç¨è½¯ä»¶å®¹å¨ã
Tomcat
Server
æ¯æ ¹æ®
servlet
å
JSP
è§èè¿è¡æ§è¡çï¼å æ¤æ们就å¯ä»¥è¯´
Tomcat
Server
ä¹å®è¡äº
Apache-Jakarta
è§èä¸æ¯ç»å¤§å¤æ°
åä¸åºç¨è½¯ä»¶æå¡å¨è¦å¥½ã
Tomcat
æ¯
Java
Servlet
2.2
å
JavaServer
Pages
1.1
ææ¯çæ åå®ç°ï¼æ¯åºäº
Apache
许å¯è¯ä¸å¼åçèªç±è½¯ä»¶ã
Tomcat
æ¯å®å
¨éåç
Servlet API 2.2
å
JSP 1.1
å
¼å®¹ç
Servlet/JSP
容å¨ã
Tomcat
使ç¨äº
JServ
çä¸äºä»£ç ï¼
ç¹å«æ¯
Apache
æå¡éé
å¨ãéç
Catalina
Servlet
å¼æçåºç°ï¼
Tomcat
第åçå·çæ§è½å¾å°æåï¼ä½¿å¾å®æ为ä¸ä¸ªå¼å¾èèç
Servlet/JSP
容å¨ï¼å æ¤ç®å许å¤
WEB
æå¡å¨é½æ¯éç¨
Tomcat
ã
å®æ¹ç½ç«ï¼
http://tomcat.apache.orgä¸è½½å°åï¼
http://www.eryin.com/Server/Soft/200808/02250.htmlå°å
WEB
æå¡å¨
ã
micro_httpd - really small HTTP server
ã
ç¹ç¹ï¼
*
æ¯æå®å
¨ç
..
ä¸çº§ç®å½è¿æ»¤
*
æ¯æéç¨ç
MIME
ç±»å
*
æ¯æç®åçç®å½
*
æ¯æç®å½å表
*
æ¯æ使ç¨
index.html
ä½ä¸ºé¦é¡µ
* Trailing-slash redirection
*
ç¨åºæ»å
±ä»£ç æ
200
å¤è¡
è¿ä¸ª
httpd
éåå¦ä¹ ç®åç
Web Server
ç¼åå¦ä¹ ï¼
å 为å®åªæä¸ä¸ªç®åçæ¡æ¶ï¼
åªè½å¤å¤çç®åçéæ页ï¼å¯ä»¥
èèç¨æ¥æ¾éæ页ã
å®æ¹å°åï¼
http://www.acme.com/software/micro_httpd/ä¸è½½å°åï¼
http://www.acme.com/software/micro_httpd/micro_httpd_12dec2005.tar.gz
ã
mini_httpd - small HTTP server
ã
ç¹ç¹ï¼
*
æ¯æ
GET
ã
HEAD
ã
POST
æ¹æ³
*
æ¯æ
CGI
åè½
*
æ¯æåºæ¬çéªè¯åè½
*
æ¯æå®å
¨
..
ä¸çº§ç®å½åè½
*
æ¯æéç¨ç
MIME
ç±»å
*
æ¯æç®å½å表åè½
*
æ¯æ使ç¨
index.html, index.htm, index.cgi
ä½ä¸ºé¦é¡µ
*
æ¯æå¤ä¸ªæ ¹ç®å½çèæ主æº
*
æ¯ææ åæ¥å¿è®°å½
*
æ¯æèªå®ä¹é误页
* Trailing-slash redirection
mini_httpd
ä¹æ¯ç¸å¯¹æ¯è¾éåå¦ä¹ 使ç¨ï¼å¤§ä½å®ç°äºä¸ä¸ª
Web
Server
çåè½ï¼æ¯æéæ页å
CGI
ï¼è½å¤ç¨æ¥æ¾
ç½®ä¸äºä¸ªäººç®åçä¸è¥¿ï¼ä¸éå®æå
¥ç产使ç¨ã
å®æ¹å°åï¼
http://www.acme.com/software/thttpd/ä¸è½½å°åï¼
http://www.acme.com/software/mini_httpd/mini_httpd-1.19.tar.gzã
thttpd - tiny/turbo/throttling HTTP server
ã
thttpd
ä¸æ¯ä¸ä¸ªç®å
,
å°å
,
轻便
,
å¿«éåå®å
¨ç
http
æå¡å¨
.
ç®åï¼å®è½å¤æ¯æ
HTTP/1.1
åè®®æ åï¼æè
è¶
è¿äºæä½æ°´å¹³
å°å·§ï¼å®å
·æé常å°çè¿è¡æ¶é´ï¼å 为å®ä¸
fork
åè¿ç¨æ¥æ¥åæ°è¯·æ±ï¼å¹¶ä¸é常谨æ
çåé
å
åï¼æ§è½å¯¹æ¯è¡¨ï¼
http://www.acme.com/software/thttpd/benchmarks.html
ï¼
便æºï¼å®è½å¤å¨å¤§é¨åçç±»
Unix
ç³»ç»ä¸è¿è¡ï¼å
æ¬
FreeBSD, SunOS 4, Solaris 2, BSD/OS, Linux, OSF
çç
å¿«éï¼å®çé度è¦è¶
è¿ä¸»æµç
Web
æå¡å¨ï¼
Apache, NCSA, Netscape
ï¼
ï¼å¨é«è´è½½æ
åµä¸ï¼å®è¦å¿«çå¤
å®å
¨ï¼å®åªåçä¿æ¤ä¸»æºä¸åå°æ»å»ï¼ä¸ä¸ææå¡å¨
thttpd
类似äº
lighttpd
ï¼
对äºå¹¶å请æ±ä¸ä½¿ç¨
fork()
æ¥æ´¾çåè¿ç¨å¤çï¼
èæ¯éç¨å¤è·¯å¤ç¨
(Multiplex)
ææ¯æ¥å®ç°ã
å æ¤æè½å¾å¥½ãåæ¶å®è¿æä¸ä¸ªç¹ç¹å°±æ¯åºäº
URL
çæ件æµééå¶ï¼è¿å¯¹äºä¸è½½çæµéæ§å¶èè¨æ¯é常æ¹ä¾¿çã象
Apache
å°±å¿
须使ç¨æ件å®ç°ï¼æçè¾
thttpd
ä½ã
thttpd
è·
lighttpd
类似ï¼éåéæèµæºç±»çæå¡ï¼æ¯å¦å¾çãèµæºæ件ãéæ
HTML
çççåºç¨ï¼æ§è½åºè¯¥æ¯è¾
好ï¼åæ¶ä¹éåç®åç
CGI
åºç¨çåºåã
å®æ¹å°åï¼
http://www.acme.com/software/thttpd/ä¸è½½å°åï¼
http://www.acme.com/software/thttpd/thttpd-2.25b.tar.gz
ã
lighttpd - light footprint + httpd = LightTPD
ã
Lighttpd
æ¯ä¸ä¸ªå¾·å½äººé¢å¯¼çå¼æºè½¯ä»¶ï¼å
¶æ ¹æ¬çç®çæ¯æä¾ä¸ä¸ªä¸é¨é对é«æ§è½ç½ç«ï¼å®å
¨ãå¿«éãå
¼å®¹æ§å¥½
并ä¸çµæ´»ç
web server
ç¯å¢ãå
·æé常ä½çå
åå¼éï¼
cpu
å ç¨çä½ï¼æè½å¥½ï¼ä»¥å丰å¯ç模åçç¹ç¹ã
lighttpd
æ¯ä¼å¤
OpenSource
è½»é级ç
web
server
ä¸è¾ä¸ºä¼ç§çä¸ä¸ªãæ¯æ
FastCGI,
CGI,
Auth,
è¾åºå缩
(output
compress), URL
éå
, Alias
çéè¦åè½ï¼
è
Apache
ä¹æ以æµè¡ï¼
å¾å¤§ç¨åº¦ä¹æ¯å 为åè½ä¸°å¯ï¼
å¨
lighttpd
ä¸å¾å¤åè½
é½æç¸åºçå®ç°äºï¼è¿ç¹å¯¹äº
apache
çç¨æ·æ¯é常éè¦çï¼å 为è¿ç§»å°
lighttpd
å°±å¿
é¡»é¢å¯¹è¿äºé®é¢ã
å®ç¨èµ·æ¥
lighttpd
ç¡®å®é常ä¸éï¼
apache
主è¦çé®é¢æ¯å¯é并åä¸ï¼
ä¸æç
fork()
ååæ¢ï¼
以åè¾é«
ï¼ç¸å¯¹äº
lighttpd
èè¨ï¼çå
åå ç¨ï¼ä½¿ç³»ç»çèµæºå å°½æ¯ç«ãè
lighttpd
éç¨äº
Multiplex
ææ¯ï¼ä»£ç ç»è¿ä¼åï¼ä½ç§¯é常å°ï¼èµæº
å ç¨å¾ä½ï¼èä¸ååºé度ç¸å½å¿«ã
å©ç¨
apache
ç
rewrite
ææ¯ï¼å°ç¹éç
cgi/fastcgi
ä»»å¡äº¤ç»
lighttpd
æ¥å®æï¼å
åå©ç¨ä¸¤è
çä¼ç¹ï¼ç°å¨é£å°æ
å¡å¨çè´è½½ä¸éäºä¸ä¸ªæ°é级ï¼èä¸ååºé度ä¹æé«äºä¸ä¸ªçè³æ¯
2
个æ°é级ï¼