Apache³Ì·sª©¥»¬°1.3.9¡C¥¦ªº¥Dnºô¯¸¬° http://www.apache.org/¡C Apacheweek¤]¦³¤£¿ùªº¸ê®Æºô¯¸¬°¡G http://www.apacheweek.com/¡C Apacheªº¤å¥óÁÙ¦n°Õ¡I©Ò¥H§Ú¤£¥²¦A¦h¥[²Óz¦p¦ó³]©wApache¡C¥L̦bºô¯¸¤W¡A¤]¸ò ì©lµ{¦¡¦b¤@°_¡£HTML®æ¦¡¡¤¡CÁöµM¤]¦³¤@¯ë¤å¦rÀɮ榡¡A¦ý¥HHTML®æ¦¡¸û¨Î¡Cµ¥ ¨ìApache Documentation Project§¹¦¨«á¡A¥¦À³¸Ó·|§ó¦n¡C¦ý²{¦b¤j³¡¥÷ªº¤å¥ó ³£¥Ñ¥L̪º¶}µoªÌ¦Û¦æ¼¶¼g¡C§Ú¨Ã¤£¬On§åµû¥LÌ¡A¦ý¬O¦pªG¤£ÁA¸Ñ¨ä¤¤ªº³N»y¡A ÁÙ¯u¤£ÁA¸Ñ³o¨Ç¤å¥ó¡C
RedHat ¡B Slackware ¤Î OpenLinux¤¤§Y¤w¸g¦³ Apache¡Cª©¥»¥i¯à¤£¬O³Ì·sªº¡A¦ý ¤G¦ì¤¸Àɵ´¹ï¥i¾a¡C¤£©¯ªº¬O¡A¦UºØª©¥»³£¨Ï¥Î¤£¦Pªº¥Ø¿ý¡C
ì©lµ{¦¡¥i±q http://www.apache.org/dist/¨ú±o¡C¤G¦ì¤¸ÀÉ¥i±q ftp://sunsite.unc.edu/pub/Linux/apps/www/servers/¨ú±o¡C¨Ï¥Î RedHatªº¤HÁÙ¥i¥H±q ftp://ftp.redhat.com/pub/contrib/i386/¨ú±oRPMÀÉ¡C
¦pªG§Aªº¦øªA¾¹¬O¥Î©ó°Ó·~¥Î³~¡A³Ì¦n¬O±qApacheªººô¶¤U¸üì©lµ{¦¡¦Û¦æ½sĶ¡C¤] ¥i¥H¨Ï¥Î¦p RedHat¡B Slackware©Î OpenLinux¥»¨Ó´Nªþ±aªº¤G¦ì¤¸ÀÉ¡C¦pªG§A¥Î¨ä¥L°õ ¦æÀÉ¡A¨ä¤¤¥i¯à·|¦³Àb«È°½¥[ªº'«áªù'¡C¤]¥i¯à¦]¬°¤@¨Çpatch¤£°÷¦w©w¡A¦Ó³y¦¨·í¾÷¡C ¦pªG¦Û¦æ½sĶ¡A§AÁÙ¥i¥H´x´¤¹ê»Ú½sĶ¶i¥hªº¼Ò²Õ¡A§A¤]¥i¥H¨M©wn©ñ¦b¨º¤@ӥؿý¤¤¡C ½sĶ¨Ã¤£Ãø¡A¦Ó¥B±q½sĶªº¹Lµ{¤¤¡A§AÁÙ¯à¾Ç¨ì¦p¦ó¦¨¬°¯u¥¿ªºLinux¨Ï¥ÎªÌ;)
º¥ý±N¤å¥ó®w¥´¶}¡£untar¡¤¡C©ñ¤J¤@¼È¦s¥Ø¿ý¤¤¡AµM«á¨ìsrc¥Ø¿ý¡C¦pn¥[¤J¯S®í¼Ò²Õ¡A
´N¦b¦¹×§ïconfigurationÀɮס£¥±`¥Dnªº¼Ò²Õ¤w¸g¥[¤J¤F¡¤¡CµM«á°õ¦æ¦¹configuration
shell script(./Configure
)¡C¶·½T©w¥¦¥¿½T±Ôz§A¬O¦b¥ÎLinux¥¥x¡A¦Ó¥B¥H
gcc¬°½sĶ¾¹¡C±µ¤U¨Ó¡A§A¥i¥Hקïhttp.h¨Ó§ïÅܹw³]ªº¥Ø¿ý¡£©ñconfigÀÉ¡¤¹w³]¬°
/usr/local/etc/httpd/
¡A§A¥i¯à·|¦Ò¼{²¤Æ¬°/etc/httpd/
¡C¦øªA¾¹
ªº®Ú¥Ø¿ý¡£©ñHTMLº¶¡¤¹w³]¬°/usr/local/etc/httpd/htdocs/
¡A§A¤]¥i¯à¦Ò
¼{§ï¬°/home/httpd/html
¡£³oÓ¬ORedHatªº¹w³]¥Ø¿ý¡¤¡C¦pªG§An¨Ï¥Îsu-exec
¥Ø¿ý¡£°Ñ¦Ò«ázªº¦U¶µ¥\¯à²Ó»¡¡¤¡A§A¤]¥i¥H¦Ò¼{²¤Æ¤§¡C¦øªA¾¹ªº¹w³]®Ú¥Ø¿ýÁÙ¥i¥H¥Î
configÀɨӧó§ï¡C¦pªGApacheµLªkŪ¨ìconfigÀɮɡAÁÙ¬O¦bhttp.h¤¤©w¸q½sĶ«áªº®Ú¥Ø¿ý
¦ì¸m§a¡C¨ä¥Lªºªº¹w³]¥Ø¿ý³£¥²¶·¥ÎconfigÀɮרÓקï¡C³Ì«á¡A¦b¦¹°õ¦æmakeÀɨӽsĶ
Apache¡C
¦pªG¦]¬°¿òº|includeÀɮסA¦Ó¦b½sĶ®É¥X°ÝÃD¡A¤U±³o¨Ç¶µ¥ØȱoÀˬd¤@¤U¡G½T©w¤w¦w¸Ë ¤F¾A¦X§Aªº®Ö¤ß¨t²Îª©¥»ªºKernel header¡£§YincludeÀɮס¤¡C¨ÃÀˬd¤Uzªº³sµ²¬O¥¿½Tªº¡A
/usr/include/linux should be a link to /usr/src/linux/include/linux
/usr/include/asm should be a link to /usr/src/linux/include/asm
/usr/src/linux should be a link to the Linux source directory (ex.linux-2.0.30)
n³sµ²ÀÉ®×¥i¥Îln -s
«ü¥O¡C³o©Mcp«ü¥O¬ÛÃþ¦ü¡A¥u¬O¥¦³sµ²¦Ó¤£¬O½Æ»s
¡£ln -s source-dir destination-link
¡¤¡C
¦pªG¦b°õ¦æmake®É¨S¦³°ÝÃD¡A²{¦bªº¥Ø¿ý¤¤À³¦³Ó¥shttpdªº°õ¦æÀÉ¡C§â¥¦²¾¨ìbin¥Ø¿ý¤¤¡C
/usr/sbin
©Î/usr/local/sbin
³£¥i¡C
¥t¥~±Nconf.¡Blogs¤Î icons¤TÓ¦¸¥Ø¿ý±qsrc¥Ø¿ý½Æ»s¨ì¦øªA¾¹ªºhome¥Ø¿ý¡CµM«á±Nconf¦¸
¥Ø¿ý¤¤ªº¤TÓÀɮצWºÙקï¤@¤U¡A®³±¼¨ä¤¤ªº-dist
¡A¡£¨Ò¡G±N
httpd.conf-dist
§ï¦¨/usr/local/sbin
¡¤¡C
Apache¤¤ÁÙ¦³¨Ç¤ä´©µ{¦¡¡C¥L̳£¦bsupport
¥Ø¿ý¤¤¡A³£n¦U§O½sĶ¨Ã¦w¸Ë¡C¤j³¡¥÷³o
¨Çµ{¦¡³£¥i¥Î¸Ó¥Ø¿ý¡£§A°õ¦æconfigure
script®É¡A¤w½sĶ¦n¤F¡¤¤¤ªºmakefile¨Ó½sĶ¡C
§A¨Ï¥ÎApache®É¡A¨Ã¤£¤@©wn¥Î¨ì³o¨Çµ{¦¡¡A¦ý¨ä¤¤¦³¨Ç¥i¥H²¤Æ¨t²ÎºÞ²zûªº¤u§@¡C
¦¹®É¦bconf
¦¸¥Ø¿ý¤¤¡A§AÀ³¸Ó·|¦³¥|ÓÀɮסC¨ä¤¤¡Ahttpd.conf
¥Î¨Ó³]©w¦øªA¾¹
¦uÅ@¯«¡£port¸¹½X¡B¨Ï¥ÎªÌµ¥¡E¡E¡¤¡Csrm.conf
¥Î¨Ó³]©wroot documen tree¡B
special handleµ¥¡C¦Óaccess.conf
¥Î¨Ó³]©w°ò¥»¦s¨ú¡C³Ì«á¡Amine.types
¥Î¨Ó§i
¶D¦øªA¾¹¡A¨º¤@Ó©µ¦ùÀɮצW¥Nªí°eµ¹ÂsÄý¾¹¨º¤@ºØmine«¬¦¡¡C
¤@¥¹ÁA¸Ñ¨ä¤¤©Ç³N»y¡A§A´N·|µo²{³o¨Ç³]©wÀɤ¤¦³³\¦hªþ±a»¡©ú¡C¦b§A±Ò¥Î¦øªA¾¹¤§«e¡A¹ý ¹ý©³©³±oŪ¥¦¤@¹M¡C¨ä¤¤ªº¨C¤@Ó¶µ¥Ø¦bApache¤å¥ó¤¤³£¦³»¡©ú¡C
mine.types
Àɮר䣬O¯u¥¿ªº³]©wÀÉ¡C¦øªA¾¹¦b°e¸ê®Æµ¹ÂsÄý¾¹¤§«e¡A±N©µ¦ùÀɮצWĶ
¬°mine«¬¦¡¡C¤@¯ëªº mine«¬¦¡³£¤w¦b¦¹Àɮפ¤¤F¡A¤j¦h±¡ªp¤U¤£¶·×§ï¦¹¤@ÀɮסC¥¼¨Ó¤@¨Ç
¤é¤l¥H«á¡A¦³¤@¨Ç·sªºmine«¬¦¡¶}µo¥X¨Ó¥H«á¡A¦¹®É¤~¯u¥¿nקï³o¤@ÀɮסC
°OµÛ¤@ÂI¡I¨C·í§A§ïÅܤF³]©wÀÉ¡A´N¶·«·s±Ò°ÊApache¡C¤£µM¤]n¥Îkill
°e¤@ÓSIGNUP
°T¸¹¡A¨Ó±Ò°Ê·sªº³]©w¡C³oÓ°T¸¹¬On°e¨ì¤÷µ{¦¡¦Ó¤£¬O¤lµ{¦¡¡Cn¬d¥X¤÷µ{¦¡ªº¥N¸¹¦³¨Ç
¤èªk¡A¤÷µ{¦¡ªº¥N¸¹¤@¯ë¸û¤p¡C¤÷µ{¦¡ªº¥N¸¹¤]¥i±qlog¦¸¥Ø¿ýªºhttpd.pid
Àɮפ¤¬d¨ì¡C
¦Ó¥B¦pªG§A°ekill
µ¹¤lµ{¦¡¡A¤lµ{¦¡¦º¤F¡A¦Ó¤÷µ{¦¡¤S·|¥ß¨è²£¥Í¤@Ó¤lµ{¦¡¡C
§Ú¤£·Q±aµÛ§A¤@¨B¤@¨B¦a¥h³]©wApache¡C§Ú·Q°w¹ï¤@¨Ç¯S®íªº®×¨Ò¡B¿ï¶µ¤Î¥\¯à¥[¥H»¡©ú¡C ±j¯P«Øij¦n¦nŪ¤@ŪApache¤å¥ó¤¤ªº«O¥þ³Z¬¡C¥¦¥i¥H±q http://www.apache.org/docs/mics/security_tips.html¤U¸ü¡C
µêÀÀ¥D¾÷¥Î©ó¤@¥x¹q¸£¾Ö¦³¼ÆÓºô°ì¦WºÙªº±¡ªp¡C¦Ñªº¤èªk¬Oµ¹¨C¤@µêÀÀ¥D¾÷¤@Ó±M¥Îªº IP¦ì§}¡C·sªº¤èªk¥u¥Î¤@Ó¦@¥ÎªºIP¦ì§}¡A¦ý¬O¦pªGÂsÄý¾¹¤£¤ä´©HTTP 1.1«h¨S¦³¥Î¡C
§Ú«Øij¡A¦pªG¬O¥Î¦b°Ó·~¤W¡A¥ý¥Î¦Ñ¤èªk¡Aª½¨ì¤H¤HªºÂsÄý¾¹³£¤ä´©HTTP 1.1®É¡A¦A§ï¥Î ·s¤èªk¡C¦Ó¥B¦Ñ¤èªkªº»¡©ú¤]¸û¦h¡C¨âºØ¤èªk³£¦³µêÀÀmail¥\¯à¡£³o¹ï¶Ü¡H¡¤¡A¦ý¥u¦³¦Ñ ¤èªk¤~¦³µêÀÀFTP¥\¯à¡C
¦pªG¥Î¦b¤p²Õ´©ÎÓ¤Hºô¶¡A§A¥i¦Ò¼{·sªº¤èªk¡C¥¦¥i¥H¬Ù¥h§A©ù¶QªºIP¦ì§}¡C
§AÁÙ¥i¥H¦b¦P¤@¦øªA¾¹²V¦X¨âºØ¤èªk¡C¬ÛÃö²Ó¸`°Ñ¦ÒApacheweek¡G http://www.apacheweek.com/features/vhost¡C
¥H¦¹¤@¤èªk¡A¨C¤@µêÀÀ¥D¾÷¦U¦³¤@ÓIP¦ì§}¡C¨Ï¥Î¨C¤@½Ð¨D¡£request¡¤©Ò°e©¹¤§IP¦ì§} ¡AApache¤Î¨ä¥Lµ{¦¡¡A¨M©wn¥Î¨º¤@Óºô°ì¨Ó§¹¦¨ªA°È¡C³oÓ¨BÆJ«D±`®ö¶OIPªÅ¶¡¡C¥H §ÚªºµêÀÀºô°ì©Ò¦bªº¦øªA¾¹¨ÓÁ|¨Ò¡A¥L̳£¦³35,000ÓµêÀÀ±b¸¹¡A¤]´N¬O35,000ÓIP¦ì§} ¡A¦ý§Ú¬Û«H¥u¦³¤£¨ì50Ó¦øªA¾¹¬O¯u¥¿¦b¹B§@¡C
³]©w³oºØµêÀÀ¥D¾÷¦³¨â¤j¨BÆJ¡A²Ä¤@¬O³]©wLinux¡A¨Ï¥¦¯à±µ¨ü¨âÓ¥H¤WªºIP¦ì§}¡C¨ä¦¸ ¡A¬O³]©wApache¨Ï¥¦¤ä´©µêÀÀ¥D¾÷¥\¯à¡C
²Ä¤@¨BÆJ¡A³]©wLinux¡A¨Ï¥¦±µ¨ü¼ÆÓIP¦ì§}¡A³on«Ø¥ß¤@Ó·sªº®Ö¤ß¨t²Î¡A´N¬O¨Ï¥¦¤ä ´©IP networking ¤ÎIP aliasing¡C¡£¦b2.0ª©¤Î¨ä«áªºª©¥»¡A³o¨BÆJ¸û®e©ö¡¤¡C½sĶ®Ö ¤ßªº»¡©ú¡A°Ñ¦Ò kernel howto¡C
²Ä¤G¨BÆJ¡An³]©w¶}¾÷µ{§Ç¤¤ªº¤¶±¡C¦pªG§A¥Îªº¬ORed Hat¡A¥i¥Î±±¨î¥x¨Ó³]©w¡C¥Î root¥´¶}X-Windows¡A§AÀ³¸Ó¥i¥H¬Ý¨ì±±¨î¥x¡CÂùÀºNetwork configuration¡AÂI¿ï interface panel¨Ã¿ï¾Ü§AªºNetwork card¡CÂI¿ï©³¤Uªºalias¡A¶ñ¤J¸ê®Æ¡AµM«áÂI¿ïdone¡C ¨C¤@µêÀÀ¥D¾÷³£n¤@¤@³]©w¡C
¦pªG§A¤£¬O¥ÎRed Hat¡A§A´Nn¥Î¤â°Ê¤è¦¡¨Ó³]©w¡A¦b/etc/rc.d
¥Ø¿ý¤¤ªº
rc.local
Àɮפ¤¥[¤J«ü¥O¡C¨C¤@³]¬I³£n¦³Óifconfig
¤Îroute
«ü¥O¡C
¦P¦W³]¬I¬°¤@¥Dn³]¬Iªº¦¸³]¬I¡C¨Ò¦p¡Geth0¡G1 ¡Beth0¡G2µ¥¡C¤Uz¬°³]©w¤@¦P¦W³]¬Iªº
¨Ò¤l¡G
ifconfig eth0:0 192.168.1.57
route add -host 192.168.1.57 dev eth0:0
ÁÙ¥i¥H¦bifconfig©R¥O¤¤¥[¤Jbroadcast address¤Înetmask¡C¦pªG¦³³\¦h¦P¦W¦a§}¡A¥i¥H¥Î for loop¨Ó²¤Æ©R¥OÀÉ¡C
¬ÛÃö²Ó¸`°Ñ¦Ò IP alias mini howto¡C
±µ¤U¨Ó´N¬O³]©wºô°ì¦WºÙ¦øªA¾¹¡£DNS¡¤¨Ó¬d¸ß³o¨Ç·sªººô°ì¡C¦pªG§A¨S¦³§Aªººô°ì¦WºÙ ¡A¥i¨ì Internicµù¥U¡C¥i°Ñ¦ÒDNS-HOWTO¨Ó ³]©w§AªºDNS¡C
³Ì«án³]©wApache¨ÓÅý³o¨ÇµêÀÀºô°ì¥¿±`¤u§@¡C¨Ï¥Îhttpd.conf
³]©wÀÉ¡C¨ä¤¤¦³Ó¨Ò
¤l¡A¥i¥H°Ñ¦Ò¡C©Ò¦³ªº«ü¥O³£©ñ¦bvirtualhost
«ü¥O¼Ðñ¤§¤º¡A¥ô¦ó«ü¥O³£¥i©ñ¤J¡C¤@
¯ë¨Ó»¡¡An³]©w¦U§Oªº®Ú¥Ø¿ý¡Ascript¥Ø¿ý¤ÎlogÀɮץؿý¡A¥un¥[¤Jvirtualhost
¼Ðñ
¡A´N¥i¥H¤£Â_¥[¤J·sªºµêÀÀ¥D¾÷¡C
¦b¤@¨Ç·¥¯S®íªº±¡ªp¤U¡A¦pªG¬Y¤@ÓµêÀÀ¥D¾÷»Ýn¨Ï¥Î¬Y¤@«ü¥O¡A¦ý¤£©¯¥¦¤S¤£¯à©ñ¤Jµê ÀÀ¥D¾÷ªº¼Ðñ¤¤¡A¨º´N¥u¦n¨Ï¥Î¤£¦P¦øªA¾¹¡CBindaddress«ü¥O§Y¬°¤@¨Ò¡C¨C¤@Ó¦øªA¾¹³£ n¦³¤£¦Pªº¦WºÙ¤Î³]©wÀÉ¡C¨C¤@¦øªA¾¹¥ut³d¤@Ó¥ÑBindaddress«ü¥O©Ò«ü©wªº¦ì§}¡Cµ²ªG ¨t²Î¸ê·½´N³Q¤j¤jªº®ö¶O±¼¤F¡C
¦¹¬°«Ø¥ßµêÀÀ¥D¾÷ªº·s¤èªk¡C³æ¤@IP¦ì§}³Q±Ä¥Î¡A¦]¦ÓIP¦ì§}¬O¥Î¦b¯u¹ê¾÷¾¹¤W¡£¦Ó«Dµê ÀÀ¥D¾÷¡¤¡C¦b¤Wz¨Ò¤l¤¤¡A30,000ÓµêÀÀ¥D¾÷¥u·|¥Î±¼50ÓIP¦ì§}¡£¨C¥x¾÷¾¹¤@Ó¡¤¡C³o n·f°tHTTP1.1¨óij¡AÂsÄý¾¹¦b°e¥X½Ð¨D®É¡A³qª¾¦øªA¾¹¥¦n±µ¨ì¨ºÓºô¯¸¡C¦pªGÂsÄý¾¹ µLªk¤ä´©HTTP1.1¡A´N·|¥hŪ¦øªA¾¹ªºº¶¡A¨ä¤¤À³¦³¿ï³æ¨Ñ¿ï¾Ün¨Ï¥ÎªºµêÀÀ¥D¾÷¡C³o¼Ë ¤l¡Aì¨Ó§A¥H¬°§A¾Ö¦³¦Û¤vªº¦øªA¾¹ªº¨ººØ·Pı¡A´N·|³Q¯}Ãa¤F¡C
³]©w¨BÆJ¤ñ©T©wIP¦ì§}ªº¤è¦¡®e©ö¡C§A¤´µMn±qIntenicµù¥U§Aªººô°ì¦WºÙ¡AµM«á³]©wºô °ì¦WºÙ¦øªA¾¹¡C¦ý¬Oºô°ì¦WºÙ¦øªA¾¹«o¬On«ü¨ìì¨Óºô°ì¦WºÙªºIP¦ì§}¡CApacheªº³]©w¤è ¦¡¤´µM¤£ÅÜ¡C¦]¬°§A¦bvirtualhost¼Ðñ¤º¨Ï¥Î¬Û¦PIP¦ì§}¡AApache´Nª¾¹D§AªºµêÀÀ¥D¾÷ n¦@¥ÎIP¦ì§}¡C
°w¹ï¦Ñ¦¡ªºÂsÄý¾¹«h¦³´XºØ½Õ¾ã¤u§@n°µ¡A§Ú¥u¤¶²Ð¨ä¤¤³Ì¨ÎªÌ¡Cº¥ý¶·±N§Aªºº¶¥Ø¿ý
³]¬°¤@ÓµêÀÀ¥D¾÷¡£©T©wIP©Î¦@¥ÎIP¦ì§}¡¤¡C³o¼Ë¤l§Aªºº¶¥Ø¿ý´N¥i¥HÄË¥X¨Ó¥Î©ó³s±µ
¨ì¦UÓµêÀÀ¥D¾÷¤W¥h¡CµM«á´N¬O¬°¦Ñ¦¡ÂsÄý¾¹¶}¤@Ó'«áªù'¡C§@ªk¬O¥ÎServerPath
«ü¥O¡A¬°¨C¤@Óvirtualhost
¼Ðñ¤ºªºµêÀÀ¥D¾÷©w¸q¸ô®|¡C¨Ò¦p¡A¦bwww.mysite.com
¤¤¥[¤@ÓServerPath /mysite/
¡A¦ÑªºÂsÄý¾¹´N¥i¥H¥Îwww.mysite.com/mysite/
¦s¨ú¸Ó¥D¾÷ªº¸ê®Æ¡CµM«á¦bº¶¥Ø¿ý©ñ¤J¤@¹w³]º¶¡A¨ä¤¤¦n¦n¦aÄU¨Ï¥ÎªÌ§ï¥Î·sªºÂsÄý
¾¹¡A¨Ã¥B±ø¦C¸Ó¥D¾÷¤W¦UÓºô¯¸ªº'«áªù'¡C¦p¦¹¤@¥¹¤@ӦѦ¡ÂsÄý¾¹Åª¨ì¦¹¯¸¡A´N·|Åã
¥Ü¤@Óº¶¡A§iª¾¦p¦ó³s¨ì¥¿½Tªººô¶¡C¦Ó·s¦¡ÂsÄý¾¹«h¥iª½±µ³s¨ì¥¿½Tªººô¶¡CÁÙnª`
·N¤@¥ó¨Æ¡A§Y§Aªºº¶¤¤ªº³sµ²¥²¶·©w¸q²M·¡¡C¦]¬°¨C¤@¶³£¥i¥H¥H¨âÓ¤£¦PªºURL¨Ó³sµ²
¡£¨Ò¦p¡Gwww.mysite.com©Mwww.mysite.com/mysite/¡¤¡C
§Æ±æ¨ì¦¹¬°¤î¡A§AÁÙ¯à«O«ùÀY¸£²M´·¡A²×¨s¤Wzªº¤º®e¨Ã¤£®e©ö·d²M·¡¡C·d¤£¦n¡A§A³Ì«á ÁÙ¬O¨M©w¨Ï¥Î±M¥ÎIP¦ì§}¡C ¬ÛÃö¸ê®Æ¥i¥H±qApacheºô¯¸¨ú±o http://www.apache.org/manual/host.html¡C
¦pªG¦³¤H¦³Ãö©ó¦@¥ÎIP¦ì§}ªº¸ê®Æ¡A½Ð§i¶D§Ú¡C§Ú·Qª¾¹D¨ì©³¦³¦h¤ÖÂsÄý¾¹¥i¤ä´© HTTP 1.1¡C¦p¦³¤@¥÷²M³æ¦C¥X¥L̪ºª©¥»´N§ó¦n¡C
¦³¨âºØ¤è¦¡Åý§Aªººô¯¸¥Î¤á¹B¥ÎCGI script¥\¯à¡C²Ä¤@ºØ¤è¦¡¬O¡A¥un¬OCGI script¡A¨ä
©µ¦ùÀɦW§Y¬°.cgi
¡C¥t¤@ºØ¤è¦¡¬O«Ø¥ß¤@script¦¸¥Ø¿ý¡£³q±`¥scgi-bin
¡¤¡C
¨âºØ¤è¦¡¤]¥i¨Ã¥Î¡C¤£½×¨Ï¥Î¨º¤@ºØ¤è¦¡¡A§Aªºscript¥²¶·³]¦¨¥i°õ¦æ¼Ò¦¡
¡£chmod 711
¡¤¡C¦ý¬OÅý¥Î¤á¨Ï¥Îscript¦s¨ú¥i¯à·|¦³«O¥þªº·ÀI¡A©Ò¥H¥ýn²Ó¤ßªº
¬ã¨s¡C
§ÚÓ¤H¤ñ¸û³ßÅw¨Ï¥Î²Ä¤@ºØ¤è¦¡¡A¤×¨ä¬O·íscript«Ü½ÆÂø®É¡C³oºØ¤è¦¡¤¹³\§âscript©ñ¦b
¥ô¦ó¥Ø¿ý¤¤¡C§ÚÓ¤H³ß·R±Nscript©ñ¤J¬ÛÃöº¶¥Ø¿ý¤¤¡C¦pªG¤@Óºô¯¸¦³³\³\¦h¦hªºscript
¡A¨º»ò±N¥L̤À´²¦w¸m¤ñ¶°¤¤¦b¤@ӥؿý¤¤n®e©ö¬Ý±o¦h¤F¡C¦Ó¥B³]©w¤]¤ñ¸û²³æ¡Cº¥ý
¦bsrm.conf
Àɫᱶ}±Ò¡£uncomment¡¤.cgi
¼Ð¦¡¡AµM«áÀˬd¬O§_¨C¤@¥Ø¿ýªº
access.conf
Àɤ¤³£¦³option ExecCGI
©ÎAll
¡C
«Ø¥ßscript¦¸¥Ø¿ý«h¸û¬°«O¥þ¡C§@ªk¬O¦bsrm.conf
Àɤ¤¨Ï¥ÎscriptAlias«ü¥O¡C²Ä¤@
ӰѼƬO¥N¦W¡£Alias¡¤,²Ä¤GӰѼƬO¯u¹ê¥Ø¿ý¡C¨Ò¦p«ü¥O
ScriptAlias /cgi-bin/ /usr/httpd/cgi-bin/
©w¸q:
·í©I¥s¥Ø¿ý/cgi-bin/
®É¡A¯u¥¿ªºscript¬O¦b/usr/httpd/cgi-bin/
¤¤°õ¦æ¡C
¬°¤F«O¥þªº²z¥Ñ¡A¦baccess.conf
Àɤ¤³]©w¸Ó¥Ø¿ýªº¯S©Ê¬°
Options none¡AAllowOveride none
¡£¥un¶}±Ò¡£uncomment¡¤¸Ó¦æ§Y¥i¡¤¡C¦ýnª`·N
¡A¤£n§â¥¦³]¬°¥ô¦óº¶ªº¦¸¥Ø¿ý¡C¨Ò¦p»¡¡A¦pªG§Aªºº¶¥Ø¿ý¬°
/home/httpd/html/
¡A¤£n³]¬°/home/httpd/html/cgi-bin
¡A¦ý¥i¥H³]¬°
/home/httpd/cgi-bin
¡C
¦pªGn¤¹³\¥Î¤á¦³¦Û¤vªºscript¦¸¥Ø¿ý¡A¥i¥H¨Ï¥Î¼ÆÓScriptAlias
©R¥O¡C¦pªG¨Ï¥Îµê
ÀÀ¥D¾÷¡A«h¦bvirtualhost
¼Ðñ¤º©ñ¤JScriptAlias
©R¥O¡C¦³¤H¥i¥H§i¶D§Ú¤£¶·n
¤@¤@¥[¤JScriptAlias©R¥Oªº¤èªk¶Ü¡H
¦³¨âºØ¤£¦P¤è¦¡¨Ó³]©w¨Ï¥ÎªÌªººô¶¥Ø¿ý¡C²Ä¤@Ó¤èªk¬O¦b¨Ï¥ÎªÌªººô¶¥Ø¿ý¤U«Ø¥ß¤@Ó
Ó§Oªº¦¸¥Ø¿ý¡C¡£¤@¯ë¬°public_html
¡¤¡C²Ä¤GÓ¤èªk¬O¡A¥t¥~¬°¨C¤@Óºô¶¥Ø¿ý«Ø
¥ß¤@ӥؿý¾ð¡A¨âºØ¤èªk³£¶·¦baccess.conf
Àɤ¤³]©w¦s¨ú¿ï¶µ¡C
²Ä¤@Ó¤èªk¬OApache¹w³]ªº¤è¦¡¡C³oºØ¤èªk¬O¡A·ínŪ/~bob/
ªººô¶¡AApacheŪ
public_html
¥Ø¿ý¤¤bobªºº¶¥Ø¿ý¡C§@ªk¬O¦bsrm.conf
Àɤ¤¥ÎUserDir
«ü¥O
¨Ó³]©w¡C¸Ó¥Ø¿ý¥²¶·¬Oworld¥iŪ¨ú¤Îworld¥i°õ¦æ¡C¦]¬°nApache¨ÓŪ¨ú¨Ï¥ÎªÌªº¥Ø¿ý¡A¸Ó
¥Ø¿ý¥²¶·¬°world¥i°õ¦æ¡A©Ò¥H·|²£¥Í¤@¨Ç«O¥þªº·ÀI¡C
²Ä¤GºØ¤èªk«h¸û®e©ö³]©w¡C¥u¦³srm.conf
Àɤ¤ªºUserDir
«ü¥O»Ýn³Q
קï¡C®æ¦¡¦³«Ü¦hºØ¡A½Ð°Ñ¦ÒApacheªº¤å¥ó¡A§Ë²M·¡¦UºØ©w¸q¡C¦pªG·QÅý¨C£¸¨Ï¥ÎªÌ¦b¥Ø
¿ý/home/httpd/
¤U¡A¦³¦Û¤vªº¥Ø¿ý¡A´Nn¨Ï¥Î«ü¥OUserDir /home/httpd
¡C
¨º»ò·í/~bob/
³QŪ¨ú®É¡AŪ¨úªº¥Ø¿ý´N·|Åܬ°/home/httpd/bob/
¡CY
¬OnÅýbobªº¥Ø¿ý¤U¥t¥[¤@Ó¦¸¥Ø¿ý°µ¬°¥Lªºº¶¥Ø¿ý¡A´N¥Î
UserDir /home/httpd/*/html
«ü¥O¡CŪ¨úªº¥Ø¿ý´NÅܦ¨
/home/httpd/bob/html/
¡A¦P®É¤]«Ø¥ß¤@Óscript¥Ø¿ý¡£¨Ò¦p¡G
/home/httpd/bob/cgi-bin/
¡¤¡C
Apache¥i¦b¤Uz¨âºØ¼Ò¦¡¤U¹B§@¡C¨ä¤@¬°daemon¼Ò¦¡¡A¦b³oÓ¼Ò¦¡¤UApache¤£°±¹B§@¡£ ApacheºÙ¤§¬° standalong¡¤¡C¥t¤@¬°inetd super-server¡C
daemon¼Ò¦¡¤ñinetd¼Ò¦¡¦n¡CApache¥H¥¦¬°¹w³]¼Ò¦¡¡C¨Ï¥Îinetd¼Ò¦¡ªº°ß¤@±¡ªp¬O¡A·í¨Ï¥Î ²v«Ü§C®É¡A¨Ò¦p¤º³¡´ú¸Õscript¡B¤p«¬¥ø·~ªº°Ï°ìºô¸ôµ¥¡E¡E¡E¡CInetd¼Ò¦¡¥i¸`¬Ù°O¾ÐÅé ªÅ¶¡¡A¦]¬°Apache¥u¦³·í¥²n®É¤~¶}±Ò¡A¥±`°O¾ÐÅ餤¥u¦³inetd daemon¡C
¦pªG§A¤£±`¨Ï¥ÎApache¡A¥i¥H¦Ò¼{Åý¥¦ºû«ù¦bdaemon¼Ò¦¡¡A¦Ó¥B¥u¦³¥²n®É¤~±Ò°ÊApache¡C ¨º»ò§A¤£¦A»Ýn®É¡A¥i¥H±þ±¼Apache¡£n±þªº¬O¤÷µ{¦¡§Ç¦Ó¤£¬O¤lµ{§Ç¡¤¡C
n³]©wInetd¼Ò¦¡¡A¦³¤@¨ÇÀÉnקï¡Cº¥ý¬d¤@¤U/etc/services
ÀɮסA¬Ý¤@¬Ý
http¬O§_¦s¦b¡A¦pªG¤£¦b¡A«h¥H¤U¦C¤è¦¡¥[¤J
http 80/tcp
¦bPort 79 ¡£finger¡¤ªº«á±¤]³\ȱo¦Ò¼{¡CµM«áקï/etc/inetd.conf
ÀɮסA
¥[¤J
http stream tcp nowait root /usr/sbin/httpd httpd
¦pªGApache¦b¤£¦P¦ì¸m¡A¸ô®|nÀHApacheªº¥Ø¿ý¨Ó§ïÅÜ¡C²Ä¤GÓhttp¤£¬Otypo¡A¥¦¥u¬O inetd daemonªº»Ý¨D¡C¦pªG§A¤£¦A¨Ï¥Îinetd daemon¡A¨º´N§âÀɮפ¤§A¤£·Q±Ò°ÊªºªA°È§ï¬° µù¸Ñ¦æ¡£¹³FTP¡B finger¡B telnet¤Î¨ä¥L±`¥Î©óinetd daemonªºªA°È¶µ¥Ø¡¤¡C
¦pªG§A¦b¥Îinetd daemon,¥unµ¹¥¦¤@ÓSIGHUP°T¸¹¡£¥Îkill©R¥O¡A°Ñ¦Òkillªºman page¡¤
©Î«·s±Ò°Ê¨t²ÎÅýקﶵ¥Ø¥Í®Ä¡C¦pªGinetd
¤£¦b¨Ï¥Î¡A¥i¥H¥H¤â°Ê¤è¦¡±Ò°Êªº¡C
¤]¥i¥H¥[¦binitÀɮס£¤]³\¬Orc.local
ÀÉ¡¤¤¤¡A¨Ï±o¶}¾÷®ÉInetd¦Û°Ê±Ò°Ê¡C
·sªººô¶µo¦æ¤u¨ã¤ä´©¥Hhttp¤W¸üºô¶¡£¦Ó¤£©ó¥ÎFTP¡¤¡C¨ä¤¤¦³ªº¬Æ¦ÜÁÙ¤£¤ä´©FTP ¤W¸ü¡CApache¤]¤ä´©http¤W¸ü¡A¦ý©Òn¥Îªºscript«h¨S¦³¥]§t¡A¦]¦Ó¤W¸ü©Ò¥Îªºscript ¥i¯à¦¨¬°«O¥þªº¤jº|¬}¡C¦b¼g©Î¥Î§O¤Hªºscript«e¡A½Ð¥ý·d²M·¡ª¬ªp¡C
¦pªG¦³¤Hª¾¹D¥ô¦ó¦¹Ãþªºscript¡A½Ð§i¶D§Ú¡C§Ú·|§â¥¦ªººô§}¯Ç¤J¡C
¬ÛÃö²Ó¸`°Ñ¦Ò Apacheweek http://www.apacheweek.com/features/put¡C
³o¬O§Ú³Ì³ß·Rªº¤@Ó¥\¯à¡C¥¦Åý§A¤£¶·n¥Î¨ìCGI script´N¥i¥H«OÅ@¥Ø¿ý©ÎÀɮסC¥¦ÁÙ ¥i¥H¨Ì¾Ú¥Î¤áªºIP¦ì§}©Îºô°ì¦WºÙ¨Ó¨M©w¥Î¤áªº¦s¨úÅv¡C³o¬O¤@ºØ§â¤£³t¤§«Èç¥X¥Î¤á¦W ³æªº¦n¤èªk¡£¥un±qlogÀɮ׬d¥X¥¦ÌªºIP¦ì§}¤Îºô°ì¦WºÙ§Y¥i¡¤¡C
n³]©w Authentication¡A¥Ø¿ý¤¤access.conf
Àɮפ¤¥²¶·n¦³
AllowOverrides Authconfig
¡C¦Ó³]©waccess control¡£¨Ï¥Îºô°ì¦WºÙ©ÎIP
¦ì§}¡¤¡A«h¥[¤JAllowOverrides Limit¡C
³]©w¥Ø¿ý¡A´Nn¦b¨ä¤¤©ñ¤J.htaccess
ÀɮסCn³]©w¨Ï¥ÎªÌªºAuthentication¡A
n¥Î¨ì.htpasswd
ÀÉ©Î¥~±a¤@.htgroup
ÀÉ¡C³o¨âÓÀÉÁÙ¥i¥Ñ¼ÆÓ
.htaccess
Àɦ@¥Î¡C
¬°¤F«O¥þªº²z¥Ñ¡A§ÚÓ¤H«Øij¡A¨CӨϥΪ̳£¦b¥L̪ºaccess.confÀɨϥΤUz«ü¥O¡G
<files ~ "/\.ht">
order deny,allow
deny from all
</files>
¦pªG§A¤£¬O¨t²ÎºÞ²zû¡A¦ý§Aªº¥Ø¿ý¤w¸g³]¬°AllowOverride Limit¡A§A¤´µM¥i¥H¦b §Aªº .htaccessÀɮפ¤¥[¤J³o¨Ç«ü¥O¡C¥LÌ¥i¥H¨¾¤î§O¤H°½¿s§Aªºaccess control Àɮס£.htaccess ¡B.htpasswdµ¥¡¤¡C
Access control¥i¹B¥Î¦b³\¦h¤£¦Pªº¿ï¶µ¤ÎÀɮ׫¬¦¡¡C³o¤w¶W¥X¥»¤åªº½dÃ¥¡C³]©w¨Ï¥Î ªÌ Authenticationªº¸ê°T¡A½Ð°Ñ¦Ò http://www.apacheweek.com/features/userauth¡A©ÎNCSAªººô¶ at http://hoohoo.ncsa.uiuc.edu/docs-1.5/tutorials/user.html¡C
su-exec¥\¯à¯à¥Hownerªº¦a¦ì°õ¦æCGI script¡C¥±`³£¥Hºô¶¦øªA¾¹¡£¤£¬O¤@¯ëªº¤H¡¤ ªº¦a¦ì¨Ó°õ¦æCGI script¡C¦]¦¹¡A¨Ï¥ÎªÌ¤£¶·±N¥L̪ºCGI scriptªº¦s¨ú¼Ò¦¡³]¬°world writable¡£³o¬O¤@Óº|¬}¡¤¡C¦ý¬O¦pªG¤£¼ô±xsu-exec¡A§A¥i¯à·|·d¥X§ó¤jªºº|¬}¡C¥±` su-exec¦b°õ¦æ«e·|§@«O¥þÀˬd¡A¦ý¦pªG³]©w¿ù»~¡A¤Ï¦Ó²£¥Í«O¥þªºº|¬}¡C
su-exec¤£¬O³]pµ¹¥~¦æ¤H¥Îªº¡C¦pªG¨S¦³·d²M·¡¡A³Ì¦n¤£n¥Î¡A¤£µM§A·d¥X¨Óªºº|¬} ¥i¥HÅý¨Ï¥ÎªÌ¨ã³Æroot¦s¨ú¯à¤O¡CµL½×¦p¦ó¤£nקïµ{¦¡¡AnŪ³q©Ò¦³¬ÛÃö¤å¥ó¡C su-exec¨º»òÃø³]©w¡A¬O¬G·N³]p¥X¨ÓÅý¥~¦æ¤Hª¾Ãø¦Ó°h¡£¥þ³¡¤â°Ê¾Þ§@¡A¨S¦³makeÀÉ ¡A¤]¨S¦³¦w¸Ëscript¡¤¡C
su-exec¬O©ñ¦bsupport
¥Ø¿ý¤¤¡Cº¥ýn¬°¨t²Îקïsuexec.h
ÀÉ¡AµM«á¥Î¤U±ªº
©R¥O½sĶsu-execµ{¦¡
gcc suexec.c -o suexec
µM«á±Nsu-execªº¥i°õ¦æÀɽƻs¨ì¾A·íªº¥Ø¿ý¡CApacheªº¹w³]¥Ø¿ý¬°
/usr/local/etc/httpd/sbin/
¡C¦pn§ïÅܹw³]¥Ø¿ý¡A¥iקïApacheì©lµ{¦¡¤¤
ªºhttph
¡A¦b«·s½sĶApache¡CApache¥u·|·j´M¸Ó¥Ø¿ý¡A¦Ó¤£·|·j´M¸ô®|¡C¥t¥~n
§âsu-execªº¨Ï¥ÎªÌ§ï¬°root(chown root suexec
)¡A¨Ã¥B³]©wsuid bit
(chmod 4711 suexec
)¡C³Ì«á«·s±Ò°ÊApache¡C¦¹®ÉApacheÀ³¸Ó·|¦b¿Ã¹õ¤WÅã¥Ü
su-exec¥¿¦b¹B§@¡C
CGI script¤´n³]¬°world executable¡C¥LÌ¥i¥H¥HCGI script ownerªº¨¥÷°õ¦æ¡C¦pªG
³]©w¥L̪ºSUID¡£set user id¡¤bit¡A«h¤£·|°õ¦æ¡C¦pªG¥L̪º¥Ø¿ý¬°world©Î
group writable¡A¤]¤£·|°õ¦æ¡C¦pªGowner¬°system user ¡£root¡Bbinµ¥¡¤¤]¤£·|°õ¦æ¡C
¬ÛÃö«O¥þª¬ªp¡A°Ñ¦Òsu-execªº¤å¥ó¡C¦pªGÁÙ¦³°ÝÃD¡AÀˬdsu-execªºlogÀÉcgi.log
¡C
¦bApacheªºinetd¼Ò¦¡¡Asu-exec¤£¹B§@¡A¥u¦³¦bdaemon¼Ò¦¡¤~¹B§@¡C¤U¤@ª©¥i¯à·|§ïµ½ ¡A¦]¬°inetd¼Ò¦¡¤£·|¦A¥Î¨ì¤F¡Cnª±ì©lµ{¦¡ªº¸Ü¡A´Nקïhttp.main.c¡C§A¥i¥H§R°£ ¨ä¤¤¨Ï¥Îsu-exec wrapperªºApache«Å§i¡£¥¦¦b¨CÓ¿é¥X¤§«e©~µM³£¦L¤@¦¸¡¤¡C
¦n¦nŪ¤@¤UApache¦³Ãösu-execªº¤å¥ó¡C¥LÌ©Msu-execªºì©lµ{¦¡³£¦bApacheºô¯¸¤¤ http://www.apache.org/docs/suexec.html¡C
Apache¯à¥Î¨Ó³B²z¦øªA¾¹ºÝimagemaps¡CImagemaps¬Oºô¯¸¤Wªº¹Ï§Î¡A¨Ï¥ÎªÌÂI¿ï¹Ï§Î¤¤
¬YÓ¦ì¸m¡A¥i¥H¥Î¨Ó¨M©wn³sµ²¨ì¨ºùØ¥h¡Cn±Ò°Êimagemaps¡A¥ý½T©wimagemap¼Ò¦¡¬O§_
¤w¦w¸Ë¡£¥¦¬O¹w³]n¦w¸Ëªº¤@Ó¼Ò¦¡¡¤¡CµM«á±Nsrm.conf
Àɤ¤ªº.map
¼Ð°O
¶}±Ò¡£uncomment¡¤¡C¦¹®É©Ò¦³¥H.map
µ²§ÀªºÀɮ׳£Åܦ¨¤FimagemapÀɮסC
ImagemapÀɥΤ@ӹϧΪº¦UÓ¦ì¸m³sµ²¨ì¤£¦Pªººô¶¡CApache¥H¼Ð·ÇNCSA®æ¦¡¨Ï¥Î§ë¼v
¡£map¡¤ÀÉ¡C¤Uz¬°§ë¼vÀɪº¤@¨Ò¡G
<a href="/map/mapfile.map">
<img src="picture.gif" ISMAP>
</a>
¨Ò¤¤¡Amapfile.map
§Y¬°§ë¼vÀÉ¡C¦Ópicture.gif
¬°ÂI¿ï¥Îªº¹Ï§Î¡C
¦³«Ü¦hµ{¦¡¥i¥Î¨Ó²£¥Í¯à»PNCSA§ë¼vÀɦ@¦sªºÀɮסA§A¤]¥i¥H¦Û¤v½s¼g¤@¤ä¡C¬ÛÃö²Ó ¸`½Ð°Ñ¦Ò¡GApacheweek http://www.apacheweek.com/features/imagemaps¡C
¦øªA¾¹ºÝ¥[¤J¡£SSI¡¤¥i¦bÀRºAªººô¶¤¤¥H°ÊºA¤è¦¡¥[¤J¬Y¨Ç¤º®e¡Cn¥[¤Jªº¶µ¥Ø¦b ºô¶¤¤¥H»¡©ú¡£comment¡¤ªº¤è¦¡ªí¥Ü¡C¦øªA¾¹¥ý¸ÑªR³o¨Ç¶µ¥Ø¡AµM«á±N©Ònªº¤º®e ¥[¤J¡CSSI¥i¦bÀɮפ¤¥[¤Jheader¤Îfooter¡A¤]¥i¥H¥[¤J³Ì«áקï¤é´Á¡A¤]¥i°õ¦æ¨t ²Î©R¥O©ÎCGI script¡C¦pªG¨Ï¥Î©µ¦ù«¬¦øªAºÝ¥[¤J ¡£XSSI; eXtended Server Side Includes¡¤¡A¥i°µªº´N§ó¦h¤F¡C¥¦¥i ¥[¤JÅܼƤάyµ{±±¨î¡£¦pif¡Belseµ¥¡¤¡C³o²ª½´N¹³¤@Ó¦b¨Ï¥Î¤@Óµ{¦¡»y¨¥¡C
¦pn¹ï¨C¤@ÓHTMLÀɳ£¥[¥H¸ÑªR¡A·|®ø¶O¤Ó¦h¨t²Î¸ê·½¡C©Ò¥Hn¦³Ó¤èªk¨Ï¨º¨Ç¦³SSI
¶µ¥ØªºÀɮ׬ݨӤ£¤@¼Ë¡C¤@¯ëªº§@ªk¬O¡A§â³o¨ÇHTMLªº©µ¦ùÀɦW§ï¬°.stml
¡C
n±Ò¥ÎSSI/XSSI¡Aº¥ý½T»{¬O§_¸Ó¥\¯àªº¼Ò¦¡¤w¸g¦w¸Ë¡CµM«á´N¥iקïsrm.conf
ÀÉ¡A¬°.shml
«¬¦¡ªºAddType
¤ÎAddHandler
¶}±Ò¡£uncomment¡¤¡C³Ì«á
¥ÎOptions Includes
¨Ó©w¸q¨º¨Ç¥Ø¿ý¤USSI/XSSIÀÉ¥i¹B¦æ¡C³o¤@¨BÆJ¬O¦b
access.conf
Àɤ¤¡C¨º»ò©Ò¦³¨ã.shtml
©µ¦ùÀɦWªºÀɮ׳£·|³Q¸ÑªR°õ¦æ
SSI/XSSI¡C
¥t¤@ºØ¦bºô¶¤¤¥[¤J¤º®eªº¤è¦¡¬O¨Ï¥ÎXBitHack
«ü¥O¡C³oÓ«ü¥O¤@¶}±Ò¡A¥¦·|
Àˬd¸ÓÀɮ׬O§_¬°user exectable¡C¦pªG¬O¡A¦Ó¥B¸Ó¥Ø¿ý¥ÎOptions Includes
¶}
±Òªº¸Ü¡A¸ÓÀÉ®×´N³Qµø¬°SSIÀɮסC¦ý³oºØ¤è¦¡¥u¹ïmime «¬¦¡ªºtext/html
¡£.html .htm
Àɮס¤¦³®Ä¡C©Ò¥H¤£¬O³Ì¦nªº¤èªk¡C
¥ÎSSI¨Ó°õ¦æ¨t²Î©R¥O¤ÎCGI script¡A·|¾ÉP¤@¨Ç«O¥þªº·ÀI¡C©Ò¥H¦b
access.conf
Àɤ¤³Ì¦n¨Ï¥ÎOption IncludesNOEXEC
¦Ó¤£n¥ÎOption Includes¡C
¨ä¥LSSI©R¥O«h¤£¶·×§ï¡C
¬ÛÃö²Ó¸`°Ñ¦Òì©lµ{¦¡ªþ±aªºApache mod-includes¤å¥ó¡C ¥i¥H±q http://www.apache.org/docs/mod/mod_include.html¨ú±o¡C
SSI/XSSI¹ê²{ªº¬ÛÃö²Ó¸`°Ñ¦ÒApacheweek http://www.apacheweek.com/features/ssi.
¦³ÃöSSI©R¥Oªº¸ê°T¡A°Ñ¦ÒNCSA¤å¥ó http://hoohoo.ncsa.uiuc.edu/docs/tutorials/includes.html¡C
¦Ó¦³ÃöXSSI©R¥Oªº¸ê°T¡A°Ñ¦Ò ftp://pageplus.com/pub/hsf/xssi/xssi-1.1.html¡C
Apache¥i¥Î¼Ò²Õªº¤è¦¡¥[¤J¥ô¦óªF¦è¡C²{¦b¤w¦³ªº¼Ò²Õ«Ü¦h¡A¦ý¥u¦³¤@¯ë±`¥Îªº¼Ò²Õ ªþ±a¦bApache®M¥ó¤¤¡C
n¬d¬d¬ÝÁÙ¦³¨º¨Ç¼Ò²Õ¡A½Ð°Ñ¦ÒApache¼Ò²ÕÄ_®w http://www.zyzzyva.com/module_registry/¡C
¦Ó¦³Ãö¼Ò²Õ¤Æ³]pªº¸ê°T¡A°Ñ¦Ò http://www.zyzzyva.com/module_registry/reference/¡C