From: Justin Erenkrantz Date: Wed, 5 Jan 2005 23:08:27 +0000 (+0000) Subject: The return of the htdocs for Apache 1.3 sans history. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4d88d4dbec7dbda9442564fa49b2772cfa5b73a2;p=thirdparty%2Fapache%2Fhttpd.git The return of the htdocs for Apache 1.3 sans history. Imported from tip of the httpd-docs-1.3 CVS repository. (just the htdocs dir) git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@124296 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/htdocs/README.rus b/htdocs/README.rus new file mode 100644 index 00000000000..b33f25657d9 --- /dev/null +++ b/htdocs/README.rus @@ -0,0 +1,18 @@ +Apache test page, russian translation by Pavel Polischouk +Different russian encodings provided: + + Name iconv's codepage + ++index.html.dos - CP-866 aka ibm866; used by DOS and OS/2. +*index.html.iso - ISO-8859-5 +*index.html.koi - KOI8-R; used by UNIX flavours and Mac. + index.html.ucs2 - UCS-2 aka UNICODE aka UNICODEBIG aka UTF-16 + index.html.ucs4 - UCS-4 +*index.html.utf8 - UTF-8 +*index.html.win - CP-1251 aka windows-1251 aka MS-CYRILLIC; used by Windows + +* - supported by Netscape 4.72. ++ - Netscape is supposed to support this encoding, but fails to +read this page on Linux. Should be OK on systems like DOS and OS/2 where this +encoding is the default. +Does anyone need the UCS-2 and UCS-4? \ No newline at end of file diff --git a/htdocs/apache_pb.gif b/htdocs/apache_pb.gif new file mode 100644 index 00000000000..3a1c139fc42 Binary files /dev/null and b/htdocs/apache_pb.gif differ diff --git a/htdocs/index.html.ca b/htdocs/index.html.ca new file mode 100644 index 00000000000..002cec22227 --- /dev/null +++ b/htdocs/index.html.ca @@ -0,0 +1,51 @@ + + + + Pàgina de prova de l'instal·lació d'Apache + + + +

+ Funciona ! El servidor web Apache està instal·lat + en aquest lloc  ! +

+

+ Si veu aquesta pàgina, es que els propietaris d'aquest domini + acaben d'instal·lar satisfactòriament el + servidor web Apache. + Ara han d'afegir contingut en aquest directori i substituir aquesta pàgina, + o bè dirigir aquest servidor cap al contingut real. +

+
+
+ Si està veien aquesta pàgina i no es la que esperava, posis en + contacte amb + l'administrador web d'aquest lloc. + (Provi d'enviar un correu electrònic a <Webmaster@domain>.) + Encara que aquest lloc està utilitzant el programari Apache, es gairebé segur + que no tè res a veure amb el Grup Apache, per tant + no enviï cap correu electrònic als autors d'Apache referent a aquest lloc o al seu contingut. + Si es que ho fa, el seu missatge serà ignorat. +
+
+

+ La + documentació + d'Apache ha estat inclosa en aquesta distribució. +

+

+ L'administrador de web pot utilitzar lliurement la imatge d'aquí sota + en el servidor web equipat amb el programari Apache. + Gràcies per utilitzar Apache ! +

+
+ +
+ + diff --git a/htdocs/index.html.cz b/htdocs/index.html.cz new file mode 100644 index 00000000000..edadd7b3b43 --- /dev/null +++ b/htdocs/index.html.cz @@ -0,0 +1,51 @@ + + + + + Testovací stránka instalace web serveru Apache + + + +

+ Funguje to! Na tomto serveru bì¾í Apache! +

+

+ Pokud vidíte tuto zprávu, správce tohoto poèítaèe právì úspì¹nì + nainstaloval Apache web server. + Teï je¹tì musí doplnit obsah a nahradit tuto standardní uvítací + stránku, nebo pøesmìrovat server na skuteènou domovskou stránku. +

+
+
+ Pokud vidíte tuto zprávu místo oèekávané domovské stránky, + kontaktujte, prosím, správce pøíslu¹ného web + serveru. (Zkuste poslat e-mail na adresu + <Webmaster@domain>.) + Pøesto¾e tento server pou¾ívá program Apache, témìø jistì nemá nic + spoleèného s Apache Group, proto prosím neposílejte e-maily o tomto + serveru nebo jeho obsahu autorùm Apache. Pokud to udìláte, budeme + va¹e zprávy ignorovat. +
+
+

+ Zde najdete + dokumentaci + Apache (anglicky) obsa¾enou v této distribuci. +

+

+ Následující logo mù¾e být pou¾ito bez omezení na web serveru s + programem Apache. Dìkujeme za pou¾ití Apache! +

+
+ +
+ + diff --git a/htdocs/index.html.de b/htdocs/index.html.de new file mode 100644 index 00000000000..7d2d4e860a8 --- /dev/null +++ b/htdocs/index.html.de @@ -0,0 +1,61 @@ + + + + Testseite fuer die Apache-Installation auf dieser Web Site + + + + +

+ Es klappt! Der Apache Web-Server ist auf dieser Web-Site installiert! +

+

+ Wenn Sie diese Seite sehen, dann bedeutet das, dass die + Eigentümer dieser Domäne soeben einen neuen + Apache Web-Server + erfolgreich installiert haben. Jetzt muss noch der + richtige Web-Inhalt zugefügt und diese Platzhalter-Seite + ersetzt werden (oder der Web-Server für den Zugriff auf den + richtigen Inhalt umkonfiguriert werden). +

+
+
+ Wenn Sie diese Seite an Stelle einer anderen erwarteten Web-Site + sehen sollten, dann nehmen Sie bitte Kontakt mit dem + Eigentümer dieser Site auf (Versuchen Sie, eine EMail + an <Webmaster@domänenname> + zu senden)!
+

+ Obwohl der Eigentümer dieser Domäne die Apache + Web-Server Software verwendet, hat diese Web-Site ziemlich sicher + keinerlei Verbindung mit der Apache Software Foundation + (die diese Software kostenlos vertreibt). Es besteht also + keinerlei Veranlassung, eine EMail an + die Entwickler der Software zu senden. Sollten Sie das dennoch + tun, wird Ihre Mail stillschweigend + ignoriert. +

+
+

+ Die englische Online-Dokumentation für die + Apache Web-Server Software ist Bestandteil dieser + Software-Distribution. +

+

+ Dem WebMaster dieser Web-Site steht es frei, das + untenstehende "Powered by Apache"-Logo auf einem Apache-basierten + Web-Server zu verwenden.
+ Vielen Dank, dass Sie Apache gewählt haben! +

+
+ Powered by Apache! +
+ + diff --git a/htdocs/index.html.dk b/htdocs/index.html.dk new file mode 100644 index 00000000000..273277268cb --- /dev/null +++ b/htdocs/index.html.dk @@ -0,0 +1,47 @@ + + + + Prøveside for Apache installationen + + + +

+ Det virkede! Apache Webserveren er installeret på denne maskine! +

+

+ Hvis du kan se denne side, så har dem som ejer dette domæne lige + installeret Apache Webserveren. + Du må nu placere web sider i dette directory og fjerne denne side, eller + konfigurere serveren til at anvende et andet directory. +

+
+
+ Hvis du ser denne side istedet for en anden forventet side, kontakt + venligst administratoren for den server du prøver at kontakte. + (Prøv at sende mail til <Webmaster@domain>.) + Apachegruppen har ikke noget at gøre med denne site, så det vil ikke + hjælpe at sende mail to Apache udviklerne angående denne site. +
+
+

+ Apache- + documentationen + er inkluderet med denne distribution. +

+

+ Webmasteren af denne site må gerne bruge den følgende grafik + på en Apache-drevet webserver. Mange tak for at bruge Apache! +

+
+ +
+ + diff --git a/htdocs/index.html.ee b/htdocs/index.html.ee new file mode 100644 index 00000000000..7208921650f --- /dev/null +++ b/htdocs/index.html.ee @@ -0,0 +1,53 @@ + + + + Apache veebiserveri installatsiooni testlehekülg + + + + +

+ Kujuta pilti, käima läks! Apache veebiserver on installeeritud! +

+

+ Kui Sa näed seda lehekülge, siis selle domeeni omanikud on + edukalt hakkama saanud Apache veebiserveri + installeerimisega. Järgmiseks peaks nad selle lehekülje asendama + misiganes materjaliga, mida nad oma veebisaidis näidata tahavad, + või siis juhatama veebiserverile kätte tegeliku materjali + asukoha. +

+
+
+ Kui Sa ootasid siin leheküljel näha hoopis midagi muud, + siis palun võta ühendust selle veebisaidi + administraatoriga. (Võid näiteks kirjutada aadressil + <Webmaster@domain>.) Kuigi see veebisait + kasutab Apache tarkvara, pole ta peaaegu kindlasti mitte Apache Group'iga + mingil muul moel seotud. Seega, palun ära kirjuta selle saidi + asjus Apache autoritele. Kui sa seda teed, siis sinu kirja + ignoreeritakse. +
+
+

+ Ka Apache + dokumentatsioon + on selles distributsioonis olemas. +

+

+ Kohalik veebmeister võib vabalt kasutada allpool olevat + pilti oma Apache veebiserveril. Aitäh Apachet kasutamast! +

+
+ +
+ + diff --git a/htdocs/index.html.el b/htdocs/index.html.el new file mode 100644 index 00000000000..b194dc565e7 --- /dev/null +++ b/htdocs/index.html.el @@ -0,0 +1,37 @@ + + + + ÄïêéìáóôéêÞ Óåëßäá ãéá ôçí ÅãêáôÜóôáóç ôïõ Apache + + + + + +

+ÅÜí ìðïñåßôå íá äåßôå áõôÞ ôç óåëßäá, ôüôå ç åãêáôÜóôáóç ôïõ ëïãéóìéêïý ôïõ ÅîõðçñåôçôÞ WWW Apache óå áõôü ôï óýóôçìá Þôáí åðéôõ÷Þò. Ìðïñåßôå ôþñá íá ðñïóèÝóåôå ðåñéå÷üìåíï óå áõôü ôïí êáôÜëïãï êáé íá áíôéêáôáóôÞóåôå áõôÞ ôç óåëßäá. + +


+ +

ÂëÝðåôå áõôÞ ôç óåëßäá áíôß ãéá ôï äéêôõáêü ôüðï ðïõ ðåñéìÝíáôå;

+ +

+ÁõôÞ ç óåëßäá âñßóêåôáé åäþ ãéáôß ï äéá÷åéñéóôÞò áõôïý ôïõ äéêôõáêïý ôüðïõ ôñïðïðïßçóå ôéò ñõèìßóåéò óôïí åîõðçñåôçôÞ Apache. Ðáñáêáëþ åðéêïéíùíÞóôå ìå ôïí õðåýèõíï ãéá ôç äéá÷åßñéóç ôïõ ðáñüíôïò åîõðçñåôçôÞ. Ôï ºäñõìá Ëïãéóìéêïý Apache (The Apache Software Foundation) Ýãñáøå ôï ëïãéóìéêü ôïõ åîõðçñåôçôÞ WWW ôï ïðïßï ÷ñçóéìïðïéåß ï äéá÷åéñéóôÞò áõôïý ôïõ äéêôõáêïý ôüðïõ. Ôï ºäñõìá üìùò äåí Ý÷åé êáìéÜ áñìïäéüôçôá ó÷åôéêÞ ìå ôç äéá÷åßñéóç áõôïý ôïõ äéêôõáêïý ôüðïõ êáé äåí ìðïñåß íá âïçèÞóåé óôçí åðßëõóç èåìÜôùí ðïõ Ý÷ïõí ó÷Ýóç ìå ôéò ñõèìßóåéò ôïõ. + +


+ + +

ôåêìçñßùóç ôïõ Apache Ý÷åé óõìðåñéëçöèåß óå áõôÞ ôç äéáíïìÞ. + +

+Åßóôå åëåýèåñïò/ç íá ÷ñçóéìïðïéÞóåôå ôçí ðáñáêÜôù åéêüíá óå Ýíáí åîõðçñåôçôÞ ôïõ WWW ðïõ âáóßæåôáé óå Apache. Åõ÷áñéóôïýìå ðïõ ÷ñçóéìïðïéåßôå ôïí Apache! + +

+ + diff --git a/htdocs/index.html.en b/htdocs/index.html.en new file mode 100644 index 00000000000..dc4c5182e57 --- /dev/null +++ b/htdocs/index.html.en @@ -0,0 +1,38 @@ + + + +Test Page for Apache Installation + + + +

If you can see this, it means that the installation of the Apache web +server software on this system was successful. You may now add +content to this directory and replace this page.

+ +
+

Seeing this instead of the website you +expected?

+ +

This page is here because the site administrator has changed the +configuration of this web server. Please contact the person +responsible for maintaining this server with questions. +The Apache Software Foundation, which wrote the web server software +this site administrator is using, has nothing to do with +maintaining this site and cannot help resolve configuration +issues.

+ +
+

The Apache documentation has been included +with this distribution.

+ +

You are free to use the image below on an Apache-powered web +server. Thanks for using Apache!

+ +
+ + + diff --git a/htdocs/index.html.es b/htdocs/index.html.es new file mode 100644 index 00000000000..b67fbb3dae8 --- /dev/null +++ b/htdocs/index.html.es @@ -0,0 +1,53 @@ + + + + Pagína para probar la instalación de Apache + + + +

+ ¡Funcionó! ¡El Servidor de Red Apache ha sido instalado en ese sitio! +

+

+ Si usted puede ver esta pagína, entonces los dueños de esta + maquína han instalado el + Servidor de Red Apache con exíto. Ahora deben + añadir contenido a este directorio + y reemplazar esta pagína, ó apuntar este servidor al contenido real. +

+
+
+ Si usted esta leyendo esta pagína y no es lo que esperaba, por favor + contacte el administrador de este sitio. + (Trate de enviar correo electrónico a <Webmaster@domain>.) + Aunque este sitio esta utilizando el programa Apache es casi seguro + que no tiene ninguna conexión con el Apache Group, por eso favor de + no enviar correo sobre este sitio o su contenido a los autores de + Apache. Si lo hace, su mensaje sera + ignorado. +
+
+

+ La + documentación + de Apache ha sido incluida en esta distribución. +

+

+ El administrador del sitio esta invitado a usar la siguiente + imagen para indicar que su sitio es servido por Apache. + ¡Gracias por usar Apache! +

+
+ +
+ + diff --git a/htdocs/index.html.fr b/htdocs/index.html.fr new file mode 100644 index 00000000000..f8949b2d988 --- /dev/null +++ b/htdocs/index.html.fr @@ -0,0 +1,47 @@ + + + + + Page de test de l'installation d'Apache + + + + + +

Si vous lisez cette page, c'est que les propriétaires de ce +domaine viennent d'installer le +serveur web Apache +avec succès. Ils doivent maintenant ajouter du contenu à ce +répertoire et remplacer cette page, ou bien faire pointer le serveur +vers l'endroit où se trouve le contenu réel du site.

+ +
+ +

Vous voyez cette page au lieu du site attendu ?

+ +

Vous voyez cette page parce que l'administrateur du site a modifié +la configuration de ce serveur Web. Veuillez contacter +l'administrateur du site concerné. La Fondation +Apache (Apache Software Foundation), qui produit le logiciel Apache +utilisé par ce site, n'a rien à voir avec la maintenance de ce +site et ne peut intervenir sur sa configuration.

+ +
+ +

La documentation Apache est incluse dans cette +distribution.

+ +

Le webmaster de ce site peut librement utiliser l'image ci-dessous sur un +site web utilisant le logiciel Apache. Merci d'avoir choisi Apache !

+ +
+ + + diff --git a/htdocs/index.html.he.iso8859-8 b/htdocs/index.html.he.iso8859-8 new file mode 100644 index 00000000000..b3ca1558c50 --- /dev/null +++ b/htdocs/index.html.he.iso8859-8 @@ -0,0 +1,54 @@ + + + + + Apache-ä úøù úð÷úäì ïåéñð óã + + + + +
+

+ +
äæä ãåîòä úà äàåø äúà íà +
Apache èðøèðéàä úøù ìù äð÷úääù øîåà äæ +
!!!äçìöäá äøáò +
êìù íéöá÷ä úà óéñåäì ìåëé äúà åéùëò +
.äæä óãä úà óéìçäìå úàæä äöéçîì + + +


+ +

?úéôéöù øúàä íå÷îá úàæ äàåø

+

+
äæä øúàä ìò éàøçàä éë ,ïàë àöîð äæä ãåîòä +
.äæä èðøèðéàä úøù ìù äéöøåâéôðå÷ä úà äðéù +
.úåìàù íò úøùä éàøçà íò øù÷ øåöéì àð +
úà äøöé øùà Apache Software Foundation +
úøùä ú÷åæçú ìò úéàøçà äðéà ,äæä úøùä úðëåú +
äéöøåâéôðå÷ úåéòá ïåøúôá òééñì äìåëé äðéàå + .ïäùìë + +


+ +

+
êåúá íéòöîð äéöèðîå÷åãä éëîñî + .úøùä úðëåú úìéáç + + +

+
ãåîòä úéúçúá àöîðä ìîñá ùîúùäì éàùø äúà +
.Apache é''ò ìòôåîù úøùä ìò ÷ø + + !!!Apache-á ùåîéùä ìò äãåú + +

+
+ + diff --git a/htdocs/index.html.hu b/htdocs/index.html.hu new file mode 100644 index 00000000000..d92e7a23434 --- /dev/null +++ b/htdocs/index.html.hu @@ -0,0 +1,65 @@ + + + + Ezen a web oldalon az Apache-webszerver van telepítve! + + + + +

Talált! Ezen a web oldalon az + Apache-webszerver van telepítve!

+

+ Ha Ön ezt az oldalt látja, az azt jelenti, hogy + ennek a domain-nek a tulajdonosa éppen egy új + Apache webszervert telepített sikeresen. Most + még ezt a lapot a valós web tartalommal ki kell + egészíteni és a lapot + átalakítani (vagy a webszervert a valós + tartalmak eléréséhez át kell + konfigurálni). +

+
+
+

+ Ha Ön ezt a lapot egy másik várt weblap + helyett látná, vegye fel a kapcsolatot + ennek a lapnak a tulajdonosával! + (Kísérelje meg e-mail üzenet + küldését a + <webmaster@domain-név> + címre).
+

+

+ Annak ellenére, hogy ennek a domain-nek a tulajdonosa + az Apache webszerver szoftvert használja, ennek az + oldalnak semminemü kapcsolata nincs az Apache + Software Foundation szervezettel (amely ezt a szoftvert + ingyenesen terjeszti). Ebbõl kifolyólag + nem áll fenn semmilyen indok e-mail üzenet + küldésére a szoftver fejlesztõinek + címezve. Ha Ön mégis ezt + tenné, az Ön e-mail üzenete + törölve lesz. +

+
+
+

+ Az Apache-webszerver szoftver angol nyelvû online dokumentációja + része ennek a szoftvercsomagnak. +

+

+ Ezen weblap webmesterének joga van az alul + elhelyezkedõ "Powered by Apache"-logót Apache + szoftveren alapuló webszerveren használni. +
+ Köszönet, hogy Ön az Apache szoftvert + választotta! +

+
+ Powered by the Apache HTTP Server! +
+ + diff --git a/htdocs/index.html.it b/htdocs/index.html.it new file mode 100644 index 00000000000..b18315542ac --- /dev/null +++ b/htdocs/index.html.it @@ -0,0 +1,38 @@ + + + + + Pagina di prova dell'installazione di un sito Web con Apache + + + + +
+

+Funziona! Il Server Web Apache è stato installato su questo sito Web!

+Se riuscite a vedere questa pagina, allora vuol dire che coloro che gestiscono +questo dominio hanno appena installato il software Web Server +Apache correttamente. Ora è necessario aggiungere il vostro materiale +in questa directory e sostituire questa pagina di prova, oppure configurare +il server per far riferimento al vostro materiale se collocato altrove. +

+


+
Se state vedendo questa pagina invece del sito che pensavate, +vi preghiamo di contattare l'amministratore del sito in questione. +(Provate ad inviare un email a <Webmaster@domain>.)  +Nonostante questo sito stia utilizzando il software Apache, questo non +vi garantisce nessun tipo di contatto diretto al Gruppo Apache, quindi +vi preghiamo di non inviare email riguardanti questo sito o il materiale +in esso contenuto agli autori di Apache. Ogni messaggio del genere verrà +ignorato.
+ +
+
La documentazione relativa di Apache +è inclusa nella distribuzione. +

Il Webmaster di questo sito è libero di utilizzare l'immagine qui sotto +su qualsiasi Web server potenziato con Apache. Grazie per aver scelto Apache! +

+

+ + + diff --git a/htdocs/index.html.ja.jis b/htdocs/index.html.ja.jis new file mode 100644 index 00000000000..78e19376a31 --- /dev/null +++ b/htdocs/index.html.ja.jis @@ -0,0 +1,36 @@ + + + + + Apache $B%$%s%9%H!<%k;~$N%F%9%H%Z!<%8(B + + + + + +

$B$b$7$3$N%Z!<%8$,FI$a$?$N$G$"$l$P!"(BApache$B%&%'%V%5!<%P(B$B$N%$%s%9%H!<%k$,$3$N7W;;5!$GL5;v$K=*N;$7$?$3$H$r0UL#$7$^$9!#(B + $B$"$J$?$O!"$3$N%G%#%l%/%H%j$KJ8=q$r2C$($?$j!"$3$N%Z!<%8$rCV$-$+$($k$3$H$,$G$-$^$9!#(B

+ +
+

$B$"$J$?$NM=A[$KH?$7$F!"$3$N%Z!<%8$,8+$($F$$$k$G$7$g$&$+(B?

+ +

$B$3$N%Z!<%8$O!"%5%$%H4IM}$B$3$N%5!<%P$r4IM}$9$k@UG$$r;}$C$F$$$kJ}$KO"Mm$r$H$C$F(B$B$/$@$5$$!#(B + $B$3$N%5%$%H4IM} + +


+

Apache $B$K4X$9$k(B$BJ8=q(B$B$O!"$3$N(B web + $B%5!<%PG[I[J*$NCf$K4^$^$l$F$$$^$9!#(B

+ +

$B0J2<$N2hA|$O!"(BApache $B$rMxMQ$7$F$$$k(B web $B%5!<%P$G<+M3$K;H$&$3$H$,$G$-$^$9!#(B + Apache $B$r$4MxMQ$$$?$@$-!"$"$j$,$H$&$4$6$$$^$9(B!

+ +
+ + diff --git a/htdocs/index.html.kr.iso-kr b/htdocs/index.html.kr.iso-kr new file mode 100644 index 00000000000..f9c8b5d64e2 --- /dev/null +++ b/htdocs/index.html.kr.iso-kr @@ -0,0 +1,40 @@ + + + + + ¾ÆÆÄÄ¡ ¼³Ä¡¸¦ À§ÇÑ Å×½ºÆ®ÆäÀÌÁö + + + + + +

+ÇöÀçÈ­¸éÀÌ Àß º¸À̽Ŵٸé ÀÌ ½Ã½ºÅÛ¿¡ Apache À¥¼­¹ö ¼ÒÇÁÆ®¿þ¾îÀÇ ¼³Ä¡°¡ ¼º°øÀûÀ¸·Î ³¡³µ´Ù´Â°É ÀǹÌÇÕ´Ï´Ù. ¿©·¯ºÐÀº ¾Æ¸¶ °ð ÀÌ ÆäÀÌÁö¸¦ Áö¿ì°í µð·ºÅ丮¿¡ »õ·Î¿î ³»¿ëÀ» Ãß°¡ÇÒ °ÍÀÔ´Ï´Ù. + +


+ +

¿©·¯ºÐÀÌ ¿¹»óÇÑ À¥½ÎÀÌÆ® ´ë½Å ÀÌ È­¸éÀÌ º¸ÀԴϱî?

+ +

+½ÎÀÌÆ® °ü¸®ÀÚ°¡ À¥ ¼­¹öÀÇ ¼³Á¤ÆÄÀÏÀ» º¯°æÇ߱⠶§¹®¿¡ ÀÌ ÆäÀÌÁö°¡ º¸ÀÌ´Â °Í ÀÔ´Ï´Ù. +Áú¹®»çÇ×Àº °¢ ¼­¹ö°ü¸® Ã¥ÀÓÀÚ¿¡°Ô ¹®ÀÇÇϽñ⠹ٶø´Ï´Ù. Apache Software FoundationÀº Çö ½ÎÀÌÆ®ÀÇ °ü¸®ÀÚ°¡ »ç¿ëÁßÀÎ À¥¼­¹ö¸¦ ¸¸µç ´Üü +ÀÏ »Ó ½ÎÀÌÆ®ÀÇ °ü¸®¹æ¹ýÀ̳ª ¼³Á¤¹®Á¦¿¡ °üÇÑ µµ¿òÀ» µå¸± ¼ö ¾ø½À´Ï´Ù. + +


+ + +

+¾ÆÆÄÄ¡ ¹®¼­´Â ÀÌ ¹èÆ÷ÆÇ¿¡ Æ÷ÇԵǾî ÀÖ½À´Ï´Ù. + +

+¾Æ·¡¿¡ ÀÖ´Â Apache À̹ÌÁö¸¦ »ç¿ëÇÏ´Â°Ç ¿©·¯ºÐÀÇ ÀÚÀ¯ÀÔ´Ï´Ù. ¾ÆÆÄÄ¡¸¦ »ç¿ëÇØ Áּż­ °¨»çÇÕ´Ï´Ù! + +

+ + diff --git a/htdocs/index.html.lb.utf8 b/htdocs/index.html.lb.utf8 new file mode 100644 index 00000000000..58b959789f4 --- /dev/null +++ b/htdocs/index.html.lb.utf8 @@ -0,0 +1,39 @@ + + + + + + Test Page for Apache Installation on Web Site + + + + +
+

+Et huet geklappt! Den Apache Web Server as op dëser 'Web Site' installeiert!

+Wann Dir die heiten Sait gesit, dann hun d'Proprietairen vun dëser 'domain' +elo just d'Apache Web server software +mat succés installeiert. Sie mussen allerdengs nach des Decksait +remplaceieren oder awer de Server op eng aner Sait mat dem richtigen contenu +em-dirigeieren. +
+
+
Wann Dir die heiten Sait anstell vun der site die Dir erwârt +hut gesitt, da contacteiert wannechglift den administrator vun dem betraffener +site. (Versicht én email no <Webmaster@domain> +ze +schecken.) Obwuel den heiten site Apache software benotzt, as et +ball secher datt keng Verbindung mat der Apache Group existeiert, also scheckt +wannechglift keng email iwert desen site oder sein contenu zu den Apache +Autoren. Falls Dir dëst awer macht, get ären message  +ignoreiert.
+ +
+

D'Apache documentation ass dëser Ausgab +beigefücht. +

Dem Webmaster vun dem heitenen site steht et zou dest Bild ob engem +Apache-powered Web server ze presenteieren. Merci dat Dir Apache benotzt! +

+ + + diff --git a/htdocs/index.html.nl b/htdocs/index.html.nl new file mode 100644 index 00000000000..88267d9cad4 --- /dev/null +++ b/htdocs/index.html.nl @@ -0,0 +1,54 @@ + + + + Test Pagina voor de Apache Installatie op deze Web Site + + + + +

+ Alles Werkt! De Apache Web Server is geinstalleerd op deze Web Site +

+

+ Mocht u deze pagina zien, dan betekent dat, dat de eigenaren van dit + domein zojuist een nieuwe Apache Web + Server hebben geinstalleerd. Nu moet men nog de echte inhoud gaan + toevoegen, en moet men deze pagina gaan vervangen door de echte web + site. +

+
+
+ Mocht u deze pagina zien, in plaats van de pagina of web site die u + verwachtte, neem dan contact op met de beheerder van + deze site. Bijvoorbeeld door een berichtje te sturen naar + <Webmaster@dit-domain>. +

+ Alhoewel deze web site gebruik maakt van de Apache Software is er + verder geen enkele relatie tussen de beheerders van deze web site en + de Apache Groep (die de web software geschreven heeft). Het heeft dus + absoluut + geen zin de web software auteurs een emailtje te sturen. Mocht u dat + toch doen, dan wordt uw bericht gewoon genegeerd. +

+
+

+ De + handleiding voor de apache web + server software maakt deel uit van deze distributie. +

+

+ Als beheerder of webmaster is het u toegestaan het onderstaande + plaatje vrijelijk te gebruiken op uw 'Apache Powered' web site. Bedankt + voor het kiezen voor, en gebruiken van, Apache! +

+
+ Klein 'Powered by Apache' Logotje +
+ + diff --git a/htdocs/index.html.nn b/htdocs/index.html.nn new file mode 100644 index 00000000000..67db9570b04 --- /dev/null +++ b/htdocs/index.html.nn @@ -0,0 +1,48 @@ + + + + Testside Apache-installasjon + + + +

+ Det gjekk bra! Apache er no installert på denne maskina! +

+

+ Dersom du kan sjå denne sida, har den eller dei som driv denne nettstaden + installert Apache vevtenar. + No må denne testsida erstattast med verkeleg innhald. +

+
+
+ Dersom du hadde venta å sjå ei anna side enn denne, bør du + ta kontakt med den som er ansvarleg for denne nettstaden + (Prøv å sende e-post til <webmaster@domene>.) + Sjølv om denne nettstaden vert kjørt på Apache, har den ingen annan + tilknytning til Apache-gruppa, som har utvikla programvaren. + Ver snill og ikkje send e-post om denne nettstaden eller + innhaldet du finn her til utviklarane i Apache-gruppa. + I så tilfelle vil førespurnaden ignorerast. +
+
+

+ Dokumentasjon + for Apache er inkludert i denne pakka. +

+

+ Logoen under kan brukast på kva som helst av maskiner som køyrer Apache. + Takk for at du nyttar Apache! +

+
+ +
+ + diff --git a/htdocs/index.html.no b/htdocs/index.html.no new file mode 100644 index 00000000000..0432f84997d --- /dev/null +++ b/htdocs/index.html.no @@ -0,0 +1,48 @@ + + + + Testside Apache-installasjon + + + +

+ Det gikk bra! Apache er nå installert på denne maskinen! +

+

+ Hvis du kan se denne siden har den eller de som driver dette nettstedet + installert Apache Web server. + Nå må denne testsiden erstattes med virkelig innhold. +

+
+
+ Hvis du hadde ventet å se en annen side enn denne bør du + ta kontakt med den som har ansvaret for nettstedet. + (Prøv å sende e-post til <webmaster@domene>.) + Selv om dette nettstedet kjøres på Apache, har det ingen annen + tilknytning til Apache-gruppen som har utviklet programvaren. + Vennligst ikke send post angående dette nettstedet eller dets + innhold til Apache-gruppens programmerere. I så fall vil din henvendelse + bli ignorert. +
+
+

+ Dokumentasjon + for Apache er inkludert i denne pakken. +

+

+ Logoen under kan benyttes på en hvilken som helst maskin som kjører Apache. + Takk for at du benytter Apache! +

+
+ +
+ + diff --git a/htdocs/index.html.po.iso-pl b/htdocs/index.html.po.iso-pl new file mode 100644 index 00000000000..471a69572e3 --- /dev/null +++ b/htdocs/index.html.po.iso-pl @@ -0,0 +1,40 @@ + + + + Strona testowa instalacji serwera Apache + + + + + + + +

+Je¿eli strona ta jest widoczna, oznacza to poprawn± instalacjê serwera Apache. Mo¿na ju¿ zamieniæ zawarto¶æ tej witryny. + +


+ +

Czy zamiast spodziewanej witryny WWW widoczna jest ta?

+ +

+Strona ta jest widoczna, poniewa¿ administrator serwera WWW zmieni³ jego konfiguracjê. +Proszê skontaktowaæ siê z osob± odpowiedzialn± za zarz±dzanie tym serwerem. Apache Software Foundation, producent oprogramowania serwerowego Apache, nie administruje t± witryn± i nie jest w stanie pomóc w sprawach zwi±zanych z jej konfiguracj±. + +


+ + +

+Do niniejszej dystrybucji serwera Apache do³±czono anglojêzyczn± dokumentacjê. + +

+Poni¿sze logo, "Powered by Apache", mo¿na stosowaæ bez ograniczeñ. Dziêkujemy za wybranie Apache'a! + +

+ + diff --git a/htdocs/index.html.pt b/htdocs/index.html.pt new file mode 100644 index 00000000000..671042bc548 --- /dev/null +++ b/htdocs/index.html.pt @@ -0,0 +1,42 @@ + + + + Página de teste da instalação do Apache Web Server + + + + + + +

Se está a ver esta página significa que a instalação + do Apache Web Server foi efectuada + com sucesso. Pode agora adicionar conteúdo a esta directoria e substituir + esta página. +


+ +

Está a ver esta página em vez do website que + esperava?

+ +

Esta página está neste momento activa porque o administrador + deste site alterou a configuração do web server. Por favor contacte + a pessoa responsável pela manutenção deste servidor. + A Fundação Apache Software (Apache Software Foundation), apesar + de ter produzido o web server que o administrador deste site está a usar, + não tem qualquer tipo de responsabilidade pela manutenção + deste nem pode ajudar a resolver problemas de configuração. +


+ + +

A documentação foi incluída + juntamente com esta distribuição. +

A imagem abaixo pode ser usada livremente em qualquer site presente num servidor + com o Apache Web Server instalado. Obrigado por usar o Apache Web Server! +

+ + diff --git a/htdocs/index.html.pt-br b/htdocs/index.html.pt-br new file mode 100644 index 00000000000..009e2a137a1 --- /dev/null +++ b/htdocs/index.html.pt-br @@ -0,0 +1,46 @@ + + + + + + Página teste para a instalação do Apache no +Web Site + + + + + +
+

+Funcionou! O Apache Web Server foi instalado corretamente neste Web Site!

+Se você está vendo esta página, isso quer dizer que o software +Apache +Web server foi instalado com sucesso. Agora, basta adicionar o conteúdo +ao diretório raiz e substituir esta página temporaria, ou apontar o servidor +para o seu conteúdo real. +
+
+
+
+

+Está vendo esta página em vez do site que esperava?

+Esta página está sendo carregada, pois o administrador modificou as +configurações +deste servidor. Por favor, contacte o administrador do site para esclarecimentos. +(Tente enviar um e-mail para <Webmaster@dominio>.) A Apache +Server Foundation, que desenvolveu o software (web server) utilizado pelo +administrador, não tem nenhuma responsabilidade sobre a manutenção desta +página e não poderá ajudar a resolução de problemas de +configuração.
+ +
+

O Apache documentation foi incluído +com esta distribuição. +

O Webmaster deste site é livre para utilizar a imagem abaixo num web +server utilizando o Apache. Obrigado por utilizar o Apache! +

+ + + diff --git a/htdocs/index.html.ru.cp-1251 b/htdocs/index.html.ru.cp-1251 new file mode 100644 index 00000000000..82ad768dd36 --- /dev/null +++ b/htdocs/index.html.ru.cp-1251 @@ -0,0 +1,34 @@ + + + + + + Òåñòîâàÿ ñòðàíèöà óñòàíîâêè Apache + + + +Åñëè Âû ýòî âèäèòå, ýòî çíà÷èò, ÷òî óñòàíîâêà +ÏÎ âåá-ñåðâåðà Apache íà ýòîé +ñèñòåìå çàâåðøèëàñü óñïåøíî. Âû ìîæåòå òåïåðü äîáàâëÿòü ñîäåðæèìîå â ýòó +äèðåêòîðèþ è çàìåíèòü ýòó ñòðàíèöó. +

+


+
+

+Âû âèäèòå ýòî âìåñòî îæèäàåìîé ñòðàíèöû?

+Ýòà ñòðàíèöà íàõîäèòñÿ çäåñü ïîòîìó, ÷òî àäìèíèñòðàòîð ñèñòåìû èçìåíèë +êîíôèãóðàöèþ ýòîãî âåá-ñåðâåðà. Ïîæàëóéñòà, ñâÿæèòåñü ñ ëèöîì, îòâåòñâåííûì +çà ïîääåðæêó ýòîãî ñåðâåðà äëÿ âûÿñíåíèÿ âàøèõ âîïðîñîâ. Apache Software +Foundation, àâòîð ÏÎ âåá-ñåðâåðà, êîòîðûì ïîëüçóåòñÿ àäìèíèñòðàòîð ýòîé +ñèñòåìû, íå ñâÿçàí ñ ïîääåðæêîé ýòîé ñèñòåìû è íå ìîæåò ïîìî÷ü Âàì +ðàçðåøèòü ïðîáëåìû êîíôèãóðàöèè. +

+


+

Äîêóìåíòàöèÿ ïî âåá-ñåðâåðó Apache ïðèëàãàåòñÿ +ê êîìïëåêòó ÏÎ. +

Âû ìîæåòå ñâîáîäíî èñïîëüçîâàòü ïèêòîãðàììó, íàõîäÿùóþñÿ íèæå, íà âåá-ñåðâåðå, +èñïîëüçóþùèì ÏÎ Apache. Ñïàñèáî çà èñïîëüçîâàíèå Apache! +

+ + + diff --git a/htdocs/index.html.ru.cp866 b/htdocs/index.html.ru.cp866 new file mode 100644 index 00000000000..f3335d6518c --- /dev/null +++ b/htdocs/index.html.ru.cp866 @@ -0,0 +1,34 @@ + + + + + + ’¥á⮢ ï áâà ­¨æ  ãáâ ­®¢ª¨ Apache + + + +…᫨ ‚ë íâ® ¢¨¤¨â¥, íâ® §­ ç¨â, çâ® ãáâ ­®¢ª  +Ž ¢¥¡-á¥à¢¥à  Apache ­  í⮩ +á¨á⥬¥ § ¢¥à訫 áì ãᯥ譮. ‚ë ¬®¦¥â¥ ⥯¥àì ¤®¡ ¢«ïâì ᮤ¥à¦¨¬®¥ ¢ íâã +¤¨à¥ªâ®à¨î ¨ § ¬¥­¨âì íâã áâà ­¨æã. +

+


+
+

+‚ë ¢¨¤¨â¥ íâ® ¢¬¥áâ® ®¦¨¤ ¥¬®© áâà ­¨æë?

+â  áâà ­¨æ  ­ å®¤¨âáï §¤¥áì ¯®â®¬ã, çâ®  ¤¬¨­¨áâà â®à á¨áâ¥¬ë ¨§¬¥­¨« +ª®­ä¨£ãà æ¨î í⮣® ¢¥¡-á¥à¢¥à . ®¦ «ã©áâ , á¢ï¦¨â¥áì á «¨æ®¬, ®â¢¥âᢥ­­ë¬ +§  ¯®¤¤¥à¦ªã í⮣® á¥à¢¥à  ¤«ï ¢ëïá­¥­¨ï ¢ è¨å ¢®¯à®á®¢. Apache Software +Foundation,  ¢â®à Ž ¢¥¡-á¥à¢¥à , ª®â®àë¬ ¯®«ì§ã¥âáï  ¤¬¨­¨áâà â®à í⮩ +á¨á⥬ë, ­¥ á¢ï§ ­ á ¯®¤¤¥à¦ª®© í⮩ á¨áâ¥¬ë ¨ ­¥ ¬®¦¥â ¯®¬®ç젂 ¬ +à §à¥è¨âì ¯à®¡«¥¬ë ª®­ä¨£ãà æ¨¨. +

+


+

„®ªã¬¥­â æ¨ï ¯® ¢¥¡-á¥à¢¥àã Apache ¯à¨« £ ¥âáï +ª ª®¬¯«¥ªâ㠏Ž. +

‚ë ¬®¦¥â¥ ᢮¡®¤­® ¨á¯®«ì§®¢ âì ¯¨ªâ®£à ¬¬ã, ­ å®¤ïéãîáï ­¨¦¥, ­  ¢¥¡-á¥à¢¥à¥, +¨á¯®«ì§ãî騬 Ž Apache. ‘¯ á¨¡® §  ¨á¯®«ì§®¢ ­¨¥ Apache! +

+ + + diff --git a/htdocs/index.html.ru.iso-ru b/htdocs/index.html.ru.iso-ru new file mode 100644 index 00000000000..4c758fea98c --- /dev/null +++ b/htdocs/index.html.ru.iso-ru @@ -0,0 +1,34 @@ + + + + + + ÂÕáâÞÒÐï áâàÐÝØæÐ ãáâÐÝÞÒÚØ Apache + + + +µáÛØ ²ë íâÞ ÒØÔØâÕ, íâÞ ×ÝÐçØâ, çâÞ ãáâÐÝÞÒÚÐ +¿¾ ÒÕÑ-áÕàÒÕàÐ Apache ÝÐ íâÞÙ +áØáâÕÜÕ ×ÐÒÕàèØÛÐáì ãáßÕèÝÞ. ²ë ÜÞÖÕâÕ âÕßÕàì ÔÞÑÐÒÛïâì áÞÔÕàÖØÜÞÕ Ò íâã +ÔØàÕÚâÞàØî Ø ×ÐÜÕÝØâì íâã áâàÐÝØæã. +

+


+
+

+²ë ÒØÔØâÕ íâÞ ÒÜÕáâÞ ÞÖØÔÐÕÜÞÙ áâàÐÝØæë?

+ÍâÐ áâàÐÝØæÐ ÝÐåÞÔØâáï ×ÔÕáì ßÞâÞÜã, çâÞ ÐÔÜØÝØáâàÐâÞà áØáâÕÜë Ø×ÜÕÝØÛ +ÚÞÝäØÓãàÐæØî íâÞÓÞ ÒÕÑ-áÕàÒÕàÐ. ¿ÞÖÐÛãÙáâÐ, áÒïÖØâÕáì á ÛØæÞÜ, ÞâÒÕâáÒÕÝÝëÜ +×Ð ßÞÔÔÕàÖÚã íâÞÓÞ áÕàÒÕàÐ ÔÛï ÒëïáÝÕÝØï ÒÐèØå ÒÞßàÞáÞÒ. Apache Software +Foundation, ÐÒâÞà ¿¾ ÒÕÑ-áÕàÒÕàÐ, ÚÞâÞàëÜ ßÞÛì×ãÕâáï ÐÔÜØÝØáâàÐâÞà íâÞÙ +áØáâÕÜë, ÝÕ áÒï×ÐÝ á ßÞÔÔÕàÖÚÞÙ íâÞÙ áØáâÕÜë Ø ÝÕ ÜÞÖÕâ ßÞÜÞçì ²ÐÜ +àÐ×àÕèØâì ßàÞÑÛÕÜë ÚÞÝäØÓãàÐæØØ. +

+


+

´ÞÚãÜÕÝâÐæØï ßÞ ÒÕÑ-áÕàÒÕàã Apache ßàØÛÐÓÐÕâáï +Ú ÚÞÜßÛÕÚâã ¿¾. +

²ë ÜÞÖÕâÕ áÒÞÑÞÔÝÞ ØáßÞÛì×ÞÒÐâì ߨÚâÞÓàÐÜÜã, ÝÐåÞÔïéãîáï ÝØÖÕ, ÝÐ ÒÕÑ-áÕàÒÕàÕ, +ØáßÞÛì×ãîéØÜ ¿¾ Apache. ÁßÐáØÑÞ ×Ð ØáßÞÛì×ÞÒÐÝØÕ Apache! +

+ + + diff --git a/htdocs/index.html.ru.koi8-r b/htdocs/index.html.ru.koi8-r new file mode 100644 index 00000000000..344729424a7 --- /dev/null +++ b/htdocs/index.html.ru.koi8-r @@ -0,0 +1,34 @@ + + + + + + ôÅÓÔÏ×ÁÑ ÓÔÒÁÎÉÃÁ ÕÓÔÁÎÏ×ËÉ Apache + + + +åÓÌÉ ÷Ù ÜÔÏ ×ÉÄÉÔÅ, ÜÔÏ ÚÎÁÞÉÔ, ÞÔÏ ÕÓÔÁÎÏ×ËÁ +ðï ×ÅÂ-ÓÅÒ×ÅÒÁ Apache ÎÁ ÜÔÏÊ +ÓÉÓÔÅÍÅ ÚÁ×ÅÒÛÉÌÁÓØ ÕÓÐÅÛÎÏ. ÷Ù ÍÏÖÅÔÅ ÔÅÐÅÒØ ÄÏÂÁ×ÌÑÔØ ÓÏÄÅÒÖÉÍÏÅ × ÜÔÕ +ÄÉÒÅËÔÏÒÉÀ É ÚÁÍÅÎÉÔØ ÜÔÕ ÓÔÒÁÎÉÃÕ. +

+


+
+

+÷Ù ×ÉÄÉÔÅ ÜÔÏ ×ÍÅÓÔÏ ÏÖÉÄÁÅÍÏÊ ÓÔÒÁÎÉÃÙ?

+üÔÁ ÓÔÒÁÎÉÃÁ ÎÁÈÏÄÉÔÓÑ ÚÄÅÓØ ÐÏÔÏÍÕ, ÞÔÏ ÁÄÍÉÎÉÓÔÒÁÔÏÒ ÓÉÓÔÅÍÙ ÉÚÍÅÎÉÌ +ËÏÎÆÉÇÕÒÁÃÉÀ ÜÔÏÇÏ ×ÅÂ-ÓÅÒ×ÅÒÁ. ðÏÖÁÌÕÊÓÔÁ, Ó×ÑÖÉÔÅÓØ Ó ÌÉÃÏÍ, ÏÔ×ÅÔÓ×ÅÎÎÙÍ +ÚÁ ÐÏÄÄÅÒÖËÕ ÜÔÏÇÏ ÓÅÒ×ÅÒÁ ÄÌÑ ×ÙÑÓÎÅÎÉÑ ×ÁÛÉÈ ×ÏÐÒÏÓÏ×. Apache Software +Foundation, Á×ÔÏÒ ðï ×ÅÂ-ÓÅÒ×ÅÒÁ, ËÏÔÏÒÙÍ ÐÏÌØÚÕÅÔÓÑ ÁÄÍÉÎÉÓÔÒÁÔÏÒ ÜÔÏÊ +ÓÉÓÔÅÍÙ, ÎÅ Ó×ÑÚÁÎ Ó ÐÏÄÄÅÒÖËÏÊ ÜÔÏÊ ÓÉÓÔÅÍÙ É ÎÅ ÍÏÖÅÔ ÐÏÍÏÞØ ÷ÁÍ +ÒÁÚÒÅÛÉÔØ ÐÒÏÂÌÅÍÙ ËÏÎÆÉÇÕÒÁÃÉÉ. +

+


+

äÏËÕÍÅÎÔÁÃÉÑ ÐÏ ×ÅÂ-ÓÅÒ×ÅÒÕ Apache ÐÒÉÌÁÇÁÅÔÓÑ +Ë ËÏÍÐÌÅËÔÕ ðï. +

÷Ù ÍÏÖÅÔÅ Ó×ÏÂÏÄÎÏ ÉÓÐÏÌØÚÏ×ÁÔØ ÐÉËÔÏÇÒÁÍÍÕ, ÎÁÈÏÄÑÝÕÀÓÑ ÎÉÖÅ, ÎÁ ×ÅÂ-ÓÅÒ×ÅÒÅ, +ÉÓÐÏÌØÚÕÀÝÉÍ ðï Apache. óÐÁÓÉÂÏ ÚÁ ÉÓÐÏÌØÚÏ×ÁÎÉÅ Apache! +

+ + + diff --git a/htdocs/index.html.ru.ucs2 b/htdocs/index.html.ru.ucs2 new file mode 100644 index 00000000000..4d22a70a05b Binary files /dev/null and b/htdocs/index.html.ru.ucs2 differ diff --git a/htdocs/index.html.ru.ucs4 b/htdocs/index.html.ru.ucs4 new file mode 100644 index 00000000000..8db773e6a6d Binary files /dev/null and b/htdocs/index.html.ru.ucs4 differ diff --git a/htdocs/index.html.ru.utf8 b/htdocs/index.html.ru.utf8 new file mode 100644 index 00000000000..9889df41160 --- /dev/null +++ b/htdocs/index.html.ru.utf8 @@ -0,0 +1,34 @@ + + + + + + Тестовая страница установки Apache + + + +Если Вы это видите, это значит, что установка +ПО веб-сервера Apache на этой +системе завершилась успешно. Вы можете теперь добавлять содержимое в эту +директорию и заменить эту страницу. +

+


+
+

+Вы видите это вместо ожидаемой страницы?

+Эта страница находится здесь потому, что администратор системы изменил +конфигурацию этого веб-сервера. Пожалуйста, свяжитесь с лицом, ответсвенным +за поддержку этого сервера для выяснения ваших вопросов. Apache Software +Foundation, автор ПО веб-сервера, которым пользуется администратор этой +системы, не связан с поддержкой этой системы и не может помочь Ð’ам +разрешить проблемы конфигурации. +

+


+

Документация по веб-серверу Apache прилагается +к комплекту ПО. +

Вы можете свободно использовать пиктограмму, находящуюся ниже, на веб-сервере, +использующим ПО Apache. Спасибо за использование Apache! +

+ + + diff --git a/htdocs/index.html.se b/htdocs/index.html.se new file mode 100644 index 00000000000..532b3a49c33 --- /dev/null +++ b/htdocs/index.html.se @@ -0,0 +1,43 @@ + + + + Testsida för Apache-installationen + + + +

+ Det fungerade! Apache är installerad på denna maskin! +

+

+ Om du kan se denna sida så har ägaren till denna maskin installerat + webbserverprogramvaran Apache.
+ Denne måste nu placera webbsidor i detta bibliotek och ändra på denna sida, eller + peka servern mot ett annat bibliotek. +

+
+
+ Om du förväntat dig att se något helt annat här än denna sida, kontakta + vänligen administratören för den webbserver du försöker komma i kontakt med. + (Försök att skicka ett brev till <webmaster@domain>.) + Apache Software Foundation har inget med denna webbplats att göra, så det är ingen idé + att skicka mail till författarna av Apache rörande denna webbplats. +
+
+

+ Apache-dokumentationen är inkluderad i denna distribution. +

+

+ Administratören av denna webbplats får gärna använda följande bild till en webbplats som använder Apache.
+ Tack för att ni använder Apache! +

+
+ +
+ + diff --git a/htdocs/index.html.zh-tw.big5 b/htdocs/index.html.zh-tw.big5 new file mode 100644 index 00000000000..78a3a558184 --- /dev/null +++ b/htdocs/index.html.zh-tw.big5 @@ -0,0 +1,46 @@ + + + + ¦w¸Ë Apache ªº´ú¸Õºô­¶ + + + + + +

+¦pªG§A¥i¥H¬Ý¨£¦¹­¶¡A³oªí¥Ü§Aªº +Apache Web Server +¤w¸g¦w¸Ë¦¨¥\¡C +§A¥i¥H¼W¥[¤º®e¨ì³o­Ó¥Ø¿ý¡A©Î§â³o­Óºô­¶´«±¼¡C

+ +


+ +

¨S¦³¬Ý¨ì§A·Q¬Ýªººô¯¸¶Ü ?

+ +

+³o­Óºô­¶¤§©Ò¥H·|¦b³oùØ¡A¨º¬O¦]¬°ºô¯¸ºÞ²zªÌ¤w¸g§ó§ï³o­Óºô¯¸ªº³]©w¡C +­Y¦³°ÝÃD, ½Ð»P ºûÅ@³o­Ó¦øªA¾¹ªº¤H­ûÁpµ¸¡C +Apache ³nÅé°òª÷·|¡A¤]´N¬O¶}µo³o®M³nÅ骺³æ¦ì¡A»P¦¹ºô¯¸¨ÃµL¥ô¦óÃö«Y¡A +¦Ó¥B¤]µLªkÀ°§A¸Ñ¨M³]©w¤Wªº°ÝÃD¡C + +


+ +

+Apache ªº +¤å¥ó +¤w¸g¥]§t¦b¸Óª©¥»¤¤¡C + +

+§A¥i¥H¦b¨Ï¥Î Apache ªººô¯¸¦øªA¾¹¤W¡A¦Û¥Ñªº¨Ï¥Î¤U­±¤§¹Ï¥Ü¡A +·PÁ±z¨Ï¥Î Apache¡I +

+

+ + + diff --git a/htdocs/manual/LICENSE b/htdocs/manual/LICENSE new file mode 100644 index 00000000000..57bc88a15a0 --- /dev/null +++ b/htdocs/manual/LICENSE @@ -0,0 +1,202 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/htdocs/manual/bind.html.en b/htdocs/manual/bind.html.en new file mode 100644 index 00000000000..8ea715b512c --- /dev/null +++ b/htdocs/manual/bind.html.en @@ -0,0 +1,130 @@ + + + + + + + Setting which addresses and ports Apache uses + + + + + + +

Setting which addresses and ports Apache + uses

+
+ When Apache starts, it connects to some port and address on the + local machine and waits for incoming requests. By default, it + listens to all addresses on the machine, and to the port as + specified by the Port directive in the server + configuration. However, it can be told to listen to more the + one port, or to listen to only selected addresses, or a + combination. This is often combined with the Virtual Host + feature which determines how Apache responds to different IP + addresses, hostnames and ports. + +

There are two directives used to restrict or specify which + addresses and ports Apache listens to.

+ + + +

BindAddress

+ Syntax: BindAddress [ * | + IP-address | hostname ]
+ Default: BindAddress + *
+ Context: server config
+ Status: Core + +

Makes the server bind to just the specified address. If the + argument is * (an asterisk), the server binds to all interfaces + currently marked as up on the server. The port bound to is set + with the Port directive. Only one BindAddress should + be used.

+ +

Listen

+ Syntax: Listen [ port | + IP-address:port ]
+ Default: + none
+ Context: server config
+ Status: Core + +

Listen can be used instead of BindAddress + and Port. It tells the server to accept incoming + requests (to listen) on the specified port or address-and-port + combination. If the first format is used, with a port number + only, the server listens on the given port on all interfaces + marked as up, instead of the port given by the Port + directive. If an IP address is given as well as a port, the + server will listen on the given port and interface.

+ +

Multiple Listen directives may be used to specify a number + of addresses and ports to listen to. The server will respond to + requests from any of the listed addresses and ports.

+ +

For example, to make the server accept connections on both + port 80 and port 8000, use:

+
+   Listen 80
+   Listen 8000
+
+ To make the server accept connections on two specified + interfaces and port numbers, use +
+   Listen 192.170.2.1:80
+   Listen 192.170.2.5:8000
+
+ +

How this works with Virtual Hosts

+ BindAddress and Listen do not implement + Virtual Hosts. They tell the main Apache daemon process what + addresses and ports to bind and listen on. If no + <VirtualHost> directives are used, the server will behave + the same for all accepted requests. However, + <VirtualHost> can be used to specify a different behavior + for one or more of the addresses and ports. To implement a + VirtualHost, the server must: + + + Note that if the <VirtualHost> is set for an address and + port that the server is not listening to, it cannot be + accessed. + +

See also

+ See also the documentation on Virtual + Hosts, BindAddress + directive, Port directive, + DNS Issues and <VirtualHost> + section. + + + diff --git a/htdocs/manual/bind.html.fr b/htdocs/manual/bind.html.fr new file mode 100644 index 00000000000..8e9bd214231 --- /dev/null +++ b/htdocs/manual/bind.html.fr @@ -0,0 +1,145 @@ + + + + + + + + + Définir quelles adresses et quels ports Apache + utilise + + + + + + +

Définir quelles adresses et quels + ports Apache utilise

+
+ Quand Apache démarre, il se connecte à des ports + et adresses donnés de la machine et attend les + requêtes. Par défaut il écoute sur toutes + les adresses de la machines, et sur le port défini par + la directive Port du fichier de configuration. + Cependant, on peut lui indiquer d'écouter sur d'autres + ports, ou d'écouter à partir de certaines + adresses seulement, ou une combinaison de ces + paramètres. Ceci est généralement + combiné avec la fonction d'hôte virtuel qui + définit comment répond aux différentes + adresses IP, nom d'hôte et de ports. + +

Il existe deux directives pour resteindre ou + spécifier sur quels adresses et ports Apache doit + écouter.

+ + + +

BindAddress

+ Syntaxe : BindAddress [ * | + IP-address | hostname ]
+ Défaut : + BindAddress *
+ Contexte : configuration du + serveur
+ Statut : base + +

Cette directive force le serveur à n'écouter + que d'une adresse spécifique. Si l'argument est *, le + serveur écoute sur toutes les adresses. Le port + d'écoute est défini par la directive + Port directive. Il ne doit y avoir qu'au plus une + seule directive BindAddress.

+ +

Listen

+ Syntaxe : Listen [ port | + IP-address:port ]
+ Défaut : + aucun
+ Contexte : configuration du + serveur
+ Statut : base + +

Listen peut être utilisé à la + place de BindAddress et Port. Il indique au + serveur d'accepter des requêtes venant d'un port + spécifique ou d'une combinaison d'adresse et de port. Si + le premier format est employé, avec uniquement un + numéro de port, le serveur écoute sur ce port, + à la place du port spécifié dans la + directive Port, sur l'ensemble des interfaces + réseau. Si une adresse est donnée en plus du + port, le serveur n'écoutera que sur le port de + l'interface spécifiée.

+ +

Plusieurs directives Listen peuvent être + utilisées pour spécifier un ensemble d'adresses + et de ports d'écoute. Le serveur répondra aux + requêtes provenant de n'importe quels de ces adresses et + ports.

+ +

Par exemple pour autoriser les requêtes sur les ports + 80 et 8000, il suffit d'écrire :

+
+   Listen 80
+   Listen 8000
+
+ Pour que le serveur acccepte des requêtes provenant de + deux adresses et ports spécifiques, écrivez : +
+   Listen 192.170.2.1:80
+   Listen 192.170.2.5:8000
+
+ +

Comment cela fonctionne avec les hôtes virtuels

+ BindAddress et Listen n'implémentent + pas les hôtes virtuels. Ils indiquent au serveur + principal sur quelles adresses et ports écouter. Si + aucune directive <VirtualHost> n'est + employée, le serveur se comportera de la même + manière pour toutes les requêtes. + <VirtualHost> peut être employé + pour définir un comportement différent pour un ou + plusieurs de ces ports et adresses. Pour implémenter un + hôte virtuel, le serveur doit connaître quels ports + et quelles adresses employer. Une section + <VirtualHost> doit être + créée pour une adresse et un port + spécifique afin de définir le comportement de cet + hôte virtuel. Il faut noter que si un hôte virtuel + est configuré pour une adresse ou un port sur lequel le + serveur n'écoute pas, il est inaccessible. + +

Voir également

+ Voir également la documentation sur les hôtes virtuels, la directive BindAddress, la + directive Port, les questions sur le DNS et la section + <VirtualHost>. + + + diff --git a/htdocs/manual/bind.html.html b/htdocs/manual/bind.html.html new file mode 100644 index 00000000000..2ba9299ba4a --- /dev/null +++ b/htdocs/manual/bind.html.html @@ -0,0 +1,4 @@ + + + diff --git a/htdocs/manual/bind.html.ja.jis b/htdocs/manual/bind.html.ja.jis new file mode 100644 index 00000000000..67f7baeed30 --- /dev/null +++ b/htdocs/manual/bind.html.ja.jis @@ -0,0 +1,131 @@ + + + + + + Apache $B$,;HMQ$9$k%"%I%l%9$H%]!<%H$N@_Dj(B + + + + + + + +

Apache $B$,;HMQ$9$k%"%I%l%9$H%]!<%H$N@_Dj(B

+ +
+ Apache $B$O5/F0;~$K!"%m!<%+%k$J%^%7%s$N$"$k%]!<%H$*$h$S%"%I%l%9(B + $B$KBP$7$F@\B3$7!"%j%/%(%9%H$,Mh$k$N$rBT$A$^$9!#(B + $B%G%U%)%k%H$G$O!"%^%7%s>e$N$9$Y$F$N%"%I%l%9!"$*$h$S%5!<%P@_Dj%U%!%$%k$N(B + Port $B%G%#%l%/%F%#%V$G@_Dj$5$l$?%]!<%H$KBP$7$F(B listen $B$7$^$9!#(B + $B$7$+$7!"J#?t$N%]!<%H$r(B listen $B$9$k!";XDj$5$l$?%"%I%l%9$K8B$C$F(B + listen $B$9$k!"$"$k$$$O$=$l$i$rAH$_9g$o$;$F@_Dj$9$k$3$H$b2DG=$G$9!#(B + $B$3$l$O!"0[$J$k(B IP $B%"%I%l%9!"%[%9%HL>!"%]!<%H$KBP$9$k(B Apache + $B$N1~EzJ}K!$r7hDj$9$k%P!<%A%c%k%[%9%H5!G=$HAH$_9g$o$;$F;H$o$l$^$9!#(B + +

Apache $B$,(B listen $B$9$k%"%I%l%9$*$h$S%]!<%H$r8BDj$9$k$?$a$K;H$o$l$k(B + $B%G%#%l%/%F%#%V$,Fs$D$"$j$^$9!#(B

+ + + +

BindAddress

+ $B9=J8(B: BindAddress [ * | + IP $B%"%I%l%9(B | $B%[%9%HL>(B ]
+ $B%G%U%)%k%H(B:BindAddress + *
+ $B%3%s%F%-%9%H(B:$B%5!<%P@_Dj%U%!%$%k(B
+ $B%9%F!<%?%9(B:$B%3%"(B + +

$B%5!<%P$r!"FCDj$N%"%I%l%9$@$1$K%P%$%s%I$7$^$9!#(B + $B0z?t$,(B * ($B%"%9%?%j%9%/(B) $B$N>l9g$O!"8=:_%5!<%P>e$GM-8z$J$9$Y$F$N(B + $B%$%s%?%U%'!<%9$K%P%$%s%I$7$^$9!#%]!<%H$O(B Port + $B%G%#%l%/%F%#%V$G$N@_Dj$,;H$o$l$^$9!#(BBindAddress $B$O0l$D$@$1;H$($^$9!#(B +

+ +

Listen

+ $B9=J8(B:Listen [$B%]!<%H(B | + IP $B%"%I%l%9(B:$B%]!<%H(B ]
+ $B%G%U%)%k%H(B: + none
+ $B%3%s%F%-%9%H(B:$B%5!<%P@_Dj%U%!%$%k(B
+ $B%9%F!<%?%9(B:$B%3%"(B + +

Listen $B%G%#%l%/%F%#%V$O(B BindAddress $B$*$h$S(B + Port $B%G%#%l%/%F%#%V$NBe$o$j$H$7$F;H$&$3$H$b$G$-$^$9!#(B + $B$3$l$K$h$jFCDj$N%]!<%H$^$?$O%"%I%l%9$H%]!<%H$NAH9g$o$;$KBP$7$F$N(B + $B%j%/%(%9%H$r%5!<%P$,l9g!"(BPort + $B%G%#%l%/%F%#%V$G@_Dj$5$l$?%]!<%H$G$O$J$/%5!<%P>e$GM-8z$J$9$Y$F$N(B + $B%$%s%?%U%'!<%9$KBP$7$F!"$3$3$G@_Dj$5$l$?%]!<%H$r(B listen $B$7$^$9!#(B + $B%]!<%H$H6&$K(B IP $B%"%I%l%9$r;XDj$7$?>l9g$O!";XDj$5$l$?%]!<%H$H(B + $B%$%s%?%U%'!<%9$KBP$7$F(B listen $B$7$^$9!#(B

+ +

$BJ#?t$N(B Listen $B%G%#%l%/%F%#%V$K$h$j!"(Blisten $B$9$k%"%I%l%9$H%]!<%H$r(B + $B$$$/$D$b;XDj$9$k$3$H$b=PMh$^$9!#(B + $B%j%9%H$5$l$?%"%I%l%9$H%]!<%H$9$Y$F$KBP$7$F1~Ez$7$^$9!#(B

+ +

$B$?$H$($P!"%]!<%H(B 80 $B$H(B 8000 $B$NN>J}$KBP$7$F$N@\B3$r +

+   Listen 80
+   Listen 8000
+
+ $B$H$7$^$9!#(B + $BFs$D$N;XDj$5$l$?%$%s%?%U%'!<%9$H%]!<%HHV9f$KBP$7$F$N@\B3$r + Listen 192.170.2.1:80 + Listen 192.170.2.5:8000 + + $B$H$7$^$9!#(B + +

$B%P!<%A%c%k%[%9%H$KBP$7$F$I$&F/$/$N$+(B

+ + BindAddress $B$H(B Listen $B$O%P!<%A%c%k%[%9%H$r9T$J$&(B + $B$o$1$G$O$"$j$^$;$s!#$=$l$i$O%a%$%s$N(B Apache $B%G!<%b%s%W%m%;%9$,$I$N%"%I%l%9(B + $B$r%P%$%s%I$7!"$I$N%]!<%H$r(B listen $B$9$k$N$+$H$$$&$3$H$r;XDj$7$^$9!#(B + <VirtualHost> + $B%G%#%l%/%F%#%V$,A4$/;H$o$l$J$$>l9g$O!" +
  • $BL\E*$N%"%I%l%9$H%]!<%H$r(B Listen $B$9$k$h$&$K;X<($5$l$F$$$k(B
  • + +
  • $B;XDj$5$l$?%]!<%H$H%"%I%l%9$KBP$7$F!"(B + $B%P!<%A%c%k%[%9%H$N?6$kIq$$$r@_Dj$9$k$?$a$K(B + <VirtualHost> $B%;%/%7%g%s$,:n$i$l$F$$$k(B
  • + + + $B%5!<%P$G(B listen $B$7$F$$$J$$%"%I%l%9$*$h$S%]!<%H$r(B <VirtualHost> + $B$G;XDj$7$?>l9g!"%"%/%;%9$G$-$J$$$3$H$KCm0U$7$F$/$@$5$$!#(B + +

    $B4XO"9`L\(B

    + $B%P!<%A%c%k%[%9%H(B$B!"(BBindAddress + $B%G%#%l%/%F%#%V(B$B!"(BPort + $B%G%#%l%/%F%#%V(B$B!"(BDNS + $B$NLdBj(B$B!"$*$h$S(B<VirtualHost> + $B%;%/%7%g%s(B$B$NJ8=q$b;2>H$7$F$/$@$5$$!#(B + + + + diff --git a/htdocs/manual/configuring.html.en b/htdocs/manual/configuring.html.en new file mode 100644 index 00000000000..fa3f276c407 --- /dev/null +++ b/htdocs/manual/configuring.html.en @@ -0,0 +1,253 @@ + + + + + + + Configuration Files + + + + + + +

    Configuration Files

    + + +
    + +

    Main Configuration Files

    + + + + + + + +
    Related Modules
    +
    + mod_mime
    +
    Related Directives
    +
    + AccessConfig
    + <IfDefine>
    + Include
    + ResourceConfig
    + TypesConfig
    +
    + +

    Apache is configured by placing directives in plain text + configuration files. The main configuration file is usually + called httpd.conf. The location of this file is + set at compile-time, but may be overridden with the + -f command line flag. Some sites also have + srm.conf and access.conf files for historical + reasons. In addition, other configuration files may be + added using the Include directive. Any + directive may be placed in any of these configuration files. + Changes to the main configuration files are only recognized by + Apache when it is started or restarted.

    + +

    New with Apache 1.3.13 is a feature where if any + configuration file is actually a directory, Apache will enter + that directory and parse any files (and subdirectories) found + there as configuration files. One possible use for this would + be to add VirtualHosts by creating small configuration files + for each host, and placing them in such a configuration + directory. Thus, you can add or remove VirtualHosts without + editing any files at all, simply adding or deleting them. This + makes automating such processes much easier.

    + +

    The server also reads a file containing mime document types; + the filename is set by the TypesConfig directive, + and is mime.types by default.

    +
    + +

    Syntax of the Configuration + Files

    + +

    Apache configuration files contain one directive per line. + The back-slash "\" may be used as the last character on a line + to indicate that the directive continues onto the next line. + There must be no other characters or white space between the + back-slash and the end of the line.

    + +

    Directives in the configuration files are case-insensitive, + but arguments to directives are often case sensitive. Lines + which begin with the hash character "#" are considered + comments, and are ignored. Comments may not be + included on a line after a configuration directive. Blank lines + and white space occurring before a directive are ignored, so + you may indent directives for clarity.

    + +

    You can check your configuration files for syntax errors + without starting the server by using apachectl + configtest or the -t command line + option.

    +
    + +

    Modules

    + + + + + + + +
    Related Modules
    +
    + mod_so
    +
    Related Directives
    +
    + AddModule
    + ClearModuleList
    + <IfModule>
    + LoadModule
    +
    + +

    Apache is a modular server. This implies that only the most + basic functionality is included in the core server. Extended + features are available through modules which can be loaded + into Apache. By default, a base set of modules is + included in the server at compile-time. If the server is + compiled to use dynamically loaded + modules, then modules can be compiled separately and added at + any time using the LoadModule directive. + Otherwise, Apache must be recompiled to add or remove modules. + Configuration directives may be included conditional on a + presence of a particular module by enclosing them in an <IfModule> block.

    + +

    To see which modules are currently compiled into the server, + you can use the -l command line option.

    +
    + +

    Scope of Directives

    + + + + + +
    Related Directives
    +
    + <Directory>
    + <DirectoryMatch>
    + <Files>
    + <FilesMatch>
    + <Location>
    + <LocationMatch>
    + <VirtualHost>
    +
    + +

    Directives placed in the main configuration files apply to + the entire server. If you wish to change the configuration for + only a part of the server, you can scope your directives by + placing them in <Directory>, <DirectoryMatch>, + <Files>, <FilesMatch>, <Location>, and + <LocationMatch> + sections. These sections limit the application of the + directives which they enclose to particular filesystem + locations or URLs. They can also be nested, allowing for very + fine grained configuration.

    + +

    Apache has the capability to serve many different websites + simultaneously. This is called Virtual + Hosting. Directives can also be scoped by placing them + inside <VirtualHost> + sections, so that they will only apply to requests for a + particular website.

    + +

    Although most directives can be placed in any of these + sections, some directives do not make sense in some contexts. + For example, directives controlling process creation can only + be placed in the main server context. To find which directives + can be placed in which sections, check the Context of the + directive. For further information, we provide details on How Directory, Location and Files sections + work.

    +
    + +

    .htaccess Files

    + + + + + +
    Related Directives
    +
    + AccessFileName
    + AllowOverride
    +
    + +

    Apache allows for decentralized management of configuration + via special files placed inside the web tree. The special files + are usually called .htaccess, but any name can be + specified in the AccessFileName + directive. Directives placed in .htaccess files + apply to the directory where you place the file, and all + sub-directories. The .htaccess files follow the + same syntax as the main configuration files. Since + .htaccess files are read on every request, changes + made in these files take immediate effect.

    + +

    To find which directives can be placed in + .htaccess files, check the Context of the + directive. The server administrator further controls what + directives may be placed in .htaccess files by + configuring the AllowOverride + directive in the main configuration files.

    + +

    For more information on .htaccess files, see + Ken Coar's tutorial on + Using .htaccess Files with Apache, or the .htaccess + tutorial in the Apache docs.

    + + + + diff --git a/htdocs/manual/configuring.html.fr b/htdocs/manual/configuring.html.fr new file mode 100644 index 00000000000..8d5a04463f8 --- /dev/null +++ b/htdocs/manual/configuring.html.fr @@ -0,0 +1,346 @@ + + + + + + + + + + Fichiers de configuration + + + + + + +

    Fichiers de configuration

    + + +
    + +

    Principaux fichiers de + configuration

    + + + + + + + +
    Modules liés
    +
    + mod_mime
    +
    Directives + liées
    +
    + AccessConfig
    + <IfDefine>
    + Include
    + ResourceConfig
    + TypesConfig
    +
    + +

    Apache se configure en plaçant des directives dans des fichiers + textes de configuration. Le fichier de configuration principal + est généralement appelé + httpd.conf. L'emplacement de ce fichier est + fixé à la compilation, mais peut être + redéfini en utilisant l'option de ligne de commande + -f. Certains sites possèdent + également des fichiers srm.conf et + access.conf pour des raisons + historiques. De plus, d'autres fichiers de configuration + peuvent être ajoutés en utilisant la directive + Include. Les + directives peuvent être placées dans n'importe + quel fichier. Les modifications dans le fichier de + configuration principal ne sont prises en compte qu'au + démarrage ou au redémarrage d'Apache.

    + +

    Une nouveauté de la version 1.3.13 d'Apache est la + possibilité qu'un fichier de configuration soit en fait + un répertoire. Dans ce cas, Apache lira tous les + fichiers et sous répertoires et les traitera comme + fichiers de configuration. Une utilisation possible de cette + fonctionnalité est de pouvoir ajouter des hôtes + virtuels en créant des fichiers de configuration pour + chaque hôte, et de les placer dans le répertoire + de configuration. Ainsi, vous pouvez ajouter ou retirer des + hôtes virtuels sans avoir à éditer de + fichiers, mais simplement en ajoutant ou supprimant un fichier. + Celà permet d'automatiser plus facilement ce genre de + traitement.

    + +

    Le serveur lit également un fichier décrivant + les types de contenu MIME; le nom de ce fichier est + défini par la directive TypesConfig et est par + défaut mime.types.

    +
    + +

    Syntaxe des fichiers de + configuration

    + +

    Les fichiers de configurations contiennent au plus une + directive par ligne. Le caractère "\" peut être + utilisé à la fin d'une ligne pour indiquer que la + directive se poursuit sur la ligne suivante. Il ne doit pas y + avoir d'autres caractère ou d'espace entre le + caractère "\" et la fin de la ligne.

    + +

    Dans les fichiers de configuration, l'écriture des + noms des directives n'est pas sensible à la casse, mais + les arguments des directives le sont + généralement. Les lignes blanches et les espaces + précédant une directive sont ignorés. Les + commentaires ne doivent pas être inclus + sur la même ligne qu'une directive. Les lignes + commençant par le caractère dièse "#" sont + traitées comme des commentaires et sont ignorés; + vous pouvez les utiliser pour indenter les directives et rendre + leur lecture plus facile.

    + +

    Vous pouvez vérifier la syntaxe de vos fichiers de + configuration en utilisant soit apachectl + configtest soit l'option de ligne de commande + -t.

    +
    + +

    Modules

    + + + + + + + +
    Modules liés
    +
    + mod_so
    +
    Directives + liées
    +
    + AddModule
    + ClearModuleList
    + <IfModule>
    + LoadModule
    +
    + +

    Apache est un serveur modulaire. Celà implique que + seules les fonctions de base sont incluses dans le noyau du + serveur. Les fonctionnalités plus avancées sont + disponibles grâce aux modules qui peuvent être + chargés dans Apache. Par défaut, un ensemble de + modules de base sont + inclus à la compilation. Si le serveur est + compilé pour utiliser les modules dynamiquement chargés, alors les + modules peuvent être compilés + séparément et ajouté à n'importe + quel moment en utilisant la directive LoadModule. Sinon, Apache + doit être recompilé pour ajouter ou supprimer des + modules. Des directives de configuration peuvent être + incluses de manière conditionnelle en fonction de la + présence d'un module particulier en les entourant par un + bloc <IfModule>.

    + +

    Pour savoir quels modules ont été + compilés dans le serveur, vous pouvez utiliser l'option + de ligne de commande -l.

    +
    + +

    Portée des + directives

    + + + + + +
    Directives + liées
    +
    + <Directory>
    + <DirectoryMatch>
    + <Files>
    + <FilesMatch>
    + <Location>
    + <LocationMatch>
    + <VirtualHost>
    +
    + +

    Les directives placées dans les principaux fichiers + de configuration s'appliquent à l'ensemble du serveur. + Si vous souhaitez modifier la configuration pour une partie + seulement du serveur, vous pouvez mettre en contexte vos + directives en les plaçant dans des sections <Directory>, <DirectoryMatch>, + <Files>, <FilesMatch>, <Location>, et + <LocationMatch> + . Ces sections limitent la portée d'application des + directives qu'elles contiennent à un emplacement des + fichiers ou à certaines URL. Elles peuvent être + imbriquées, permettant ainsi une configuration + très fine.

    + +

    Apache a la possibilité de servir plusieurs sites web + simultanément. Cette possibilité est + appelée hébergement + virtuel. Des directives peuvent également être + limitées en utilisant des sections <VirtualHost> + afin qu'elles ne s'appliquent qu'à certains sites + web.

    + +

    Bien que la plupart des directives peuvent être + placées à l'intérieur de n'importe quelle + section, certaines directives n'ont pas de sens dans certains + contextes. Par exemple, les directives contrôlant la + création des processus ne peuvent être + placées que dans le contexte pricipal du serveur. Pour + savoir quelles directives peuvent être placées + dans quelles sections, vérifiez le contexte de la + directive. Pour plus d'informations, voir comment les sections Directory, Location + et Files fonctionnent.

    +
    + +

    Fichiers + .htaccess

    + + + + + +
    Directives + liées
    +
    + AccessFileName
    + AllowOverride
    +
    + +

    Apache permet une gestion décentralisée de la + configuration par l'utilisation de fichiers spéciaux + à l'intérieur de l'arborescence web. Ces fichiers + spéciaux sont généralement appelés + .htaccess, mais n'importe quel nom peut être + défini par la directive AccessFileName. + Les directives placées dans les fichiers + .htaccess s'appliquent au répertoire + où se trouve le fichier ainsi qu'aux sous + répertoires. Les fichiers .htaccess + respectent la même syntaxe que les fichiers principaux de + configuration. Comme les fichiers .htaccess sont + lus à chaque requête, Les modifications + effectuées dans ces fichiers prennent effet + immédiatement.

    + +

    Pour savoir si une directive peut être placée + dans les fichiers .htaccess, vérifiez le contexte de la + directive. L'administrateur peut contôler quelles + directives peuvent être placées dans les fichiers + .htaccess en modifiant la directive AllowOverride + du fichier principal de configuration.

    +
    + +

    Fichiers de trace

    + +

    Avertissement sur la sécurité

    + Toute personne pouvant écrire dans le répertoire + où Apache écrit un fichier de trace peut avoir + accès à l'uid sous lequel le serveur est + lancé, généralement root. Ne donnez + pas accès en écriture au répertoire + où les fichiers de trace sont stockés sans + être clairement conscient des conséquences; voir + le document trucs sur la + sécurité pour plus de détails. + +

    Fichier pid

    + +

    Au lancement, Apache écrit le numéro de + processus du processus père httpd dans le fichier + logs/httpd.pid. Le nom du fichier peut être + changé en modifiant la directive PidFile. Le numéro de + processus est utilisé par l'administrateur pour relancer + et arrêter le démon. Sur Unix, un signal HUP ou + USR1 a pour effet de faire relire par le démon les + fichiers de configuration, et un signal TERM le fait terminer + de manière douce. Sur Windows, il faut employer l'option + -k. Pour plus d'information voir la page Arrêt et redémarrage.

    + +

    Si le processus meurt (ou est tué) de manière + anormale, il peut alors être nécessaire de tuer + les processus fils.

    + +

    Trace des erreurs

    + +

    Le serveur trace les messages d'erreurs dans un fichier, par + défaut logs/error_log sur Unix ou + logs/error.log sur Windows and OS/2. Le nom du + fichier peut être défini en utilisant la directive + ErrorLog D'autres traces + peuvent être définies pour différents hôtes virtuels.

    + +

    Trace des requêtes

    + +

    Le serveur trace généralement chaque + requête dans un fichier de transfert, par défaut + logs/access_log sur Unix ou + logs/access.log sur Windows and OS/2. Le nom du + fichier peut être défini en utilisant la directive + CustomLog. + D'autres traces peuvent être définies pour + différents hôtes virtuels. + +

    + + + diff --git a/htdocs/manual/configuring.html.html b/htdocs/manual/configuring.html.html new file mode 100644 index 00000000000..1c19de94fde --- /dev/null +++ b/htdocs/manual/configuring.html.html @@ -0,0 +1,4 @@ + + + diff --git a/htdocs/manual/configuring.html.ja.jis b/htdocs/manual/configuring.html.ja.jis new file mode 100644 index 00000000000..d83609f3120 --- /dev/null +++ b/htdocs/manual/configuring.html.ja.jis @@ -0,0 +1,253 @@ + + + + + + + + $B@_Dj%U%!%$%k(B + + + + + + +

    $B@_Dj%U%!%$%k(B

    + + +
    + +

    $B%a%$%s$N@_Dj%U%!%$%k(B

    + + + + + + + +
    $B4XO"%b%8%e!<%k(B
    +
    + mod_mime
    +
    $B4XO"%G%#%l%/%F%#%V(B
    +
    + AccessConfig
    + <IfDefine>
    + Include
    + ResourceConfig
    + TypesConfig
    +
    + +

    Apache $B$O(B $B%G%#%l%/%F%#%V(B $B$r@_Dj%U%!%$%k$KJ?J8$G=q$/$3$H$K$h$j@_Dj$7$^$9!#(B + $B%a%$%s$N@_Dj%U%!%$%k$OIaDL$O(B httpd.conf $B$H$$$&L>A0$G$9!#(B + $B$3$N%U%!%$%k$N0LCV$O%3%s%Q%$%k;~$K@_Dj$5$l$^$9$,!"%3%^%s%I%i%$%s$N(B + -f $B%U%i%0$K$h$j>e=q$-$G$-$^$9!#%5%$%H$K$h$C$F$O(B $BNr;KE*M}M3(B $B$K$h$j(B srm.conf $B$H(B access.conf + $B$,$"$k>l9g$b$"$j$^$9!#$=$N>e!"B>$N@_Dj%U%!%$%k$,(B Include + $B%G%#%l%/%F%#%V$K$h$C$FDI2C$5$l$F$$$k$+$b$7$l$^$;$s!#(B + $B$I$N%G%#%l%/%F%#%V$b$3$l$i$N@_Dj%U%!%$%k$N$I$l$K$G$bF~$l$i$l$^$9!#(B + Apache $B$O5/F0;~$+:F5/F0;~$N$_%a%$%s@_Dj%U%!%$%k$NJQ99$rG'<1$7$^$9!#(B

    + + + +

    Apache 1.3.13 $B$N?7$7$$5!G=$H$7$F!"@_Dj%U%!%$%k$,$l$N%[%9%H$KBP$7$F>.$5$J@_Dj(B + $B%U%!%$%k$r:n$j!"@_Dj%G%#%l%/%H%j$KCV$/$H$$$&$b$N$,5s$2$i$l$^$9!#(B + $B$3$&$9$k$H!"C1$K%U%!%$%k$NDI2C!":o=|$r$9$k$3$H$K$h$jA4$/%U%!%$%k$r(B + $BJT=8$9$k$3$H$J$/%P!<%A%c%k%[%9%H$NDI2C!":o=|$,$G$-$^$9!#(B + $B$3$l$O<+F02=$r$:$C$H4JC1$K$7$^$9!#(B +

    + +

    $B%5!<%P$O(B mime $B%I%-%e%a%s%H%?%$%W$r4^$s$G$$$k%U%!%$%k$bFI$_9~$_$^$9!#(B + $B%U%!%$%kL>$O(B TypesConfig + $B$G@_Dj$5$l!"%G%U%)%k%H$G(B mime.types$B$K$J$C$F$$$^$9!#(B

    + +
    + +

    $B@_Dj%U%!%$%k$N9=J8(B

    + + +

    Apache $B$N@_Dj%U%!%$%k$O(B 1 $B9T$K(B 1 $B$D$N%G%#%l%/%F%#%V$+$i$J$j$^$9!#(B + $B%P%C%/%9%i%C%7%e(B "\" $B$O%G%#%l%/%F%#%V$,$NJ8;z$d6uGr$,$"$C$F$O$$$1$^$;$s!#(B +

    + +

    $B@_Dj%U%!%$%k$N%G%#%l%/%F%#%V$OBgJ8;z>.J8;z$r6hJL$7$^$;$s$,!"(B + $B0z?t$K$O$7$P$7$P6hJL$9$k$b$N$,$"$j$^$9!#%O%C%7%eJ8;z(B "#" + $B$G;O$^$k9T$O%3%a%s%H$H8+$J$5$l$FL5;k$5$l$^$9!#(B + $B@_Dj%G%#%l%/%F%#%V$N8e$N9T$G$O%3%a%s%H$,4^$^$l$F$$$F$O(B$B$$$1$^$;$s(B$B!#%G%#%l%/%F%#%V$NA0$N6u9T$H6uGr$OL5;k$5$l$^$9$N$G!"(B + $B$o$+$j$d$9$/$9$k$?$a$K%G%#%l%/%F%#%V$r%$%s%G%s%H$9$k$3$H$,$G$-$^$9!#(B +

    + +

    $B@_Dj%U%!%$%k$N9=J8%(%i!<$O(B apachectl configtest $B$+%3%^%s%I%i%$%s%*%W%7%g%s(B -t $B$r;H$C$FD4$Y$i$l$^$9!#(B +

    + +
    + +

    $B%b%8%e!<%k(B

    + + + + + + + +
    $B4XO"%b%8%e!<%k(B
    +
    + mod_so
    +
    $B4XO"%G%#%l%/%F%#%V(B
    +
    + AddModule
    + ClearModuleList
    + <IfModule>
    + LoadModule
    +
    + +

    Apache $B$O%b%8%e!<%k2=$5$l$?%5!<%P$G$9!#(B + $B%3%"%5!<%P$K$O:G$b4pK\E*$J5!G=$@$1$,4^$^$l$F$$$^$9!#3HD%5!G=$O(B + Apache $B$K%m!<%I$5$l$k(B$B%b%8%e!<%k(B$B$H$7$FMxMQ2DG=$G$9!#%G%U%)%k%H$G$O%3%s%Q%$%k;~$K%b%8%e!<%k$N(B$B4pK\(B$B%;%C%H$,(B + $B%5!<%P$K4^$^$l$^$9!#%5!<%P$,(B$BF0E*%m!<%I(B$B%b%8%e!<%k$r;H$&$h$&$K%3%s%Q%$%k$5$l$F$$$k>l9g$O!"(B + $B%b%8%e!<%k$rJL$K%3%s%Q%$%k$7$F!"$$$D$G$b(B LoadModule $B%G%#%l%/%F%#%V$r;H$C$FDI2C$G$-$^$9!#(B + $B$=$&$G$J$$>l9g$O!"%b%8%e!<%k$NDI2C$d:o=|$r$9$k$?$a$K$O(B Apache + $B$r:F%3%s%Q%$%k$9$kI,MW$,$"$j$^$9!#@_Dj%G%#%l%/%F%#%V$O(B <IfModule> + $B%V%m%C%/$KF~$l$k$3$H$GFCDj$N%b%8%e!<%k$,B8:_$9$k$H$-$@$1(B + $B@_Dj%U%!%$%k$K4^$^$l$k$h$&$K$9$k$3$H$,$G$-$^$9!#(B

    + + +

    $B%3%^%s%I%i%$%s%*%W%7%g%s(B -l $B$r;H$C$F8=;~E@$G(B + $B$I$N%b%8%e!<%k$,%5!<%P$K%3%s%Q%$%k$5$l$F$$$k$+$rCN$k$3$H$,$G$-$^$9!#(B

    +
    + +

    $B%G%#%l%/%F%#%V$NE,MQHO0O(B

    + + + + + +
    $B4XO"%G%#%l%/%F%#%V(B
    +
    + <Directory>
    + <DirectoryMatch>
    + <Files>
    + <FilesMatch>
    + <Location>
    + <LocationMatch>
    + <VirtualHost>
    +
    + +

    $B%a%$%s@_Dj%U%!%$%k$K$"$k%G%#%l%/%F%#%V$O%5!<%PA4BN$KE,MQ$5$l$^$9!#(B + $B%5!<%P$N0lItJ,$N@_Dj$@$1$rJQ99$7$?$$>l9g$O(B <Directory>,<DirectoryMatch>,<Files>,<FilesMatch>,<Location>,<LocationMatch> + + $B%;%/%7%g%s$NCf$KCV$/$3$H$GE,MQHO0O$r7h$a$i$l$^$9!#(B + $B$3$l$i$N%;%/%7%g%s$O$=$NCf$K$"$k%G%#%l%/%F%#%V$NE,MQHO0O$r(B + $BFCDj$N%U%!%$%k%7%9%F%`$N0LCV$d(B URL $B$K8BDj$7$^$9!#(B + $BHs>o$K:YN3EY$N@_Dj$r2DG=$K$9$k$?$a$K!"(B + $B%;%/%7%g%s$rF~$l;R$K$9$k$3$H$b$G$-$^$9!#(B +

    + +

    Apache $B$OF1;~$KB?$/$N0c$&%&%'%V%5%$%H$r07$&G=NO$,$"$j$^$9!#(B + $B$3$l$O(B $B%P!<%A%c%k%[%9%H(B $B$H8F$P$l$F$$$^$9!#(B + $BFCDj$N%&%'%V%5%$%H$K$N$_E,MQ$5$l$k$h$&$K$9$k$?$a$K!"(B + $B%G%#%l%/%F%#%V$O(B <VirtualHost> + $B%;%/%7%g%s$NCf$KCV$/$3$H$G$bE,MQHO0O$rJQ$($k$3$H$,$G$-$^$9!#(B +

    + +

    $B$[$H$s$I$N%G%#%l%/%F%#%V$O$I$N%;%/%7%g%s$K$G$b=q$1$^$9$,!"(B + $BCf$K$O%3%s%F%-%9%H$K$h$C$F$O0UL#$r$J$5$J$$$b$N$b$"$j$^$9!#(B + $BNc$($P!"%W%m%;%9$N:n@.$r@)8f$7$F$$$k%G%#%l%/%F%#%V$O%a%$%s%5!<%P$N(B + $B%3%s%F%-%9%H$K$N$_=q$/$3$H$,$G$-$^$9!#(B + $B$I$N%G%#%l%/%F%#%V$r$I$N%;%/%7%g%s$K=q$/$3$H$,$G$-$k$+$rCN$k$?$a$K$O(B + $B%G%#%l%/%F%#%V$N(B $B%3%s%F%-%9%H(B $B$rD4$Y$F$/$@$5$$!#>\$7$$>pJs$O!"(BDirectory, Location, Files $B%;%/%7%g%s$NF0:nK!(B$B$K$"$j$^$9!#(B +

    +
    + +

    .htaccess $B%U%!%$%k(B

    + + + + + +
    $B4XO"%G%#%l%/%F%#%V(B
    +
    + AccessFileName
    + AllowOverride
    +
    + +

    Apache $B$G$O%&%'%V%D%j!<$NCf$KCV$+$l$?FCJL$J%U%!%$%k$r;H$C$F(B + $BHsCf1{=88"E*$J@_Dj4IM}$r$G$-$^$9!#(B + $B$=$NFCJL$J%U%!%$%k$OIaDL$O(B .htaccess $B$H$$$&L>A0$G!"(B + AccessFileName + $B%G%#%l%/%F%#%V$G$I$s$JL>A0$G$b;XDj$G$-$^$9!#(B + .htaccess $B%U%!%$%k$K=q$+$l$?%G%#%l%/%F%#%V$O%U%!%$%k$r(B + $BCV$$$?%G%#%l%/%H%j$H$=$NA4$F$N%5%V%G%#%l%/%H%j$KE,MQ$5$l$^$9!#(B + .htaccess $B%U%!%$%k$O$9$Y$F$N%j%/%(%9%H$GFI$_9~$^$l$k$?$a!"(B + $BJQ99$O$9$0$KH?1G$5$l$^$9!#(B +

    + + +

    $B$I$N%G%#%l%/%F%#%V$,(B .htaccess + $B%U%!%$%k$K=q$1$k$+$rD4$Y$k$K$O!"%G%#%l%/%F%#%V$N(B$B%3%s%F%-%9%H(B $B$rD4$Y$F$/$@$5$$!#(B + $B%5!<%P4IM}AllowOverride + $B$r@_Dj$9$k$3$H$G$I$N%G%#%l%/%F%#%V$r(B .htaccess + $B%U%!%$%k$K=q$1$k$h$&$K$9$k$+$r@)8f$9$k$3$H$,$G$-$^$9!#(B +

    + +

    .htaccess $B%U%!%$%k$K4X$9$k>\$7$$>pJs$O(B + Using .htaccess Files with Apache $B$N(B Ken Coar's tutorial + $B$+(B Apache $B$N%I%-%e%a%s%F!<%7%g%s$K$"$k(B .htaccess + $B%A%e!<%H%j%"%k(B $B$r;2>H$7$F$/$@$5$$!#(B

    + + + diff --git a/htdocs/manual/content-negotiation.html.en b/htdocs/manual/content-negotiation.html.en new file mode 100644 index 00000000000..689ab49390d --- /dev/null +++ b/htdocs/manual/content-negotiation.html.en @@ -0,0 +1,667 @@ + + + + + + + Apache Content Negotiation + + + + + + +

    Content Negotiation

    + +

    Apache's support for content negotiation has been updated to + meet the HTTP/1.1 specification. It can choose the best + representation of a resource based on the browser-supplied + preferences for media type, languages, character set and + encoding. It is also implements a couple of features to give + more intelligent handling of requests from browsers which send + incomplete negotiation information.

    + +

    Content negotiation is provided by the mod_negotiation module, + which is compiled in by default.

    +
    + +

    About Content Negotiation

    + +

    A resource may be available in several different + representations. For example, it might be available in + different languages or different media types, or a combination. + One way of selecting the most appropriate choice is to give the + user an index page, and let them select. However it is often + possible for the server to choose automatically. This works + because browsers can send as part of each request information + about what representations they prefer. For example, a browser + could indicate that it would like to see information in French, + if possible, else English will do. Browsers indicate their + preferences by headers in the request. To request only French + representations, the browser would send

    +
    +  Accept-Language: fr
    +
    + +

    Note that this preference will only be applied when there is + a choice of representations and they vary by language.

    + +

    As an example of a more complex request, this browser has + been configured to accept French and English, but prefer + French, and to accept various media types, preferring HTML over + plain text or other text types, and preferring GIF or JPEG over + other media types, but also allowing any other media type as a + last resort:

    +
    +  Accept-Language: fr; q=1.0, en; q=0.5
    +  Accept: text/html; q=1.0, text/*; q=0.8, image/gif; q=0.6,
    +        image/jpeg; q=0.6, image/*; q=0.5, */*; q=0.1
    +
    + Apache 1.2 supports 'server driven' content negotiation, as + defined in the HTTP/1.1 specification. It fully supports the + Accept, Accept-Language, Accept-Charset and Accept-Encoding + request headers. Apache 1.3.4 also supports 'transparent' + content negotiation, which is an experimental negotiation + protocol defined in RFC 2295 and RFC 2296. It does not offer + support for 'feature negotiation' as defined in these RFCs. + +

    A resource is a conceptual entity + identified by a URI (RFC 2396). An HTTP server like Apache + provides access to representations of the + resource(s) within its namespace, with each representation in + the form of a sequence of bytes with a defined media type, + character set, encoding, etc. Each resource may be associated + with zero, one, or more than one representation at any given + time. If multiple representations are available, the resource + is referred to as negotiable and each of its + representations is termed a variant. The ways + in which the variants for a negotiable resource vary are called + the dimensions of negotiation.

    + +

    Negotiation in Apache

    + +

    In order to negotiate a resource, the server needs to be + given information about each of the variants. This is done in + one of two ways:

    + +
      +
    • Using a type map (i.e., a *.var + file) which names the files containing the variants + explicitly, or
    • + +
    • Using a 'MultiViews' search, where the server does an + implicit filename pattern match and chooses from among the + results.
    • +
    + +

    Using a type-map file

    + +

    A type map is a document which is associated with the + handler named type-map (or, for + backwards-compatibility with older Apache configurations, the + mime type application/x-type-map). Note that to + use this feature, you must have a handler set in the + configuration that defines a file suffix as + type-map; this is best done with a

    +
    +  AddHandler type-map .var
    +
    + in the server configuration file. See the comments in the + sample config file for more details. + +

    Type map files have an entry for each available variant; + these entries consist of contiguous HTTP-format header lines. + Entries for different variants are separated by blank lines. + Blank lines are illegal within an entry. It is conventional to + begin a map file with an entry for the combined entity as a + whole (although this is not required, and if present will be + ignored). An example map file is shown below. In this example, the + file would be named foo.var and would be placed in the + same directory with the various variants of the resource + foo.

    +
    +  URI: foo
    +
    +  URI: foo.en.html
    +  Content-type: text/html
    +  Content-language: en
    +
    +  URI: foo.fr.de.html
    +  Content-type: text/html;charset=iso-8859-2
    +  Content-language: fr, de
    +
    + If the variants have different source qualities, that may be + indicated by the "qs" parameter to the media type, as in this + picture (available as jpeg, gif, or ASCII-art): +
    +  URI: foo
    +
    +  URI: foo.jpeg
    +  Content-type: image/jpeg; qs=0.8
    +
    +  URI: foo.gif
    +  Content-type: image/gif; qs=0.5
    +
    +  URI: foo.txt
    +  Content-type: text/plain; qs=0.01
    +
    + +

    qs values can vary in the range 0.000 to 1.000. Note that + any variant with a qs value of 0.000 will never be chosen. + Variants with no 'qs' parameter value are given a qs factor of + 1.0. The qs parameter indicates the relative 'quality' of this + variant compared to the other available variants, independent + of the client's capabilities. For example, a jpeg file is + usually of higher source quality than an ascii file if it is + attempting to represent a photograph. However, if the resource + being represented is an original ascii art, then an ascii + representation would have a higher source quality than a jpeg + representation. A qs value is therefore specific to a given + variant depending on the nature of the resource it + represents.

    + +

    The full list of headers recognized is:

    + +
    +
    URI:
    + +
    uri of the file containing the variant (of the given + media type, encoded with the given content encoding). These + are interpreted as URLs relative to the map file; they must + be on the same server (!), and they must refer to files to + which the client would be granted access if they were to be + requested directly.
    + +
    Content-Type:
    + +
    media type --- charset, level and "qs" parameters may be + given. These are often referred to as MIME types; typical + media types are image/gif, + text/plain, or + text/html; level=3.
    + +
    Content-Language:
    + +
    The languages of the variant, specified as an Internet + standard language tag from RFC 1766 (e.g., + en for English, kr for Korean, + etc.).
    + +
    Content-Encoding:
    + +
    If the file is compressed, or otherwise encoded, rather + than containing the actual raw data, this says how that was + done. Apache only recognizes encodings that are defined by an + AddEncoding + directive. This normally includes the encodings + x-compress for compress'd files, and + x-gzip for gzip'd files. The x- + prefix is ignored for encoding comparisons.
    + +
    Content-Length:
    + +
    The size of the file. Specifying content lengths in the + type-map allows the server to compare file sizes without + checking the actual files.
    + +
    Description:
    + +
    A human-readable textual description of the variant. If + Apache cannot find any appropriate variant to return, it will + return an error response which lists all available variants + instead. Such a variant list will include the human-readable + variant descriptions.
    +
    + +

    Multiviews

    + +

    MultiViews is a per-directory option, meaning + it can be set with an Options directive within a + <Directory>, <Location> + or <Files> section in + access.conf, or (if AllowOverride is + properly set) in .htaccess files. Note that + Options All does not set MultiViews; + you have to ask for it by name.

    + +

    The effect of MultiViews is as follows: if the + server receives a request for /some/dir/foo, if + /some/dir has MultiViews enabled, and + /some/dir/foo does not exist, then the + server reads the directory looking for files named foo.*, and + effectively fakes up a type map which names all those files, + assigning them the same media types and content-encodings it + would have if the client had asked for one of them by name. It + then chooses the best match to the client's requirements.

    + +

    MultiViews may also apply to searches for the + file named by the DirectoryIndex directive, if the + server is trying to index a directory. If the configuration + files specify

    +
    +  DirectoryIndex index
    +
    + then the server will arbitrate between index.html + and index.html3 if both are present. If neither + are present, and index.cgi is there, the server + will run it. + +

    If one of the files found when reading the directive is a + CGI script, it's not obvious what should happen. The code gives + that case special treatment --- if the request was a POST, or a + GET with QUERY_ARGS or PATH_INFO, the script is given an + extremely high quality rating, and generally invoked; otherwise + it is given an extremely low quality rating, which generally + causes one of the other views (if any) to be retrieved.

    + +

    The Negotiation Methods

    + After Apache has obtained a list of the variants for a given + resource, either from a type-map file or from the filenames in + the directory, it invokes one of two methods to decide on the + 'best' variant to return, if any. It is not necessary to know + any of the details of how negotiation actually takes place in + order to use Apache's content negotiation features. However the + rest of this document explains the methods used for those + interested. + +

    There are two negotiation methods:

    + +
      +
    1. Server driven negotiation with the Apache + algorithm is used in the normal case. The Apache + algorithm is explained in more detail below. When this + algorithm is used, Apache can sometimes 'fiddle' the quality + factor of a particular dimension to achieve a better result. + The ways Apache can fiddle quality factors is explained in + more detail below.
    2. + +
    3. Transparent content negotiation is used + when the browser specifically requests this through the + mechanism defined in RFC 2295. This negotiation method gives + the browser full control over deciding on the 'best' variant, + the result is therefore dependent on the specific algorithms + used by the browser. As part of the transparent negotiation + process, the browser can ask Apache to run the 'remote + variant selection algorithm' defined in RFC 2296.
    4. +
    + +

    Dimensions of Negotiation

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    DimensionNotes
    Media TypeBrowser indicates preferences with the Accept header + field. Each item can have an associated quality factor. + Variant description can also have a quality factor (the + "qs" parameter).
    LanguageBrowser indicates preferences with the Accept-Language + header field. Each item can have a quality factor. Variants + can be associated with none, one or more than one + language.
    EncodingBrowser indicates preference with the Accept-Encoding + header field. Each item can have a quality factor.
    CharsetBrowser indicates preference with the Accept-Charset + header field. Each item can have a quality factor. Variants + can indicate a charset as a parameter of the media + type.
    + +

    Apache Negotiation Algorithm

    + +

    Apache can use the following algorithm to select the 'best' + variant (if any) to return to the browser. This algorithm is + not further configurable. It operates as follows:

    + +
      +
    1. First, for each dimension of the negotiation, check the + appropriate Accept* header field and assign a + quality to each variant. If the Accept* header for + any dimension implies that this variant is not acceptable, + eliminate it. If no variants remain, go to step 4.
    2. + +
    3. + Select the 'best' variant by a process of elimination. Each + of the following tests is applied in order. Any variants + not selected at each test are eliminated. After each test, + if only one variant remains, select it as the best match + and proceed to step 3. If more than one variant remains, + move on to the next test. + +
        +
      1. Multiply the quality factor from the Accept header + with the quality-of-source factor for this variant's + media type, and select the variants with the highest + value.
      2. + +
      3. Select the variants with the highest language quality + factor.
      4. + +
      5. Select the variants with the best language match, + using either the order of languages in the + Accept-Language header (if present), or else the order of + languages in the LanguagePriority directive + (if present).
      6. + +
      7. Select the variants with the highest 'level' media + parameter (used to give the version of text/html media + types).
      8. + +
      9. Select variants with the best charset media + parameters, as given on the Accept-Charset header line. + Charset ISO-8859-1 is acceptable unless explicitly + excluded. Variants with a text/* media type + but not explicitly associated with a particular charset + are assumed to be in ISO-8859-1.
      10. + +
      11. Select those variants which have associated charset + media parameters that are not ISO-8859-1. If + there are no such variants, select all variants + instead.
      12. + +
      13. Select the variants with the best encoding. If there + are variants with an encoding that is acceptable to the + user-agent, select only these variants. Otherwise if + there is a mix of encoded and non-encoded variants, + select only the unencoded variants. If either all + variants are encoded or all variants are not encoded, + select all variants.
      14. + +
      15. Select the variants with the smallest content + length.
      16. + +
      17. Select the first variant of those remaining. This + will be either the first listed in the type-map file, or + when variants are read from the directory, the one whose + file name comes first when sorted using ASCII code + order.
      18. +
      +
    4. + +
    5. The algorithm has now selected one 'best' variant, so + return it as the response. The HTTP response header Vary is + set to indicate the dimensions of negotiation (browsers and + caches can use this information when caching the resource). + End.
    6. + +
    7. To get here means no variant was selected (because none + are acceptable to the browser). Return a 406 status (meaning + "No acceptable representation") with a response body + consisting of an HTML document listing the available + variants. Also set the HTTP Vary header to indicate the + dimensions of variance.

      + +

      You should be aware that the error message returned by Apache is + necessarily rather terse and might confuse some users (even though it + lists the available alternatives). If you want to avoid users seeing this + error page, you should organize your documents such that a document in a + default language (or with a default encoding etc.) is always returned if a + document is not available in any of the languages, encodings etc. the + browser asked for.

      + +

      In particular, if you want a document in a default language to + be returned if a document is not available in any of the languages + a browser asked for, you should create a document with no language + attribute set. See Variants with no + Language below for details.

    8. +
    + +

    Fiddling with Quality + Values

    + +

    Apache sometimes changes the quality values from what would + be expected by a strict interpretation of the Apache + negotiation algorithm above. This is to get a better result + from the algorithm for browsers which do not send full or + accurate information. Some of the most popular browsers send + Accept header information which would otherwise result in the + selection of the wrong variant in many cases. If a browser + sends full and correct information these fiddles will not be + applied.

    + +

    Media Types and Wildcards

    + +

    The Accept: request header indicates preferences for media + types. It can also include 'wildcard' media types, such as + "image/*" or "*/*" where the * matches any string. So a request + including:

    +
    +  Accept: image/*, */*
    +
    + would indicate that any type starting "image/" is acceptable, + as is any other type (so the first "image/*" is redundant). + Some browsers routinely send wildcards in addition to explicit + types they can handle. For example: +
    +  Accept: text/html, text/plain, image/gif, image/jpeg, */*
    +
    + The intention of this is to indicate that the explicitly listed + types are preferred, but if a different representation is + available, that is ok too. However under the basic algorithm, + as given above, the */* wildcard has exactly equal preference + to all the other types, so they are not being preferred. The + browser should really have sent a request with a lower quality + (preference) value for *.*, such as: +
    +  Accept: text/html, text/plain, image/gif, image/jpeg, */*; q=0.01
    +
    + The explicit types have no quality factor, so they default to a + preference of 1.0 (the highest). The wildcard */* is given a + low preference of 0.01, so other types will only be returned if + no variant matches an explicitly listed type. + +

    If the Accept: header contains no q factors at all, + Apache sets the q value of "*/*", if present, to 0.01 to + emulate the desired behaviour. It also sets the q value of + wildcards of the format "type/*" to 0.02 (so these are + preferred over matches against "*/*". If any media type on the + Accept: header contains a q factor, these special values are + not applied, so requests from browsers which send the + correct information to start with work as expected.

    + +

    Variants with no Language

    + +

    If some of the variants for a particular resource have a + language attribute, and some do not, those variants with no + language are given a very low language quality factor of + 0.001.

    + +

    The reason for setting this language quality factor for variant + with no language to a very low value is to allow for a default + variant which can be supplied if none of the other variants match + the browser's language preferences. This allows you to avoid users + seeing a "406" error page if their browser is set to only accept + languages which you do not offer for the resource that was + requested.

    + +

    For example, consider the situation with Multiviews enabled and + three variants:

    + +
      +
    • foo.en.html, language en
    • + +
    • foo.fr.html, language fr
    • + +
    • foo.html, no language
    • +
    + +

    The meaning of a variant with no language is that it is always + acceptable to the browser. If the request is for foo + and the Accept-Language header includes either en or fr (or both) + one of foo.en.html or foo.fr.html will be returned. If the browser + does not list either en or fr as acceptable, foo.html will be + returned instead. If the client requests foo.html + instead, then no negotiation will occur since the exact match + will be returned. To avoid this problem, it is sometimes helpful + to name the "no language" variant foo.html.html to assure + that Multiviews and language negotiation will come into play.

    + +

    Extensions to Transparent Content Negotiation

    + Apache extends the transparent content negotiation protocol + (RFC 2295) as follows. A new {encoding ..} element + is used in variant lists to label variants which are available + with a specific content-encoding only. The implementation of + the RVSA/1.0 algorithm (RFC 2296) is extended to recognize + encoded variants in the list, and to use them as candidate + variants whenever their encodings are acceptable according to + the Accept-Encoding request header. The RVSA/1.0 implementation + does not round computed quality factors to 5 decimal places + before choosing the best variant. + +

    Note on hyperlinks and naming conventions

    + +

    If you are using language negotiation you can choose between + different naming conventions, because files can have more than + one extension, and the order of the extensions is normally + irrelevant (see mod_mime + documentation for details).

    + +

    A typical file has a MIME-type extension (e.g., + html), maybe an encoding extension (e.g., + gz), and of course a language extension + (e.g., en) when we have different + language variants of this file.

    + +

    Examples:

    + +
      +
    • foo.en.html
    • + +
    • foo.html.en
    • + +
    • foo.en.html.gz
    • +
    + +

    Here some more examples of filenames together with valid and + invalid hyperlinks:

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FilenameValid hyperlinkInvalid hyperlink
    foo.html.enfoo
    + foo.html
    -
    foo.en.htmlfoofoo.html
    foo.html.en.gzfoo
    + foo.html
    foo.gz
    + foo.html.gz
    foo.en.html.gzfoofoo.html
    + foo.html.gz
    + foo.gz
    foo.gz.html.enfoo
    + foo.gz
    + foo.gz.html
    foo.html
    foo.html.gz.enfoo
    + foo.html
    + foo.html.gz
    foo.gz
    + +

    Looking at the table above you will notice that it is always + possible to use the name without any extensions in a hyperlink + (e.g., foo). The advantage is that you + can hide the actual type of a document rsp. file and can change + it later, e.g., from html to + shtml or cgi without changing any + hyperlink references.

    + +

    If you want to continue to use a MIME-type in your + hyperlinks (e.g. foo.html) the language + extension (including an encoding extension if there is one) + must be on the right hand side of the MIME-type extension + (e.g., foo.html.en).

    + +

    Note on Caching

    + +

    When a cache stores a representation, it associates it with + the request URL. The next time that URL is requested, the cache + can use the stored representation. But, if the resource is + negotiable at the server, this might result in only the first + requested variant being cached and subsequent cache hits might + return the wrong response. To prevent this, Apache normally + marks all responses that are returned after content negotiation + as non-cacheable by HTTP/1.0 clients. Apache also supports the + HTTP/1.1 protocol features to allow caching of negotiated + responses.

    + +

    For requests which come from a HTTP/1.0 compliant client + (either a browser or a cache), the directive + CacheNegotiatedDocs can be used to allow caching of + responses which were subject to negotiation. This directive can + be given in the server config or virtual host, and takes no + arguments. It has no effect on requests from HTTP/1.1 clients. + +

    + + + diff --git a/htdocs/manual/content-negotiation.html.html b/htdocs/manual/content-negotiation.html.html new file mode 100644 index 00000000000..8d47f79e64a --- /dev/null +++ b/htdocs/manual/content-negotiation.html.html @@ -0,0 +1,4 @@ + + + diff --git a/htdocs/manual/content-negotiation.html.ja.jis b/htdocs/manual/content-negotiation.html.ja.jis new file mode 100644 index 00000000000..608d39e3fdb --- /dev/null +++ b/htdocs/manual/content-negotiation.html.ja.jis @@ -0,0 +1,662 @@ + + + + + Apache Content Negotiation + + + + + +

    $B%3%s%F%s%H%M%4%7%(!<%7%g%s(B

    + +

    Apache $B$N%3%s%F%s%H%M%4%7%(!<%7%g%s$N%5%]!<%H$O(B HTTP/1.1 + $B$N5,3J$K9g$&$h$&$K(B + $B99?7$5$l$^$7$?!#$=$l$K$h$j!"%V%i%&%6$K$h$jDs6!$5$l$?%a%G%#%"%?%$%W!"(B + $B8@8l!"%-%c%i%/%?%;%C%H$H!"%(%s%3!<%G%#%s%0$NM%@h=g0L$rMQ$$$F%j%=!<%9$N(B + $B0lHVNI$$I=8=J}K!$rA*Br$G$-$^$9!#$^$?!"IT40A4$J%M%4%7%(!<%7%g%sMQ$N>pJs$r(B + $BAw$C$F$/$k%V%i%&%6$+$i$N%j%/%(%9%H$r$h$jM%2m$K07$&$?$a$N5!G=$r(B + $B$$$/$D$+ + +

    $B%3%s%F%s%H%M%4%7%(!<%7%g%s$O(B mod_negotiation + $B%b%8%e!<%k$K$h$j(B + $BDs6!$5$l$F$$$F!"%G%U%)%k%H$GAH$_9~$^$l$F$$$^$9!#(B

    +
    + +

    $B%3%s%F%s%H%M%4%7%(!<%7%g%s$K$D$$$F(B

    + +

    $B%j%=!<%9$O!"4v$D$+0[$J$C$?I=8=$GMxMQ$G$-$k>l9g$,$"$j$^$9!#(B + $B$?$H$($P!"0[$J$k8@8l$d0[$J$k%a%G%#%"%?%$%W!"$^$?$O$=$l$i$NAH$_9g$o$;$G(B + $BMxMQ$G$-$k$+$bCN$l$^$;$s!#$b$C$H$bE,$7$?A*Br$r$9$kJ}K!$N0l$D$K$O!"(B + $B%$%s%G%C%/%9%Z!<%8$r%f!<%6$K8+$;$F!"%f!<%6$KA*$s$G$b$i$&J}K!$,$"$j$^$9!#(B + $B$7$+$7!"%5!<%P$,<+F0E*$KA*$V$3$H$,$G$-$k>l9g$,B?$/$"$j$^$9!#(B + $B$3$l$O!"%V%i%&%6$,%j%/%(%9%H>pJsKh$N>pJs$N0lIt$K!"(B + $B$I$NI=8=$rSO9%$9$k$+$rAw$k$3$H$GF0:n$7$F$$$^$9!#(B + $B$?$H$($P%V%i%&%6$O!"2DG=$J$i%U%i%s%98l$G>pJs$r8+$?$$!"(B + $BIT2DG=$J$i$=$NBe$o$j$K1Q8l$G$b$h$$$H!"<+J,$NSO9%$rCN$i$;$k$3$H$,$G$-$^$9!#(B + $B%V%i%&%6$O%j%/%(%9%H$N%X%C%@$G<+J,$NM%@h798~$rCN$i$;$^$9!#(B + $B%U%i%s%98l$NI=8=$@$1$rMW5a$9$k>l9g$O!"%V%i%&%6$O0J2<$rAw$j$^$9!#(B

    +
    +  Accept-Language: fr
    +
    + +

    $B$3$NM%@h798~$O!"A*Br2DG=$JI=8=$,B8:_$7$F!"(B + $B8@8l$K$h$C$FMM!9$JI=8=$,$"$k>l9g$K$N$_E,MQ$5$l$k(B + $B$H$$$&$3$H$KCm0U$7$F$/$@$5$$!#(B

    + +

    $B$b$C$HJ#;($J%j%/%(%9%H$NNc$r5s$2$^$7$g$&!#(B + $B$3$N%V%i%&%6$O%U%i%s%98l$H1Q8l$r$N%?%$%W$h$j$O(B HTML $B$r9%$`!"(B + $BB>$N%a%G%#%"%?%$%W$h$j$O(B GIF $B$d(B JPEG $B$r9%$`!"$7$+$7:G=*$N%a%G%#%"%?%$%W$b +

    +  Accept-Language: fr; q=1.0, en; q=0.5
    +  Accept: text/html; q=1.0, text/*; q=0.8, image/gif; q=0.6,
    +        image/jpeg; q=0.6, image/*; q=0.5, */*; q=0.1
    +
    + +

    Apache 1.2 $B$O(B HTTP/1.1 $B$N5,3J$GDj5A$5$l$F$$$k(B 'server driven' + $B%3%s%F%s%H%M%4%7%(!<%7%g%s$r%5%]!<%H$7$F$$$^$9!#(B + Accept, Accept-Language, Accept-Charset, Accept-Encoding + $B%j%/%(%9%H%X%C%@$r40A4$K%5%]!<%H$7$F$$$^$9!#(BApache 1.3.4 $B$O(B + RFC 2295 $B$H(B RFC 2296 + $B$GDj5A$5$l$F$$$k + +

    $B%j%=!<%9(B$B$H$O(B URI + $B$GFCDj$5$l$k35G0>e$N$b$N$N$3$H$G$9(B (RFC 2396)$B!#(B Apache + $B$N$h$&$J(B HTTP $B%5!<%P$O!"$=$NL>A06u4V$NCf$G$N(B + $B%j%=!<%9$N(B$BI=8=(B$B$X$N%"%/%;%9$rDs6!$7$^$9!#(B + $B$=$l$>$l$NI=8=$ODj5A$5$l$?%a%G%#%"%?%$%W!"J8;z%;%C%H!"(B + $B%(%s%3!<%G%#%s%0Ey$NIUB0$7$?!"%P%$%HNs$N7A<0$G$9!#(B + $B$=$l$>$l$N%j%=!<%9$O$"$k;~E@$G(B 0 $B8D!"(B1 $B8D!"$=$l0J>e$NI=8=$H(B + $B4XO"IU$1$i$l$k2DG=@-$,$"$j$^$9!#J#?t$NI=8=$,MxMQ$G$-$k>l9g$O!"(B + $B%j%=!<%9$O(B$B%M%4%7%(!<%7%g%s2DG=$G$"$k(B$B$H$5$l!"(B + $B8D!9$NI=8=$O(B variant $B$H8F$P$l$^$9!#(B + $B%M%4%7%(!<%7%g%s2DG=$J%j%=!<%9$N(B variant $B$,0[$J$k!"$=$N>uBV$r;X$7$F!"(B + $B%M%4%7%(!<%7%g%s$N(B$B$B$H8F$S$^$9!#(B

    + +

    Apache $B$K$*$1$k%M%4%7%(!<%7%g%s(B

    + +

    $B%j%=!<%9$r%M%4%7%(!<%7%g%s$9$k$?$a$K$O!"%5!<%P$O$=$l$>$l$N(B + variant $B$K$D$$$F$N>pJs$rCN$C$F$*$/I,MW$,$"$j$^$9!#(B + $B$3$l$O0J2<$NFs$D$NJ}K!$N$I$A$i$+$G9T$o$l$^$9!#(B

    + +
      +
    • $B%?%$%W%^%C%W(B ($B$9$J$o$A(B$B!"(B*.var $B%U%!%$%k(B) + $B$r;H$&J}K!!#$3$l$O!"(Bvariant + $B$rL@<(E*$K5s$2$F$$$k%U%!%$%k$r;XDj$7$^$9!#(B
    • + +
    • 'Multiviews' $B$r;H$C$F!"(B + $B%5!<%P$,0EL[$NFb$K%U%!%$%kL>$K%Q%?!<%s>H9g$r(B + $B9T$J$C$F$=$N7k2L$+$iA*Br$9$kJ}K!!#(B
    • +
    + +

    type-map $B%U%!%$%k$r;H$&(B

    + +

    $B%?%$%W%^%C%W$O(B type-map $B%O%s%I%i(B ($B$b$7$/$O!"8E$$(B + Apache $B$N@_Dj$K>e0L8_49$H$J$k$?$a$K0];}$5$l$F$$$k(B mime $B%?%$%W(B + application/x-type-map) + $B$K4XO"IU$1$i$l$?%I%-%e%a%s%H$G$9!#(B + $B$3$N5!G=$r;H$&$?$a$K$O!"$"$k%U%!%$%k$N3HD%;R$r(B + type-map + $B$H$7$FDj5A$9$k%O%s%I%i$r@_Dj%U%!%$%k$G@_Dj$9$k(B + $BI,MW$,$"$k$3$H$KCm0U$7$F$/$@$5$$!#$3$l$O(B

    +
    +  AddHandler type-map .var
    +
    +

    + $B$r%5!<%P$N@_Dj$K=q$/$3$H$,0lHVNI$$J}K!$G$9!#(B + $B>\:Y$O%5%s%W%k$N@_Dj%U%!%$%k$N%3%a%s%H$r;2>H$7$F$/$@$5$$!#(B

    + +

    $B%?%$%W%^%C%W%U%!%$%k$K$O$=$l$>$l$N(B variant + $B$K$D$$$F$N%(%s%H%j$,$"$j$^$9!#$3$l$i$N%(%s%H%j$OO"B3$7$?(B HTTP + $B$N%X%C%@9T$+$i@.$j$^$9!#JL$N(B variant $B$N%(%s%H%j$H$O6u9T$G(B + $BJ,$1$i$l$F$$$^$9!#%(%s%H%jCf$K6u9T$,$"$C$F$O$$$1$^$;$s!#(B + $B%^%C%W%U%!%$%k$OA4BN$N%(%s%F%#%F%#$r$/$C$D$1$?7A$G;O$a$k$N$,(B + $B=,47$H$J$C$F$$$^$9(B + ($B$3$l$OMW5a$5$l$F$$$k$o$1$G$O$J$/!"$b$7$"$C$?>l9g$OL5;k$5$l$^$9(B)$B!#(B + $B$?$H$($P!"%^%C%W%U%!%$%k$OA0$O(B foo.var $B$G!"%j%=!<%9(B foo + $B$N$$$m$$$m$J(B variant $B$,$"$k%G%#%l%/%H%j$KG[CV$5$l$k$3$H$K$J$j$^$9!#(B

    +
    +  URI: foo
    +
    +  URI: foo.en.html
    +  Content-type: text/html
    +  Content-language: en
    +
    +  URI: foo.fr.de.html
    +  Content-type: text/html;charset=iso-8859-2
    +  Content-language: fr, de
    +
    + +

    variant $B$NIJ +

    +  URI: foo
    +
    +  URI: foo.jpeg
    +  Content-type: image/jpeg; qs=0.8
    +
    +  URI: foo.gif
    +  Content-type: image/gif; qs=0.5
    +
    +  URI: foo.txt
    +  Content-type: text/plain; qs=0.01
    +
    + +

    qs $BCM$NHO0O$O(B 0.000 $B$+$i(B 1.000 $B$G$9!#(Bqs $BCM$,(B 0.000 $B$N(B variant + $B$O7h$7$FA*Br$5$l$J$$$3$H$KCm0U$7$F$/$@$5$$!#(B'qs' $BCM$N$J$$(B + variant $B$O(B qs $BCM(B 1.0 $B$r(B $BM?$($i$l$^$9!#(Bqs + $B%Q%i%a!<%?$O%/%i%$%"%s%H$NG=NO$K4X78L5$/!"B>$N(B variant + $B$HHf3S$7$?$H$-$N(B variant $B$NAjBPE*$J!VIJ + +

    $BG'<1$5$l$k%X%C%@$N40A4$J0lMw$O0J2<$N$h$&$K$J$j$^$9(B:

    + +
    +
    URI:
    + +
    ($BM?$($i$l$?%a%G%#%"%?%$%W$N$b$N$G!"M?$($i$l$?(B content + encoding $B$G%(%s%3!<%I$5$l$?(B) variant $B$N%U%!%$%k$N(B URI + $B!#%^%C%W%U%!%$%k$+$i$NAjBP(B URL $B$H$7$F2re$K$"$kI,MW$,$"$j!"(B + $BD>@\MW5a$5$l$?$H$-$K%/%i%$%"%s%H$,%"%/%;%9$r(B + $BG'$a$i$l$F$$$k%U%!%$%k$r;2>H$7$F$$$J$1$l$P$J$j$^$;$s!#(B
    + +
    Content-Type:
    + +
    $B%a%G%#%"%?%$%W(B --- charset, level, "qs" + $B%Q%i%a!<%?$r;XDj$9$k$3$H$,$G$-$^$9!#$3$l$i$O$7$P$7$P(B MIME + $B%?%$%W$H8F$P$l$^$9!#E57?E*$J%a%G%#%"%?%$%W$O(B + image/gif, text/plain, + text/html; level=3 $B$G$9!#(B
    + +
    Content-Language:
    + +
    RFC 1766 $B$N%$%s%?!<%M%C%HI8=`8@8l%?%0$G;XDj$5$l$?!"(Bvariant + $B$N8@8l!#(B ($B$?$H$($P(B$B!"1Q8l$O(B + en$B!"(B $B4Z9q8l$O(B kr, + $BEy(B)$B!#(B
    + +
    Content-Encoding:
    + +
    $B@8$N%G!<%?$G$O$J$/!"%U%!%$%k$,05=L$5$l$F$$$?$j!"(B + $B%(%s%3!<%I$5$l$?$j$7$F$$$k$H$-$K!"(B + $B$I$N$h$&$K$=$l$,$J$5$l$F$$$k$+$r;XDj$7$^$9!#(B + Apache $B$O(B AddEncoding + $B%G%#%l%/%F%#%V$GDj5A$5$l$?%(%s%3!<%G%#%s%0$N$_$rG'<1$7$^$9!#DL>o$O(B + compress $B$5$l$?%U%!%$%k$N$?$a$N(B x-compress $B$d(B + gzip $B$5$l$?%U%!%$%k$N$?$a$N(B x-gzip + $B$N$h$&$J%(%s%3!<%G%#%s%0$r4^$_$^$9!#(B + $B%(%s%3!<%G%#%s%0$NHf3S;~$K$O@\F,<-(B x- + $B$OL5;k$5$l$^$9!#(B
    + +
    Content-Length:
    + +
    $B%U%!%$%k$N%5%$%:!#%?%$%W%^%C%W$G(B content length $B$r;XDj$9$k$H!"(B + $B%5!<%P$, + +
    Description:
    + +
    $B?M4V$,FI$a$k(B variant $B$r@bL@$7$?J8>O!#(BApache $B$,E,@Z$J(B variant + $B$r8+$D$1$i$l$J$+$C$?>l9g$O!"$9$Y$F$N2DG=$J(B variant + $B$N0lMw$r5s$2$k%(%i!<1~Ez$rJV$7$^$9!#$=$N(B variant + $B0lMw$O?M4V$,FI$a$k(B variant $B$N(B $B@bL@$r4^$_$^$9!#(B
    +
    + +

    Multiviews

    + +

    MultiViews $B$O%G%#%l%/%H%jKh$N%*%W%7%g%s$G!"(B + <Directory>, <Location>, + <Files> $B$d!"(B(AllowOverride + $B$,E,@Z$JCM$K@_Dj$5$l$F$$$k$H(B) .htaccess + $B%U%!%$%k$G(B Options + $B%G%#%l%/%F%#%V$K$h$C$F@_Dj$9$k$3$H$,$G$-$^$9!#(BOptions + All $B$O(B MultiViews + $B$r@_Dj$7$J$$$3$H$KCm0U$7$F$/$@$5$$!#(B + $BL@<(E*$K$=$NL>A0$r=q$/I,MW$,$"$j$^$9!#(B

    + +

    MultiViews $B$N8z2L$O0J2<$N$h$&$K$J$j$^$9(B: + $B%5!<%P$,(B /some/dir/foo $B$X$N%j%/%(%9%H$r/some/dir/foo $B$,B8:_(B$B$7$J$$(B$B>l9g!"(B + $B%5!<%P$O%G%#%l%/%H%j$rFI$s$G!"(Bfoo.* + $B$K$"$F$O$^$k$9$Y$F$N%U%!%$%k$rC5$7!"(B + $B;ve$=$l$i$N%U%!%$%k$r%^%C%W$9$k%?%$%W%^%C%W$r:n$j$^$9!#(B + $B$=$N$H$-!"%a%G%#%"%?%$%W$H%3%s%F%s%H%(%s%3!<%G%#%s%0$O!"(B + $B$=$N%U%!%$%kL>$rD>@\;XDj$7$?$H$-$HF1$8$b$N$,3d$jEv$F$i$l$^$9!#(B + $B$=$l$+$i%/%i%$%"%s%H$NMW5a$K$b$C$H$b9g$&$b$N$rA*$S!"(B + $B$=$N%I%-%e%a%s%H$rJV$7$^$9!#(B

    + +

    $B%5!<%P$,%G%#%l%/%H%j$N:w0z$r:n$m$&$H$7$F$$$k$H!"(B + MultiViews $B$O(B DirectoryIndex + $B%G%#%l%/%F%#%V$G;XDj$5$l$?L>A0$NC5:w$K$bE,MQ$5$l$^$9!#(B + $B@_Dj%U%!%$%k$K(B

    + +
    +  DirectoryIndex index
    +
    + +

    $B$,=q$+$l$F$$$F!"(Bindex.html $B$H(B + index.html3 $B$,N>J}B8:_$7$F$$$k$H!"(B + $B%5!<%P$O$=$NCf$+$iKh2s$I$A$i$+$rE,Ev$KA*$S$^$9!#(B + $B$b$7$=$NN>J}$,B8:_$;$:$K(B index.cgi + $B$,B8:_$7$F$$$k$H!"%5!<%P$O$=$l$r + +

    $B%G%#%l%/%H%j$rFI$s$G$$$k$H$-$K8+$D$+$C$?%U%!%$%k$K(B CGI + $B%9%/%j%W%H$,$"$C$?>l9g$O!"2?$,5/$3$k$Y$-$+$O<+L@$G$O$"$j$^$;$s!#(B + $B$=$N$h$&$J>l9g$O%3!<%I$OFCJL$J07$$$r$7$F$$$^$9!#%j%/%(%9%H$,(B + POST $B$+(B QUERY_ARGS $B$d(B PATH_INFO $B$N$"$k(B GET + $B$N>l9g$O!"%9%/%j%W%H$KHs>o$K9b$$IJo$=$l$,5/F0$5$l$^$9!#$=$NB>$N%j%/%(%9%H$N$H$-$O!"%9%/%j%W%H$K$O(B + $BHs>o$KDc$$IJ$N$b$N$,(B($B$b$7$"$l$P(B)$B + +

    $B%M%4%7%(!<%7%g%sJ}K!(B

    + +

    Apache $B$,%?%$%W%^%C%W%U%!%$%k$+%G%#%l%/%H%j$N%U%!%$%kL>$+$i(B + $B%j%=!<%9$N(B variant $B$N0lMw$r\:Y$rCN$kI,MW$O(B + $B$"$j$^$;$s!#(B + $B$7$+$7!"$3$l0J9_$G$O4X?4$N$"$k?M$N$?$a$K$=$NJ}K!$r@bL@$7$^$9!#(B

    + +

    $B%M%4%7%(!<%7%g%sJ}K!$OFs$D$"$j$^$9!#(B

    + +
      +
    1. $BDL>o$O(B Apache $B$N%"%k%4%j%:%`$rMQ$$$?(B Server + driven negotiation $B$,;HMQ$5$l$^$9!#(BApache + $B$N%"%k%4%j%:%`$O8e$G>\:Y$K@bL@$5$l$F$$$^$9!#(B + $B$3$N%"%k%4%j%:%`$,;HMQ$5$l$?>l9g!"(BApache + $B$O$h$jNI$$7k2L$K$J$k$h$&$K!"FCDj$N\:Y$K@bL@$5$l$F$$$^$9!#(B
    2. + +
    3. RFC 2295 + $B$GDj5A$5$l$F$$$k5!9=$rMQ$$$F%V%i%&%6$,FC$K;XDj$7$?>l9g!"(B + transparent content negotiation + $B$,;HMQ$5$l$^$9!#$3$N%M%4%7%(!<%7%g%sJ}K!$G$O!"%V%i%&%6$,!V:GA1!W$N(B + variant $B$N7hDj$r40A4$K@)8f$9$k$3$H$,$G$-$^$9!#(B + $B$G$9$+$i!"7k2L$O%V%i%&%6$,;HMQ$7$F$$$k%"%k%4%j%:%`$K0MB8$7$^$9!#(B + Transparent negotiation $B$N=hM}$N2aDx$G!"%V%i%&%6$O(B RFC 2296 + $B$GDj5A$5$l$F$$$k(B 'remote variant selection algorithm' + $B$r +
    + +

    $B%M%4%7%(!<%7%g%s$N + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    DimensionNotes
    $B%a%G%#%"%?%$%W(BAccept $B%X%C%@%U%#!<%k%I$G%V%i%&%6$K$h$j<($5$l$k!#(B + $B$=$l$>$l$N9`L\$OIJ +
    $B8@8l(BAccept-Language $B%X%C%@%U%#!<%k%I$G%V%i%&%6$K$h$j<($5$l$k!#(B + $B$=$l$>$l$N9`L\$OIJe$N8@8l$H4XO"$E$1$k$3$H$,$G$-$^$9!#(B +
    $B%(%s%3!<%G%#%s%0(BAccept-Encoding $B%X%C%@%U%#!<%k%I$G%V%i%&%6$K$h$j<($5$l$k!#(B + $B$=$l$>$l$N9`L\$OIJ +
    $B%-%c%i%/%?%;%C%H(BAccept-Charset $B%X%C%@%U%#!<%k%I$G%V%i%&%6$K$h$j<($5$l$k!#(B + $B$=$l$>$l$N9`L\$OIJ +
    + +

    Apache $B$N%M%4%7%(!<%7%g%s%"%k%4%j%:%`(B

    + +

    $B%V%i%&%6$KJV$9!V:GE,$J!W(Bvariant $B$r!J$b$7$"$l$P!KA*Br$9$k$h$&$K(B Apache + $B$O + +

      +
    1. $B$^$:$O$8$a$K!"%M%4%7%(!<%7%g%s$N$l$K$D$$$FE,@Z$J(B + Accept* $B%X%C%@%U%#!<%k%I$r%A%'%C%/$7$F!"(Bvariant + $B$=$l$>$l$KIJAccept* + $B%X%C%@$G$=$N(B variant $B$,5vMF$G$-$J$$$H0E<($5$l$F$$$l$P!"$=$l$r:o=|$7$^$9!#(B + variants $B$,0l$D$b;D$C$F$$$J$1$l$P!"%9%F%C%W(B 4 $B$K9T$-$^$9!#(B
    2. + +
    3. $B>C5nK!$G!V:GE,$J!W(B variant $B$rA*$S$^$9!#(B + $B +
    4. variant $B$N%a%G%#%"%?%$%W$NIJ + +
    5. $B8@8lIJ + +
    6. ($B$b$7$"$l$P(B) Accept-Language $B%X%C%@$N8@8l=g$+!"(B + ($B$b$7$"$l$P(B) LanguagePriority + $B%G%#%l%/%F%#%V$N8@8l=g$G:GE,$J8@8l$N(B variant $B$rA*$S$^$9!#(B +
    7. + +
    8. $B:G9b!V%l%Y%k!W$N%a%G%#%"%Q%i%a!<%?(B (text/html + $B%a%G%#%"%?%$%W$N%P!<%8%g%s$rM?$($k$?$a$K;H$o$l$^$9(B)$B$r;}$D(B + variant $B$rA*$S$^$9!#(B
    9. + +
    10. Accept-Charset $B%X%C%@9T$GM?$($i$l$F$$$k:G9b$NJ8;z%;%C%H(B + $B%a%G%#%"%Q%i%a!<%?$r;}$D(B variant $B$rA*$S$^$9!#L@<(E*$K=|30(B + $B$5$l$F$$$J$$8B$j!"(BISO-8859-1 $B$,5vMF$5$l$k$h$&$K$J$C$F$$$^$9!#(B + text/* $B%a%G%#%"%?%$%W$G$"$k$1$l$I$b(B + $BFCDj$NJ8;z%;%C%H$KL@<(E*$K4XO"$E$1$i$l$F$$$k$o$1$G$O$J$$(B + variant $B$O(B ISO-8859-1 $B$G$"$k$H2>Dj$5$l$^$9!#(B
    11. + +
    12. ISO-8859-1 $B$G$O$J$$(B$BJ8;z%;%C%H%a%G%#%"%Q%i%a!<%?$H(B + $B4XO"$E$1$i$l$F$$$k(B variant $B$rA*$S$^$9!#$=$N$h$&$J(B variant + $B$,$J$$>l9g$O!"Be$o$j$K$9$Y$F$N(B variant $B$rA*$S$^$9!#(B
    13. + +
    14. $B:GE,$J%(%s%3!<%G%#%s%0$N(B variant $B$rA*$S$^$9!#$b$7(B user-agent + $B$,5vMF$9$k%(%s%3!<%G%#%s%0$,$"$l$P!"$=$N(B variant $B$N$_$rA*$S$^$9!#(B + $B$=$&$G$O$J$/!"$b$7%(%s%3!<%I$5$l$?$b$N$H$=$&$G$J$$(B + variant $B$,:.$6$C$FB8:_$7$F$$$?$i%(%s%3!<%I$5$l$F$$$J$$(B variant + $B$N$_$rA*$S$^$9!#(B variant $B$,$9$Y$F%(%s%3!<%I$5$l$F$$$k$+(B variant + $B$,$I$l$b%(%s%3!<%I$5$l$F$$$J$$$H$$$&>l9g$O!"$9$Y$F$N(B variant + $B$rA*$S$^$9!#(B
    15. + +
    16. $BFbMF$N:G$bC;$$(B variant $B$rA*$S$^$9!#(B
    17. + +
    18. $B;D$C$F$$$k(B variant $B$N:G=i$N$b$N$rA*$S$^$9!#(B + $B%?%$%W%^%C%W%U%!%$%k$N:G=i$K%j%9%H$5$l$F$$$k$+!"(B + variant $B$,%G%#%l%/%H%j$+$i:G=i$KFI$_9~$^$l$k;~$K(B ASCII + $B=g$G%=!<%H$7$F%U%!%$%kL>$,@hF,$K$J$C$?$+!"$N$I$A$i$+$G$9!#(B
    19. +
    + + +
  • $B%"%k%4%j%:%`$r;H$C$F0l$D$N!V:GE,$J!W(Bvariant + $B$rA*$S$^$7$?$N$G!"$=$l$r1~Ez$H$7$FJV$7$^$9!#(B + $B%M%4%7%(!<%7%g%s$NpJs$r;H$&$3$H$,$G$-$^$9(B)$B!#(B + $B0J>e$G=*$o$j!#(B
  • + +
  • $B$3$3$KMh$?$H$$$&$3$H$O!"(Bvariant $B$,0l$D$bA*Br$5$l$J$+$C$?(B + ($B%V%i%&%6$,5vMF$9$k$b$N$,$J$+$C$?$?$a(B) $B$H$$$&$3$H$G$9!#(B406 $B%9%F!<%?%9(B + ("No Acceptable representation" $B$r0UL#$9$k(B) $B$,!"MxMQ2DG=$J(B variant + $B$N%j%9%H$N$D$$$?(B HTML $B%I%-%e%a%s%H$H$H$b$KJV$5$l$^$9!#(B + $BJQ2=$N + +

    Apache$B$K$h$jJV$5$l$k%(%i!<%a%C%;!<%8$,I,MW0J>e$K4JL@$G!"(B + ($BF1Ey$NFbMF$rDs<($7$F$$$k$1$l$I$b!"(B) + $B%f!<%6$,:.Mp$9$k860x$K$J$k$3$H$KN10U$9$Y$-$G$9!#(B + $B$b$7%f!<%6$,$3$N%(%i!<%Z!<%8$r8+$k$3$H$rHr$1$?$$>l9g$O!"(B + $BI8=`$N8@8l$N(B($B$^$?!"I8=`$N%(%s%3!<%G%#%s%0Ey$rE:$($?(B) + $BJ8=q$rCV$$$F$*$/$3$H$G!"$b$7%V%i%&%6$+$iMW5a$5$l$?8@8l$d(B + $B%(%s%3!<%G%#%s%0Ey$,;H$($J$+$C$?>l9g$O>o$K$=$l$,JV$5$l$^$9!#(B

    + +

    $B%V%i%&%6$+$iMW5a$5$l$?8@8l$NJ8=q$,$I$l$bF@$i$l$J$$;~$K(B + $B%G%U%)%k%H8@8l$NJ8=q$rJV$7$?$$>l9g$O!"(B + $B8@8lB0@-%;%C%H$J$7$NJ8=q$r:n@.$7$F$/$@$5$$!#>\:Y$O8e$N(B + Variants with no Language + $B;2>H!#(B

  • + + +

    $BIJ

    + + +

    $B>e5-$N(B Apache + $B%M%4%7%(!<%7%g%s%"%k%4%j%:%`$N873J$J2rpJs$rAw$k%V%i%&%68~$1$N%"%k%4%j%:%`$G!"(B + $B$h$j$h$$7k2L$rF@$k$?$a$K9T$o$l$^$9!#$+$J$j%]%T%e%i!<$J%V%i%&%6$G!"(B + $B$b$7$J$$$H4V0c$C$?(B variant $B$rA*Br$9$k7k2L$K$J$C$F$7$^$&$h$&$J(B + Accept $B%X%C%@>pJs$rAw$k$b$N$b$"$j$^$9!#(B + $B%V%i%&%6$,40A4$G@5$7$$>pJs$rAw$C$F$$$l$P!"(B + $B$3$N?tCMJQ2=$OE,MQ$5$l$^$;$s!#(B

    + +

    $B%a%G%#%"%?%$%W$H%o%$%k%I%+!<%I(B

    + +

    Accept: $B%j%/%(%9%H%X%C%@$O%a%G%#%"%?%$%W$NM%@h798~$r;XDj$7$^$9!#(B + $B$3$l$O$^$?!"(B"image/*" $B$d(B "*/*" + $B$H$$$C$?!V%o%$%k%I%+!<%I!W%a%G%#%"%?%$%W$r4^$`$3$H$,$G$-$^$9!#(B + $B$3$3$G(B * $B$OG$0U$NJ8;zNs$K%^%C%A$7$^$9!#$G$9$+$i!" +

    +  Accept: image/*, */*
    +
    + $B$r4^$`%j%/%(%9%H$O!"(B"image/" $B$G$O$8$^$k%?%$%W$9$Y$F$,5vMF$G$-$k!"(B + $B$=$7$FB>$N$I$s$J%?%$%W$b5vMF$G$-$k(B ($B$3$N>l9g$O$8$a$N(B "image/*" + $B$O>iD9$K$J$j$^$9(B) $B$3$H$r<($7$^$9!#(B + $B07$&$3$H$N$G$-$kL@<(E*$J%?%$%W$K2C$($F!"(B + $B%k!<%A%s$N$h$&$K%o%$%k%I%+!<%I$rAw$k%V%i%&%6$b$"$j$^$9!#$?$H$($P(B: +
    +  Accept: text/html, text/plain, image/gif, image/jpeg, */*
    +
    + $B$3$&$9$k$3$H$NA@$$$O!"L@<(E*$K%j%9%H$7$F$$$k%?%$%W$,M%@h$5$l$k$1$l$I$b!"(B + $B0[$J$kI=8=$,MxMQ2DG=$G$"$l$P$=$l$G$bNI$$!"$H$$$&$3$H$G$9!#(B + $B$7$+$7$J$,$i4pK\E*$J%"%k%4%j%:%`$G$O!">e$K<($7$?$h$&$K!"(B*/* + $B%o%$%k%I%+!<%I$,B>$N$9$Y$F$N%?%$%W$HA4$/F1Ey$J$N$GM%@h$5$l$^$;$s!#(B + $B%V%i%&%6$O(B */* $B$K$b$C$HDc$$IJ + Accept: text/html, text/plain, image/gif, image/jpeg, */*; q=0.01 + + $BL@<(E*$J%?%$%W$K$OIJl9g$K$N$_!"B>$N%?%$%W$,JV$5$l$^$9!#(B + +

    $B$b$7(B Accept: $B%X%C%@$,(B q $BCM$rA4$/4^$s$G(B$B$$$J$1$l$P(B$B!"(B + $BK>$_$N5sF0$r$9$k$?$a$K!"(BApache $B$O(B "*/*" $B$,$"$l$P(B 0.01 $B$N(B q + $BCM$r@_Dj$7$^$9!#$^$?!"(B"type/*" $B$N7A$N%o%$%k%I%+!<%I$K$O(B 0.02 $B$N(B q + $BCM$r@_Dj$7$^$9(B ($B$G$9$+$i$3$l$i$O(B "*/*" $B$N%^%C%A$h$j$bM%@h$5$l$^$9(B)$B!#(B + $B$b$7(B Accept: $B%X%C%@Cf$N%a%G%#%"%?%$%W$N$I$l$+$,(B q $BCM$r4^$s$G$$$l$P!"(B + $B$3$l$i$NFC$B$5$l$:(B$B!"@5$7$$>pJs$rAw$k%V%i%&%6$+$i$N(B + $B%j%/%(%9%H$O4|BTDL$j$KF0:n$7$O$8$a$^$9!#(B

    + +

    $B8@8lB0@-$N$J$$(B variant

    + +

    $B$b$7FCDj$N%j%=!<%9$N(B variant $B$N$&$A$N$$$/$D$+$,8@8lB0@-$r;}$C$F$$$F(B + $B$$$/$D$+$O;}$C$F$$$J$$>l9g$O!"$=$l$i$N8@8lB0@-$r;}$?$J$$(B variant + $B$K$O(B 0.001 $B$H$$$&Hs>o$KDc$$IJ + +

    $B$3$N8@8lB0@-$r;}$?$J$$(B variant $B$K(B 0.001 + $B$H$$$&Hs>o$KDc$$IJ + +

    $B$?$H$($P(B Multiviews $B$,M-8z$G(B variants + $B$,;0$D$"$k>u67$r9M$($^$9!#(B

    + +
      +
    • foo.en.html, language en
    • + +
    • foo.fr.html, language fr
    • + +
    • foo.html, no language
    • +
    + +

    $B8@8lB0@-$N$J$$(B variant $B$N0UL#$O>o$K%V%i%&%6$KE,1~$9$k$3$H$G$9!#(B + $B%j%/%(%9%H$,(B foo $B$G(B Accept-Language $B%X%C%@$K(B en + $B$^$?$O(B fr ($B$^$?$O$=$NN>J}(B) $B$,4^$^$l$k>l9g!"(Bfoo.en.html $B$+(B + foo.fr.html $B$N$I$A$i$+$,JV$5$l$^$9!#%V%i%&%6$,5vMF$9$k$b$N$H$7$F(B + en $B$H(B fr $B$N$I$A$i$b5s$2$i$l$F$$$J$$>l9g$OBe$o$j$K(B foo.html + $B$,JV$5$l$^$9!#%/%i%$%"%s%H$,(B foo.html + $B$r%j%/%(%9%H$7$?>l9g$O40A4$K0lCW$9$k$N$G%M%4%7%(!<%7%g%s$OH/@8$;$:!"(B + $B$=$l<+BN$,JV$5$l$^$9!#$3$NLdBj$rHr$1$k$K$O!"!V8@8l$N$J$$!W(B variant + $B$H$7$F(B foo.html.html $B$H$$$&L>A0$rIU$1$k$3$H$,(B Multiviews + $B$=$7$F8@8l%M%4%7%(!<%7%g%s$,F0:n$9$k$?$a$NJ]81$H$7$F(B + $BLrN)$D$3$H$,;~!9$"$j$^$9!#(B

    + +

    Transparent Content Negotiation $B$N3HD%(B

    + Apache $B$O(B transparent content negotiation $B%W%m%H%3%k(B (RFC 2295) + $B$r{encoding ..} $BMWAG$r(B variant $B%j%9%HCf$K;H$&$3$H$,$G$-$^$9!#(B + $B%j%9%HCf$N%(%s%3!<%I$5$l$?(B variant $B$rG'<1$G$-$F!"(BAccept-Encoding + $B%j%/%(%9%H%X%C%@$K=>$C$F5vMF$5$l$k%(%s%3!<%I$r$b$C$?(B variant + $B$O!"$I$l$G$b8uJd(B variant $B$H$7$F;HMQ$G$-$k$h$&$K$9$k$?$a$K!"(B + RVSA/1.0 $B%"%k%4%j%:%`(B (RFC 2296) $B$N.?tE@0J2<(B 5 $B7e$^$G4]$a$^$;$s!#(B + +

    $B%j%s%/$HL>A0$NJQ49$K4X$9$kCm0UE@(B

    + +

    $B8@8l%M%4%7%(!<%7%g%s$r;H$C$F$$$k>l9g$O!"%U%!%$%k$,0l$D0J>e$N3HD%;R$r;}$F$F!"(B + $B3HD%;R$N=gHV$K$O4XO"@-$,DL>o$O$J$$(B ($B>\:Y$O(B + mod_mime $B$r;2>H(B) + $B$N$G!"4v$D$+$N0[$J$kL>A0$NJQ49$rA*$Y$k$3$H$K$J$j$^$9!#(B

    + +

    $BE57?E*$J%U%!%$%k$G$O!"(BMIME $B%?%$%W3HD%;R(B ($B$?$H$($P(B + html) $B$r;}$C$F$$$F!"%(%s%3!<%G%#%s%03HD%;R(B + ($B$?$H$($P(B gz) $B$r;}$C$F$$$k$+$b$7$l$J$$$7!"(B + $B$3$N%U%!%$%k$K0[$J$k8@8l(B variant $B$rMQ0U$7$F$$$l$P!"$b$A$m$s8@8l3HD%;R(B + ($B$?$H$($P(B en) $B$r;}$C$F$$$k$G$7$g$&!#(B

    + +

    $BNc(B:

    + +
      +
    • foo.en.html
    • + +
    • foo.html.en
    • + +
    • foo.en.html.gz
    • +
    + +

    $B@5$7$$%j%s%/!"IT@5$J%j%s%/$NN>J}$N%U%!%$%kL>$NNc$r5s$2$^$9(B:

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    $B%U%!%$%kL>(B$B@52r$N%j%s%/(B$BIT@52r$N%j%s%/(B
    foo.html.enfoo
    + foo.html
    -
    foo.en.htmlfoofoo.html
    foo.html.en.gzfoo
    + foo.html
    foo.gz
    + foo.html.gz
    foo.en.html.gzfoofoo.html
    + foo.html.gz
    + foo.gz
    foo.gz.html.enfoo
    + foo.gz
    + foo.gz.html
    foo.html
    foo.html.gz.enfoo
    + foo.html
    + foo.html.gz
    foo.gz
    + +

    $B>e$NI=$r8+$F!"3HD%;R$J$7$N%j%s%/(B ($B$?$H$($P(B foo) + $B$,$$$D$G$b;H$($k$3$H$K5$$,IU$/$G$7$g$&!#$3$NMxE@$O!"(B + $B%I%-%e%a%s%H$H$7$F1~Ez$9$k%U%!%$%k$NH$rJQ99$9$k$3$H$J$/8e$+$i%U%!%$%k$rJQ99$G$-$k!"(B + $B$?$H$($P(B html $B$+$i(B shtml + $B$K!"$"$k$$$O(B cgi $B$KJQ99$G$-$kE@$G$9!#(B

    + +

    $B%j%s%/$K(B MIME $B%?%$%W$r;H$$B3$1$?$$(B ($B$?$H$($P(B + foo.html)$B;~$O!"8@8l3HD%;R$O(B + ($B%(%s%3!<%G%#%s%03HD%;R$b$"$l$P$=$l$b4^$a$F(B) + MIME $B%?%$%W3HD%;R$N1&B&$K$J$1$l$P$J$j$^$;$s(B + ($B$?$H$($P(B foo.html.en)$B!#(B

    + +

    $B%-%c%C%7%e$K4X$9$kCm0U;v9`(B

    + +

    $B%-%c%C%7%e$,$"$kI=8=$rJ]B8$7$F$$$k$H$-$O!"%j%/%(%9%H(B URL + $B$H4XO"$E$1$i$l$F$$$^$9!# + +

    HTTP/1.0 $B=`5r$N%/%i%$%"%s%H$+$i$N%j%/%(%9%H$KBP$7$F$O!"(B + ($B%V%i%&%6$G$"$m$&$H%-%c%C%7%e$G$"$m$&$H(B) $B%M%4%7%(!<%7%g%s(B + $B$rCacheNegotiatedDocs + $B%G%#%l%/%F%#%V$r;HMQ$G$-$^$9!#$3$N%G%#%l%/%F%#%V$O!"(B + $B + + + + diff --git a/htdocs/manual/custom-error.html.en b/htdocs/manual/custom-error.html.en new file mode 100644 index 00000000000..3cbb5704364 --- /dev/null +++ b/htdocs/manual/custom-error.html.en @@ -0,0 +1,182 @@ + + + + + + + Custom error responses + + + + + + +

    Custom error responses

    + +
    +
    Purpose
    + +
    + Additional functionality. Allows webmasters to configure + the response of Apache to some error or problem. + +

    Customizable responses can be defined to be activated in + the event of a server detected error or problem.

    + +

    e.g. if a script crashes and produces a "500 Server + Error" response, then this response can be replaced with + either some friendlier text or by a redirection to another + URL (local or external).

    +
    + +
    Old behavior
    + +
    NCSA httpd 1.3 would return some boring old error/problem + message which would often be meaningless to the user, and + would provide no means of logging the symptoms which caused + it.
    +
    + +
    New behavior
    + +
    + The server can be asked to; + +
      +
    1. Display some other text, instead of the NCSA hard + coded messages, or
    2. + +
    3. redirect to a local URL, or
    4. + +
    5. redirect to an external URL.
    6. +
    + +

    Redirecting to another URL can be useful, but only if + some information can be passed which can then be used to + explain and/or log the error/problem more clearly.

    + +

    To achieve this, Apache will define new CGI-like + environment variables, e.g.

    + +
    + REDIRECT_HTTP_ACCEPT=*/*, image/gif, + image/x-xbitmap, image/jpeg
    + REDIRECT_HTTP_USER_AGENT=Mozilla/1.1b2 (X11; I; HP-UX + A.09.05 9000/712)
    + REDIRECT_PATH=.:/bin:/usr/local/bin:/etc
    + REDIRECT_QUERY_STRING=
    + REDIRECT_REMOTE_ADDR=121.345.78.123
    + REDIRECT_REMOTE_HOST=ooh.ahhh.com
    + REDIRECT_SERVER_NAME=crash.bang.edu
    + REDIRECT_SERVER_PORT=80
    + REDIRECT_SERVER_SOFTWARE=Apache/0.8.15
    + REDIRECT_URL=/cgi-bin/buggy.pl
    +
    +
    + +

    note the REDIRECT_ prefix.

    + +

    At least REDIRECT_URL and + REDIRECT_QUERY_STRING will be passed to the + new URL (assuming it's a cgi-script or a cgi-include). The + other variables will exist only if they existed prior to + the error/problem. None of these will be + set if your ErrorDocument is an external redirect + (i.e., anything starting with a scheme name like + http:, even if it refers to the same host as + the server).

    +
    + +
    Configuration
    + +
    + Use of "ErrorDocument" is enabled for .htaccess files when + the "FileInfo" + override is allowed. + +

    Here are some examples...

    + +
    + ErrorDocument 500 /cgi-bin/crash-recover
    + ErrorDocument 500 "Sorry, our script crashed. Oh + dear
    + ErrorDocument 500 http://xxx/
    + ErrorDocument 404 /Lame_excuses/not_found.html
    + ErrorDocument 401 + /Subscription/how_to_subscribe.html
    +
    + +

    The syntax is,

    + +

    ErrorDocument + <3-digit-code> action

    + +

    where the action can be,

    + +
      +
    1. Text to be displayed. Prefix the text with a quote + ("). Whatever follows the quote is displayed. Note: + the (") prefix isn't displayed.
    2. + +
    3. An external URL to redirect to.
    4. + +
    5. A local URL to redirect to.
    6. +
    +
    +
    +
    + +

    Custom error responses and redirects

    + +
    +
    Purpose
    + +
    Apache's behavior to redirected URLs has been modified so + that additional environment variables are available to a + script/server-include.
    + +
    Old behavior
    + +
    Standard CGI vars were made available to a script which + has been redirected to. No indication of where the + redirection came from was provided.
    + +
    New behavior
    + +
    A new batch of environment variables will be initialized + for use by a script which has been redirected to. Each new + variable will have the prefix REDIRECT_. + REDIRECT_ environment variables are created from + the CGI environment variables which existed prior to the + redirect, they are renamed with a REDIRECT_ + prefix, i.e., HTTP_USER_AGENT becomes + REDIRECT_HTTP_USER_AGENT. In addition to these + new variables, Apache will define REDIRECT_URL + and REDIRECT_STATUS to help the script trace its + origin. Both the original URL and the URL being redirected to + can be logged in the access log.
    +
    + +

    If the ErrorDocument specifies a local redirect to a CGI + script, the script should include a "Status:" + header field in its output in order to ensure the propagation + all the way back to the client of the error condition that + caused it to be invoked. For instance, a Perl ErrorDocument + script might include the following:

    +
    +      :
    +    print  "Content-type: text/html\n";
    +    printf "Status: %s Condition Intercepted\n", $ENV{"REDIRECT_STATUS"};
    +      :
    +
    + +

    If the script is dedicated to handling a particular error + condition, such as 404 Not Found, it can + use the specific code and error text instead.

    + + + + diff --git a/htdocs/manual/custom-error.html.fr b/htdocs/manual/custom-error.html.fr new file mode 100644 index 00000000000..c522b921944 --- /dev/null +++ b/htdocs/manual/custom-error.html.fr @@ -0,0 +1,221 @@ + + + + + + + + + Messages d'erreur personnalisés + + + + + +

    Messages d'erreur personnalisés

    + +

    But

    + +

    Fonctionnalité additionnelle. Permet aux + administrateurs Web de personnaliser les réponses + données par Apache en cas de problèmes. Les + réponses personnalisées définies peuvent + être activables lorsque le serveur est à + même de détecter la cause du problème.

    + +

    ex. si un script termine en faute, produisant une + réponse "500 Server Error", alors cette réponse + peut être remplacée soit par un texte quelque peu + plus explicatif soit par une redirection vers une autre URL + (locale ou externe).

    + +

    Ancien comportement

    + +

    La version 1.3 d'httpd du NCSA répondait souvent avec + des messages d'erreur ennuyeux et peu amènes qui + étaient sans signification pour l'utilisateur, et ne + donnait pas les symptômes qui pouvaient causer la + faute.

    + +

    Nouveau comportement

    + +

    On pourra désormais demander au serveur :

    + +
      +
    1. D'afficher un autre texte, plutôt que les messages + standard NCSA, ou
    2. + +
    3. rediriger l'utilisateur vers une URL locale, ou + encore
    4. + +
    5. rediriger l'utilisateur vers une URL sur un autre + serveur.
    6. +
    + +

    La redirection vers une autre URL peut être utile, + mais seulement si certaines informations peuvent être + passées et qui serviront à produire un affichage + ou un enregistrement du problème plus clair et + explicite.

    + +

    Pour ce faire, Apache définira de nouvelles variables + d'environnement ( à la mode CGI), ex.

    + +
    + REDIRECT_HTTP_ACCEPT=*/*, image/gif, image/x-xbitmap, + image/jpeg
    + REDIRECT_HTTP_USER_AGENT=Mozilla/1.1b2 (X11; I; HP-UX + A.09.05 9000/712)
    + REDIRECT_PATH=.:/bin:/usr/local/bin:/etc
    + REDIRECT_QUERY_STRING=
    + REDIRECT_REMOTE_ADDR=121.345.78.123
    + REDIRECT_REMOTE_HOST=ooh.ahhh.com
    + REDIRECT_SERVER_NAME=crash.bang.edu
    + REDIRECT_SERVER_PORT=80
    + REDIRECT_SERVER_SOFTWARE=Apache/0.8.15
    + REDIRECT_URL=/cgi-bin/buggy.pl
    +
    + +

    notez le préfixe REDIRECT_.

    + +

    Seront au moins passés à la nouvelle URL les + variables REDIRECT_URL et + REDIRECT_QUERY_STRING (en supposant que l'URL de + redirection est un script CGI ou un Include CGI). Les autres + variables n'existeront que si elles existaient + déjà avant l'apparition du problème. + Aucune de ces deux variables ne sera initialisée + si votre Document d'erreur est le résultat d'une + redirection externe (c-à-d. toute adresse + commençant par le nom d'un plan de protocole comme + http:, même si le protocole invoqué + aboutit sur le même hôte que le serveur à + l'origine de la redirection).

    + +

    Configuration

    + +
    +
    L'utilisation des documents "ErrorDocument" est + autorisée dans les fichiers .htaccess lorsque la + surcharge "FileInfo" est + active.
    + +
    En voici quelques exemples...
    +
    + +
    +
    + ErrorDocument 500 /cgi-bin/crash-recover
    + ErrorDocument 500 "Désolé, votre script + s'est vautré. Fichtre"
    + ErrorDocument 500 http://xxx/
    + ErrorDocument 404 /Lame_excuses/not_found.html
    + ErrorDocument 401 + /Subscription/how_to_subscribe.html
    +
    + +
    +
    La syntaxe admise est :
    + +
    ErrorDocument + <code à trois chiffres> action
    + +
    dans laquelle l'action peut être :
    +
    +
    + +
    +
      +
    1. Le texte devant être affiché. Le texte + devra être préfixé par un guillemet + ("). Tout ce qui suit le guillemet sur la ligne est + affiché. Notez : le préfixe (") + lui-même n'est pas affiché.
    2. + +
    3. Une URL externe de redirection.
    4. + +
    5. Une URL locale de redirection.
    6. +
    +
    +
    +
    +
    + + +
    +

    Redirections et affichage d'erreurs + personnalisées

    + +

    But

    + +
    +
    Le comportement d'Apache lorsqu'il redirige des URL a + été modifié afin que d'autres + variables d'environnement additionnelles puissent + être rendues accessibles par un + script/server-include.
    +
    + +

    Ancien comportement

    + +
    +
    Les variables CGI standard étaient transmises au + script vers lequel était redirigé le client. + Aucune indication n'était transmise quant à + qui redirigeait le message.
    +
    + +

    Nouveau comportement

    + +
    +
    Un nouvel ensemble de variables d'environnement sera + initialisé, à l'intention du script vers + lequel le client a été redirigé. + Chaque nouvelle variable de cet ensemble est + préfixée par REDIRECT_. Les + variables d'environnement de type REDIRECT_ + sont créées à partir des variables + d'environnement CGI qui existaient avant que n'intervienne + la redirection, en leur rajoutant le préfixe. Par + exemple HTTP_USER_AGENT devient + REDIRECT_HTTP_USER_AGENT. En plus de ces + variables, Apache définit les variables + REDIRECT_URL et REDIRECT_STATUS + pour aider le script à identifier l'origine de la + redirection. Dans la trace d'accès déduite + peuvent apparaître l'URL initiale ainsi que l'URL + vers laquelle est redirigée la requête.
    +
    +
    +
    +
    +
    + + +

    Si la directive ErrorDocument spécifie une + redirection local vers un script CGI, le script devra inclure + un champ "Status:" dans l'en-tête de sa + sortie afin de garantir la retransmiison complète vers + le client des conditions d'erreurs qui ont causé son + invocation. Par exemple un script Perl devrait inclure les + lignes suivantes :

    +
    +      :
    +    print  "Content-type: text/html\n";
    +    printf "Status: %s Condition Intercepted\n", $ENV{"REDIRECT_STATUS"};
    +      :
    +
    + +

    Si le script est dédié pour traité une + condition d'erreur particulière telle que + 404 Not Found, il peut utiliser le code + spécifique et le message d'erreur à la place.

    + + + + diff --git a/htdocs/manual/custom-error.html.html b/htdocs/manual/custom-error.html.html new file mode 100644 index 00000000000..ff8a00c2326 --- /dev/null +++ b/htdocs/manual/custom-error.html.html @@ -0,0 +1,4 @@ + + + diff --git a/htdocs/manual/custom-error.html.ja.jis b/htdocs/manual/custom-error.html.ja.jis new file mode 100644 index 00000000000..b4610c51b16 --- /dev/null +++ b/htdocs/manual/custom-error.html.ja.jis @@ -0,0 +1,183 @@ + + + + + + + $B%+%9%?%`%(%i!<%l%9%]%s%9(B + + + + + + + +

    $B%+%9%?%`%(%i!<%l%9%]%s%9(B

    + +
    +
    $BL\E*(B
    + +
    + $BDI2C5!G=$NDs6!!#%&%'%V%^%9%?!<$,2?$i$+$N%(%i!<$dLdBj$KBP$9$k(B + Apache $B$NH?1~$r@_Dj$G$-$k$h$&$K$7$^$9!#(B + +

    $B%5!<%P$,%(%i!<$dLdBj$rH/8+$7$?>l9g$NH?1~$r!"(B + $B%+%9%?%^%$%:$7$FDj5A$9$k$3$H$,$G$-$^$9!#(B

    + +

    $BNc$($P!"%9%/%j%W%H$Nl9g$NH?1~$r!"$h$j9%$^$7$$%F%-%9%H$d!"JL$N(B + URL ($BFbIt5Z$S30It(B) $B$X$N%j%@%$%l%/%7%g%s$KCV$-49$($k$3$H$,$G$-$^$9!#(B +

    +
    + +
    $B8E$$F0:n(B
    + +
    NCSA httpd 1.3 $B$O!"8E$/$FB`6~$J%(%i!<(B/$BLdBj%a%C%;!<%8$r(B + $BJV$7$F$$$^$7$?!#$=$l$O$7$P$7$P%f!<%6$K$OL50UL#$G$"$j!"(B + $B$^$?$=$l$rH/@8$5$;$?860x$r5-O?$9$kJ}K!$bDs6!$7$F$$$^$;$s$G$7$?!#(B +
    +
    + +
    $B?7$7$$F0:n(B
    + +
    + + +
      +
    1. NCSA $B$N%O!<%I%3!<%I$5$l$?%a%C%;!<%8$NBe$o$j$K(B + $BB>$N%F%-%9%H$rI=<((B
    2. + +
    3. $B%m!<%+%k$N(B URL $B$K%j%@%$%l%/%H(B
    4. + +
    5. $B30It$N(B URL $B$K%j%@%$%l%/%H(B
    6. +
    + $B$9$k$h$&$K%5!<%P$r@_Dj$G$-$^$9!#(B +

    $BJL$N(B URL $B$K%j%@%$%l%/%H$9$k$3$H$OLr$KN)$A$^$9$,!"(B + $B$=$l$O@bL@$r$7$?$j!"$h$jL@3N$K8m$j(B/$BLdBj$r5-O?$7$?$j$9$k$?$a$K(B + $B2?$+>pJs$rEA$($i$l$k$H$-$K8B$j$^$9!#(B

    + +

    $B$3$l$r$BNc$($P(B$B0J2<$N$h$&$J$b$N$,$"$j$^$9!#(B

    + +
    + REDIRECT_HTTP_ACCEPT=*/*, image/gif, + image/x-xbitmap, image/jpeg
    + REDIRECT_HTTP_USER_AGENT=Mozilla/1.1b2 (X11; I; HP-UX + A.09.05 9000/712)
    + REDIRECT_PATH=.:/bin:/usr/local/bin:/etc
    + REDIRECT_QUERY_STRING=
    + REDIRECT_REMOTE_ADDR=121.345.78.123
    + REDIRECT_REMOTE_HOST=ooh.ahhh.com
    + REDIRECT_SERVER_NAME=crash.bang.edu
    + REDIRECT_SERVER_PORT=80
    + REDIRECT_SERVER_SOFTWARE=Apache/0.8.15
    + REDIRECT_URL=/cgi-bin/buggy.pl
    +
    +
    + +

    $BF,$KIU$/(B REDIRECT_ $B$KCmL\$7$F$/$@$5$$!#(B

    + +

    $B>/$J$/$H$b(B REDIRECT_URL $B$H(B + REDIRECT_QUERY_STRING $B$O?7$7$$(B URL (CGI $B%9%/%j%W%H$+(B + CGI $B%$%s%/%k!<%I$G$"$k$H2>Dj$5$l$^$9(B) $B$KEO$5$l$^$9!#(B + $BB>$NJQ?t$O!"%(%i!<$dLdBj$,5/$-$kA0$KB8:_$7$?>l9g$K$@$1B8:_$7$^$9!#(B + $B$b$7$"$J$?$N@_Dj$7$?(B ErrorDocument $B$,(B $B30It(B$B%j%@%$%l%/%H(B + ($B$9$J$o$A(B$B!"(Bhttp: + $B$N$h$&$JBN7OL>$+$i;O$^$k$9$Y$F$N$b$N!#$?$H$(F1$8%[%9%H$r;X$7$F$$$F$b(B) + $B$J$i$P!"$3$l$i$O(B$B$^$C$?$/(B$B@_Dj$5$l$^$;$s!#(B +

    +
    + +
    $B@_Dj(B
    + +
    + "FileInfo" $B%*!<%P!<%i%$%I(B + $B$,5v2D$5$l$F$$$l$P!"(B.htaccess $B%U%!%$%k$G(B "ErrorDocument" + $B$r;HMQ$9$k$3$H$,$G$-$^$9!#(B + +

    $B$3$3$K!"$$$/$D$+$NNc$r5s$2$^$9!#(B

    + +
    + ErrorDocument 500 /cgi-bin/crash-recover
    + ErrorDocument 500 "Sorry, our script crashed. Oh + dear
    + ErrorDocument 500 http://xxx/
    + ErrorDocument 404 /Lame_excuses/not_found.html
    + ErrorDocument 401 + /Subscription/how_to_subscribe.html
    +
    + +

    $B9=J8(B

    + +

    ErrorDocument + <3 $B7e%3!<%I(B> $BF0:n(B

    + +

    $BF0:n$O!"(B

    + +
      +
    1. $BI=<($5$l$k$Y$-%F%-%9%H!#%F%-%9%H$K$O0zMQId(B (") $B$r$D$1$^$9!#(B + $B0zMQId$N8e$KB3$/$b$N$,2?$G$bI=<($5$l$^$9!#(B + $BCm0U(B : (") $B$OI=<($5$l$^$;$s(B
    2. + +
    3. $B%j%@%$%l%/%H@h$N30It(B URL
    4. + +
    5. $B%j%@%$%l%/%H@h$N%m!<%+%k(B URL
    6. +
    +
    +
    +
    + +

    $B%+%9%?%`%(%i!<%l%9%]%s%9$H%j%@%$%l%/%H(B

    + +
    +
    $BL\E*(B
    + +
    $B%9%/%j%W%H(B/SSI $B$KDI2C$N4D6-JQ?t$,MxMQ2DG=$K$J$k$h$&$K!"(B + $B%j%@%$%l%/%H$5$l$?(B URL $B$KBP$9$k(B Apache $B$NF0:n$,JQ99$5$l$^$7$?!#(B +
    + +
    $B8E$$F0:n(B
    + +
    $B%j%@%$%l%/%H$5$l$?%9%/%j%W%H$OI8=`$N(B CGI + $B4D6-JQ?t$rMxMQ2DG=$G$7$?!#$7$+$7!"$I$3$+$i%j%@%$%l%/%H(B + $B$5$l$?$+$N>pJs$ODs6!$5$l$F$$$^$;$s$G$7$?!#(B
    + +
    $B?7$7$$F0:n(B
    + +
    $B%j%@%$%l%/%H$5$l$?@h$N%9%/%j%W%H$,;HMQ2DG=$J$h$&$K!"(B + $B?7$7$$$?$/$5$s$N4D6-JQ?t$,=i4|2=$5$l$^$9!#?7$7$$JQ?t$O!"$=$l$>$l(B + REDIRECT_ $B$G;O$^$j$^$9!#(B + REDIRECT_ $B$G;O$^$k4D6-JQ?t$O%j%@%$%l%/%H$5$l$kA0$KB8:_$7$F$$$?(B + CGI $B4D6-JQ?t$NF,$K(B REDIRECT_ $B$rIU$1$F:n@.$5$l$^$9!#(B + $B$9$J$o$A(B$B!"(BHTTP_USER_AGENT $B$O(B + REDIRECT_HTTP_USER_AGENT $B$K$J$j$^$9!#(B + $B$3$l$i$N?7$7$$JQ?t$K2C$($F!"(BApache $B$O!"(B + $B%9%/%j%W%H$,%j%@%$%l%/%H85$N%H%l!<%9$r=u$1$k$?$a$K(B + REDIRECT_URL $B$H(B REDIRECT_STATUS + $B$rDj5A$7$^$9!#%"%/%;%9%m%0$K$O85$N(B URL $B$H%j%@%$%l%/%H$5$l$?(B URL + $B$NN>J}$,5-O?$5$l$^$9!#(B
    +
    + +

    ErrorDocument $B$,(B CGI $B%9%/%j%W%H$X$N%m!<%+%k%j%@%$%l%/%H$r(B + $B;XDj$7$F$$$k>l9g$O!"$=$l$r5/F0$9$k$3$H$K$J$C$?%(%i!<$N>uBV$r(B + $B%/%i%$%"%s%H$^$G3N"Status:" + $B%X%C%@$r4^$`$Y$-$G$9!#Nc$($P!"(BErrorDocument $BMQ$N(B Perl + $B%9%/%j%W%H$O0J2<$N$h$&$J$b$N$r4^$`$+$b$7$l$^$;$s!#(B +

    +
    +      :
    +    print  "Content-type: text/html\n";
    +    printf "Status: %s Condition Intercepted\n", $ENV{"REDIRECT_STATUS"};
    +      :
    +
    + +

    $B%9%/%j%W%H$,(B 404 Not Found $B$N$h$&$J(B + $BFCDj$N%(%i!<%3%s%G%#%7%g%s$r07$&$?$a$@$1$K;H$o$l$k>l9g$O!"(B + $BBe$o$j$KFCDj$N%3!<%I$H%(%i!<%F%-%9%H$r;HMQ$9$k$3$H$,$G$-$^$9!#(B +

    + + + diff --git a/htdocs/manual/cygwin.html b/htdocs/manual/cygwin.html new file mode 100644 index 00000000000..ff0bda44015 --- /dev/null +++ b/htdocs/manual/cygwin.html @@ -0,0 +1,567 @@ + + + + + + + Using Apache with Cygwin + + + + + + +

    Using Apache with + Cygwin

    + +

    This document explains how to install, configure and run + Apache 1.3 under the Cygwin + layer for Microsoft Windows. Cygwin is a POSIX.1 emulation + layer for 32-bit Microsoft Windows operating systems.

    + +

    The Apache Group does not guarantee that this software will + work as documented, or even at all. If you find any bugs, + please document them on our bug reporting + page.

    + +

    Latest development news, pre-compiled distribution binaries, + and third-party modules as DLLs, may be found at http://apache.dev.wapme.net/. + Contributions are highly welcome (please see TODO list); + please submit your code or suggestions to the bug report page, + or join the dev@httpd.apache.org mailing list.

    + +

    The Win32 port of Apache is built + on its own, custom code within Apache to assure + interoperability with Windows operating systems. While it is + considered release quality, it is slower and less thoroughly + tested than the Unix ports. The Cygwin alternative uses the + well tested Unix code by using the Cygwin portability layer for + POSIX.1 emulation. The Cygwin port may suffer from gaps in + security or reliability due to the interaction of the Cygwin + compatibility layer with the native Windows API.

    + +

    The Win32 port will be more + familiar to most Windows users. The Cygwin port (including the + build environment) will be more familiar to Unix admins and + developers. Due to these two different code bases, the security + and reliability of the two ports are unrelated to each other. + The Win32 port should be considered the more secure of the two + at this time. The Win32 port is recommended for most Windows + users, however the Cygwin port offers an extra layer of + compatibility for Unix developers.

    + +

    Apache still performs best, and is most reliable, on Unix + platforms. First benchmarks have shown that the same Apache + setup on Cygwin performs about 30% slower than the + corresponding native Windows version.

    + +

    Most of this document assumes that you have a working Cygwin + installation and want to compile Apache yourself from the + original distribution sources.

    +
    + + +
    + +

    History of Apache for + Cygwin

    + +

    Cygwin support for Apache began with Apache 1.2.6 and Cygwin + b18.

    + +

    Due to licensing issues there has not been an official + binary distribution until Red Hat Inc. (who merged with Cygnus + Solutions Inc.) changed their Cygwin license to ensure compiled + executables do not fall under GPL license if the distributed + software is considered as open source.

    + +

    Cygwin is supported in the official source distributions + from Apache 1.3.20 and later. Pre-compiled binaries for the + Cygwin platform (without the cygwin1.dll) will be + supplied at http://httpd.apache.org/ + for each released version.

    + +

    Differences from Apache for + Windows (native)

    + +

    Both versions, Apache for Windows and Apache for Cygwin, are + designed to run on the same operating systems, the Windows NT + and Windows 2000 family. But there are considerable differences + between the two flavors.

    + +

    While Apache for Windows is a native Windows port, Apache + for Cygwin relies on the Cygwin POSIX.1 emulation layer + provided by the cygwin1.dll dynamic library to + create a Unix compatible environment. Therefore we consider + Apache for Cygwin closer to the Unix side then to the Windows + side, even while it runs on Windows.

    + +

    Most significant differences are the amount of changes to + the source code needed to compile and run Apache on the Cygwin + platform. While the native Windows port needs major changes and + platform specific additions, the Cygwin based port changes are + very small and most of the Unix source code can be used without + major changes on the Cygwin platform.

    + +

    When to use Apache for Cygwin and/or Apache versus + Windows?
    + Apache for Cygwin is intended to be most useful if you want a + seamless transition from Unix systems to Windows systems for + your HTTP services.

    + +

    If you are using Windows NT or Windows 2000 for development + and office purposes, but your productive HTTP server + environments are Unix based systems, you may use Apache for + Cygwin to develop on Windows and simply copy whole Apache + configurations (i.e., httpd.conf) and + Perl (mod_perl), PHP (mod_php) or + Python (mod_snake) applications to your productive + Unix systems.

    + +

    What about modules (mod_foo) for Apache + for Cygwin?
    + Apache for Cygwin can be built with most of the available + Apache modules with no or minimal changes. Many popular modules + have been compiled and tested with Apache for Cygwin, including + mod_dav, mod_ssl, + mod_php, mod_perl, + mod_gzip, and mod_jserv.

    + +

    While there are developers who directly support the Windows + native port of Apache, very few module developers do. That is + why it is can be difficult to make a Unix-based Apache + installation with third-party modules work the same way on the + Windows side using the native port. Apache for Cygwin makes + this much easier.

    + +

    What are the differences in the configuration + files?
    + While the Apache for Windows port uses Windows native path + names to refer files and directories, like

    +
    +  # httpd.conf (for Windows)
    +  DocumentRoot "c:/apache/htdocs"
    +
    + Apache for Cygwin can use unmodified POSIX style path names + like +
    +  # httpd.conf (for Cygwin)
    +  DocumentRoot "/usr/local/apache/htdocs"
    +
    + +

    What about performance?
    + Apache for Cygwin is not as high-performance as Apache for + Windows on the same hardware.

    + +

    This is to be expected, because Cygwin emulates a Unix + environment on a "foreign" operating system, while Apache for + Windows uses Windows code in its own native environment. First + benchmark results have shown that Apache for Cygwin is about + 30% slower than native Apache for Windows counterpart.

    + +

    Requirements

    + +

    This Apache 1.3 port for Cygwin is designed to run on + Windows NT 4.0 and Windows 2000, NOT on + Windows 95 or 98. Windows NT 4.0 and Windows 2000 have both + been successfully tested and approved. In all cases TCP/IP + networking must be installed.

    + +

    Cygwin 1.x is required to compile and run this version. + Cygwin 1.3.9 and 1.3.10 have been tested and approved on both + supported OSes. We suggest using Cygwin 1.3.9-2 and higher.

    + +

    Note:If you want to compile shared DLL + modules using apxs you will need + Cygwin 1.3.9-2 or higher version, which includes a version of + ld.exe with --auto-import support. +

    + + +

    Downloading Apache for + Cygwin

    + +

    The Cygwin platform is supported out of the box by Apache + 1.3.20 and later. This means there is no extra download + required for the Cygwin platform. The latest version of Apache + can be found on the Apache httpd web site at http://httpd.apache.org/. + The site lists the current release, any more recent development + versions, and information on any mirror sites.

    + +

    What about Cygwin Net Distribution binaries?
    + Apache for Cygwin is also available as pre-compiled binary + package for the Cygwin Net Distribution available at + http://www.cygwin.com/ and it's + setup.exe + installation process.

    + + +

    Configuring and Installing Apache + for Cygwin

    + +

    Apache on Cygwin is configured and compiled the same way as + on most Unix systems. Refer to the general configuration and installation documents for details.

    + +

    There are three ways to configure and build Apache for + Cygwin, depending on how additional Apache modules should be + used:

    + +
      +
    • + Static linked version + +

      To build a static linked version of httpd + including additional modules, use the following commands in + the shell:

      +
      +  $ cd apache_1.3.x
      +  $ ./configure [--enable-module=module|--add-module=/path/to/module]
      +  $ make
      +
      + +

      This will produce the required extra libraries or object + files for module and link everything to + src/httpd.exe.

      +
    • + +
    • + Shared core, DLL linked version ('one-for-all' + version) + +

      To build a DLL version of httpd including + additional modules, use the following commands:

      +
      +  $ cd apache_1.3.x
      +  $ ./configure --enable-rule=SHARED_CORE \
      +       [--enable-module=module|--add-module=/path/to/module]
      +  $ make
      +  $ make install
      +
      + +

      This will produce the required extra libraries or object + files that hold all static linked code. Then + dllwrap and dlltool will export + all of those (including any additional module code) to the + shared cyghttpd.dll and create the + libhttpd.a import library which is required + for linking httpd.exe.

      + +

      Note: After make install + is performed you will find the resulting core DLL module + cyghttpd.dll within + /usr/local/apache/libexec. This is due to the + installation process. Please move the file to Apache's + bin directory, i.e.

      +
      +  $ mv /usr/local/apache/libexec/cyghttpd.dll /usr/local/apache/bin
      +
      +

      or to an other place inside your $PATH, i.e. + /usr/bin is used in the Cygwin Net Distribution + layout. The core DLL module cyghttpd.dll is the + only file that should reside in + /usr/local/apache/bin directory. All other + shared DLL modules mod_foo.dll should be + located in /usr/local/apache/libexec.

      +
    • + +
    • + Shared DLL modules linked version + +

      This method is ONLY supported using a + version of ld.exe which supports the + --auto-import option. Please see the + requirements section for more + information.

      + +

      To build a dynamic loadable DLL version of + httpd which can load DLL modules on the fly + (at runtime), proceed as follows:

      + +
        +
      • +

        First build Apache's shared core as follows:

        +
        +  $ cd apache_1.3.x
        +  $ ./configure --enable-rule=SHARED_CORE --enable-module=so \
        +       [--enable-module=module|--add-module=/path/to/module] \
        +       [--enable-shared=module]
        +  $ make
        +
        + +

        You will notice that there is a warning message + shown which lets you know that the shared core DLL + library src/cyghttpd.dll is missing while + trying to link the shared DLL modules + mod_foo.dll.

        + +

        Unfortunately, during Apache's build process, the shared + modules are linked before the shared core import + library src/cyghttpd.dll has been made. + The shared modules depend on this import library, so + they cannot link for the first time you run + make.

        +
      • + +
      • + Re-run make to build the shared module + DLLs and install the whole package to the installation + directory: +
        +  $ make
        +  $ make install
        +
        + +

        All shared modules are placed into + libexec, including the shared core DLL + cyghttpd.dll. When Apache's + /bin/httpd is started, it has to dynamically + link cyghttpd.dll during runtime; that is + why you have to place the shared core DLL + cyghttpd.dll to the same directory where + httpd.exe resides, i.e. + /usr/local/apache/bin or an other place + in your $PATH.

        +
      • + +
      • + Add configuration directives to + conf/httpd.conf to load and activate + shared DLL modules at runtime: +
        +  # httpd.conf
        +  [...]
        +  LoadModule foo_module   libexec/mod_foo.dll
        +  AddModule mod_foo.c
        +  [...]
        +
        +
      • +
      +
    • + +
    • + Using apxs to create shared DLL modules + +

      To make the extending httpd with shared DLL + modules easier, you can use apxs.

      + +

      Make sure you have configured + $CFG_LDFLAGS_SHLIB within apxs to + include the --shared directive and the path to + the shared code DLL cyghttpd.dll.

      + +

      After performing make install you will + probably have the following lines within your + apxs:

      +
      +  # apxs
      +  [...]
      +  my $CFG_LD_SHLIB      = q(dllwrap --export-all --output-def libhttpd.def --implib libhttpd.a --driver-name gcc);          # substituted via Makefile.tmpl
      +  my $CFG_LDFLAGS_SHLIB = q(-g); # substituted via Makefile.tmpl 
      +  my $CFG_LIBS_SHLIB    = q();        # substituted via Makefile.tmpl 
      +  [...]
      +
      + Change these to reflect the new compile options needed for + shared DLL modules as follows: +
      +  # apxs
      +  [...]
      +  my $CFG_LD_SHLIB      = q(gcc);          # substituted via Makefile.tmpl
      +  my $CFG_LDFLAGS_SHLIB = q(-g --shared); # substituted via Makefile.tmpl 
      +  my $CFG_LIBS_SHLIB    = q(/path/to/cyghttpd.dll);        # substituted via Makefile.tmpl 
      +  [...]
      +
      + +

      Now you should be able to create a shared DLL module + from a mod_foo.c source file with:

      +
      +  $ apxs -c mod_foo.c -o mod_foo.dll
      +
      + Place the resulting DLL in Apache's libexec + directory, so the dlopen() function within the + compiled in mod_so.c module can find and load + it at runtime. +
    • +
    + + +

    Using Win32 native socket + implementation instead

    + +

    Apache for Cygwin supports an option to use the Win32 native + socket calls instead of Cygwin's POSIX wrappers internally. To + use the Win32 native socket calls configure Apache for Cygwin + with the CYGWIN_WINSOCK configuration rule flag + as follows:

    +
    +  $ cd apache_1.3.x
    +  $ ./configure --enable-rule=CYGWIN_WINSOCK [...]
    +  $ make
    +
    +

    Using Win32 native socket calls is intended for performance + reasons and as a hybrid way to interact with the underlying + native socket implementation.

    + + + +

    Running Apache for Cygwin

    + +

    Apache on Cygwin can be started and stopped in the same + manner as on Unix systems. You may also use the apachectl tool + for starting and stopping Apache.

    + +
      +
    • + Starting Apache + +

      If installed with the default Apache directory layout, + you can start httpd as follows:

      +
      +  $ /usr/local/apache/bin/httpd
      +
      + +

      An explicit background indicator (&) is + not required. The parent process is automatically detached + from the current terminal. Check the global + error_log to see if Apache started cleanly + without any major problems.

      +
    • + +
    • + Stopping Apache + +

      To stop Apache send at least a SIGTERM + signal to the parent httpd process:

      +
      +  $ kill -TERM `cat /usr/local/apache/logs/httpd.pid`
      +
      +
    • + +
    • + Gracefully Restarting Apache + +

      In order to update configuration directives and reload + the httpd.conf configuration file, send a + SIGHUP to the parent httpd + process:

      +
      +  $ kill -HUP `cat /usr/local/apache/logs/httpd.pid`
      +
      +
    • +
    + +

    Running Apache for Cygwin as a + Service

    + +

    Apache on Cygwin can be invoked as a Windows NT or Windows + 2000 service. Cygwin has its own cygrunsrv.exe + facility to define, remove, start, and stop services as + follows:

    + +
      +
    • + Installing Apache as a new Service + +

      Use the following statement to install + httpd.exe as a new service:

      +
      +  $ cygrunsrv -I service_name-p /usr/local/apache/bin/httpd.exe [-a arguments] \
      +      [-e VAR=VALUE] [-t auto|manual] [-u user] [-w passwd]
      +
      + +

      Where -a is used to pass command line + arguments (such as -DFOO defines) to + httpd.exe, and -e is used to pass + environment variables. If necessary you may use the + -t options to set the autostart configuration + for the service. If you want the new service to run under a + different userid, you will have to supply the + -u and -w options.

      +
    • + +
    • + Starting Apache as a Service + +

      After the new service is installed it can be started + using the following command:

      +
      +  $ cygrunsrv -S service_name
      +
      + +

      Check your process table and global + error_log file to ensure Apache has started + without any major problems.

      +
    • + +
    • + Stopping an Apache Service + +

      A running Apache service may be stopped using the + following command:

      +
      +  $ cygrunsrv -E service_name
      +
      + +

      This will stop all running httpd.exe + processes and shutdown the HTTP service for the + machine.

      +
    • + +
    • + Removing an Apache Service + +

      An installed Apache service may be removed from Windows + NT or Windows 2000 using the following command:

      +
      +  $ cygrunsrv -R service_name
      +
      + +

      This will remove your previously defined and installed + service from the machine.

      +
    • +
    + +

    Please refer to the man page for + cygrunsrv and the Cygwin mailing list for further + details of how services are invoked.

    + +

    Any additional contributions to this document and the Cygwin + support for Apache are highly welcome. Please send them to + Stipe Tolj <tolj@wapme-systems.de>.

    + + + + + diff --git a/htdocs/manual/dns-caveats.html.en b/htdocs/manual/dns-caveats.html.en new file mode 100644 index 00000000000..dd0be45f55e --- /dev/null +++ b/htdocs/manual/dns-caveats.html.en @@ -0,0 +1,217 @@ + + + + + + + Issues Regarding DNS and Apache + + + + + + +

    Issues Regarding DNS and Apache

    + +

    This page could be summarized with the statement: don't + require Apache to use DNS for any parsing of the configuration + files. If Apache has to use DNS to parse the configuration + files then your server may be subject to reliability problems + (it might not boot), or denial and theft of service attacks + (including users able to steal hits from other users).

    + +

    A Simple Example

    + Consider this configuration snippet: + +
    +
    +    <VirtualHost www.abc.dom>
    +    ServerAdmin webgirl@abc.dom
    +    DocumentRoot /www/abc
    +    </VirtualHost>
    +
    +
    + +

    In order for Apache to function properly it absolutely needs + to have two pieces of information about each virtual host: the + ServerName + and at least one IP address that the server responds to. This + example does not include the IP address, so Apache must use DNS + to find the address of www.abc.dom. If for some + reason DNS is not available at the time your server is parsing + its config file, then this virtual host will not be + configured. It won't be able to respond to any hits to + this virtual host (prior to Apache version 1.2 the server would + not even boot).

    + +

    Suppose that www.abc.dom has address 10.0.0.1. + Then consider this configuration snippet:

    + +
    +
    +    <VirtualHost 10.0.0.1>
    +    ServerAdmin webgirl@abc.dom
    +    DocumentRoot /www/abc
    +    </VirtualHost>
    +
    +
    + +

    Now Apache needs to use reverse DNS to find the + ServerName for this virtualhost. If that reverse + lookup fails then it will partially disable the virtualhost + (prior to Apache version 1.2 the server would not even boot). + If the virtual host is name-based then it will effectively be + totally disabled, but if it is IP-based then it will mostly + work. However if Apache should ever have to generate a full URL + for the server which includes the server name then it will fail + to generate a valid URL.

    + +

    Here is a snippet that avoids both of these problems.

    + +
    +
    +    <VirtualHost 10.0.0.1>
    +    ServerName www.abc.dom
    +    ServerAdmin webgirl@abc.dom
    +    DocumentRoot /www/abc
    +    </VirtualHost>
    +
    +
    + +

    Denial of Service

    + +

    There are (at least) two forms that denial of service can + come in. If you are running a version of Apache prior to + version 1.2 then your server will not even boot if one of the + two DNS lookups mentioned above fails for any of your virtual + hosts. In some cases this DNS lookup may not even be under your + control. For example, if abc.dom is one of your + customers and they control their own DNS then they can force + your (pre-1.2) server to fail while booting simply by deleting + the www.abc.dom record.

    + +

    Another form is far more insidious. Consider this + configuration snippet:

    + +
    +
    +    <VirtualHost www.abc.dom>
    +    ServerAdmin webgirl@abc.dom
    +    DocumentRoot /www/abc
    +    </VirtualHost>
    +
    +
    + +
    +
    +    <VirtualHost www.def.dom>
    +    ServerAdmin webguy@def.dom
    +    DocumentRoot /www/def
    +    </VirtualHost>
    +
    +
    + +

    Suppose that you've assigned 10.0.0.1 to + www.abc.dom and 10.0.0.2 to + www.def.dom. Furthermore, suppose that + def.com has control of their own DNS. With this + config you have put def.com into a position where + they can steal all traffic destined to abc.com. To + do so, all they have to do is set www.def.dom to + 10.0.0.1. Since they control their own DNS you can't stop them + from pointing the www.def.com record wherever they + wish.

    + +

    Requests coming in to 10.0.0.1 (including all those where + users typed in URLs of the form + http://www.abc.dom/whatever) will all be served by + the def.com virtual host. To better understand why + this happens requires a more in-depth discussion of how Apache + matches up incoming requests with the virtual host that will + serve it. A rough document describing this is available.

    + +

    The "main server" Address

    + +

    The addition of name-based + virtual host support in Apache 1.1 requires Apache to know + the IP address(es) of the host that httpd is running on. To get + this address it uses either the global ServerName + (if present) or calls the C function gethostname + (which should return the same as typing "hostname" at the + command prompt). Then it performs a DNS lookup on this address. + At present there is no way to avoid this lookup.

    + +

    If you fear that this lookup might fail because your DNS + server is down then you can insert the hostname in + /etc/hosts (where you probably already have it so + that the machine can boot properly). Then ensure that your + machine is configured to use /etc/hosts in the + event that DNS fails. Depending on what OS you are using this + might be accomplished by editing /etc/resolv.conf, + or maybe /etc/nsswitch.conf.

    + +

    If your server doesn't have to perform DNS for any other + reason then you might be able to get away with running Apache + with the HOSTRESORDER environment variable set to + "local". This all depends on what OS and resolver libraries you + are using. It also affects CGIs unless you use mod_env to control the + environment. It's best to consult the man pages or FAQs for + your OS.

    + +

    Tips to Avoid these + problems

    + +
      +
    • use IP addresses in <VirtualHost>
    • + +
    • use IP addresses in Listen
    • + +
    • use IP addresses in BindAddress
    • + +
    • ensure all virtual hosts have an explicit + ServerName
    • + +
    • create a <VirtualHost _default_:*> + server that has no pages to serve
    • +
    + +

    Appendix: Future Directions

    + +

    The situation regarding DNS is highly undesirable. For + Apache 1.2 we've attempted to make the server at least continue + booting in the event of failed DNS, but it might not be the + best we can do. In any event requiring the use of explicit IP + addresses in configuration files is highly undesirable in + today's Internet where renumbering is a necessity.

    + +

    A possible work around to the theft of service attack + described above would be to perform a reverse DNS lookup on the + IP address returned by the forward lookup and compare the two + names. In the event of a mismatch the virtualhost would be + disabled. This would require reverse DNS to be configured + properly (which is something that most admins are familiar with + because of the common use of "double-reverse" DNS lookups by + FTP servers and TCP wrappers).

    + +

    In any event it doesn't seem possible to reliably boot a + virtual-hosted web server when DNS has failed unless IP + addresses are used. Partial solutions such as disabling + portions of the configuration might be worse than not booting + at all depending on what the webserver is supposed to + accomplish.

    + +

    As HTTP/1.1 is deployed and browsers and proxies start + issuing the Host header it will become possible to + avoid the use of IP-based virtual hosts entirely. In this event + a webserver has no requirement to do DNS lookups during + configuration. But as of March 1997 these features have not + been deployed widely enough to be put into use on critical + webservers. +

    + + + diff --git a/htdocs/manual/dns-caveats.html.fr b/htdocs/manual/dns-caveats.html.fr new file mode 100644 index 00000000000..2def7c59d79 --- /dev/null +++ b/htdocs/manual/dns-caveats.html.fr @@ -0,0 +1,269 @@ + + + + + + + + + Apache et le DNS + + + + + + +

    Apache et le DNS

    + +

    Cette page aurait pu être résumée par la + phrase : ne demandez pas à Apache d'utiliser le DNS + pour la lecture des fichiers de configuration. Si Apache + doit utiliser le DNS pour récupérer ses fichiers + de configuration, alors votre serveur peut être sujet + à des problèmes de fiabilité (il peut tout + simplement ne pas démarrer), ou s'ouvrir à des + attaques et des vols d'information (y compris des utilisateurs + qui pourraient "voler" des hits d'autres utilisateurs).

    + +

    Un exemple simple

    + Considérez ce court extrait de code de configuration : + +
    +
    +    <VirtualHost www.abc.dom>
    +    ServerAdmin webgirl@abc.dom
    +    DocumentRoot /www/abc
    +    </VirtualHost>
    +
    +
    + +

    Pour qu'Apache fonctionne correctement, il a absolument + besoin d'au moins deux informations pour chaque hôte + virtuel : le ServerName et + au moins une adresse IP à laquelle ce serveur doit + répondre. Cet exemple ne fait pas apparaître + d'adresse IP ; Apache doit donc utiliser le DNS pour trouver + l'adresse correspondant à www.abc.dom. Si + pour telle ou telle raison, le service de noms de domaines + n'est pas accessible au moment ou le serveur interprète + ses fichiers de configuration, alors cet hôte virtuel + ne pourra pas être configuré. Il ne pourra + donc pas répondre aux requêtes émises vers + cet hôte virtuel (les versions d'Apache + antérieures à la 1.2 n'auraient même pas pu + démarrer).

    + +

    Supposons que le doamine www.abc.dom ait pour + adresse 10.0.0.1. Considérez alors ce nouvel extrait de + code de configuration :

    + +
    +
    +    <VirtualHost 10.0.0.1>
    +    ServerAdmin webgirl@abc.dom
    +    DocumentRoot /www/abc
    +    </VirtualHost>
    +
    +
    + +

    Apache doit alors effectuer une résolution DNS + inverse pour trouver le nom ServerName pour cet + hôte virtuel. Si cette résolution échoue, + alors il devra partiellement désactiver cet hôte + virtuel (les versions d'Apache antérieures à la + 1.2 n'auraient même pas démarré). Si + l'hôte virtuel est basé sur un nom de domaine + alors il sera totalement inhibé, si par contre il se + base sur une adresse IP, alors il tournera probablement. + Cependant, si Apache devait générer une URL + complète pour ce serveur, incluant le nom de domaine, + l'URL produite ne pourrait être correctement + constituée.

    + +

    Voici un extrait qui élimine ces deux + problèmes.

    + +
    +
    +    <VirtualHost 10.0.0.1>
    +    ServerName www.abc.dom
    +    ServerAdmin webgirl@abc.dom
    +    DocumentRoot /www/abc
    +    </VirtualHost>
    +
    +
    + +

    Refus de service

    + +

    Il existe (au moins) deux situations où Apache refuse + de fournir le service. Si vous exécutez une version + antérieure à la version 1.2 d'Apache, votre + serveur ne démarrera même pas si l'une des deux + résolutions DNS mentionnées ci-avant + échoue pour au moins un hôte virtuel. Dans + certains cas, cette résolution peut ne même pas + être sous votre contrôle. Par exemple, si + abc.dom est l'un de vos clients, lequel + contrôle son propre serveur DNS, ce dernier peut forcer + votre serveur Apache (en version antérieure à + 1.2) à s'arrêter au démarrage en supprimant + simplement l'enregistrement du nom + www.abc.dom.

    + +

    Une autre situation est beaucoup plus pernicieuse. + Considérez cet extrait de code de configuration :

    + +
    +
    +    <VirtualHost www.abc.dom>
    +    ServerAdmin webgirl@abc.dom
    +    DocumentRoot /www/abc
    +    </VirtualHost>
    +
    +
    + +
    +
    +    <VirtualHost www.def.dom>
    +    ServerAdmin webguy@def.dom
    +    DocumentRoot /www/def
    +    </VirtualHost>
    +
    +
    + +

    Supposez que vous avez assigné 10.0.0.1 au domaine + www.abc.dom et 10.0.0.2 au domaine + www.def.dom. De plus, supposez que + def.com contrôle son propre service DNS. + Avec la précédente configuration, vous permettez + à def.com de "voler" tout le trafic + destiné à abc.com. Tout ce qu'ils + auraient à faire pour y parvenir est d'assigner + www.def.dom à l'adresse 10.0.0.1. Dans la + mesure où ils contrôlent leur propre DNS, vous ne + pouvez les empêcher de piéger leur enregistrement + de www.def.com.

    + +

    Les requêtes arrivant pour 10.0.0.1 (y compris toutes + celles où les utilisateurs auront tapé une URL de + la forme http://www.abc.dom/qqchose) seront toutes + servies par l'hôte virtuel def.com. Mieux + comprendre comment cela est possible demande une discussion + plus détaillée sur la manière dont Apache + traite des requêtes arrivant pour des hôtes + virtuels. Un premier document descrivant ceci est disponible.

    + +

    L'adresse du "serveur principal"

    + +

    L'addition du support + d'hôtes virtuels basés sur les noms dans + Apache 1.1 nécessite qu'Apache connaisse les adresses IP + de l'hôte sur lequel est exécuté httpd. + Pour obtenir cette adresse, il utilise soit le + ServerName global (si défini) ou appelle la + fonction C gethostname (qui renvoie une + information similaire à celle donnée par la + commande interactive "hostname"). Puis il procède + à une résolution DNS pour cette adresse. + Jusqu'à présent, il n'y a aucun moyen + d'éviter cette résolution.

    + +

    Si vous craignez que cette résolution échoue + parceque votre serveur DNS est arrêté, alors vous + popuvez ajouter le nom d'hôte dans le fichier + /etc/hosts (où il devrait normalement + déjà figurer, ne serait-ce que pour assurer un + démarrage correct de la machine). Vous devrez en outre + vous assurer que votre machine est configurée pour + exploiter le fichier /etc/hosts en cas + d'échec d'une résolution dynamique. Suivant l'OS + que vous utilisez, ceci peut être fait en éditant + le code /etc/resolv.conf, ou peut être + /etc/nsswitch.conf.

    + +

    Si votre machine n'a pas de résolution DNS à + effectuer pour toute autre raison (par exemple parce qu'elle + est isolée), alors vous pourrez néanmoins faire + tourner Apache en initialisant la variable d'environnement + HOSTRESORDER à "local". Tout ceci + dépend de l'OS et des librairies de résolveur que + vous utilisez. Les CGI sont également affectés + sauf si vous utilisez la fonctionnalité mod_env pour + contrôler l'environnement. Il est prudent de consulter + les pages de manuel ou les FAQ spécifiques à + votre OS.

    + +

    Astuces pour éviter ces + problèmes

    + +
      +
    • utilisez des adresses IP dans les sections + <VirtualHost>
    • + +
    • utilisez des adresses IP dans la clause + Listen
    • + +
    • utilisez des adresses IP dans la clause + BindAddress
    • + +
    • assurez vous que tous les hôtes virtuels on un + ServerName
    • + +
    • créez un serveur <VirtualHost + _default_:*> qui ne sert aucune page.
    • +
    + +

    Annexe: Directions futures

    + +

    Cette situation vis-à-vis du DNS est largement + insatisfaisante. Pour Apache 1.2, nous avons travaillé + pour que le serveur puisse continuer à démarrer + dans le cas de l'échec d'une résolution DNS, mais + il est possible que nous puissions en faire plus. Toute + écriture nécessitant l'usage d'adresses IP + explicites dans le fichier de configuration n'est pas + souhaitable dans le contexte Internet actuel où la rotation + d'adresses est une nécessité.

    + +

    Une parade au vol de service serait d'effectuer une + résolution DNS inverse sur l'adresse IP renvoyée + par la résolution directe, et comparer les deux noms. En + cas de non concordance, cet hôte virtuel serait + désactivé. Ceci impliquerait que la + résolution DNS inverse soit correctement + configurée (ce qui reste assez connu des administrateurs + du fait de l'usage commun de la résolution inverse + double par les serveurs FTP et les transposeurs TCP).

    + +

    Dans tous les cas, il ne semble pas possible de garantir la + fiabilité du démarrage d'un serveur web + gérant des hôtes virtuels lorsque la + résolution DNS a échoué, sauf si la + définition de ces hôtes utilise des adresses IP + explicites. Une solution partielle consistant à ignorer + certaines portions du fichier de configuration serait encore + pire que ne pas démarrer du tout, dans certains cas + d'exploitation.

    + +

    Par l'extension de l'usage de HTTP/1.1, les navigateurs et + proxies fournissent de plus en plus souvent l'en-tête + Host, et il deviendra possible d'éviter + totalement la définition d'hôtes virtuels + basés sur des adresses IP. Dans ce cas, un serveur Web + n'aura plus de résolution DNS à effectuer pendant + la configuration. Mais à la date de Mars 1997, ces + fonctionnalités n'ont pas été suffisament + largement déployées pour pouvoir être + exploitées par des serveurs en situation critique. + +

    + + + diff --git a/htdocs/manual/dns-caveats.html.html b/htdocs/manual/dns-caveats.html.html new file mode 100644 index 00000000000..0fd2b2a410b --- /dev/null +++ b/htdocs/manual/dns-caveats.html.html @@ -0,0 +1,4 @@ + + + diff --git a/htdocs/manual/dns-caveats.html.ja.jis b/htdocs/manual/dns-caveats.html.ja.jis new file mode 100644 index 00000000000..bca7830cd00 --- /dev/null +++ b/htdocs/manual/dns-caveats.html.ja.jis @@ -0,0 +1,220 @@ + + + + + + DNS$B$H(BApache$B$K$D$$$F$NLdBj(B + + + + + + +

    DNS $B$H(B Apache $B$K$^$D$o$kCm0U;v9`(B

    + +

    $BK\J8=q$NFbMF$ODNS + $B$r;HMQ$9$kI,MW$,$J$$$h$&$K$7$F2<$5$$(B$B!#(BApache + $B$,@_Dj%U%!%$%k$rFI$_9~$`$H$-$K(B DNS + $B$r;HMQ$9$kI,MW$,$"$k>l9g!"?.Mj@-$NLdBj(B($B5/F0$7$J$$$+$b$7$l$^$;$s(B) + $B$d%5!<%S%95qH]!"EpMQ%"%?%C%/(B($BB>$N%f!<%6$+$i%R%C%H$rEp$`$3$H$r4^$_$^$9(B) + $B$NLdBj$KD>LL$9$k$+$b$7$l$^$;$s!#(B

    + +

    $B4JC1$JNc(B

    + $B$3$N@_DjNc$r9M$($F$_$^$9(B: + +
    +
    +    <VirtualHost www.abc.dom>
    +    ServerAdmin webgirl@abc.dom
    +    DocumentRoot /www/abc
    +    </VirtualHost>
    +
    +
    + +

    Apache $B$,@5>o$K5!G=$9$k$K$O!"%P!<%A%c%k%[%9%H$4$H$KI,$:Fs$D$N(B + $B>pJs$,I,MW$K$J$j$^$9!#$=$l$O!"(B + ServerName + $B$H!"$=$N%5!<%P$,1~Ez$9$k$?$a$N(B IP $B%"%I%l%9(B($B:GDc0l$D(B) $B$G$9!#(B + $B$3$NNc$G$O(B IP $B%"%I%l%9$r4^$s$G$$$^$;$s$N$G!"(BApache $B$O(B DNS + $B$r;HMQ$7$F(B www.abc.dom $B$r8+$D$1$J$1$l$P$J$j$^$;$s!#(B + $B@_Dj%U%!%$%k$rFI$_9~$s$G$$$k$H$-$K2?$i$+$NM}M3$G(B DNS + $B$,MxMQ$G$-$J$+$C$?>l9g!"(B + $B%P!<%A%c%k%[%9%H$O(B$B@_Dj$5$l$^$;$s(B$B!#(B + $B$=$7$F!"$=$N%P!<%A%c%k%[%9%H$KBP$9$k%R%C%H$K$O1~Ez$,$J$5$l$^$;$s(B + (Apache 1.2 $B0JA0$G$O5/F0$9$i$7$^$;$s(B)$B!#(B

    + +

    www.abc.dom $B$N%"%I%l%9$,(B 10.0.0.1 + $B$@$H$7$^$9!#$G$O!" + +

    +
    +    <VirtualHost 10.0.0.1>
    +    ServerAdmin webgirl@abc.dom
    +    DocumentRoot /www/abc
    +    </VirtualHost>
    +
    +
    + +

    $B8=:_(B Apache $B$O(B DNS $B5U0z$-$r;HMQ$7$F$3$N%P!<%A%c%k%[%9%H$N(B + ServerName $B$r8+$D$1$^$9!#(B + $B$=$N5U0z$-$,<:GT$7$?>l9g$OItJ,E*$K%P!<%A%c%k%[%9%H$rL58z$K$7$^$9(B + (Apache 1.2 $B$h$jA0$G$O5/F0$9$i$7$^$;$s(B)$B!#(B + $B%P!<%A%c%k%[%9%H$,L>A0%Y!<%9$G$"$l$P40A4$KL58z$K$J$j$^$9$,!"(B + IP $B%Y!<%9$G$"$l$P35$MF0:n$7$^$9!#$7$+$7$J$,$i!"%5!<%PL>$r4^$`40A4$J(B + URL $B$r@8@.$7$J$1$l$P$J$i$J$$>l9g$O!"@5$7$$(B URL $B$N@8@.$,$G$-$^$;$s!#(B +

    + +

    $Be5-$NLdBj$r2r7h$7$F$$$^$9!#(B

    + +
    +
    +    <VirtualHost 10.0.0.1>
    +    ServerName www.abc.dom
    +    ServerAdmin webgirl@abc.dom
    +    DocumentRoot /www/abc
    +    </VirtualHost>
    +
    +
    + +

    $B%5!<%S%95qH](B

    + +

    $B%5!<%S%95qH]$,5/$3$k>l9g!"(B($B>/$J$/$H$b(B) $BFs$D$N%1!<%9$,$"$j$^$9!#(B + Apache 1.2 $B$h$jA0$rl9g!"%P!<%A%c%k%[%9%H$N$?$a$N(B + $B>e5-$NFs$D$N(B DNS $B8!:w$N$&$A0l$D$G$b<:GT$9$l$P5/F0$9$i$7$^$;$s!#(B + $B$^$?$3$N(B DNS $B8!:w$,<+J,$N@)8f2<$K$9$i$J$$>l9g$b$"$j$($^$9!#(B + $BNc$($P!"(Babc.dom $B$,8\5R$N%5!<%P$N0l$D$G!"(B + DNS $B$O8\5R<+?H$G4IM}$7$F$$$k>l9g!"8\5R$OC1$K(B + www.abc.dom $B%l%3!<%I$r:o=|$9$k$@$1$G!"(B + (1.2 $B$h$jA0$N(B) $B%5!<%P$r5/F0ITG=$K$9$k$3$H$,$G$-$^$9!#(B

    + +

    $B$b$&0l$D$N%1!<%9$O!"$h$j5$IU$-$K$/$$$b$N$G$9!#(B + $B + +

    +
    +    <VirtualHost www.abc.dom>
    +    ServerAdmin webgirl@abc.dom
    +    DocumentRoot /www/abc
    +    </VirtualHost>
    +
    +
    + +
    +
    +    <VirtualHost www.def.dom>
    +    ServerAdmin webguy@def.dom
    +    DocumentRoot /www/def
    +    </VirtualHost>
    +
    +
    + +

    10.0.0.1 $B$r(B www.abc.dom $B$K!"(B10.0.0.2 $B$r(B + www.def.dom $B$K3d$jEv$F$F$$$k$H$7$^$9!#$^$?!"(B + def.com $B$O8\5R<+?H$N(B DNS + $B$N@)8f2<$K$"$k$H$7$^$9!#$3$N@_Dj$G!"(Babc.com + $B$K8~$1$i$l$?%H%i%U%#%C%/$9$Y$F$rC%$&$3$H$,$G$-$k0LCV$K(B + def.com $B$r@_CV$G$-$F$$$^$9!#8e$OC1$K(B + www.def.dom $B$,(B 10.0.0.1 + $B$r;2>H$9$k$h$&$K@_Dj$9$k$@$1$G$9!#(BDNS + $B$O8\5RB&$G%3%s%H%m!<%k$5$l$F$$$k$N$G!"(Bwww.def.com + $B%l%3!<%I$,9%$-$J>l=j$r;X$9$h$&$K@_Dj$9$k$N$r;_$a$k$3$H$,$G$-$^$;$s!#(B +

    + +

    10.0.0.1 $B$KBP$9$k%j%/%(%9%H(B + (http://www.abc.dom/whatever $B7A<0$N(B URL + $B$rF~NO$7$?%f!<%6$+$i$N$b$N$9$Y$F$r4^$_$^$9(B) + $B$O!"(Bdef.dom $B%P!<%A%c%k%[%9%H$G1~Ez$5$l$^$9!#(B + $B$3$N$h$&$J$3$H$,2?8N5/$3$k$+$b$C$H$h$/CN$k$?$a$K$O!"(B + $B1~Ez$NI,MW$J%P!<%A%c%k%[%9%H$X$N%j%/%(%9%H$KBP$7$F!"(B + Apache $B$,$I$N$h$&$K@09g@-$r3NJ]$9$k$+$K$D$$$F!"(B + $B?<$$5DO@$,I,MW$K$J$j$^$9!#$*$*$^$+$J@bL@$O(B$B$3$A$i(B$B$K5-=R$5$l$F$$$^$9!#(B

    + +

    $B!V + +

    Apache 1.1 $B$GDI2C$5$l$?(B + $BL>A0%Y!<%9$N%P!<%A%c%k%[%9%H$N%5%]!<%H(B$B$K$h$j!"(Bhttpd + $B$,F0:n$7$F$$$k%[%9%H$N(B IP $B%"%I%l%9$r!"(BApache + $B$,CN$C$F$$$kI,MW$,$"$j$^$9!#$3$N%"%I%l%9$rF@$k$?$a$K!"(B + ($B$b$7$"$l$P(B)$B%0%m!<%P%k$N(B ServerName $B$d(B C $B$N(B + gethostname $B%U%!%s%/%7%g%s%3!<%k(B + ($B$3$l$O%3%^%s%I%W%m%s%W%H$G(B "hostname" + $B$HBG$A9~$`$N$HF1$87k2L$rJV$7$^$9!#(B) $B$r;HMQ$7$^$9!#(B + $B$=$l$+$i$3$N%"%I%l%9$N(B DNS $B8!:w$r9T$J$$$^$9!#(B + $B8=;~E@$G$O!"$3$N8!:w$N2sHrJ}K!$O2?$b$"$j$^$;$s!#(B

    + +

    DNS $B%5!<%P$N%@%&%s$,860x$G$3$N%k%C%/%"%C%W$,<:GT$9$k$N$r62$l$k>l9g!"(B + /etc/hosts $B$K(B hostname $B$rA^F~$9$k$3$H$,$G$-$^$9!#(B + ($B%^%7%s$,@5>o$K5/F0$G$-$k$h$&$K!"$3$l$O$*$=$i$/4{$KB8:_$7$^$9!#(B) + $B$=$l$+$i!"(BDNS $B$,<:GT$7$?$H$-$K3N/etc/hosts + $B$r;HMQ$9$k$h$&$K@_Dj$7$^$9!#$I$s$J(B OS $B$r;H$C$F$$$k$+$K$h$j$^$9$,!"(B + /etc/resolv.conf $B$d(B /etc/nsswitch.conf + $B$rJT=8$9$k$3$H$K$h$C$F40@.$G$-$^$9!#(B

    + +

    $B$b$7%5!<%P$,B>$NM}M3$K$h$j(B DNS $B$rHOSTRESORDER $B4D6-JQ?t$r(B "local" $B$K@_Dj$7$F(B + $B%k%P%i%$%V%i%j$K0MB8$7$^$9!#(B + $B$3$l$O(B mod_env + $B$r;H$C$F4D6-JQ?t$r@)8f$7$F$$$J$$8B$j!"(BCGI $B$K$b1F6A$7$^$9!#(B + OS $B$N(B man $B%Z!<%8$d(B FAQ $B$r;2>H$9$k$h$&$K$7$F$/$@$5$$!#(B +

    + +

    $B$3$l$i$NLdBj$rHr$1$kHk7m(B

    + + +
      +
    • <VirtualHost> $BCf$K(B IP $B%"%I%l%9$r;H$&(B
    • + +
    • Listen $BCf$K(B IP $B%"%I%l%9$r;H$&(B
    • + +
    • BindAddress $BCf$K(B IP $B%"%I%l%9$r;H$&(B
    • + +
    • $B$9$Y$F$N%P!<%A%c%k%[%9%H$KBP$7L@<(E*$J(B ServerName + $B$r3N + +
    • $B1~Ez$9$k%Z!<%8$N$J$$(B <VirtualHost _default_:*> + $B%5!<%P$r:n@.$9$k(B
    • +
    + +

    $BIUO?!'(B $B>-MhE*$JJ}8~@-(B

    + +

    DNS $B$K4X$7$F!"8=>u$OA4$/59$7$/$"$j$^$;$s!#(BApache 1.2 $B$G!"(B DNS + $B$N%$%Y%s%H$,<:GT$7$F$b>/$J$/$H$b5/F0%W%m%;%9$,B3$/$h$&$K$7$^$7$?$,!"(B + $B$3$l$,:G9b$N2r7hJ}K!$G$O$J$$$G$7$g$&!#%"%I%l%9$N:F3d$jEv$F$,(B + $BI,MWIT2DHr(B $B$H$J$C$F$$$k:#F|$N%$%s%?!<%M%C%H$K$*$$$F$O!"(B + $B@_Dj%U%!%$%k$NCf$GL@<(E*$J(B IP $B%"%I%l%9$rMW5a$9$k;EMM$O!"(B + $BA4$/59$7$/$"$j$^$;$s!#(B +

    + +

    $B>e$G@bL@$7$?%5!<%S%9EpMQ967b$KBP$7$F2DG=$JBP:v$O!"(B + DNS $B$N@50z$-$K$h$jJV$5$l$?(B IP $B%"%I%l%9$+$i(B DNS $B$N5U0z$-$rA0$rHf3S$9$k$3$H$G$9!#0lCW$7$J$$>l9g%P!<%A%c%k%[%9%H$OL58z$K$5$l$^$9!#(B + $B$3$l$K$O!"(BDNS $B$N5U0z$-$,E,@Z$K@_Dj$5$l$F$$$kI,MW$,$"$j$^$9!#(B(DNS + $B$N!VFs=E$N5U0z$-!W$O(B FTP $B%5!<%P$d(B TCP + $B%i%C%Q!<$K$h$j0lHLE*$K;H$o$l$F$$$k$?$a!"(B + $B$[$H$s$I$N4IM} + +

    IP $B%"%I%l%9$,;HMQ$5$l$F$$$J$/$F(B DNS $B$,<:GT$7$?>l9g$O!"(B + $B$I$&$7$F$b%P!<%A%c%k%[%9%H%&%'%V%5!<%P$r?.Mj@-$r3NJ]$7$F(B + $B5/F0$5$;$k$3$H$OIT2DG=$N$h$&$G$9!#@_Dj$N0lIt$rL58z$K$9$k$H$$$&$h$&$J(B + $BItJ,E*$J2r7h$O!"%5!<%P$NL\E*$K$b$h$j$^$9$,(B + $B5/F0$7$J$$$h$j$b0-$$$+$b$7$l$^$;$s!#(B

    + +

    HTTP/1.1 $B$,3+H/$5$l!"%V%i%&%6$d%W%m%-%7$,(B Host + $B%X%C%@$rH/9T$9$k$h$&$K$J$C$?$N$G!"(BIP $B%Y!<%9$N%P!<%A%c%k%[%9%H$r(B + $BA4$/;HMQ$7$J$/$F$b:Q$`$h$&$K$J$k$+$b$7$l$^$;$s!#(B + $B$3$N>l9g!"%&%'%V%5!<%P$O@_DjCf$K(B DNS $B;2>H$r$7$J$/$F$b:Q$_$^$9!#(B + $B$7$+$7(B 1997 $BG/(B 3 $B7n;~E@$N>u67$G$O!"(B + $B>&MQ%l%Y%k$N%&%'%V%5!<%P$G;HMQ$G$-$k$[$I$K$O!"(B + $B$3$l$i$N5!G=$O9-$/3+H/$,?J$s$G$$$^$;$s!#(B + +

    + + + diff --git a/htdocs/manual/dso.html b/htdocs/manual/dso.html new file mode 100644 index 00000000000..ec7f538b4ba --- /dev/null +++ b/htdocs/manual/dso.html @@ -0,0 +1,513 @@ + + + + + + + Apache 1.3 Dynamic Shared Object (DSO) support + + + + +
    + + +
    +

    Apache 1.3
    + Dynamic Shared Object (DSO)
    + Support

    + +
    + Originally written by
    + Ralf S. Engelschall <rse@apache.org>, April 1998 +
    +
    + +

    Background

    + +

    On modern Unix derivatives there exists a nifty mechanism + usually called dynamic linking/loading of Dynamic Shared + Objects (DSO) which provides a way to build a piece of + program code in a special format for loading it at run-time + into the address space of an executable program.

    + +

    This loading can usually be done in two ways: + Automatically by a system program called ld.so + when an executable program is started or manually from within + the executing program via a programmatic system interface to + the Unix loader through the system calls + dlopen()/dlsym().

    + +

    In the first way the DSO's are usually called shared + libraries or DSO libraries and named + libfoo.so or libfoo.so.1.2. They + reside in a system directory (usually /usr/lib) + and the link to the executable program is established at + build-time by specifying -lfoo to the linker + command. This hard-codes library references into the + executable program file so that at start-time the Unix loader + is able to locate libfoo.so in + /usr/lib, in paths hard-coded via linker-options + like -R or in paths configured via the + environment variable LD_LIBRARY_PATH. It then + resolves any (yet unresolved) symbols in the executable + program which are available in the DSO.

    + +

    Symbols in the executable program are usually not + referenced by the DSO (because it's a reusable library of + general code) and hence no further resolving has to be done. + The executable program has no need to do anything on its own + to use the symbols from the DSO because the complete + resolving is done by the Unix loader. (In fact, the code to + invoke ld.so is part of the run-time startup + code which is linked into every executable program which has + been bound non-static). The advantage of dynamic loading of + common library code is obvious: the library code needs to be + stored only once, in a system library like + libc.so, saving disk space for every + program.

    + +

    In the second way the DSO's are usually called shared + objects or DSO files and can be named with an + arbitrary extension (although the canonical name is + foo.so). These files usually stay inside a + program-specific directory and there is no automatically + established link to the executable program where they are + used. Instead the executable program manually loads the DSO + at run-time into its address space via dlopen(). + At this time no resolving of symbols from the DSO for the + executable program is done. But instead the Unix loader + automatically resolves any (yet unresolved) symbols in the + DSO from the set of symbols exported by the executable + program and its already loaded DSO libraries (especially all + symbols from the ubiquitous libc.so). This way + the DSO gets knowledge of the executable program's symbol set + as if it had been statically linked with it in the first + place.

    + +

    Finally, to take advantage of the DSO's API the executable + program has to resolve particular symbols from the DSO via + dlsym() for later use inside dispatch tables + etc. In other words: The executable program has to + manually resolve every symbol it needs to be able to use it. + The advantage of such a mechanism is that optional program + parts need not be loaded (and thus do not spend memory) until + they are needed by the program in question. When required, + these program parts can be loaded dynamically to extend the + base program's functionality.

    + +

    Although this DSO mechanism sounds straightforward there + is at least one difficult step here: The resolving of symbols + from the executable program for the DSO when using a DSO to + extend a program (the second way). Why? Because "reverse + resolving" DSO symbols from the executable program's symbol + set is against the library design (where the library has no + knowledge about the programs it is used by) and is neither + available under all platforms nor standardized. In practice + the executable program's global symbols are often not + re-exported and thus not available for use in a DSO. Finding + a way to force the linker to export all global symbols is the + main problem one has to solve when using DSO for extending a + program at run-time.

    + +

    Windows and NetWare provide similar facilities, although + they are implemented somewhat differently than the + description of Unix DSO throughout this document. In + particular, DSO modules (DLL's and NLM's, respectively) are + built quite differently than their Unix cousins. This + document does not attempt to explore the topic of building + DSO modules on these platforms. The description of mod_so and + its configuration, however, are similar.

    + +

    Practical Usage

    + +

    The shared library approach is the typical one, because it + is what the DSO mechanism was designed for, hence it is used + for nearly all types of libraries the operating system + provides. On the other hand using shared objects for + extending a program is not used by a lot of programs.

    + +

    As of 1998 there are only a few software packages + available which use the DSO mechanism to actually extend + their functionality at run-time: Perl 5 (via its XS mechanism + and the DynaLoader module), Netscape Server, etc. + Starting with version 1.3, Apache joined the crew, because + Apache already uses a module concept to extend its + functionality and internally uses a dispatch-list-based + approach to link external modules into the Apache core + functionality. So, Apache is really predestined for using DSO + to load its modules at run-time.

    + +

    As of Apache 1.3, the configuration system supports two + optional features for taking advantage of the modular DSO + approach: compilation of the Apache core program into a DSO + library for shared usage and compilation of the Apache + modules into DSO files for explicit loading at run-time.

    + +

    Implementation

    + +

    The DSO support for loading individual Apache modules is + based on a module named mod_so.c which has to + be statically compiled into the Apache core. It is the only + module besides http_core.c which cannot be put + into a DSO itself (bootstrapping!). Practically all other + distributed Apache modules can then be placed into a DSO + by individually enabling the DSO build for them via + configure's --enable-shared option + (see top-level INSTALL file) or by changing the + AddModule command in your + src/Configuration into a + SharedModule command (see + src/INSTALL file). After a module is compiled + into a DSO named mod_foo.so you can use mod_so's LoadModule + command in your httpd.conf file to load this + module at server startup or restart.

    + +

    To simplify this creation of DSO files for Apache modules + (especially for third-party modules) a new support program + named apxs (APache + eXtenSion) is available. It can be used to build DSO + based modules outside of the Apache source tree. The + idea is simple: When installing Apache the + configure's make install procedure + installs the Apache C header files and puts the + platform-dependent compiler and linker flags for building DSO + files into the apxs program. This way the user + can use apxs to compile his Apache module + sources without the Apache distribution source tree and + without having to fiddle with the platform-dependent compiler + and linker flags for DSO support.

    + +

    To place the complete Apache core program into a DSO + library (only required on some of the supported platforms to + force the linker to export the apache core symbols -- a + prerequisite for the DSO modularization) the rule + SHARED_CORE has to be enabled via + configure's + --enable-rule=SHARED_CORE option (see top-level + INSTALL file) or by changing the + Rule command in your Configuration + file to Rule SHARED_CORE=yes (see + src/INSTALL file). The Apache core code is then + placed into a DSO library named libhttpd.so. + Because one cannot link a DSO against static libraries on all + platforms, an additional executable program named + libhttpd.ep is created which both binds this + static code and provides a stub for the main() + function. Finally the httpd executable program + itself is replaced by a bootstrapping code which + automatically makes sure the Unix loader is able to load and + start libhttpd.ep by providing the + LD_LIBRARY_PATH to libhttpd.so.

    + +

    Supported Platforms

    + +

    Apache's src/Configure script currently has + only limited but adequate built-in knowledge on how to + compile DSO files, because as already mentioned this is + heavily platform-dependent. Nevertheless all major Unix + platforms are supported. The definitive current state (May + 1999) is this:

    + +
      +
    • + Out-of-the-box supported platforms:
      + (actually tested versions in parenthesis) +
      +o  FreeBSD            (2.1.5, 2.2.x, 3.x, 4.x)
      +o  OpenBSD            (2.x)
      +o  NetBSD             (1.3.1)
      +o  BSDI               (3.x, 4.x)
      +o  Linux              (Debian/1.3.1, RedHat/4.2)
      +o  Solaris            (2.4, 2.5, 2.6, 2.7)
      +o  SunOS              (4.1.3)
      +o  Digital UNIX       (4.0)
      +o  IRIX               (5.3, 6.2)
      +o  HP/UX              (10.20)
      +o  UnixWare           (2.01, 2.1.2)
      +o  SCO                (5.0.4)
      +o  AIX                (3.2, 4.1.5, 4.2, 4.3)
      +o  ReliantUNIX/SINIX  (5.43)
      +o  SVR4               (-)
      +o  Mac OS X Server    (1.0)
      +o  Mac OS             (10.0 preview 1)
      +o  OpenStep/Mach      (4.2)
      +o  DGUX               (??)
      +o  NetWare            (5.1)
      +o  Windows            (95, 98, NT 4.0, 2000)
      +
      +
    • + +
    • + Explicitly unsupported platforms: +
      +o  Ultrix             (no dlopen-style interface under this platform)
      +
      +
    • +
    + +

    Usage Summary

    + +

    To give you an overview of the DSO features of Apache 1.3, + here is a short and concise summary:

    + +
      +
    1. + Placing the Apache core code (all the stuff which usually + forms the httpd binary) into a DSO + libhttpd.so, an executable program + libhttpd.ep and a bootstrapping executable + program httpd (Notice: this is only required + on some of the supported platforms to force the linker to + export the Apache core symbols, which in turn is a + prerequisite for the DSO modularization): + +
        +
      • + Build and install via configure + (preferred): + + + + + +
        +
        +$ ./configure --prefix=/path/to/install
        +              --enable-rule=SHARED_CORE ...
        +$ make install
        +
        +
        +
      • + +
      • + Build and install manually: + + + + + +
        +
        +- Edit src/Configuration:
        +  << Rule SHARED_CORE=default
        +  >> Rule SHARED_CORE=yes
        +  << EXTRA_CFLAGS= 
        +  >> EXTRA_CFLAGS= -DSHARED_CORE_DIR=\"/path/to/install/libexec\"
        +$ make 
        +$ cp src/libhttpd.so* /path/to/install/libexec/
        +$ cp src/libhttpd.ep  /path/to/install/libexec/
        +$ cp src/httpd        /path/to/install/bin/
        +
        +
        +
      • +
      +
    2. + +
    3. + Build and install a distributed Apache module, + say mod_foo.c, into its own DSO + mod_foo.so: + +
        +
      • + Build and install via configure + (preferred): + + + + + +
        +
        +$ ./configure --prefix=/path/to/install
        +        --enable-shared=foo
        +$ make install
        +
        +
        +
      • + +
      • + Build and install manually: + + + + + +
        +
        +- Edit src/Configuration:
        +  << AddModule    modules/xxxx/mod_foo.o
        +  >> SharedModule modules/xxxx/mod_foo.so
        +$ make
        +$ cp src/xxxx/mod_foo.so /path/to/install/libexec
        +- Edit /path/to/install/etc/httpd.conf
        +  >> LoadModule foo_module /path/to/install/libexec/mod_foo.so
        +
        +
        +
      • +
      +
    4. + +
    5. + Build and install a third-party Apache module, + say mod_foo.c, into its own DSO + mod_foo.so + +
        +
      • + Build and install via configure + (preferred): + + + + + +
        +
        +$ ./configure --add-module=/path/to/3rdparty/mod_foo.c 
        +        --enable-shared=foo
        +$ make install
        +
        +
        +
      • + +
      • + Build and install manually: + + + + + +
        +
        +$ cp /path/to/3rdparty/mod_foo.c /path/to/apache-1.3/src/modules/extra/
        +- Edit src/Configuration:
        +  >> SharedModule modules/extra/mod_foo.so
        +$ make
        +$ cp src/xxxx/mod_foo.so /path/to/install/libexec
        +- Edit /path/to/install/etc/httpd.conf
        +  >> LoadModule foo_module /path/to/install/libexec/mod_foo.so
        +
        +
        +
      • +
      +
    6. + +
    7. + Build and install a third-party Apache module, + say mod_foo.c, into its own DSO + mod_foo.so outside of the Apache + source tree: + +
        +
      • + Build and install via apxs: + + + + + +
        +
        +$ cd /path/to/3rdparty
        +$ apxs -c mod_foo.c
        +$ apxs -i -a -n foo mod_foo.so
        +
        +
        +
      • +
      +
    8. +
    + +

    Advantages & Disadvantages

    + +

    The above DSO based features of Apache 1.3 have the + following advantages:

    + +
      +
    • The server package is more flexible at run-time because + the actual server process can be assembled at run-time via + LoadModule + httpd.conf configuration commands instead of + Configuration AddModule commands + at build-time. For instance this way one is able to run + different server instances (standard & SSL version, + minimalistic & powered up version [mod_perl, PHP3], + etc.) with only one Apache installation.
    • + +
    • The server package can be easily extended with + third-party modules even after installation. This is at + least a great benefit for vendor package maintainers who + can create a Apache core package and additional packages + containing extensions like PHP3, mod_perl, mod_fastcgi, + etc.
    • + +
    • Easier Apache module prototyping because with the + DSO/apxs pair you can both work outside the + Apache source tree and only need an apxs -i + command followed by an apachectl restart to + bring a new version of your currently developed module into + the running Apache server.
    • +
    + +

    DSO has the following disadvantages:

    + +
      +
    • The DSO mechanism cannot be used on every platform + because not all operating systems support dynamic loading + of code into the address space of a program.
    • + +
    • The server is approximately 20% slower at startup time + because of the symbol resolving overhead the Unix loader + now has to do.
    • + +
    • The server is approximately 5% slower at execution time + under some platforms because position independent code + (PIC) sometimes needs complicated assembler tricks for + relative addressing which are not necessarily as fast as + absolute addressing.
    • + +
    • Because DSO modules cannot be linked against other + DSO-based libraries (ld -lfoo) on all + platforms (for instance a.out-based platforms usually don't + provide this functionality while ELF-based platforms do) + you cannot use the DSO mechanism for all types of modules. + Or in other words, modules compiled as DSO files are + restricted to only use symbols from the Apache core, from + the C library (libc) and all other dynamic or + static libraries used by the Apache core, or from static + library archives (libfoo.a) containing + position independent code. The only chances to use other + code is to either make sure the Apache core itself already + contains a reference to it, loading the code yourself via + dlopen() or enabling the + SHARED_CHAIN rule while building Apache when + your platform supports linking DSO files against DSO + libraries.
    • + +
    • Under some platforms (many SVR4 systems) there is no + way to force the linker to export all global symbols for + use in DSO's when linking the Apache httpd executable + program. But without the visibility of the Apache core + symbols no standard Apache module could be used as a DSO. + The only chance here is to use the SHARED_CORE + feature because this way the global symbols are forced to + be exported. As a consequence the Apache + src/Configure script automatically enforces + SHARED_CORE on these platforms when DSO + features are used in the Configuration file or + on the configure command line.
    • +
    + +
    + + + diff --git a/htdocs/manual/ebcdic.html b/htdocs/manual/ebcdic.html new file mode 100644 index 00000000000..7318f9f76ad --- /dev/null +++ b/htdocs/manual/ebcdic.html @@ -0,0 +1,364 @@ + + + + + + + The Apache EBCDIC Port + + + + + + +

    Overview of the Apache EBCDIC Port

    + +

    As of Version 1.3, the Apache HTTP Server includes a port to + (non-ASCII) mainframe machines which use the EBCDIC character + set as their native codeset.
    + (Initially, that support covered only the Fujitsu-Siemens + family of mainframes running the + BS2000/OSD operating system, a mainframe OS which features + a SVR4-derived POSIX subsystem. Later, the two IBM mainframe + operating systems TPF and OS/390 were added).

    +
    + +

    EBCDIC-related + conversion functions

    + The EBCDIC related directives EBCDICConvert, EBCDICConvertByType, + and EBCDICKludge are + available only if the platform's character set is EBCDIC + (This is currently only the case on Fujitsu-Siemens' BS2000/OSD + and IBM's OS/390 and TPF operating systems). EBCDIC stands for + Extended Binary-Coded-Decimal Interchange Code and is + the codeset used on mainframe machines, in contrast to ASCII + which is ubiquitous on almost all micro computers today. ASCII + (or its extension latin1) is the basis for the HTTP + transfer protocol, therefore all EBCDIC-based platforms need a + way to configure the code set conversion rules required between + the EBCDIC based mainframe host and the HTTP socket + protocol.
    + + +

    On an EBCDIC based system, HTML files and other text files + are usually saved encoded in the native EBCDIC code set, while + image files and other binary data are stored with identical + encoding as on ASCII based machines. When the Apache server + accesses documents, it must therefore make a distinction + between text files (to be converted to/from ASCII, depending on + the transfer direction) and binary files (to be delivered + unconverted). Such a distinction can be made based on the + assigned MIME type, or based on the file extension + (i.e., files sharing a common file suffix).

    + +

    By default, the configuration is symmetric for input and + output (i.e., when a PUT request is executed for a + document which was returned by a previous GET request, then the + resulting uploaded copy should be identical to the original + file). However, the conversion directives allow for specifying + different conversions for input and output.

    + +

    The directives EBCDICConvert and EBCDICConvertByType + are used to assign the conversion setting (On or Off) based on + file extensions or MIME types. Each configuration setting can + be defined for input only (e.g., PUT method), output + only (e.g., GET method), or both input and output. By + default, the conversion setting is applied for input and + output.

    + +

    Note that after modifying the conversion settings for a + group of files, it is not sufficient to restart the server. The + reason for this is the fact that a cached copy of a document + (in a browser or proxy cache) will not get revalidated by + contents, but only by date. Since the modification time of the + document did not change, browsers will assume they can reuse + the cached copy.
    + To recover from this situation, you must either clear all + cached copies (browser and proxy cache!), or update the + modification time of the documents (using the + touch command on the server).

    + +

    Note also that server-parsed documents (CGI scripts, .shtml + files, and other interpreted files like PHP scripts etc.) are + not subject to any input conversion and must therefore be + stored in EBCDIC form on the server side.

    + +

    In absense of any EBCDICConvertByType + directive, and if no matching EBCDICConvert was found, + Apache falls back to an internal heuristic which assumes that + all documents with MIME types starting with + "text/", "message/" or + "multipart/" as well as the MIME type + "application/x-www-form-urlencoded" are text + documents stored in EBCDIC, whereas all other documents are + binary files.

    + +

    In order to provide backward compatibility with older + versions of apache, the EBCDICKludge directive + allows for a less powerful mechanism to control the conversion + of documents to and from EBCDIC.

    + +

    Note:

    + +
    + The EBCDICKludge directive is deprecated, since its + functionality is superseded by the more powerful EBCDICConvert and EBCDICConvertByType + directives. +
    +
    +
    + + +

    The directives are applied in the following order:

    + +
      +
    1. First, the configured EBCDICConvert + directives in the current context are evaluated in + configuration file order. As soon as a matching file + extension is found, the search stops and the configured + conversion is applied.
      + EBCDICConvert settings inherited from parent directories are + tested after the more specific (deeper) directory + levels.
    2. + +
    3. If the EBCDICKludge is in + effect, the next step tests for a MIME type of the format + type/x-ascii-subtype. If + the document has such a type, then the + "x-ascii-" substring is removed and the + conversion set to Off.
    4. + +
    5. In the next step, the configured EBCDICConvertByType + directives are evaluated in configuration file order. If the + document has a matching MIME type, the search stops and the + configured conversion is applied.
      + EBCDICConvertByType settings inherited from parent + directories are tested after the more specific (deeper) + directory levels.
      + If no EBCDICConvertByType + directive at all exists in the current context, the server + falls back to the simple heuristics which assume that MIME + types starting with "text/", "message/" or "multipart/" (plus + the special type "application/x-www-form-urlencoded" used in + simple POST requests) imply a conversion, while all the rest + is delivered unconverted (i.e., binary).
    6. +
    +
    +
    + +
    + +

    Technical + Details

    + +

    Since all Apache input and output is based upon the BUFF + data type and its methods, the easiest solution was to add the + actual conversion to the BUFF handling routines. The conversion + must be settable at any time, so BUFF flags were added which + define whether a BUFF object has currently enabled conversion + or not. Two such flags exist: one for data read from the client + (ASCII to EBCDIC conversion) and one for data returned to the + client (EBCDIC to ASCII conversion).

    + +

    During sending of the header, Apache determines (based on + the returned MIME type for the request) whether conversion + should be used or the document returned unconverted. It uses + this decision to initialize the BUFF flag when the response + output begins. Modules should therefore determine the MIME type + for the current request before initiating the response by + calling ap_send_http_headers().

    + +

    The BUFF flag is modified at several points in the HTTP + protocol:

    + +
      +
    • set (In and Out) before a request is + received (because the request and the request header lines + are always in ASCII format)
    • + +
    • set/unset (for Input data) when the + request body is received - depending on the content type of + the request body (because the request body may contain ASCII + text or a binary file)
    • + +
    • set (for returned Output) before a + response header is sent (because the response header lines + are always in ASCII format)
    • + +
    • set/unset (for returned Output) when the + response body is sent - depending on the content type of the + response body (because the response body may contain text or + a binary file)
    • +
    + Additional transparent transitions may occur for + extracting/inserting the HTTP/1.1 chunking information + from/into the input/output body data stream, and for generating + multipart headers for range requests. (See + RFC2616 and src/main/http_protocol.c for details.) +
    + +

    Porting + Notes

    + +
      +
    1. + The relevant changes in the source are #ifdef'ed into two + categories: + +
      +
      #ifdef + CHARSET_EBCDIC
      + +
      Code which is needed for any EBCDIC based machine. + This includes character translations, differences in + contiguity of the two character sets, flags which + indicate which part of the HTTP protocol has to be + converted and which part doesn't etc.
      + +
      #ifdef _OSD_POSIX | TPF | + OS390
      + +
      Code which is needed for the Fujitsu-Siemens + BS2000/OSD | IBM TPF | IBM OS390 mainframe platforms + only. This deals with include file differences and socket + and fork implementation topics which are only required on + the respective platform.
      +
      +
      +
    2. + +
    3. The possibility to translate between ASCII and EBCDIC at + the socket level (on BS2000 POSIX, there is a socket option + which supports this) was intentionally not chosen, + because the byte stream at the HTTP protocol level consists + of a mixture of protocol related strings and non-protocol + related raw file data. HTTP protocol strings are always + encoded in ASCII (the GET request, any Header: lines, the + chunking information etc.) whereas the file transfer + parts (i.e., GIF images, CGI output etc.) + should usually be just "passed through" by the server. This + separation between "protocol string" and "raw data" is + reflected in the server code by functions like bgets() or + rvputs() for strings, and functions like bwrite() for binary + data. A global translation of everything would therefore be + inadequate.
      + (In the case of text files of course, provisions must be + made so that EBCDIC documents are always served in + ASCII)
      + This port therefore features a built-in protocol level + conversion for the server-internal strings (which the + compiler translated to EBCDIC strings) and thus for all + server-generated documents.
      +
    4. + +
    5. By examining the call hierarchy for the BUFF management + routines, I added an "ebcdic/ascii conversion layer" which + would be crossed on every puts/write/get/gets, and conversion + flags which allowed enabling/disabling the conversions + on-the-fly. Usually, a document crosses this layer twice from + its origin source (a file or CGI output) to its destination + (the requesting client): file -> Apache, and + Apache -> client.
      + The server can now read the header lines of a CGI-script + output in EBCDIC format, and then find out that the remainder + of the script's output is in ASCII (like in the case of the + output of a WWW Counter program: the document body contains a + GIF image). All header processing is done in the native + EBCDIC format; the server then determines, based on the type + of document being served, whether the document body (except + for the chunking information, of course) is in ASCII already + or must be converted from EBCDIC.
      +
    6. + +
    7. + By default, Apache assumes that documents with the MIME + types "text/*", "message/*", "multipart/*" and + "application/x-www-form-urlencoded" are text documents and + are stored as EBCDIC files, whereas all other files are + binary files (and stored in a byte-identical encoding as on + an ASCII machine).
      + These defaults can be overridden on a by-MIME-type + and/or by-file-extension + basis, using the directives +
      +     EBCDICConvertByType {On|Off}[={In|Out|InOut}] mimetype [...]
      +     EBCDICConvert       {On|Off}[={In|Out|InOut}] fileext [...]
      +   
      +
      + where the mimetype argument may contain + wildcards.
      +
    8. + +
    9. Before adding the flexible conversion, non-text documents + were always served "binary" without conversion. This seemed + to be the most sensible choice for, .e.g., + GIF/ZIP/AU file types (It of course requires the user to copy + them to the mainframe host using the "rcp -b" binary switch), + but proved to be inadequate for MIME types like + model/vrml, application/postscript + and application/x-javascript.
      +
    10. + +
    11. Server parsed files are always assumed to be in native + (i.e., EBCDIC) format as used on the machine + (because they do not cross the conversion layer when being + read), and are converted after processing.
      +
    12. + +
    13. For CGI output, the CGI script determines whether a + conversion is needed or not: by setting the appropriate + Content-Type, text files can be converted, or GIF output can + be passed through unmodified (depending on the conversion + configured in the script's context).
      +
    14. +
    +
    + +

    Document Storage + Notes

    + +

    Binary Files

    + +

    When exchanging binary files between the mainframe host and + a Unix machine or Windows PC, be sure to use the ftp "binary" + (TYPE I) command, or use the + rcp -b command from the mainframe host (the + -b switch is not supported in unix rcp's).

    + +

    Text Documents

    + +

    The default assumption of the server is that Text Files + (i.e., all files whose Content-Type: + starts with text/) are stored in the native + character set of the host, EBCDIC.

    + +

    Server Side Included Documents

    + +

    SSI documents must currently be stored in EBCDIC only. No + provision is made to convert them from ASCII before processing. + The same holds for other interpreted languages, like mod_perl + or mod_php.

    + + + + diff --git a/htdocs/manual/env.html.en b/htdocs/manual/env.html.en new file mode 100644 index 00000000000..a96e002c01d --- /dev/null +++ b/htdocs/manual/env.html.en @@ -0,0 +1,347 @@ + + + + + + + Environment Variables in Apache + + + + + + +

    Environment Variables in Apache

    + +

    The Apache HTTP Server provides a mechanism for storing + information in named variables that are called environment + variables. This information can be used to control various + operations such as logging or access control. The variables are + also used as a mechanism to communicate with external programs + such as CGI scripts. This document discusses different ways to + manipulate and use these variables.

    + +

    Although these variables are referred to as environment + variables, they are not the same as the environment + variables controlled by the underlying operating system. + Instead, these variables are stored and manipulated in an + internal Apache structure. They only become actual operating + system environment variables when they are provided to CGI + scripts and Server Side Include scripts. If you wish to + manipulate the operating system environment under which the + server itself runs, you must use the standard environment + manipulation mechanisms provided by your operating system + shell.

    + + +
    + +

    Setting Environment + Variables

    + + + + + + + +
    Related Modules
    +
    + mod_env
    + mod_rewrite
    + mod_setenvif
    + mod_unique_id
    +
    Related Directives
    +
    + BrowserMatch
    + BrowserMatchNoCase
    + PassEnv
    + RewriteRule
    + SetEnv
    + SetEnvIf
    + SetEnvIfNoCase
    + UnsetEnv
    +
    + +

    Basic Environment Manipulation

    + +

    The most basic way to set an environment variable in Apache + is using the unconditional SetEnv directive. + Variables may also be passed from the environment of the shell + which started the server using the PassEnv + directive.

    + +

    Conditional Per-Request Settings

    + +

    For additional flexibility, the directives provided by + mod_setenvif allow environment variables to be set on a + per-request basis, conditional on characteristics of particular + requests. For example, a variable could be set only when a + specific browser (User-Agent) is making a request, or only when + a specific Referer [sic] header is found. Even more flexibility + is available through the mod_rewrite's RewriteRule + which uses the [E=...] option to set environment + variables.

    + +

    Unique Identifiers

    + +

    Finally, mod_unique_id sets the environment variable + UNIQUE_ID for each request to a value which is + guaranteed to be unique across "all" requests under very + specific conditions.

    + +

    Standard CGI Variables

    + +

    In addition to all environment variables set within the + Apache configuration and passed from the shell, CGI scripts and + SSI pages are provided with a set of environment variables + containing meta-information about the request as required by + the CGI specification.

    + +

    Some Caveats

    + +
      +
    • It is not possible to override or change the standard CGI + variables using the environment manipulation directives.
    • + +
    • When suexec is used to launch + CGI scripts, the environment will be cleaned down to a set of + safe variables before CGI scripts are launched. The + list of safe variables is defined at compile-time in + suexec.c.
    • + +
    • For portability reasons, the names of environment + variables may contain only letters, numbers, and the + underscore character. In addition, the first character may + not be a number. Characters which do not match this + restriction will be replaced by an underscore when passed to + CGI scripts and SSI pages.
    • +
    +
    + +

    Using Environment + Variables

    + + + + + + + +
    Related Modules
    +
    + mod_access
    + mod_cgi
    + mod_include
    + mod_log_config
    + mod_rewrite
    +
    Related Directives
    +
    + Allow
    + CustomLog
    + Deny
    + LogFormat
    + RewriteCond
    + RewriteRule
    +
    + +

    CGI Scripts

    + +

    One of the primary uses of environment variables is to + communicate information to CGI scripts. As discussed above, the + environment passed to CGI scripts includes standard + meta-information about the request in addition to any variables + set within the Apache configuration. For more details, see the + CGI tutorial.

    + +

    SSI Pages

    + +

    Server-parsed (SSI) documents processed by mod_include's + server-parsed handler can print environment + variables using the echo element, and can use + environment variables in flow control elements to makes parts + of a page conditional on characteristics of a request. Apache + also provides SSI pages with the standard CGI environment + variables as discussed above. For more details, see the SSI tutorial.

    + +

    Access Control

    + +

    Access to the server can be controlled based on the value of + environment variables using the allow from env= + and deny from env= directives. In combination with + SetEnvIf, this allows for flexible control of + access to the server based on characteristics of the client. + For example, you can use these directives to deny access to a + particular browser (User-Agent).

    + +

    Conditional Logging

    + +

    Environment variables can be logged in the access log using + the LogFormat option %e. In addition, + the decision on whether or not to log requests can be made + based on the status of environment variables using the + conditional form of the CustomLog directive. In + combination with SetEnvIf this allows for flexible + control of which requests are logged. For example, you can + choose not to log requests for filenames ending in + gif, or you can choose to only log requests from + clients which are outside your subnet.

    + +

    URL Rewriting

    + +

    The %{ENV:...} form of TestString in + the RewriteCond allows mod_rewrite's rewrite + engine to make decisions conditional on environment variables. + Note that the variables accessible in mod_rewrite without the + ENV: prefix are not actually environment + variables. Rather, they are variables special to mod_rewrite + which cannot be accessed from other modules.

    +
    + +

    Special Purpose Environment + Variables

    + +

    Interoperability problems have led to the introduction of + mechanisms to modify the way Apache behaves when talking to + particular clients. To make these mechanisms as flexible as + possible, they are invoked by defining environment variables, + typically with BrowserMatch, + though SetEnv and PassEnv could also be used, + for example.

    + +

    downgrade-1.0

    + +

    This forces the request to be treated as a HTTP/1.0 request + even if it was in a later dialect.

    + +

    force-no-vary

    + +

    This causes any Vary fields to be removed from + the response header before it is sent back to the client. Some + clients don't interpret this field correctly (see the known client + problems page); setting this variable can work around this + problem. Setting this variable also implies + force-response-1.0.

    + +

    force-response-1.0

    + +

    This forces an HTTP/1.0 response when set. It was originally + implemented as a result of a problem with AOL's proxies. Some + clients may not behave correctly when given an HTTP/1.1 + response, and this can be used to interoperate with them.

    + +

    nokeepalive

    + +

    This disables KeepAlive when set.

    + +

    suppress-error-charset

    +

    Available in versions after 1.3.26 and 2.0.40

    +

    When Apache issues a redirect in response to a client request, + the response includes some actual text to be displayed in case + the client can't (or doesn't) automatically follow the redirection. + Apache ordinarily labels this text according to the character set + which it uses, which is ISO-8859-1.

    +

    However, if the redirection is to a page that uses a different + character set, some broken browser versions will try to use the + character set from the redirection text rather than the actual page. + This can result in Greek, for instance, being incorrectly rendered.

    +

    Setting this environment variable causes Apache to omit the character + set for the redirection text, and these broken browsers will then correctly + use that of the destination page.

    +
    + +

    Examples

    + +

    Changing protocol behavior with misbehaving clients

    + +

    We recommend that the following lines be included in + httpd.conf to deal with known client problems.

    +
    +#
    +# The following directives modify normal HTTP response behavior.
    +# The first directive disables keepalive for Netscape 2.x and browsers that
    +# spoof it. There are known problems with these browser implementations.
    +# The second directive is for Microsoft Internet Explorer 4.0b2
    +# which has a broken HTTP/1.1 implementation and does not properly
    +# support keepalive when it is used on 301 or 302 (redirect) responses.
    +#
    +BrowserMatch "Mozilla/2" nokeepalive
    +BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
    +
    +#
    +# The following directive disables HTTP/1.1 responses to browsers which
    +# are in violation of the HTTP/1.0 spec by not being able to grok a
    +# basic 1.1 response.
    +#
    +BrowserMatch "RealPlayer 4\.0" force-response-1.0
    +BrowserMatch "Java/1\.0" force-response-1.0
    +BrowserMatch "JDK/1\.0" force-response-1.0
    +
    + +

    Do not log requests for images in the access log

    + +

    This example keeps requests for images from appearing in the + access log. It can be easily modified to prevent logging of + particular directories, or to prevent logging of requests + coming from particular hosts.

    +
    +    SetEnvIf Request_URI \.gif image-request
    +    SetEnvIf Request_URI \.jpg image-request
    +    SetEnvIf Request_URI \.png image-request
    +    CustomLog logs/access_log env=!image-request
    +
    + +

    Prevent "Image Theft"

    + +

    This example shows how to keep people not on your server + from using images on your server as inline-images on their + pages. This is not a recommended configuration, but it can work + in limited circumstances. We assume that all your images are in + a directory called /web/images.

    +
    +    SetEnvIf Referer "^http://www.example.com/" local_referal
    +    # Allow browsers that do not send Referer info
    +    SetEnvIf Referer "^$" local_referal
    +    <Directory /web/images>
    +       Order Deny,Allow
    +       Deny from all
    +       Allow from env=local_referal
    +    </Directory>
    +
    + +

    Note: spelling of 'referer' and 'referal' is + intentional.

    + +

    For more information about this technique, see the + ApacheToday tutorial " + Keeping Your Images from Adorning Other Sites".

    + + + + diff --git a/htdocs/manual/env.html.html b/htdocs/manual/env.html.html new file mode 100644 index 00000000000..60f90431db7 --- /dev/null +++ b/htdocs/manual/env.html.html @@ -0,0 +1,4 @@ + + + diff --git a/htdocs/manual/env.html.ja.jis b/htdocs/manual/env.html.ja.jis new file mode 100644 index 00000000000..e1d163429ee --- /dev/null +++ b/htdocs/manual/env.html.ja.jis @@ -0,0 +1,342 @@ + + + + + + + + Apache $B$N4D6-JQ?t(B + + + + + + +

    Apache $B$K$*$1$k4D6-JQ?t(B

    + +

    Apache HTTP $B%5!<%P$O(B$B4D6-JQ?t(B$B$H8F$P$l$k!"L>A0$N$D$$$?(B + $BJQ?t$K>pJs$r5-21$9$k;EAH$_$rDs6!$7$F$$$^$9!#$3$N>pJs$O%m%0<}=8$d(B + $B%"%/%;%9@)8f$J$I$N$$$m$$$m$JA`:n$r@)8f$9$k$?$a$K;H$&$3$H$,$G$-$^$9!#(B + $B$3$l$i$NJQ?t$O(B CGI $B%9%/%j%W%H$J$I$N30It%W%m%0%i%`$HDL?.$9$k$?$a$K$b(B + $B;H$o$l$^$9!#$3$NJ8=q$O$=$l$i$NJQ?t$NA`:nJ}K!$H;HMQJ}K!$r$$$/$D$+(B + $B>R2p$7$^$9!#(B

    + + +

    $B$3$l$i$NJQ?t$O(B$B4D6-JQ?t(B$B$H8F$P$l$F$$$^$9$,!"%*%Z%l!<%F%#%s%0(B + $B%7%9%F%`$K$h$C$F@)8f$5$l$F$$$k4D6-JQ?t$HF1$8$G$O$"$j$^$;$s!#(B + $Bl9g$O!"(B + $B%*%Z%l!<%F%#%s%0%7%9%F%`$N%7%'%k$,Ds6!$7$F$$$kI8=`$N4D6-JQ?t$N(B + $BA`:nJ}K!$r;H$o$J$1$l$P$J$j$^$;$s!#(B

    + + +
    + +

    $B4D6-JQ?t$N@_Dj(B

    + + + + + + + + +
    $B4XO"%b%8%e!<%k(B
    +
    + mod_env
    + mod_rewrite
    + mod_setenvif
    + mod_unique_id
    +
    $B4XO"%G%#%l%/%F%#%V(B
    +
    + BrowserMatch
    + BrowserMatchNoCase
    + PassEnv
    + RewriteRule
    + SetEnv
    + SetEnvIf
    + SetEnvIfNoCase
    + UnsetEnv
    +
    + +

    $B4pK\E*$J4D6-$NA`:n(B

    + +

    Apache $B$K$*$$$F4D6-JQ?t$r@_Dj$9$k0lHV4pK\E*$JJ}K!$O!"(B + $BL5>r7o$K4D6-JQ?t$r@_Dj$9$k(B SetEnv + $B%G%#%l%/%F%#%V$r;HMQ$9$k$3$H$G$9!#(B PassEnv + $B%G%#%l%/%F%#%V$K$h$j!"(BApache $B$,5/F0$5$l$?%7%'%k$N(B + $B4D6-JQ?t$rEO$9$3$H$b$G$-$^$9!#(B

    + +

    $B%j%/%(%9%HKh$K>r7o$K4p$E$$$F@_Dj$9$k(B

    + +

    $B$h$j=@Fp@-$r9b$a$k$?$a$K!"(Bmod_setenvif + $B$GDs6!$5$l$F$$$k%G%#%l%/%F%#%V$r;HMQ$9$k$3$H$G!"%j%/%(%9%H$N(B + $BFC@-$K4p$E$$$F4D6-JQ?t$r@_Dj$9$k$3$H$,$G$-$^$9!#Nc$($P!"FCDj$N%V%i%&%6(B + (User-Agent) $B$N%j%/%(%9%H$dFCDj$N(B Referer [$B0U?^E*$JDV$j$G$9(B] + ($BLuCm(B: $B@5$7$$DV$j$O(B referrer $B$G$9$,!"(BHTTP $B$N;EMM$G$O(B Referer + $B$H$J$C$F$$$^$9(B) $B%X%C%@$,8+$D$+$C$?$H$-$N$_JQ?t$r@_Dj$9$k$3$H$,$G$-$^$9!#(B + mod_rewrite $B$N(B RewriteRule $B%G%#%l%/%F%#%V$K$*$$$F(B + $B4D6-JQ?t$r@_Dj$9$k(B [E=...] $B%*%W%7%g%s$r;HMQ$9$k$3$H$G!"(B + $B$h$j=@Fp$J@_Dj$r9T$J$&$3$H$,$G$-$^$9!#(B

    + +

    $B0l0U$J<1JL;R(B

    + +

    mod_unique_id $B$O!"Hs>o$K8B$i$l$?>r7o$N2<$G(B + $B!V$9$Y$F!W$N%j%/%(%9%H$K$D$$$F!"0l0U$G$"$k$3$H$,J]>Z$5$l$F$$$kCM$r4D6-JQ?t(B + UNIQUE_ID $B$K@_Dj$7$^$9!#(B +

    + +

    $BI8=`(B CGI $BJQ?t(B

    + +

    Apache $B$N@_Dj%U%!%$%k$G@_Dj$5$l$?4D6-JQ?t$H%7%'%k$+$iEO$5$l$k(B + $B4D6-JQ?t$K2C$($F!"(BCGI $B%9%/%j%W%H$H(B SSI $B%Z!<%8$K$O(B CGI $B$N;EMM(B$B$GMW5a$5$l$F$$$k!"(B + $B%j%/%(%9%H$N%a%?>pJs$r;}$C$?4D6-JQ?t$NAH$,Ds6!$5$l$^$9!#(B +

    + +

    $B$$$/$D$+$NCm0U(B

    + +
      +
    • $B4D6-$rA`:n$9$k%G%#%l%/%F%#%V$r;H$C$FI8=`(B CGI + $BJQ?t$r>e=q$-$7$?$jJQ99$7$?$j$9$k$3$H$O$G$-$^$;$s!#(B
    • + +
    • CGI $B%9%/%j%W%H$r5/F0$9$k$?$a$K(B suexec + $B$,;HMQ$5$l$F$$$k>l9g!"(BCGI $B%9%/%j%W%H$,5/F0$9$k$?$a$K!"4D6-JQ?t$O(B$B0BA4(B$B$J4D6-JQ?t$NAH$K@0M}$5$l$^$9!#(B + $B$3$N0BA4$J4D6-JQ?t$N=89g$O!"%3%s%Q%$%k;~$K(B suexec.c + $B$GDj5A$5$l$^$9!#(B
    • + +
    • $B0\?"@-$N$?$a$K!"4D6-JQ?t$NL>A0$O%"%k%U%!%Y%C%H!"(B + $B?t;z$H%"%s%@!<%9%3%"(B ($BLuCm(B: '_') $B$@$1$+$i@.$j$^$9!#(B + $B$5$i$K!":G=i$NJ8;z$O?t;z$G$"$C$F$O$$$1$^$;$s!#(B + $B$3$N@)8B$K9g$o$J$$J8;z$O(B CGI $B%9%/%j%W%H$H(B SSI + $B%Z!<%8$KEO$5$l$k$H$-$K%"%s%@!<%9%3%"$KCV49$5$l$^$9!#(B +
    • +
    +
    + +

    $B4D6-JQ?t$N;HMQ(B

    + + + + + + + + +
    $B4XO"%b%8%e!<%k(B
    +
    + mod_access
    + mod_cgi
    + mod_include
    + mod_log_config
    + mod_rewrite
    +
    $B4XO"%G%#%l%/%F%#%V(B
    +
    + Allow
    + CustomLog
    + Deny
    + LogFormat
    + RewriteCond
    + RewriteRule
    +
    + +

    CGI $B%9%/%j%W%H(B

    + +

    $B4D6-JQ?t$NpJs$rEA$($k$3$H$G$9!#(B + $B>e$G@bL@$5$l$F$$$k$h$&$K!"(BCGI $B%9%/%j%W%H$KEO$5$l$k4D6-JQ?t$O(B Apache + $B$N@_Dj$K$h$j@_Dj$5$l$kJQ?t$K2C$($F!"%j%/%(%9%H$NI8=`$N%a%?>pJs$r4^$s$G$$$^$9!#(B + $B>\:Y$O(B CGI $B%A%e!<%H%j%"%k(B $B$r;2>H$7$F$/$@$5$$!#(B +

    + + +

    SSI $B%Z!<%8(B

    + +

    + mod_include $B$N(B server-parsed $B%O%s%I%i$G=hM}$5$l$k(B + server-parsed (SSI) $B%I%-%e%a%s%H$G$O!"(Becho + $BMWAG$r;HMQ$9$k$H4D6-JQ?t$,=PNO$5$l$^$9!#(B + $B$^$?!"%Z!<%8$N$"$kItJ,$,%j%/%(%9%H$N@-\:Y$O(B + SSI $B%A%e!<%H%j%"%k(B $B$r;2>H$7$F$/$@$5$$!#(B +

    + +

    $B%"%/%;%9@)8f(B

    + +

    allow from env= $B%G%#%l%/%F%#%V$H(B deny from env= + $B%G%#%l%/%F%#%V$r;HMQ$7$F!"%5!<%P$X$N%"%/%;%9$r4D6-JQ?t$NCM$G@)8f$9$k$3$H$,$G$-$^$9!#(B + SetEnvIf $B%G%#%l%/%F%#%V$HAH$_9g$o$;$k$3$H$G!"%/%i%$%"%s%H$NFC@-$K4p$E$$$F(B + $B%5!<%P$X$N%"%/%;%9@)8f$r=@Fp$K9T$J$&$3$H$,$G$-$k$h$&$K$J$j$^$9!#(B + $BNc$($P!"$3$l$i$N%G%#%l%/%F%#%V$r;HMQ$7$F!"FCDj$N%V%i%&%6(B (User-Agent) + $B$+$i$N%"%/%;%9$r5qH]$9$k$3$H$,$G$-$^$9!#(B +

    + +

    $B>r7oIU$-%m%05-O?(B

    + +

    + LogFormat $B%G%#%l%/%F%#%V$N%*%W%7%g%s(B %e + $B$r;HMQ$9$k$3$H$G!"4D6-JQ?t$r%"%/%;%9%m%0$K5-O?$9$k$3$H$,$G$-$^$9!#$5$i$K!"(B + CustomLog $B%G%#%l%/%F%#%V$N>r7oJ,4t<0$r;HMQ$9$k$3$H$G!"(B + $B4D6-JQ?t$NCM$K$h$C$F%j%/%(%9%H$r%m%0$K5-O?$9$k$+$I$&$+$r7h$a$k$3$H$,$G$-$^$9!#(B + SetEnvIf $B%G%#%l%/%F%#%V$HAH$_9g$o$;$k$3$H$G!"(B + $B$I$N%j%/%(%9%H$r%m%0$K5-O?$9$k$+$r=@Fp$K@)8f$9$k$3$H$,2DG=$K$J$j$^$9!#Nc$($P!"(B + gif $B$G=*$o$k%U%!%$%kL>$X$N%j%/%(%9%H$O%m%0$K5-O?$7$J$$!"(B + $B0c$&%5%V%M%C%H$N%/%i%$%"%s%H$+$i$N%j%/%(%9%H$@$1$r%m%0$K5-O?$9$k!"$H$$$&A*Br$,2DG=$G$9!#(B +

    + +

    URL $B$N=q$-49$((B

    + +

    RewriteCond $B%G%#%l%/%F%#%V$G(B$BI>2AJ8;zNs(B$B$H$7$F(B + %{ENV:...} $B<0$r;XDj$9$k$3$H$G!"(Bmod_rewrite + $B$N=q$-49$(%(%s%8%s$,4D6-JQ?t$K4p$$$F>r7oJ,4t$r9T$J$&$3$H$,$G$-$^$9!#(B + mod_rewrite $B$,;HMQ2DG=$JJQ?t$G(B ENV: $B$,A0$K$D$$$F$$$J$$JQ?t$O!"(B + $B$N%b%8%e!<%k$+$i$O;HMQ$G$-$J$$(B mod_rewrite $BMQ$NFCJL$JJQ?t$G$9!#(B +

    +
    + +

    $BFCJL$JL\E*$N4D6-JQ?t(B

    + + +

    + $B8_49@-$NLdBj$r2r7h$9$k$?$a$K!"FCDj$N%/%i%$%"%s%H$HDL?.$7$F$$$k$H$-$O(B + Apache $B$NF0:n$rJQ99$G$-$k5!9=$,F3F~$5$l$^$7$?!#$G$-$k$@$1=@Fp$K$9$k$?$a$K!"(B + $B$3$l$i$N5!9=$O4D6-JQ?t$rDj5A$9$k$3$H$G8F$S=P$5$l$^$9!#IaDL$O!"(B + BrowserMatch + $B%G%#%l%/%F%#%V$r;H$$$^$9$,!"Nc$($P(B SetEnv $B%G%#%l%/%F%#%V$d(B PassEnv $B%G%#%l%/%F%#%V$b;HMQ$9$k$3$H$,$G$-$^$9!#(B +

    + +

    downgrade-1.0

    + +

    $B$3$l$r;XDj$9$k$3$H$G!"%j%/%(%9%H$,(B HTTP/1.0 + $B$h$j?7$7$$%W%m%H%3%k$N>l9g$G$b!"(BHTTP/1.0 $B$H$7$F07$o$l$^$9!#(B

    + +

    force-no-vary

    + +

    $B1~Ez%X%C%@$,%/%i%$%"%s%H$KAw$i$l$kA0$K(B Vary + $B%U%#!<%k%I$r$B%/%i%$%"%s%H$N4{CN$NLdBj(B + $B$N%Z!<%8$r;2>H$7$F$/$@$5$$(B)$B!#$3$NJQ?t$r@_Dj$9$k$3$H$G$=$NLdBj$r2sHr(B + $B$9$k$3$H$,$G$-$^$9!#$3$NJQ?t$r@_Dj$9$k$H!"(Bforce-response-1.0 + $B$,@_Dj$5$l$?$3$H$K$J$j$^$9!#(B

    + +

    force-response-1.0

    + +

    $B$3$l$,@_Dj$5$l$F$$$k$H!">o$K(B HTTP/1.0 $B$G$N1~Ez$K$J$j$^$9!#$3$N5!G=$O!"(B + $B85!9$O(B AOL $B$N%W%m%-%7$NLdBj$N$?$a$K + +

    nokeepalive

    + +

    $B$3$l$,@_Dj$5$l$F$$$k>l9g$O!"(BKeepAlive $B$r;HMQ$7$J$$$h$&$K$7$^$9!#(B

    + +

    suppress-error-charset

    +

    1.3.26 $B$H(B 2.0.40 $B0J9_$N%P!<%8%g%s$G;HMQ2DG=(B

    +

    Apache $B$,%/%i%$%"%s%H$N%j%/%(%9%H$K1~$8$F%j%@%$%l%/%H$r9T$J$&$H$-!"(B + $B%l%9%]%s%9$K$O%/%i%$%"%s%H$,<+F0E*$K%j%@%$%l%/%H$rDI$($J$$(B($BDI$o$J$$(B)$B$H$-$N(B + $B$?$a$KI=<($5$l$k%F%-%9%H$,4^$^$l$F$$$^$9!#(BApache $B$ODL>o$O$3$N%F%-%9%H$O(B + $B;H$o$l$F$$$kJ8;z%;%C%H$G$"$k(B ISO-8859-1 $B$H$7$^$9!#(B

    +

    $B$7$+$7!"%j%@%$%l%/%H@h$,JL$NJ8;z%;%C%H$r;H$C$F$$$k>l9g!"(B + $BI8=`$K=`5r$7$F$$$J$$%V%i%&%6$G$O!"%j%@%$%l%/%H@h$N +

    $B$3$N4D6-JQ?t$r@_Dj$9$k$H!"(B Apache $B$O%j%@%$%l%/%H85$N%F%-%9%H$NJ8;z%;%C%H(B + $B$O>JN,$9$k$h$&$K$J$j!"$=$N$h$&$JI8=`$K=`5r$7$F$$$J$$%V%i%&%6$G$b%j%@%$%l%/%H(B + $B@h$NJ8;z%;%C%H$r@5$7$/;H$&$3$H$,$G$-$k$h$&$K$J$j$^$9!#(B

    +
    + +

    $BNc(B

    + +

    $B$*$+$7$J5sF0$r$9$k%/%i%$%"%s%H$KBP$7$F%W%m%H%3%k$NF0:n$rJQ99$9$k(B

    + +

    $B%/%i%$%"%s%H$K4X$9$k4{CN$NLdBj$KBP=h$9$k$?$a$K!"0J2<$N9T$r(B + httpd.conf $B$KF~$l$k$3$H$r?d>)$7$F$$$^$9!#(B

    +
    +#
    +# The following directives modify normal HTTP response behavior.
    +# The first directive disables keepalive for Netscape 2.x and browsers that
    +# spoof it. There are known problems with these browser implementations.
    +# The second directive is for Microsoft Internet Explorer 4.0b2
    +# which has a broken HTTP/1.1 implementation and does not properly
    +# support keepalive when it is used on 301 or 302 (redirect) responses.
    +#
    +BrowserMatch "Mozilla/2" nokeepalive
    +BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
    +
    +#
    +# The following directive disables HTTP/1.1 responses to browsers which
    +# are in violation of the HTTP/1.0 spec by not being able to grok a
    +# basic 1.1 response.
    +#
    +BrowserMatch "RealPlayer 4\.0" force-response-1.0
    +BrowserMatch "Java/1\.0" force-response-1.0
    +BrowserMatch "JDK/1\.0" force-response-1.0
    +
    + +

    $B2hA|$X$N%j%/%(%9%H$r%"%/%;%9%m%0$K5-O?$7$J$$(B

    + +

    $B$3$NNc$G$O!"2hA|$X$N%j%/%(%9%H$,%"%/%;%9%m%0$K8=$l$J$$$h$&$K$7$^$9!#(B + $B$3$l$rJQ99$9$k$3$H$G!"FCDj$N%G%#%l%/%H%j$N%m%0<}=8$r$d$a$?$j!"(B + $BFCDj$N%[%9%H$+$i$N%j%/%(%9%H$N%m%0<}=8$r$d$a$?$j$9$k$3$H$,4JC1$K$G$-$^$9!#(B +

    +
    +    SetEnvIf Request_URI \.gif image-request
    +    SetEnvIf Request_URI \.jpg image-request
    +    SetEnvIf Request_URI \.png image-request
    +    CustomLog logs/access_log env=!image-request
    +
    + +

    $B!V2hA|$NEpMQ!W$rKI$0(B

    + +

    $B$3$NNc$O!"JL$N%5!<%P$K$$$k?M$,!"$"$J$?$N%5!<%P$K$"$k2hA|$r(B + inline $B2hA|$H$7$F;HMQ$9$k$3$H$rKI$.$^$9!#(B + $B$3$l$O?d>)$5$l$F$$$k@_Dj$G$O$"$j$^$;$s$,!"$"$k8BDj$5$l$?>u67$G$OM-8z$G$9!#(B + $B$3$3$G$O!"$9$Y$F$N2hA|$O(B /web/images $B$H$$$&%G%#%l%/%H%j$K$"$k$H2>Dj$7$^$9!#(B +

    +
    +    SetEnvIf Referer "^http://www.example.com/" local_referal
    +    # Allow browsers that do not send Referer info
    +    SetEnvIf Referer "^$" local_referal
    +    <Directory /web/images>
    +       Order Deny,Allow
    +       Deny from all
    +       Allow from env=local_referal
    +    </Directory>
    +
    + +

    $BCm(B: 'referer' $B$H(B 'referal' $B$NDV$j$O0U?^E*$J$b$N$G$9(B ($BLuCm(B: + $B@5$7$$DV$j$O(B referrer $B$H(B referral)$B!#(B

    + +

    $B$3$N\$7$$>pJs$O(B ApacheToday $B$N%A%e!<%H%j%"%k(B "Keeping Your Images from Adorning Other Sites" + $B$r;2>H$7$F$/$@$5$$!#(B

    + + + diff --git a/htdocs/manual/expand.pl b/htdocs/manual/expand.pl new file mode 100755 index 00000000000..6cbe2333621 --- /dev/null +++ b/htdocs/manual/expand.pl @@ -0,0 +1,104 @@ +#!/usr/local/bin/perl5 + +# This is a very simple Perl script to expand server-side includes +# in the directory it is run, and direct subdirectories. It will +# work only on SSI directives of the form +# +# +# +# Filename must be relative to the directory the file appears in. +# +# Nov 30, 1996 - Alexei Kosut + +# ==================================================================== +# Copyright (c) 1996-2000 The Apache Group. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# +# 3. All advertising materials mentioning features or use of this +# software must display the following acknowledgment: +# "This product includes software developed by the Apache Group +# for use in the Apache HTTP server project (http://httpd.apache.org/)." +# +# 4. The names "Apache Server" and "Apache Group" must not be used to +# endorse or promote products derived from this software without +# prior written permission. +# +# 5. Products derived from this software may not be called "Apache" +# nor may "Apache" appear in their names without prior written +# permission of the Apache Group. +# +# 6. Redistributions of any form whatsoever must retain the following +# acknowledgment: +# "This product includes software developed by the Apache Group +# for use in the Apache HTTP server project (http://httpd.apache.org/)." +# +# THIS SOFTWARE IS PROVIDED BY THE APACHE GROUP ``AS IS'' AND ANY +# EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE APACHE GROUP OR +# ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED +# OF THE POSSIBILITY OF SUCH DAMAGE. +# ==================================================================== +# +# This software consists of voluntary contributions made by many +# individuals on behalf of the Apache Group and was originally based +# on public domain software written at the National Center for +# Supercomputing Applications, University of Illinois, Urbana-Champaign. +# For more information on the Apache Group and the Apache HTTP server +# project, please see . + +# Put a list of dirs (except ..) into @dirs + +opendir DIR, "." or die "Could not open directory: $!"; +@dirs = grep !/^\.\.$/, (grep -d, readdir DIR); +closedir DIR; + +foreach $dir (@dirs) { + print "Entering directory $dir\n"; + opendir SUBDIR, "$dir" or die "Could not open subdir $dir: $!"; + foreach $file (grep /\.html(\.[^.]+)*$/, readdir SUBDIR) { + print "Expanding file $dir/$file\n"; + rename "$dir/$file", "$dir/${file}.old"; + open READ, "$dir/${file}.old" or die "Couldn't read $dir/$file: $!"; + open WRITE, ">$dir/$file" or die "Couldn't write $dir/$file: $!"; + while ($r = ) { + if ($r =~ //) { + ($pre, $include, $post) = ($`, $1, $'); + print WRITE $pre; + + open INC, "$dir/$include" or + print "Could not include file $dir/$include: $!"; + print WRITE while (); + close INC; + + print WRITE $post; + } + else { + print WRITE $r; + } + } + close READ; + close WRITE; + unlink "$dir/$file.old"; + } + closedir SUBDIR; +} + + diff --git a/htdocs/manual/footer.html b/htdocs/manual/footer.html new file mode 100644 index 00000000000..a4ad536c26b --- /dev/null +++ b/htdocs/manual/footer.html @@ -0,0 +1,4 @@ +
    + +

    Apache HTTP Server

    + Index diff --git a/htdocs/manual/handler.html.en b/htdocs/manual/handler.html.en new file mode 100644 index 00000000000..8662a6d7a46 --- /dev/null +++ b/htdocs/manual/handler.html.en @@ -0,0 +1,165 @@ + + + + + + + Apache's Handler Use + + + + + + +

    Apache's Handler Use

    + + +
    + +

    What is a + Handler

    + + + + + + + +
    Related Modules
    +
    + mod_actions
    + mod_asis
    + mod_cgi
    + mod_imap
    + mod_info
    + mod_include
    + mod_mime
    + mod_negotiation
    + mod_status
    +
    Related Directives
    +
    + Action
    + AddHandler
    + RemoveHandler
    + SetHandler
    +
    + +

    A "handler" is an internal Apache representation of the + action to be performed when a file is called. Generally, files + have implicit handlers, based on the file type. Normally, all + files are simply served by the server, but certain file types + are "handled" separately.

    + +

    Apache 1.1 adds the ability to use handlers explicitly. + Based on either filename extensions or on location, handlers + can be specified without relation to file type. This is + advantageous both because it is a more elegant solution, and + because it also allows for both a type and a + handler to be associated with a file. (See also Files with Multiple + Extensions.)

    + +

    Handlers can either be built into the server or included in + a module, or they can be added with the Action directive. The + built-in handlers in the standard distribution are as + follows:

    + +
      +
    • default-handler: Send the file using the + default_handler(), which is the handler used by + default to handle static content. (core)
    • + +
    • send-as-is: Send file with HTTP headers + as is. (mod_asis)
    • + +
    • cgi-script: Treat the file as a CGI + script. (mod_cgi)
    • + +
    • imap-file: Parse as an imagemap rule + file. (mod_imap)
    • + +
    • server-info: Get the server's + configuration information. (mod_info)
    • + +
    • server-parsed: Parse for server-side + includes. (mod_include)
    • + +
    • server-status: Get the server's status + report. (mod_status)
    • + +
    • type-map: Parse as a type map file for + content negotiation. (mod_negotiation)
    • +
    +
    + +

    Examples

    + +

    Modifying static content using a CGI script

    + +

    The following directives will cause requests for files with + the html extension to trigger the launch of the + footer.pl CGI script.

    +
    +     Action add-footer /cgi-bin/footer.pl
    +     AddHandler add-footer .html
    +
    + +

    Then the CGI script is responsible for sending the + originally requested document (pointed to by the + PATH_TRANSLATED environment variable) and making + whatever modifications or additions are desired.

    + +

    Files with HTTP headers

    + +

    The following directives will enable the + send-as-is handler, which is used for files which + contain their own HTTP headers. All files in the + /web/htdocs/asis/ directory will be processed by + the send-as-is handler, regardless of their + filename extensions.

    +
    +    <Directory /web/htdocs/asis>
    +    SetHandler send-as-is
    +    </Directory>
    +
    +
    + +

    Programmer's + Note

    + +

    In order to implement the handler features, an addition has + been made to the Apache API that + you may wish to make use of. Specifically, a new record has + been added to the request_rec structure:

    +
    +    char *handler
    +
    + +

    If you wish to have your module engage a handler, you need + only to set r->handler to the name of the + handler at any time prior to the invoke_handler + stage of the request. Handlers are implemented as they were + before, albeit using the handler name instead of a content + type. While it is not necessary, the naming convention for + handlers is to use a dash-separated word, with no slashes, so + as to not invade the media type name-space.

    + + + + diff --git a/htdocs/manual/handler.html.html b/htdocs/manual/handler.html.html new file mode 100644 index 00000000000..f2aec6b1346 --- /dev/null +++ b/htdocs/manual/handler.html.html @@ -0,0 +1,4 @@ + + + diff --git a/htdocs/manual/handler.html.ja.jis b/htdocs/manual/handler.html.ja.jis new file mode 100644 index 00000000000..a928b39dfef --- /dev/null +++ b/htdocs/manual/handler.html.ja.jis @@ -0,0 +1,165 @@ + + + + + + + Apache $B$N%O%s%I%i$N;HMQ(B + + + + + + + +

    Apache $B$N%O%s%I%i$N;HMQ(B

    + + +
    + +

    $B%O%s%I%i$H$O(B

    + + + + + + + + +
    $B4XO"%b%8%e!<%k(B
    +
    + mod_actions
    + mod_asis
    + mod_cgi
    + mod_imap
    + mod_info
    + mod_include
    + mod_mime
    + mod_negotiation
    + mod_status
    +
    $B4XO"%G%#%l%/%F%#%V(B
    +
    + Action
    + AddHandler
    + RemoveHandler
    + SetHandler
    +
    + +

    $B!V%O%s%I%i!W$H$O!"%U%!%$%k$,8F$P$l$?$H$-$Ko!"%U%!%$%k$O%U%!%$%k7?$K4p$E$$$?0EL[$N(B + $B%O%s%I%i$,$"$j$^$9!#IaDL$O$9$Y$F$N%U%!%$%k$OC1$K%5!<%P$K07$o$l$^$9$,!"(B + $B%U%!%$%k%?%$%W$NCf$K$OJL$K!V%O%s%I%k!W(B ($BLuCm(B: $B07$&(B) $B$5$l$k$b$N$b$"$j$^$9!#(B +

    + +

    Apache 1.1 $B$G$O!"%O%s%I%i$rL@<(E*$K;HMQ$9$k5!G=$,DI2C$5$l$^$7$?!#(B + $B%U%!%$%k$N3HD%;R$dCV$$$F$$$k>l=j$K4p$E$$$F!"%U%!%$%k7?$H4X78$J$/(B + $B%O%s%I%i$r;XDj$9$k$3$H$,$G$-$^$9!#$3$l$O$h$jM%2m$J2r7hK!$H$$$&E@$H!"(B + $B%U%!%$%k$K%?%$%W(B$B$H(B + $B%O%s%I%i$NN>J}$r4XO"IU$1$k$3$H$,$G$-$k$H$$$&E@$GM%$l$F$$$^$9!#(B + ($BJ#?t$N3HD%;R$N$"$k%U%!%$%k(B + $B$b;2>H$7$F$/$@$5$$(B)$B!#(B +

    + +

    $B%O%s%I%i$O%5!<%P$KAH$_9~$s$@$j!"%b%8%e!<%k$H$7$F4^$a$?$j!"(B + Action + $B%G%#%l%/%F%#%V$H$7$FDI2C$7$?$j$9$k$3$H$,$G$-$^$9!#(B + $B0J2<$OI8=`G[I[$KAH$_9~$^$l$F$$$k%O%s%I%i$G$9!#(B +

    + +
      +
    • default-handler: default_handelr() + $B$r;H$C$F%U%!%$%k$rAw$j$^$9!#(B + $B@EE*$J%3%s%F%s%D$r07$&$H$-$K%G%U%)%k%H$G;HMQ$5$l$k%O%s%I%i$G$9!#(B(core)
    • + +
    • send-as-is: + HTTP $B%X%C%@$N$"$k%U%!%$%k$r$=$N$^$^Aw$j$^$9!#(B + (mod_asis)
    • + +
    • cgi-script: $B%U%!%$%k$r(B CGI + $B%9%/%j%W%H$H$7$F07$$$^$9!#(B(mod_cgi)
    • + +
    • imap-file: + $B%$%a!<%8%^%C%W$N%k!<%k%U%!%$%k$H$7$F2r@O$7$^$9!#(B + (mod_imap)
    • + +
    • server-info: $B%5!<%P$N@_Dj>pJs$rmod_info)
    • + +
    • server-parsed: SSI $B$r2r@O$7$^$9!#(B + (mod_include)
    • + +
    • server-status: $B%5!<%P$N>uBVJs9p$rmod_status)
    • + +
    • type-map: + $B%3%s%F%s%H%M%4%7%(!<%7%g%s$N$?$a$N%?%$%W%^%C%W$H$7$F2r@O$7$^$9!#(B + (mod_negotiation)
    • +
    +
    + +

    $BNc(B

    + +

    CGI $B%9%/%j%W%H$rMQ$$$F@EE*$J%3%s%F%s%D$rJQ99$9$k(B

    + +

    $B0J2<$N%G%#%l%/%F%#%V$K$h$C$F!"3HD%;R$,(B html + $B$G$"$k%U%!%$%k$O(B footer.pl + CGI $B%9%/%j%W%H$r5/F0$9$k$h$&$K$J$j$^$9!#(B

    +
    +     Action add-footer /cgi-bin/footer.pl
    +     AddHandler add-footer .html
    +
    + +

    CGI $B%9%/%j%W%H$OK>$^$7$$=$@5$dDI2C$r9T$J$C$F!"85!9MW5a$5$l$?J8=q(B + ($B4D6-JQ?t(B PATH_TRANSLATED $B$G;X$5$l$F$$$^$9(B) + $B$rAw$k@UG$$,$"$j$^$9!#(B +

    + +

    HTTP $B%X%C%@$N$"$k%U%!%$%k(B

    + +

    $B0J2<$N%G%#%l%/%F%#%V$O(B send-as-is + $B%O%s%I%i$r;HMQ$9$k$h$&$K;X<($7$^$9!#$3$N%O%s%I%i$O<+J,<+?H$N(B + HTTP $B%X%C%@$r;}$C$F$$$k%U%!%$%k$K;HMQ$5$l$^$9!#$3$3$G$O!"3HD%;R$K4X$o$i$:!"(B + /web/htdocs/asis $B%G%#%l%/%H%j$K$"$kA4$F$N%U%!%$%k$O(B + send-as-is $B%O%s%I%i$K$h$C$F07$o$l$^$9!#(B +

    +
    +    <Directory /web/htdocs/asis>
    +    SetHandler send-as-is
    +    </Directory>
    +
    +
    + +

    $B%W%m%0%i%^8~$1$N%a%b(B

    + + +

    $B%O%s%I%i$N5!G=$rApache API $B$KDI2C$5$l$^$7$?!#(B + $B>\$7$/8@$&$H!"(Brequest_rec + $B9=B$BN$K?7$7$$%l%3!<%I$,DI2C$5$l$?$H$$$&$3$H$G$9!#(B

    +
    +    char *handler
    +
    + +

    $B$b$7%b%8%e!<%k$,%O%s%I%i$K4X$o$j$?$$>l9g!"$d$i$J$1$l$P$J$i$J$$$3$H$O!"(B + $B%j%/%(%9%H$,(B invoke_handler$B%9%F!<%8$KC#$9$k0JA0$K(B + r->handler$B$r@_Dj$9$k$3$H$@$1$G$9!#(B + $B%O%s%I%i$O%3%s%F%s%H%?%$%W$NBe$o$j$K%O%s%I%iL>$r;H$&$h$&$K$J$C$F$$$k$3$H0J30$O!"(B + $B0JA0$HF1$8$h$&$KA06u4V$r?/$5$J$$$h$&$K!"%O%s%I%i$NL>A0$K$O%9%i%C%7%e(B + $B$r4^$^$J$$!"%@%C%7%e(B ($BLuCm(B: "-") $B$GJ,N%$5$l$?L>A0$rIU$1$k=,47$K$J$C$F$$$^$9!#(B +

    + + + diff --git a/htdocs/manual/header.html b/htdocs/manual/header.html new file mode 100644 index 00000000000..f2bb862c00d --- /dev/null +++ b/htdocs/manual/header.html @@ -0,0 +1,6 @@ +
    + [APACHE DOCUMENTATION] + +

    Apache HTTP Server

    +
    + diff --git a/htdocs/manual/howto/auth.html b/htdocs/manual/howto/auth.html new file mode 100644 index 00000000000..2fb179ab0a5 --- /dev/null +++ b/htdocs/manual/howto/auth.html @@ -0,0 +1,1195 @@ + + + + + Authentication, Authorization, and Access Control + + + + + +

    Authentication, Authorization, and Access +Control

    + + + + + +
    + +


    + Authentication, Authorization, and Access Control

    + +

    Introduction

    + +

    Apache has three distinct ways of dealing with the question + of whether a particular request for a resource will result in + that resource actually be returned. These criteria are called + Authorization, Authentication, and Access + control.

    + +

    Authentication is any process by which you verify that + someone is who they claim they are. This usually involves a + username and a password, but can include any other method of + demonstrating identity, such as a smart card, retina scan, + voice recognition, or fingerprints. Authentication is + equivalent to showing your drivers license at the ticket + counter at the airport.

    + +

    Authorization is finding out if the person, once identified, + is permitted to have the resource. This is usually determined + by finding out if that person is a part of a particular group, + if that person has paid admission, or has a particular level of + security clearance. Authorization is equivalent to checking the + guest list at an exclusive party, or checking for your ticket + when you go to the opera.

    + +

    Finally, access control is a much more general way of + talking about controlling access to a web resource. Access can + be granted or denied based on a wide variety of criteria, such + as the network address of the client, the time of day, the + phase of the moon, or the browser which the visitor is using. + Access control is analogous to locking the gate at closing + time, or only letting people onto the ride who are more than 48 + inches tall - it's controlling entrance by some arbitrary + condition which may or may not have anything to do with the + attributes of the particular visitor.

    + +

    Because these three techniques are so closely related in + most real applications, it is difficult to talk about them + separate from one another. In particular, authentication and + authorization are, in most actual implementations, + inextricable.

    + +

    If you have information on your web site that is sensitive, + or intended for only a small group of people, the techniques in + this tutorial will help you make sure that the people that see + those pages are the people that you wanted to see them.

    + +

    Basic authentication

    + +

    As the name implies, basic authentication is the simplest + method of authentication, and for a long time was the most + common authentication method used. However, other methods of + authentication have recently passed basic in common usage, due + to usability issues that will be discussed in a minute.

    + +


    + How basic authentication works

    + +

    When a particular resource has been protected using basic + authentication, Apache sends a 401 Authentication + Required header with the response to the request, in order + to notify the client that user credentials must be supplied in + order for the resource to be returned as requested.

    + +

    Upon receiving a 401 response header, the client's + browser, if it supports basic authentication, will ask the user + to supply a username and password to be sent to the server. If + you are using a graphical browser, such as Netscape or Internet + Explorer, what you will see is a box which pops up and gives + you a place to type in your username and password, to be sent + back to the server. If the username is in the approved list, + and if the password supplied is correct, the resource will be + returned to the client.

    + +

    Because the HTTP protocol is stateless, each request will be + treated in the same way, even though they are from the same + client. That is, every resource which is requested from the + server will have to supply authentication credentials over + again in order to receive the resource.

    + +

    Fortunately, the browser takes care of the details here, so + that you only have to type in your username and password one + time per browser session - that is, you might have to type it + in again the next time you open up your browser and visit the + same web site.

    + +

    Along with the 401 response, certain other + information will be passed back to the client. In particular, + it sends a name which is associated with the protected area of + the web site. This is called the realm, or just the + authentication name. The client + browser caches the username and password that you supplied, and + stores it along with the authentication realm, so that if other + resources are requested from the same realm, the same username + and password can be returned to authenticate that request + without requiring the user to type them in again. This caching + is usually just for the current browser session, but some + browsers allow you to store them permanently, so that you never + have to type in your password again.

    + +

    The authentication name, or realm, will appear in the pop-up + box, in order to identify what the username and password are + being requested for.

    + +

    + Configuration: Protecting content with basic + authentication

    + +

    There are two configuration steps which you must complete in + order to protect a resource using basic authentication. Or + three, depending on what you are trying to do.

    + +
      +
    1. Create a password file
    2. + +
    3. Set the configuration to use this password file
    4. + +
    5. Optionally, create a group file
    6. +
    + +


    + Create a password file

    + +

    In order to determine whether a particular username/password + combination is valid, the username and password supplied by the + user will need to be compared to some authoritative listing of + usernames and password. This is the password file, which you + will need to create on the server side, and populate with valid + users and their passwords.

    + +

    Because this file contains sensitive information, it should + be stored outside of the document directory. Although, as you + will see in a moment, the passwords are encrypted in the file, + if a cracker were to gain access to the file, it would be an + aid in their attempt to figure out the passwords. And, because + people tend to be sloppy with the passwords that they choose, + and use the same password for web site authentication as for + their bank account, this potentially be a very serious breach + of security, even if the content on your web site is not + particularly sensitive.

    + +

    Caution: Encourage your users to use a different + password for your web site than for other more essential + things. For example, many people tend to use two passwords - + one for all of their extremely important things, such as the + login to their desktop computer, and for their bank account, + and another for less sensitive things, the compromise of which + would be less serious.

    + +

    To create the password file, use the htpasswd + utility that came with Apache. This will be located in the + bin directory of wherever you installed Apache. For + example, it will probably be located at + /usr/local/apache/bin/htpasswd if you installed Apache + from source.

    + +

    To create the file, type:

    +
    +htpasswd -c /usr/local/apache/passwd/passwords username
    +
    + +

    htpasswd will ask you for the password, and then + ask you to type it again to confirm it:

    +
    +# htpasswd -c /usr/local/apache/passwd/passwords rbowen
    +New password: mypassword
    +Re-type new password: mypassword
    +Adding password for user rbowen
    +
    + +

    Note that in the example shown, a password file is being + created containing a user called rbowen, and this + password file is being placed in the location + /usr/local/apache/passwd/passwords. You will + substitute the location, and the username, which you want to + use to start your password file.

    + +

    If htpasswd is not in your path, you will have to + type the full path to the file to get it to run. That is, in + the example above, you would replace htpasswd with + /usr/local/apache/bin/htpasswd

    + +

    The -c flag is used only when you are creating a + new file. After the first time, you will omit the -c + flag, when you are adding new users to an already-existing + password file.

    +
    +htpasswd /usr/local/apache/passwd/passwords sungo
    +
    + +

    The example just shown will add a user named sungo + to a password file which has already been created earlier. As + before, you will be asked for the password at the command line, + and then will be asked to confirm the password by typing it + again.

    + +

    Caution: Be very careful when you add new users to an + existing password file that you don't use the -c flag + by mistake. Using the -c flag will create a new + password file, even if you already have an existing file of + that name. That is, it will remove the contents of the file + that is there, and replace it with a new file containing only + the one username which you were adding.

    + +

    The password is stored in the password file in encrypted + form, so that users on the system will not be able to read the + file and immediately determine the passwords of all the users. + Nevertheless, you should store the file in as secure a location + as possible, with whatever minimum permissions on the file so + that the web server itself can read the file. For example, if + your server is configured to run as user nobody and + group nogroup, then you should set permissions on the + file so that only the webserver can read the file and only + root can write to it:

    +
    +chown root.nogroup /usr/local/apache/passwd/passwords
    +chmod 640 /usr/local/apache/passwd/passwords
    +
    + +

    On Windows, a similar precaution should be taken, changing + the ownership of the password file to the web server user, so + that other users cannot read the file.

    + +


    + Set the configuration to use this password file

    + +

    Once you have created the password file, you need to tell + Apache about it, and tell Apache to use this file in order to + require user credentials for admission. This configuration is + done with the following directives:

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    AuthTypeAuthentication + type being used. In this case, it will be set to + Basic
    AuthNameThe + authentication realm or name
    AuthUserFileThe location of + the password file
    AuthGroupFileThe location of + the group file, if any
    RequireThe + requirement(s) which must be satisfied in order to grant + admission
    + +

    These directives may be placed in a .htaccess file + in the particular directory being protected, or may go in the + main server configuration file, in a <Directory> + section, or other scope container.

    + +

    The example shown below defines an authentication realm + called ``By Invitation Only''. The password file located at + /usr/local/apache/passwd/passwords will be used to + verify the user's identity. Only users named rbowen or + sungo will be granted access, and even then only if + they provide a password which matches the password stored in + the password file.

    +
    +AuthType Basic
    +AuthName "By Invitation Only"
    +AuthUserFile /usr/local/apache/passwd/passwords
    +Require user rbowen sungo
    +
    + +

    The phrase ``By Invitation Only'' will be displayed in the + password pop-up box, where the user will have to type their + credentials.

    + +

    You will need to restart your Apache server in order for the + new configuration to take effect, if these directives were put + in the main server configuration file. Directives placed in + .htaccess files take effect immediately, since + .htaccess files are parsed each time files are + served.

    + +

    The next time that you load a file from that directory, you + will see the familiar username/password dialog box pop up, + requiring that you type the username and password before you + are permitted to proceed.

    + +

    Note that in addition to specifically listing the users to + whom you want to grant access, you can specify that any valid + user should be let in. This is done with the + valid-user keyword:

    +
    +Require valid-user
    +
    + +


    + Optionally, create a group file

    + +

    Most of the time, you will want more than one, or two, or + even a dozen, people to have access to a resource. You want to + be able to define a group of people that have access to that + resource, and be able to manage that group of people, adding + and removing members, without having to edit the server + configuration file, and restart Apache, each time.

    + +

    This is handled using authentication groups. An + authentication group is, as you would expect, a group name + associated with a list of members. This list is stored in a + group file, which should be stored in the same location as the + password file, so that you are able to keep track of these + things.

    + +

    The format of the group file is exceedingly simple. A group + name appears first on a line, followed by a colon, and then a + list of the members of the group, separated by spaces. For + example:

    +
    +authors: rich daniel allan
    +
    + +

    Once this file has been created, you can Require + that someone be in a particular group in order to get the + requested resource. This is done with the + AuthGroupFile directive, as shown in the following + example.

    +
    +AuthType Basic
    +AuthName "Apache Admin Guide Authors"
    +AuthUserFile /usr/local/apache/passwd/passwords
    +AuthGroupFile /usr/local/apache/passwd/groups
    +Require group authors
    +
    + +

    The authentication process is now one step more involved. + When a request is received, and the requested username and + password are supplied, the group file is first checked to see + if the supplied username is even in the required group. If it + is, then the password file will be checked to see if the + username is in there, and if the supplied password matches the + password stored in that file. If any of these steps fail, + access will be forbidden.

    + +


    + Frequently asked questions about basic auth

    + +

    The following questions tend to get asked very frequently + with regard to basic authentication. It should be understood + that basic authentication is very basic, and so is limited to + the set of features that has been presented above. Most of the + more interesting things that people tend to want, need to be + implemented using some alternate authentication scheme.

    + +


    + How do I log out?

    + +

    Since browsers first started implementing basic + authentication, website administrators have wanted to know how + to let the user log out. Since the browser caches the username + and password with the authentication realm, as described + earlier in this tutorial, this is not a function of the server + configuration, but is a question of getting the browser to + forget the credential information, so that the next time the + resource is requested, the username and password must be + supplied again. There are numerous situations in which this is + desirable, such as when using a browser in a public location, + and not wishing to leave the browser logged in, so that the + next person can get into your bank account.

    + +

    However, although this is perhaps the most frequently asked + question about basic authentication, thus far none of the major + browser manufacturers have seen this as being a desirable + feature to put into their products.

    + +

    Consequently, the answer to this question is, you can't. + Sorry.

    + +


    + How can I change what the password box looks like?

    + +

    The dialog that pops up for the user to enter their username + and password is ugly. It contains text that you did not + indicate that you wanted in there. It looks different in + Internet Explorer and Netscape, and contains different text. + And it asks for fields that the user might not understand - + for example, Netscape asks the user to type in their ``User + ID'', and they might not know what that means. Or, you might + want to provide additional explanatory text so that the user + has a better idea what is going on.

    + +

    Unfortunately, these things are features of the browser, and + cannot be controlled from the server side. If you want the + login to look different, then you will need to implement your + own authentication scheme. There is no way to change what this + login box looks like if you are using basic authentication.

    + +


    + How to I make it not ask me for my password the next + time?

    + +

    Because most browsers store your password information only + for the current browser session, when you close your browser it + forgets your username and password. So, when you visit the same + web site again, you will need to re-enter your username and + password.

    + +

    There is nothing that can be done about this on the server + side.

    + +

    However, the most recent versions of the major browsers + contain the ability to remember your password forever, so that + you never have to log in again. While it is debatable whether + this is a good idea, since it effectively overrides the entire + point of having security in the first place, it is certainly + convenient for the user, and simplifies the user + experience.

    + +


    + Why does it sometimes ask me for my password twice?

    + +

    When entering a password-protected web site for the first + time, you will occasionally notice that you are asked for your + password twice. This may happen immediately after you entered + the password the first time, or it may happen when you click on + the first link after authenticating the first time.

    + +

    This happens for a very simple, but nonetheless confusing, + reason, again having to do with the way that the browser caches + the login information.

    + +

    Login information is stored on the browser based on the + authentication realm, specified by the AuthName + directive, and by the server name. In this way, the browser can + distinguish between the Private authentication realm + on one site and on another. So, if you go to a site using one + name for the server, and internal links on the server refer to + that server by a different name, the browser has no way to know + that they are in fact the same server.

    + +

    For example, if you were to visit the URL + http://example.com/private/, which required + authentication, your browser would remember the supplied + username and password, associated with the hostname + example.com. If, by virtue of an internal redirect, or + fully-qualified HTML links in pages, you are then sent to the + URL http://www.example.com/private/, even though this + is really exactly the same URL, the browser does not know this + for sure, and is forced to request the authentication + information again, since example.com and + www.example.com are not exactly the same hostname. + Your browser has no particular way to know that these are the + same web site.

    + +


    + Security caveat

    + +

    Basic authentication should not be considered secure for any + particularly rigorous definition of secure.

    + +

    Although the password is stored on the server in encrypted + format, it is passed from the client to the server in plain + text across the network. Anyone listening with any variety of + packet sniffer will be able to read the username and password + in the clear as it goes across.

    + +

    Not only that, but remember that the username and password + are passed with every request, not just when the user first + types them in. So the packet sniffer need not be listening at a + particularly strategic time, but just for long enough to see + any single request come across the wire.

    + +

    And, in addition to that, the content itself is also going + across the network in the clear, and so if the web site + contains sensitive information, the same packet sniffer would + have access to that information as it went past, even if the + username and password were not used to gain direct access to + the web site.

    + +

    Don't use basic authentication for anything that requires + real security. It is a detriment for most users, since very few + people will take the trouble, or have the necessary software + and/or equipment, to find out passwords. However, if someone + had a desire to get in, it would take very little for them to + do so.

    + +

    Basic authentication across an SSL connection, however, will be + secure, since everything is going to be encrypted, including the + username and password.

    + +

    Digest authentication

    + +

    Addressing one of the security caveats of basic + authentication, digest authentication provides an alternate + method for protecting your web content. However, it to has a + few caveats.

    + +

    How digest auth works

    + +

    Digest authentication is implemented by the module + mod_auth_digest. There is an older module, + mod_digest, which implemented an older version of the + digest authentication specification, but which will probably + not work with newer browsers.

    + +

    Using digest authentication, your password is never sent + across the network in the clear, but is always transmitted as + an MD5 digest of the user's password. In this way, the password + cannot be determined by sniffing network traffic.

    + +

    The full specification of digest authentication can be seen + in the internet standards document RFC 2617, which you can see + at http://www1.ics.uci.edu/pub/ietf/http/rfc2617.txt. + Additional information and resources about MD5 can be found at + http://userpages.umbc.edu/ mabzug1/cs/md5/md5.html

    + +

    Configuration: + Protecting content with digest authentication

    + +

    The steps for configuring your server for digest + authentication are very similar for those for basic + authentication.

    + +
      +
    1. Create the password file
    2. + +
    3. Set the configuration to use this password file
    4. + +
    5. Optionally, create a group file
    6. +
    + +

    Creating a password file

    + +

    As with basic authentication, a simple utility is provided + to create and maintain the password file which will be used to + determine whether a particular user's name and password are + valid. This utility is called htdigest, and will be + located in the bin directory of wherever you installed + Apache. If you installed Apache from some variety of package + manager, htdigest is likely to have been placed + somewhere in your path.

    + +

    To create a new digest password file, type:

    +
    +htdigest -c /usr/local/apache/passwd/digest realm username
    +
    + +

    htdigest will ask you for the desired password, and + then ask you to type it again to confirm it.

    + +

    Note that the realm for which the authentication will be + required is part of the argument list.

    + +

    Once again, as with basic authentication, you are encouraged + to place the generated file somewhere outside of the document + directory.

    + +

    And, as with the htpasswd utility, the -c + flag creates a new file, or, if a file of that name already + exists, deletes the contents of that file and generates a new + file in its place. Omit the -c flag in order to add + new user information to an existing password file.

    + +

    Set the configuration + to use this password file

    + +

    Once you have created a password file, you need to tell + Apache about it in order to start using it as a source of + authenticated user information. This configuration is done with + the following directives:

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    AuthTypeAuthentication + type being used. In this case, it will be set to + Digest
    AuthNameThe + authentication realm or name
    AuthDigestFileThe location of + the password file
    AuthDigestGroupFileLocation of the + group file, if any
    RequireThe + requirement(s) which must be satisfied in order to grant + admission
    + +

    These directives may be placed in a .htaccess file + in the particular directory being protected, or may go in the + main server configuration file, in a <Directory> + section, or another scope container.

    + +

    The following example defines an authentication realm called + "Private". The password file located at + /usr/local/apache/passwd/digest will be used to verify + the user's identity. Only users named drbacchus or + dorfl will be granted access, if they provide a + password that patches the password stored in the password + file.

    +
    +AuthType Digest
    +AuthName "Private"
    +AuthDigestFile /usr/local/apache/passwd/digest
    +Require user drbacchus dorfl
    +
    + +

    The phrase "Private" will be displayed in the password + pop-up box, where the user will have to type their + credentials.

    + +

    Optionally, create a group file

    + +

    As you have observed, there are not many differences between + this configuration process and that required by basic + authentication, described in the previous section. This is true + also of group functionality. The group file used for digest + authentication is exactly the same as that used for basic + authentication. That is to say, lines in the group file consist + the name of the group, a colon, and a list of the members of + that group. For example:

    +
    +admins: jim roy ed anne
    +
    + +

    Once this file has been created, you can Require + that someone be in a particular group in order to get the + requested resource. This is done with the + AuthDigestGroupFile directive, as shown in the + following example.

    +
    +AuthType Digest
    +AuthName "Private"
    +AuthDigestFile /usr/local/apache/passwd/digest
    +AuthDigestGroupFile /usr/local/apache/passwd/digest.groups
    +Require group admins
    +
    + +

    The authentication process is the same as that used by basic + authentication. It is first verified that the user is in the + required group, and, if this is true, then the password is + verified.

    + +

    Caveats

    + +

    Before you leap into using digest authentication instead of + basic authentication, there are a few things that you should + know about.

    + +

    Most importantly, you need to know that, although digest + authentication has this great advantage that you don't send + your password across the network in the clear, it is not + supported by all major browsers in use today, and so you should + not use it on a web site on which you cannot control the + browsers that people will be using, such as on your intranet + site. In particular, Opera 4.0 or later, Microsoft Internet + Explorer 5.0 or later, Mozilla 1.0.1 and Netscape 7 or later + as well as Amaya support digest authentication, while various + other browsers do not.

    + +

    Next, with regard to security considerations, you should + understand two things. Although your password is not passed in + the clear, all of your data is, and so this is a rather small + measure of security. And, although your password is not really + sent at all, but a digest form of it, someone very familiar + with the workings of HTTP could use that information - just + your digested password - and use that to gain access to the + content, since that digested password is really all the + information required to access the web site.

    + +

    The moral of this is that if you have content that really + needs to be kept secure, use SSL.

    + +

    Database authentication + modules

    + +

    Basic authentication and digest authentication both suffer + from the same major flaw. They use text files to store the + authentication information. The problem with this is that + looking something up in a text file is very slow. It's rather + like trying to find something in a book that has no index. You + have to start at the beginning, and work through it one page at + a time until you find what you are looking for. Now imagine + that the next time you need to find the same thing, you don't + remember where it was before, so you have to start at the + beginning again, and work through one page at a time until you + find it again. And the next time. And the time after that.

    + +

    Since HTTP is stateless, authentication has to be verified + every time that content is requested. And so every time a + document is accessed which is secured with basic or digest + authentication, Apache has to open up those text password files + and look through them one line at a time, until it finds the + user that is trying to log in, and verifies their password. In + the worst case, if the username supplied is not in there at + all, every line in the file will need to be checked. On + average, half of the file will need to be read before the user + is found. This is very slow.

    + +

    While this is not a big problem for small sets of users, + when you get into larger numbers of users (where "larger" means + a few hundred) this becomes prohibitively slow. In many cases, + in fact, valid username/password combinations will get rejected + because the authentication module just had to spend so much + time looking for the username in the file that Apache will just + get tired of waiting and return a failed authentication.

    + +

    In these cases, you need an alternative, and that + alternative is to use some variety of database. Databases are + optimized for looking for a particular piece of information in + a very large data set. It builds indexes in order to rapidly + locate a particular record, and they have query languages for + swiftly locating records that match particular criteria.

    + +

    There are numerous modules available for Apache to + authenticate using a variety of different databases. In this + section, we'll just look at two modules which ship with Apache. +

    + +

    mod_auth_db and mod_auth_dbm

    + +

    mod_auth_db and mod_auth_dbm are modules + which lets you keep your usernames and passwords in DB or DBM + files. There are few practical differences between DB files and + DBM files. And, on some operating systems, such as various + BSDs, and Linux, they are exactly the same thing. You should + pick whichever of the two modules makes the most sense on your + particular platform of choice. If you do not have DB support on + your platform, you may need to install it. You download an + implementation of DB at http://www.sleepycat.com/. + +

    Berkeley DB files

    + +

    DB files, also known as Berkeley database files, are the + simplest form of database, and are rather ideally suited for + the sort of data that needs to be stored for HTTP + authentication. DB files store key/value pairs. That is, the + name of a variable, and the value of that variable. While other + databases allow the storage of many fields in a given record, a + DB file allows only this pairing of key and value.1 This is ideal for + authentication, which requires only the pair of a username and + password.

    + +

    Installing mod_auth_db

    + +

    For the purposes of this tutorial, we'll talk about + installing and configuring mod_auth_db. However, + everything that is said here can be directly applied to + mod_auth_dbm by simply replacing 'db' with 'dbm' and + 'DB' with 'DBM' in the various commands, file names, and + directives.

    + +

    Since mod_auth_db is not compiled in by default, + you will need to rebuild Apache in order to get the + functionality, unless you built in everything when we started. + Note that if you installed Apache with shared object + support, you may be able to just build the module and load it + in to Apache.

    + +

    To build Apache from scratch with mod_auth_db built + in, use the following ./configure line in your apache + source code directory.

    +
    +./configure --enable-module=auth_db
    +
    + +

    Or, if you had a more complex configure command + line, you can just add the -enable-module=auth_db + option to that command line, and you'll get + mod_auth_db built into your server.

    + +

    Protecting a directory with + mod_auth_db

    + +

    Once you have compiled the mod_auth_db module, and + loaded it into your web server, you'll find that there's very + little difference between using regular authentication and + using mod_auth_db authentication. The procedure is the + same as that we went through with basic and digest + authentication:

    + +
      +
    1. Create the user file.
    2. + +
    3. Configure Apache to use that file for + authentication.
    4. + +
    5. Optionally, create a group file.
    6. +
    + +

    Create the user file

    + +

    The user file for authentication is, this time, not a flat + text file, but is a DB file2. Fortunately, once again, + Apache provides us with a simple utility for the purpose of + managing this user file. This time, the utility is called + dbmmanage, and will be located in the bin + subdirectory of wherever you installed Apache.

    + +

    dbmmanage is somewhat more complicated to use than + htpasswd or htdigest, but it is still fairly + simple. The syntax which you will usually be using is as + follows:

    +
    +dbmmanage passwords.dat adduser montressor
    +
    + +

    As with htpasswd, you will at this point be + prompted for a password, and then asked to confirm that + password by typing it again. The main difference here is that + rather than a text file being created, you are creating a + binary file containing the information that you have + supplied.

    + +

    Type dbmmanage with no arguments to get the full + list of options available with this utility.

    + +

    Creating your user file with + Perl

    + +

    Note that, if you are so inclined, you can manage your user + file with Perl, or any other language which has a DB-file + module, for interfacing with this type of database. This covers + a number of popular programming languages.

    + +

    The following Perl code, for example, will add a user + 'rbowen', with password 'mypassword', to your password + file:

    +
    +use DB_File;
    +tie %database, 'DB_File', "passwords.dat"
    +    or die "Can't initialize database: $!\n";
    +
    +$username = 'rbowen';
    +$password = 'mypassword';
    +@chars=(0..9,'a'..'z');
    +$salt = $chars[int rand @chars] . $chars[int rand @chars];
    +
    +$crypt = crypt($password, $salt);
    +$database{$username} = $crypt;
    +
    +untie %database;
    +
    + +

    As you can imagine, this makes it very simple to write tools + to manage the user and password information stored in these + files.

    + +

    Passwords are stored in Unix crypt format, just as + they were in the "regular" password files. The 'salt' that is + created in the middle there is part of the process, generating + a random starting point for that encryption. The technique + being used is called a 'tied hash'. The idea is to tie a + built-in data structure to the contents of the file, such that + when the data structure is changed, the file is automatically + modified at the same time.

    + +

    Configuring Apache + to use this password file

    + +

    Once you have created the password file, you need to tell + Apache about it, and tell Apache to use this file to verify + user credentials. This configuration will look almost the same + as that for basic authentication. This configuration can go in + a .htaccess file in the directory to be protected, or + can go in the main server configuration, in a + <Directory> section, or other scope container + directive.

    + +

    The configuration will look something like the + following:

    +
    +AuthName "Members Only"
    +AuthType Basic
    +AuthDBUserFile /usr/local/apache/passwd/passwords.dat
    +require user rbowen
    +
    + +

    Now, users accessing the directory will be required to + authenticate against the list of valid users who are in + /usr/local/apache/passwd/passwords.dat.

    + +


    + Optionally, create a group file

    + +

    As mentioned earlier, DB files store a key/value pair. In + the case of group files, the key is the name of the user, and + the value is a comma-separated list of the groups to which the + user belongs.

    + +

    While this is the opposite of the way that group files are + stored elsewhere, note that we will primarily be looking up + records based on the username, so it is more efficient to index + the file by username, rather than by the group name.

    + +

    Groups can be added to your group file using + dbmmanage and the add command:

    +
    +dbmmanage add groupfile rbowen one,two,three
    +
    + +

    In the above example, groupfile is the literal name + of the group file, rbowen is the user being added, and + one, two, and three are names of + three groups to which this user belongs.

    + +

    Once you have your groups in the file, you can require a + group in the regular way:

    +
    +AuthName "Members Only"
    +AuthType Basic
    +AuthDBUserFile /usr/local/apache/passwd/passwords.dat
    +AuthDBGroupFile /usr/local/apache/passwd/groups.dat
    +require group three
    +
    + +

    Note that if you want to use the same file for both password + and group information, you can do so, but this is a little more + complicated to manage, as you have to encrypt the password + yourself before you feed it to the dbmmanage + utility.

    + +

    Access control

    + +

    Authentication by username and password is only part of the + story. Frequently you want to let people in based on something + other than who they are. Something such as where they are + coming from. Restricting access based on something other than + the identity of the user is generally referred to as Access + Control.

    + +

    Allow and Deny

    + +

    The Allow and Deny directives let you + allow and deny access based on the host name, or host address, + of the machine requesting a document. The directive goes + hand-in-hand with these is the Order directive, which + tells Apache in which order to apply the filters.

    + +

    The usage of these directives is:

    +
    +allow from address
    +
    + +

    where address is an IP address (or a partial IP + address) or a fully qualified domain name (or a partial domain + name); you may provide multiple addresses or domain names, if + desired.

    + +

    For example, if you have someone spamming your message + board, and you want to keep them out, you could do the + following:

    +
    +deny from 11.22.33.44
    +
    + +

    Visitors coming from that address will not be able to see + the content behind this directive. If, instead, you have a + machine name, rather than an IP address, you can use that. +

    +
    +deny from hostname.example.com
    +
    + +

    And, if you'd like to block access from an entire domain, + or even from an entire tld (top level domain, such as .com or .gov) + you can specify just part of an address or domain name:

    +
    +deny from 192.101.205
    +deny from exampleone.com exampletwo.com
    +deny from tld
    +
    + +

    Using Order will let you be sure that you are + actually restricting things to the group that you want to let + in, by combining a deny and an allow + directive:

    +
    +Order Deny,Allow
    +Deny from all
    +Allow from hostname.example.com
    +
    + +

    Listing just the allow directive would not do what + you want, because it will let users from that host in, in + addition to letting everyone in. What you want is to let in + only users from that host.

    + +

    Satisfy

    + +

    The Satisfy directive can be used to specify that + several criteria may be considered when trying to decide if a + particular user will be granted admission. Satisfy can + take as an argument one of two options - all or + any. By default, it is assumed that the value is + all. This means that if several criteria are + specified, then all of them must be met in order for someone to + get in. However, if set to any, then several criteria + may be specified, but if the user satisfies any of these, then + they will be granted entrance.

    + +

    A very good example of this is using access control to + assure that, although a resource is password protected from + outside your network, all hosts inside the network will be + given free access to the resource. This would be accomplished + by using the Satisfy directive, as shown below.

    +
    +<Directory /usr/local/apache/htdocs/sekrit>
    +  AuthType Basic
    +  AuthName intranet
    +  AuthUserFile /www/passwd/users
    +  AuthGroupFile /www/passwd/groups
    +  Require group customers
    +  Order allow,deny
    +  Allow from internal.com
    +  Satisfy any
    +</Directory>
    +
    + +

    In this scenario, users will be let in if they either have a + password, or if they are in the internal network.

    + +

    Summary

    + +

    The various authentication modules provide a number of ways + to restrict access to your host based on the identity of the + user. They offer a somewhat standard interface to this + functionality, but provide different back-end mechanisms for + actually authenticating the user.

    + +

    And the access control mechanism allows you to restrict + access based on criteria unrelated to the identity of the + user.
    +

    +
    + +

    Footnotes

    + +
    +
    ... value.1
    + +
    There are actually a number of implementations that get + around this limitation. MLDBM is one of them, for example. + However, for the purposes of this discussion, we'll just deal + with standard Berkeley DB, which is likely to have shipped + with whatever operating system you are already running.
    + +
    ... file2
    + +
    Or, if you are using mod_auth_dbm, a DBM file.
    +
    +
    + + + diff --git a/htdocs/manual/howto/cgi.html.en b/htdocs/manual/howto/cgi.html.en new file mode 100644 index 00000000000..0033b39fd31 --- /dev/null +++ b/htdocs/manual/howto/cgi.html.en @@ -0,0 +1,551 @@ + + + + + + + Apache Tutorial: Dynamic Content with CGI + + + + + + +

    Dynamic Content with CGI

    + + + + + +
    + +

    Dynamic Content with CGI

    + + + + + + + +
    Related Modules
    +
    + mod_alias
    + mod_cgi
    +
    Related Directives
    +
    + AddHandler
    + Options
    + ScriptAlias
    +
    + +

    The CGI (Common Gateway Interface) defines a way for a web + server to interact with external content-generating programs, + which are often referred to as CGI programs or CGI scripts. It + is the simplest, and most common, way to put dynamic content on + your web site. This document will be an introduction to setting + up CGI on your Apache web server, and getting started writing + CGI programs.

    +
    + +

    Configuring Apache to + permit CGI

    + +

    In order to get your CGI programs to work properly, you'll + need to have Apache configured to permit CGI execution. There + are several ways to do this.

    + +

    ScriptAlias

    + +

    The ScriptAlias directive tells Apache that a + particular directory is set aside for CGI programs. Apache will + assume that every file in this directory is a CGI program, and + will attempt to execute it, when that particular resource is + requested by a client.

    + +

    The ScriptAlias directive looks like:

    +
    +        ScriptAlias /cgi-bin/ /usr/local/apache/cgi-bin/
    +
    + +

    The example shown is from your default + httpd.conf configuration file, if you installed + Apache in the default location. The ScriptAlias + directive is much like the Alias directive, which + defines a URL prefix that is to mapped to a particular + directory. Alias and ScriptAlias are + usually used for directories that are outside of the + DocumentRoot directory. The difference between + Alias and ScriptAlias is that + ScriptAlias has the added meaning that everything + under that URL prefix will be considered a CGI program. So, the + example above tells Apache that any request for a resource + beginning with /cgi-bin/ should be served from the + directory /usr/local/apache/cgi-bin/, and should + be treated as a CGI program.

    + +

    For example, if the URL + http://www.example.com/cgi-bin/test.pl is + requested, Apache will attempt to execute the file + /usr/local/apache/cgi-bin/test.pl and return the + output. Of course, the file will have to exist, and be + executable, and return output in a particular way, or Apache + will return an error message.

    + +

    CGI outside of + ScriptAlias directories

    + +

    CGI programs are often restricted to + ScriptAlias'ed directories for security reasons. + In this way, administrators can tightly control who is allowed + to use CGI programs. However, if the proper security + precautions are taken, there is no reason why CGI programs + cannot be run from arbitrary directories. For example, you may + wish to let users have web content in their home directories + with the UserDir directive. If they want to have + their own CGI programs, but don't have access to the main + cgi-bin directory, they will need to be able to + run CGI programs elsewhere.

    + +

    Explicitly + using Options to permit CGI execution

    + +

    You could explicitly use the Options directive, + inside your main server configuration file, to specify that CGI + execution was permitted in a particular directory:

    +
    +        <Directory /usr/local/apache/htdocs/somedir>
    +                Options +ExecCGI
    +        </Directory>
    +
    + +

    The above directive tells Apache to permit the execution of + CGI files. You will also need to tell the server what files are + CGI files. The following AddHandler directive + tells the server to treat all files with the cgi + or pl extension as CGI programs:

    +
    +     AddHandler cgi-script cgi pl
    +
    + +

    .htaccess + files

    + +

    A .htaccess file is a way to set configuration + directives on a per-directory basis. When Apache serves a + resource, it looks in the directory from which it is serving a + file for a file called .htaccess, and, if it finds + it, it will apply directives found therein. + .htaccess files can be permitted with the + AllowOverride directive, which specifies what + types of directives can appear in these files, or if they are + not allowed at all. To permit the directive we will need for + this purpose, the following configuration will be needed in + your main server configuration:

    +
    +        AllowOverride Options
    +
    + +

    In the .htaccess file, you'll need the + following directive:

    +
    +        Options +ExecCGI
    +
    + +

    which tells Apache that execution of CGI programs is + permitted in this directory.

    +
    + +

    Writing a CGI program

    + +

    There are two main differences between ``regular'' + programming, and CGI programming.

    + +

    First, all output from your CGI program must be preceded by + a MIME-type header. This is HTTP header that tells the client + what sort of content it is receiving. Most of the time, this + will look like:

    +
    +        Content-type: text/html
    +
    + +

    Secondly, your output needs to be in HTML, or some other + format that a browser will be able to display. Most of the + time, this will be HTML, but occasionally you might write a CGI + program that outputs a gif image, or other non-HTML + content.

    + +

    Apart from those two things, writing a CGI program will look + a lot like any other program that you might write.

    + +

    Your + first CGI program

    + +

    The following is an example CGI program that prints one line + to your browser. Type in the following, save it to a file + called first.pl, and put it in your + cgi-bin directory.

    +
    +        #!/usr/bin/perl
    +        print "Content-type: text/html\r\n\r\n";
    +        print "Hello, World.";
    +
    + +

    Even if you are not familiar with Perl, you should be able + to see what is happening here. The first line tells Apache (or + whatever shell you happen to be running under) that this + program can be executed by feeding the file to the interpreter + found at the location /usr/bin/perl. The second + line prints the content-type declaration we talked about, + followed by two carriage-return newline pairs. This puts a + blank line after the header, to indicate the end of the HTTP + headers, and the beginning of the body. The third line prints + the string ``Hello, World.'' And that's the end of it.

    + +

    If you open your favorite browser and tell it to get the + address

    +
    +        http://www.example.com/cgi-bin/first.pl
    +
    + +

    or wherever you put your file, you will see the one line + Hello, World. appear in your browser window. It's + not very exciting, but once you get that working, you'll have a + good chance of getting just about anything working.

    +
    + +

    But it's still not + working!

    + +

    There are four basic things that you may see in your browser + when you try to access your CGI program from the web:

    + +
    +
    The output of your CGI program
    + +
    Great! That means everything worked fine.
    +
    +
    + +
    The source code of your CGI program or a "POST Method Not + Allowed" message
    + +
    That means that you have not properly configured Apache + to process your CGI program. Reread the section on configuring Apache + and try to find what you missed.
    +
    +
    + +
    A message starting with "Forbidden"
    + +
    That means that there is a permissions problem. Check the + Apache error log and the section + below on file + permissions.
    +
    +
    + +
    A message saying "Internal Server Error"
    + +
    If you check the Apache error + log, you will probably find that it says "Premature end + of script headers", possibly along with an error message + generated by your CGI program. In this case, you will want to + check each of the below sections to see what might be + preventing your CGI program from emitting the proper HTTP + headers.
    +
    + +

    File + permissions

    + +

    Remember that the server does not run as you. That is, when + the server starts up, it is running with the permissions of an + unprivileged user - usually ``nobody'', or ``www'' - and so it + will need extra permissions to execute files that are owned by + you. Usually, the way to give a file sufficient permissions to + be executed by ``nobody'' is to give everyone execute + permission on the file:

    +
    +        chmod a+x first.pl
    +
    + +

    Also, if your program reads from, or writes to, any other + files, those files will need to have the correct permissions to + permit this.

    + +

    The exception to this is when the server is configured to + use suexec. This program allows + CGI programs to be run under different user permissions, + depending on which virtual host or user home directory they are + located in. Suexec has very strict permission checking, and any + failure in that checking will result in your CGI programs + failing with an "Internal Server Error". In this case, you will + need to check the suexec log file to see what specific security + check is failing.

    + +

    Path + information

    + +

    When you run a program from your command line, you have + certain information that is passed to the shell without you + thinking about it. For example, you have a path, which tells + the shell where it can look for files that you reference.

    + +

    When a program runs through the web server as a CGI program, + it does not have that path. Any programs that you invoke in + your CGI program (like 'sendmail', for example) will need to be + specified by a full path, so that the shell can find them when + it attempts to execute your CGI program.

    + +

    A common manifestation of this is the path to the script + interpreter (often perl) indicated in the first + line of your CGI program, which will look something like:

    +
    +     #!/usr/bin/perl
    +
    + +

    Make sure that this is in fact the path to the + interpreter.

    + +

    Syntax + errors

    + +

    Most of the time when a CGI program fails, it's because of a + problem with the program itself. This is particularly true once + you get the hang of this CGI stuff, and no longer make the + above two mistakes. Always attempt to run your program from the + command line before you test if via a browser. This will + eliminate most of your problems.

    + +

    Error logs

    + +

    The error logs are your friend. Anything that goes wrong + generates message in the error log. You should always look + there first. If the place where you are hosting your web site + does not permit you access to the error log, you should + probably host your site somewhere else. Learn to read the error + logs, and you'll find that almost all of your problems are + quickly identified, and quickly solved.

    +
    + +

    What's going on behind the + scenes?

    + +

    As you become more advanced in CGI programming, it will + become useful to understand more about what's happening behind + the scenes. Specifically, how the browser and server + communicate with one another. Because although it's all very + well to write a program that prints ``Hello, World.'', it's not + particularly useful.

    + +

    Environment variables

    + +

    Environment variables are values that float around you as + you use your computer. They are useful things like your path + (where the computer searches for a the actual file implementing + a command when you type it), your username, your terminal type, + and so on. For a full list of your normal, every day + environment variables, type env at a command + prompt.

    + +

    During the CGI transaction, the server and the browser also + set environment variables, so that they can communicate with + one another. These are things like the browser type (Netscape, + IE, Lynx), the server type (Apache, IIS, WebSite), the name of + the CGI program that is being run, and so on.

    + +

    These variables are available to the CGI programmer, and are + half of the story of the client-server communication. The + complete list of required variables is at http://hoohoo.ncsa.uiuc.edu/cgi/env.html

    + +

    This simple Perl CGI program will display all of the + environment variables that are being passed around. Two similar + programs are included in the cgi-bin directory of + the Apache distribution. Note that some variables are required, + while others are optional, so you may see some variables listed + that were not in the official list. In addition, Apache + provides many different ways for you to add your own environment variables to + the basic ones provided by default.

    +
    +     #!/usr/bin/perl
    +     print "Content-type: text/html\n\n";
    +     foreach $key (keys %ENV) {
    +          print "$key --> $ENV{$key}<br>";
    +     }
    +
    + +

    STDIN and + STDOUT

    + +

    Other communication between the server and the client + happens over standard input (STDIN) and standard + output (STDOUT). In normal everyday context, + STDIN means the keyboard, or a file that a program + is given to act on, and STDOUT usually means the + console or screen.

    + +

    When you POST a web form to a CGI program, the + data in that form is bundled up into a special format and gets + delivered to your CGI program over STDIN. The + program then can process that data as though it was coming in + from the keyboard, or from a file

    + +

    The ``special format'' is very simple. A field name and its + value are joined together with an equals (=) sign, and pairs of + values are joined together with an ampersand (&). + Inconvenient characters like spaces, ampersands, and equals + signs, are converted into their hex equivalent so that they + don't gum up the works. The whole data string might look + something like:

    +
    +     name=Rich%20Bowen&city=Lexington&state=KY&sidekick=Squirrel%20Monkey
    +
    + +

    You'll sometimes also see this type of string appended to + the a URL. When that is done, the server puts that string into + the environment variable called QUERY_STRING. + That's called a GET request. Your HTML form + specifies whether a GET or a POST is + used to deliver the data, by setting the METHOD + attribute in the FORM tag.

    + +

    Your program is then responsible for splitting that string + up into useful information. Fortunately, there are libraries + and modules available to help you process this data, as well as + handle other of the aspects of your CGI program.

    +
    + +

    CGI + modules/libraries

    + +

    When you write CGI programs, you should consider using a + code library, or module, to do most of the grunt work for you. + This leads to fewer errors, and faster development.

    + +

    If you're writing CGI programs in Perl, modules are + available on CPAN. The most + popular module for this purpose is CGI.pm. You might also + consider CGI::Lite, which implements a minimal set of + functionality, which is all you need in most programs.

    + +

    If you're writing CGI programs in C, there are a variety of + options. One of these is the CGIC library, from http://www.boutell.com/cgic/

    +
    + +

    For + more information

    + +

    There are a large number of CGI resources on the web. You + can discuss CGI problems with other users on the Usenet group + comp.infosystems.www.authoring.cgi. And the -servers mailing + list from the HTML Writers Guild is a great source of answers + to your questions. You can find out more at http://www.hwg.org/lists/hwg-servers/

    + +

    And, of course, you should probably read the CGI + specification, which has all the details on the operation of + CGI programs. You can find the original version at the NCSA + and there is an updated draft at the Common Gateway Interface + RFC project.

    + +

    When you post a question about a CGI problem that you're + having, whether to a mailing list, or to a newsgroup, make sure + you provide enough information about what happened, what you + expected to happen, and how what actually happened was + different, what server you're running, what language your CGI + program was in, and, if possible, the offending code. This will + make finding your problem much simpler.

    + +

    Note that questions about CGI problems should + never be posted to the Apache bug database + unless you are sure you have found a problem in the Apache + source code.

    + + + + diff --git a/htdocs/manual/howto/cgi.html.html b/htdocs/manual/howto/cgi.html.html new file mode 100644 index 00000000000..a5c802e644e --- /dev/null +++ b/htdocs/manual/howto/cgi.html.html @@ -0,0 +1,4 @@ + + + diff --git a/htdocs/manual/howto/cgi.html.ja.jis b/htdocs/manual/howto/cgi.html.ja.jis new file mode 100644 index 00000000000..1523ab286c4 --- /dev/null +++ b/htdocs/manual/howto/cgi.html.ja.jis @@ -0,0 +1,550 @@ + + + + + + Apache Tutorial: CGI $B$K$h$kF0E*%3%s%F%s%D(B + + + + + + + +

    CGI $B$K$h$kF0E*%3%s%F%s%D(B

    + + + + + + +
    + +

    CGI + $B$K$h$kF0E*%3%s%F%s%D(B

    + + + + + + + +
    $B4XO"%b%8%e!<%k(B
    +
    + mod_alias
    + mod_cgi
    +
    $B4XO"%G%#%l%/%F%#%V(B
    +
    + AddHandler
    + Options
    + ScriptAlias
    +
    + +

    CGI (Common Gateway Interface) $B$O!"%&%'%V%5!<%P$,(B + $B%3%s%F%s%D@8@.$r$9$k30It%W%m%0%i%`$H6(D4$7$FF0:n$9$k$?$a$NJ}K!$r(B + $BDj5A$7$F$$$^$9!#$=$N%W%m%0%i%`$O$7$P$7$P(B CGI $B%W%m%0%i%`$d(B CGI + $B%9%/%j%W%H$H8F$P$l$^$9!#(BCGI $B$O!"%&%'%V%5%$%H$KF0E*$J%3%s%F%s%D$r(B + $BCV$/$?$a$N:G$b4JC1$G0lHLE*$JJ}K!$G$9!#$3$N%I%-%e%a%s%H$O!"(B + Apache $B%&%'%V%5!<%P$G(B CGI $B$r@_Dj$7!"(B + CGI $B%W%m%0%i%`$r=q$-;O$a$k$?$a$NF~Lg=q$H$J$k$G$7$g$&!#(B

    +
    + +

    CGI $B$r5v2D$9$k$h$&$K(B + Apache $B$r@_Dj$9$k(B

    + +

    CGI $B%W%m%0%i%`$r@5$7$/F0:n$5$;$k$K$O!"(BCGI $B$r5v2D$9$k$h$&$K(B + Apache $B$N@_Dj$r9T$&I,MW$,$"$j$^$9!#(B + $B$3$l$r9T$J$&$?$a$NJ}K!$,$$$/$D$+$"$j$^$9!#(B

    + +

    ScriptAlias

    + +

    ScriptAlias $B%G%#%l%/%F%#%V$r;HMQ$7$F!"(B + CGI $B%W%m%0%i%`MQ$NFCJL$JJL%G%#%l%/%H%j$r(B Apache $B$K@_Dj$7$^$9!#(B + Apache $B$O!"$3$N%G%#%l%/%H%jCf$NA4$F$N%U%!%$%k$r(B CGI + $B%W%m%0%i%`$G$"$k$H2>Dj$7$^$9!#$=$7$F!"$3$NFCJL$J%j%=!<%9$,(B + $B%/%i%$%"%s%H$+$iMW5a$5$l$k$H!"$=$N%W%m%0%i%`$N + +

    ScriptAlias $B%G%#%l%/%F%#%V$O0J2<$N$h$&$K;HMQ$7$^$9(B:

    +
    +        ScriptAlias /cgi-bin/ /usr/local/apache/cgi-bin/
    +
    + +

    $B%G%U%)%k%H0LCV$K(B Apache $B$r%$%s%9%H!<%k$7$?$J$i$P!"(B + $B$3$NNc$O%G%U%)%k%H>uBV$N(B httpd.conf + $B@_Dj%U%!%$%k$K4^$^$l$F$$$^$9!#(BScriptAlias + $B%G%#%l%/%F%#%V$O!"(BURL $B$NA0$KIU2C$9$k%G%#%l%/%H%j$rDj5A$9$k(B + Alias $B%G%#%l%/%F%#%V$H$+$J$j;w$F$$$^$9!#(B + Alias $B$H(B ScriptAlias $B$ODL>o!"(B + DocumentRoot + $B%G%#%l%/%H%j30$N%G%#%l%/%H%j$N$?$a$K;HMQ$5$l$^$9!#(B + Alias $B$H(B ScriptAlias $B$H$N:9$O!"(B + ScriptAlias $B$,@\F,<-$G;O$^$k$9$Y$F$N(B URL $B$O(B CGI + $B%W%m%0%i%`$H$_$J$5$l$k$H$$$&DI2C$N0UL#$r4^$s$G$$$k$3$H$G$9!#(B + $B=>$C$F!">e5-$NNc$G$O!"(B/cgi-bin/ + $B$G;O$^$k%j%=!<%9$X$N$"$i$f$k%j%/%(%9%H$KBP$7$F!"%G%#%l%/%H%j(B + /usr/local/apache/cgi-bin/ $B$+$iDs6!$7!"$=$l$i$r(B + CGI $B%W%m%0%i%`$H$7$F07$&$h$&(B Apache $B$K<($7$^$9!#(B

    + +

    $BNc$($P!"(BURL http://dev.rcbowen.com/cgi-bin/test.pl + $B$,MW5a$5$l$?>l9g!"(BApache $B$O(B $B%U%!%$%k(B + /usr/local/apache/cgi-bin/test.pl + $B$r + +

    + ScriptAlias $B%G%#%l%/%H%j30$N(B CGI

    + +

    CGI $B%W%m%0%i%`$O!"%;%-%e%j%F%#>e$NM}M3$+$i(B ScriptAlias + $B$5$l$?%G%#%l%/%H%j$K@)8B$5$l$k$3$H$,$7$P$7$P$"$j$^$9!#$3$NJ}K!$K$h$j!"(B + CGI $B%W%m%0%i%`$r;HMQ$G$-$k%f!<%6$r4IM}UserDir $B%G%#%l%/%F%#%V$G(B + $BH`$i$N%[!<%`%G%#%l%/%H%jG[2<$K%&%'%V%3%s%F%s%D$r;}$?$;$?$$$H$7$^$9!#(B + $B$b$7!"H`$i$,(B CGI $B%W%m%0%i%`$r;}$D$3$H$rK>$s$G$$$F$b!"%a%$%s$N(B + cgi-bin $B%G%#%l%/%H%j$X$N%"%/%;%9$,$G$-$J$$>l9g!"(BCGI + $B%W%m%0%i%`$r$N>l=j$,I,MW$K$J$j$^$9!#(B +

    + +

    + CGI $B$N

    + +

    $B%5!<%P$N%a%$%s$N@_Dj%U%!%$%kCf$G(B Options + $B%G%#%l%/%F%#%V$rL@<(E*$K;HMQ$9$k$3$H$G!"FCDj$N%G%#%l%/%H%jG[2<$G(B + CGI $B$N +

    +        <Directory /usr/local/apache/htdocs/somedir>
    +                Options +ExecCGI
    +        </Directory>
    +
    + +

    $B>e5-%G%#%l%/%F%#%V$O!"(BCGI $B%U%!%$%k$NAddHandler $B%G%#%l%/%F%#%V$NNc$G$O!"(B + cgi $B$^$?$O(B pl $B$r3HD%;R$K;}$D$9$Y$F$N%U%!%$%k$r(B + CGI $B%W%m%0%i%`$H$7$F$_$J$9$3$H$r%5!<%P$KEA$($^$9(B:

    +
    +     AddHandler cgi-script cgi pl
    +
    + +

    .htaccess $B%U%!%$%k(B

    + +

    .htaccess + $B%U%!%$%k$O!"%G%#%l%/%H%jKh$K%G%#%l%/%F%#%V$r;XDj$9$kJ}K!$G$9!#(BApache + $B$O!"%j%=!<%9$rDs6!$9$k$H$-$K!"Ds6!$9$k%U%!%$%k$,CV$+$l$F$$$k%G%#%l%/%H%jCf$N(B + .htaccess $B$H$$$&%U%!%$%k$r;2>H$7$^$9!#$=$N%U%!%$%k$rH/8+$7$?$i!"(B + $B$=$NCf$GH/8+$5$l$?%G%#%l%/%F%#%V$,E,MQ$5$l$^$9!#(B.htaccess + $B%U%!%$%k$O!"(BAllowOverride $B%G%#%l%/%F%#%V$N;XDj$K$h$j(B + $B;H$($k$h$&$K$J$j$^$9!#(BAllowOverride$B%G%#%l%/%F%#%V$O!"(B + .htaccess $B%U%!%$%k$G@_Dj$G$-$k%G%#%l%/%F%#%V$N%?%$%W$r;XDj$7$^$9!#(B + AllowOverride $B%G%#%l%/%F%#%V$N;XDj$,$J$$>l9g!"$^$C$?$/;H$($^$;$s!#(B + CGI $B$N +

    +        AllowOverride Options
    +
    + +

    .htaccess $B%U%!%$%k$G$O!" +

    +        Options +ExecCGI
    +
    + +

    $B$3$N@_Dj$G$O!"$3$N%G%#%l%/%H%j$K$*$1$k(B + CGI $B%W%m%0%i%`$N +


    + +

    CGI $B%W%m%0%i%`$r=q$/(B

    + +

    $BDL>o$N%W%m%0%i%_%s%0$H(B + CGI $B%W%m%0%i%_%s%0$N4V$K$O + +

    $B0l$D$O!"(BCGI $B%W%m%0%i%`$N$9$Y$F$N=PNO$K$O(B MIME-type + $B%X%C%@$rIU$1$J$1$l$P$J$j$^$;$s!#$3$l$O$I$N$h$&$Jl9g$G$O!" +

    +        Content-type: text/html
    +
    + +

    $B$b$&0l$D$O!"=PNO$r(B HTML $B$+!"(B + $B%V%i%&%6$,I=<($9$k$3$H$,$G$-$k2?$+B>$N7A<0$K$9$kI,MW$,$"$j$^$9!#(B + $BBgDq$N>l9g$O(B HTML $B$G$7$g$&$,!"(BGIF $B%$%a!<%8$dB>$NHs(B HTML + $B%3%s%F%s%D$r=PNO$9$k(B CGI $B%W%m%0%i%`$r=q$/$3$H$b$"$k$G$7$g$&!#(B +

    + +

    $B$3$l$iFsE@0J30$G$O!"(BCGI $B%W%m%0%i%`$r=q$/$3$H$O!"(B + $B$"$J$?$,=q$$$F$$$kB>$N%W%m%0%i%`$HBg$$$K;w$F$$$k$G$7$g$&!#(B

    + +

    $B$"$J$?$N:G=i$N(B CGI $B%W%m%0%i%`(B

    + +

    $Bfirst.pl $B$H$$$&%U%!%$%k$KJ]B8$7!"(B + $B$=$l$r(B cgi-bin $B%G%#%l%/%H%j$KCV$$$F$/$@$5$$!#(B +

    +
    +        #!/usr/bin/perl
    +        print "Content-type: text/html\r\n\r\n";
    +        print "Hello, World.";
    +
    + +

    Perl $B$K@:DL$7$F$$$J$/$F$b!"(B + $B2?$,5/$3$k$+$rM}2r$9$k$3$H$O$G$-$k$O$:$G$9!#(B + 1 $B9TL\$O!"(B/usr/bin/perl $B$G8+$D$1$i$l$k%$%s%?%W%j%?(B + $B$K$3$N%U%!%$%k$r6!5k$9$k$3$H$G$3$N%W%m%0%i%`$,e$G + +

    $B9%$_$N%V%i%&%6$r3+$-!"%"%I%l%9(B

    +
    +        http://www.example.com/cgi-bin/first.pl
    +
    + +

    $B$"$k$$$O%U%!%$%k$rCV$$$?%m%1!<%7%g%s$r;XDj$9$k$H!"(B + Hello, World. $B$H$$$&(B 1 $B9T$,%V%i%&%6%&%#%s%I(B + $B$K8=$l$k$G$7$g$&!#$=$l$O$"$^$j%(%-%5%$%F%#%s%0$J$3$H$G$O$"$j$^$;$s!#(B + $B$7$+$7!"$3$l$,$&$^$/F0$1$P!"(B + $BB>$N$I$N$h$&$J$b$N$G$bF0$+$9$3$H$,$G$-$k$h$&$K$J$j$^$9!#(B

    +
    + +

    $B$7$+$7!"$^$@F0$+$J$$(B !

    + +

    $B%&%'%V$+$i(B CGI $B%W%m%0%i%`$X$N%"%/%;%9$r9T$J$C$?$H$-!"(B + $B%V%i%&%6$G8+$k2DG=@-$,$"$k;M$D$N4pK\E*$J$3$H$,$"$j$^$9(B:

    + +
    +
    CGI $B%W%m%0%i%`$N=PNO(B
    + +
    $BAG@2$i$7$$(B ! $B$=$l$O$9$Y$F$,$&$^$/F0$$$?$3$H$r0UL#$7$^$9!#(B
    +
    +
    + +
    CGI $B%W%m%0%i%`$N%=!<%9%3!<%I!"$^$?$O(B + "POST Method Not Allowed" $B$H$$$&%a%C%;!<%8(B
    + +
    $B$3$l$O!"(BCGI $B%W%m%0%i%`$r=hM}$G$-$k$h$&(B + Apache $B$rE,@Z$K@_Dj$7$F$$$J$+$C$?$3$H$r0UL#$7$^$9!#(B + $B!V(BCGI $B$r5v2D$9$k$h$&$K(B + Apache $B$r@_Dj$9$k!W(B$B$N>O$rFI$_D>$7!"(B + $B$"$J$?$,2?$r4V0c$($?$+$rC5$7$F$_$F$/$@$5$$!#(B
    +
    +
    + +
    $B%a%C%;!<%8$,(B "Forbidden" $B$G;O$^$C$F$$$k(B
    + +
    $B$3$l$O%Q!<%_%C%7%g%s$NLdBj$H$$$&$3$H$r0UL#$7$^$9!#(B + Apache $B$N%(%i!<%m%0(B$B$H!"8e=R$N(B + $B!V%U%!%$%k$N%Q!<%_%C%7%g%s!W(B$B$N>O$r(B + $B%A%'%C%/$7$F$/$@$5$$!#(B
    +
    +
    + +
    "Internal Server Error" $B$H$$$&%a%C%;!<%8(B
    + +
    Apache $B$N%(%i!<%m%0(B$B$r%A%'%C%/$9$k$H!"(B + "Premature end of script headers" $B$H$$$&%m%0$,5-O?$5$l$F$$$k$H;W$$$^$9!#(B + $B$=$7$F!"$*$=$i$/(B CGI $B%W%m%0%i%`$K$h$C$F@8@.$5$l$?%(%i!<%a%C%;!<%8(B + $B$b5-O?$5$l$F$$$k$G$7$g$&!#$3$N>l9g!"(BCGI $B%W%m%0%i%`$,E,@Z$J(B + HTTP $B%X%C%@$r=PNO$G$-$J$$860x$rCN$k$?$a$K!"(B + $B0J2<$N3F>O$G%A%'%C%/$7$F$_$F$/$@$5$$!#(B +
    +
    + +

    $B%U%!%$%k$N%Q!<%_%C%7%g%s(B

    + +

    $B%5!<%P$O$"$J$?$N8"8B$Go(B + ``nobody'' $B$d(B ``www'' $B$N8"8B$Go!"(B``nobody'' $B$, +

    +        chmod a+x first.pl
    +
    + +

    $B$^$?!"$b$7$"$J$?$N%W%m%0%i%`$,B>$N%U%!%$%k$rFI$_=q$-$9$k$J$i$P!"(B + $B$=$l$i$N%U%!%$%k$O!"$3$l$,2DG=$H$J$k@5$7$$%Q!<%_%C%7%g%s(B + $B$r;}$C$F$$$kI,MW$,$"$j$^$9!#(B

    + +

    $B$3$l$KBP$9$kNc30$O!"%5!<%P$,(B suexec + $B$r;HMQ$9$k$h$&@_Dj$5$l$F$$$k>l9g$G$9!#(Bsuexec $B$O!"(BCGI + $B%W%m%0%i%`$,CV$+$l$F$$$k%P!<%A%c%k%[%9%H$^$?$O%f!<%6$N(B + $B%[!<%`%G%#%l%/%H%j$K$h$C$F!"0[$J$k%f!<%68"8B$Gl9g!"$I$N%;%-%e%j%F%#%A%'%C%/$,<:GT$7$F$$$k$N$+$rCN$k$?$a$K(B + suexec $B%m%0%U%!%$%k$r%A%'%C%/$9$kI,MW$,$"$j$^$9!#(B

    + +

    $B%Q%9>pJs(B

    + +

    $B%3%^%s%I%i%$%s$+$i%W%m%0%i%`$rpJs$,$"$j$^$9!#(B + $BNc$($P!";2>H$9$k%U%!%$%k$N$?$a$K$I$3$r8!:w$7$?$i$h$$$+$r(B + $B%7%'%k$KEA$($k%Q%9$,$"$j$^$9!#(B

    + +

    $B%W%m%0%i%`$,(B CGI $B%W%m%0%i%`$H$7$F%&%'%V%5!<%P$K$h$C$F + +

    $BF1MM$J$3$H$O!"%9%/%j%W%H$N%$%s%?%W%j%?(B ($B$7$P$7$P(B perl + ) $B$X$N%Q%9$G!"(BCGI $B%W%m%0%i%`$N(B 1 $B9TL\$K + +

    +     #!/usr/bin/perl
    +
    + +

    $B$3$l$,%$%s%?!<%W%j%?$X$N + + +

    $B9=J8%(%i!<(B

    + +

    CGI $B%W%m%0%i%`$,<:GT$9$k$N$OBgDq!"(B + $B%W%m%0%i%`<+?H$KLdBj$,$"$k>l9g$G$9!#0lEY(B CGI $B$N;H$$J}$rM}2r$7!"(B + $BA0=R$NFs$D$N8m$j$rHH$7$F$$$J$$$J$i$P!"$^$:4V0c$$$J$/$=$&$G$7$g$&!#(B + $B%V%i%&%6$rDL$7$F%F%9%H$r9T$&A0$KI,$:!"%3%^%s%I%i%$%s$+$i(B + $B%W%m%0%i%`$N + +

    $B%(%i!<%m%0(B

    + +

    $B%(%i!<%m%0$OM'C#$G$9!#A4$F$N$&$^$/$$$+$J$$$3$H$O!"(B + $B%(%i!<%m%0$K%a%C%;!<%8$r@8@.$7$^$9!#I,$:$=$l$r:G=i$K8+$k$Y$-$G$9!#(B + $B$b$7!"$"$J$?$,%&%'%V%5%$%H$rl=j$,%(%i!<%m%0$N;2>H$r(B + $B5v$7$F$$$J$$$J$i$P!"$-$C$HB>$N%5%$%H$G +


    + +

    $BN"$G2?$,5/$3$C$F$$$k$N$+(B?

    + + +

    CGI $B%W%m%0%i%_%s%0$K=OC#$9$k$H!"(B + $BN"$G5/$3$C$F$$$k$3$H$K$D$$$F99$KM}2r$9$k$3$H$OM-1W$K$J$k$G$7$g$&!#(B + $B%V%i%&%6$H%5!<%P$,$I$N$h$&$KAj8_DL?.$9$k$+$K$D$$$F$OFC$K$=$&$G$9!#(B + $B$J$<$J$i!"(B``Hello, World.'' + $B$r0u;z$9$k%W%m%0%i%`$r=q$/$3$H$O$^$3$H$K7k9=$G$9$,!"(B + $B$=$l$OFC$KM-1W$G$O$"$j$^$;$s!#(B

    + +

    $B4D6-JQ?t(B

    + +

    $B4D6-JQ?t$O!"$"$J$?$,%3%s%T%e!<%?$r;H$&$H$-$KJU$j$KB8:_$7$F$$$kCM$G$9!#(B + $B$=$l$i$O!"%Q%9(B + ($B%3%^%s%I$r%?%$%W$7$?$H$-$K!"Co$N!"KhF|$N4D6-JQ?t$N40A4$J%j%9%H$rD4$Y$k$K$O!"(B + $B%3%^%s%I%W%m%s%W%H$G(B env $B$rF~NO$7$^$9!#(B

    + +

    CGI $B$N=hM}Cf!"%5!<%P$H%V%i%&%6$b4D6-JQ?t$r@_Dj$7!"(B + $B$=$l$K$h$jAj8_$KDL?.$9$k$3$H$,$G$-$k$h$&$K$J$j$^$9!#(B + $B$=$N4D6-JQ?t$O!"%V%i%&%6%?%$%W(B (Netscape, IE, Lynx)$B!"(B + $B%5!<%P%?%$%W(B (Apache, IIS, WebSite)$B!"A0$J$I$N$h$&$J$b$N$G$9!#(B

    + +

    $B$3$l$i$NJQ?t$O(B CGI $B%W%m%0%i%^$,;HMQ$9$k$3$H$,$G$-$^$9!#(B + $B$=$7$F!"$=$l$O%/%i%$%"%s%H$H%5!<%P$NDL?.$NOC$NH>J,$G$9!#(B + $BI,MW$JJQ?t$N40A4$J%j%9%H$O(B http://hoohoo.ncsa.uiuc.edu/cgi/env.html $B$K$"$j$^$9!#(B

    + +

    $B0J2<$NC1=c$J(B Perl CGI $B%W%m%0%i%`$O!"(B + $BEO$5$l$kA4$F$N4D6-JQ?t$rI=<($7$^$9!#F1MM$N%W%m%0%i%`$O!"(B + Apache $B%G%#%9%H%j%S%e!<%7%g%s$N(B cgi-bin + $B%G%#%l%/%H%j$KFs$D4^$^$l$F$$$^$9!#$$$/$D$+$NJQ?t$,I,?\$G$"$j!"(B + $B$$$/$D$+$OG$0U$G$"$k$3$H$KCm0U$7$F$/$@$5$$!#$=$7$F!"(B + $B8x<0$N%j%9%H$K$O$J$$$$$/$D$+$NJQ?t$,I=<($5$l$F$$$k$+$b$7$l$^$;$s!#(B + $B$5$i$K!"(BApache $B$O%G%U%)%k%H$GMQ0U$5$l$F$$$k4pK\E*$J$b$N$K(B + $B$"$J$?<+?H$N4D6-JQ?t$r2C$($k(B$B$?$a$N!"(B + $BB?$/$N0[$J$kJ}K!$rMQ0U$7$F$7$^$9!#(B

    +
    +     #!/usr/bin/perl
    +     print "Content-type: text/html\n\n";
    +     foreach $key (keys %ENV) {
    +          print "$key --> $ENV{$key}<br>";
    +     }
    +
    + +

    STDIN $B$H(B + STDOUT

    + +

    $B%5!<%P$H%/%i%$%"%s%H4V$N$b$&0l$D$NDL?.$O!"I8=`F~NO(B + (STDIN)$B$HI8=`=PNO(B (STDOUT) + $B$rDL$8$F9T$J$o$l$^$9!#DL>o$NJ8L.$K$*$$$F!"(BSTDIN + $B$O%-!<%\!<%I$d%W%m%0%i%`$,F0:n$9$k$?$a$KM?$($i$l$k%U%!%$%k$r0UL#$7!"(B + STDOUT $B$ODL>o%3%s%=!<%k$^$?$O%9%/%j!<%s$r0UL#$7$^$9!#(B +

    + +

    $B%&%'%V%U%)!<%`$+$i(B CGI $B%W%m%0%i%`$X(BPOST $B$7$?$H$-!"(B + $B%U%)!<%`$N%G!<%?$OFCJL$J%U%)!<%^%C%H$GB+$M$i$l!"(BSTDIN + $B$rDL$7$F!"(BCGI $B%W%m%0%i%`$K0z$-EO$5$l$^$9!#(B + $B%W%m%0%i%`$O%G!<%?$,%-!<%\!<%I$b$7$/$O%U%!%$%k(B + $B$+$iMh$F$$$?$+$N$h$&$K=hM}$9$k$3$H$,$G$-$^$9!#(B

    + +

    $B!VFCJL$J%U%)!<%^%C%H!W$O$H$F$bC1=c$G$9!#%U%#!<%k%IL>$HCM$O(B + $B%$%3!<%k(B (=) $B$G7k$P$l$^$9!#$=$7$FCM$NAH$O%"%s%Q%5%s%I(B (&) + $B$G7k$P$l$^$9!#%9%Z!<%9!"%"%s%Q%5%s%I!"%$%3!<%k$N$h$&$JLLE]$JJ8;z$O!"(B + $B$=$l$i$,F0:n$rBLL\$K$7$J$$$h$&$K$=$NJ8;z$KAjEv$9$k(B + 16 $B?J$KJQ49$5$l$^$9!#A4%G!<%?J8;zNs$O!"0J2<$N$h$&$K$J$j$^$9(B: +

    + +
    +     name=Rich%20Bowen&city=Lexington&state=KY&sidekick=Squirrel%20Monkey
    +
    + +

    $B;~!9!"$3$N$h$&$JJ8;zNs$,(B URL $B$KIU2C$5$l$k$N$r8+$k$G$7$g$&!#(B + $B$=$N>l9g!"%5!<%P$O(B QUERY_STRING + $B$H$$$&4D6-JQ?t$K$=$NJ8;zNs$rF~$l$^$9!#$=$l$O(B GET + $B%j%/%(%9%H$H8F$P$l$^$9!#(BHTML $B%U%)!<%`$G$O!"%G!<%?$rEO$9$?$a$K(B + GET $B$H(B POST $B$N$I$A$i$r;HMQ$9$k$+$r!"(B + FORM$B%?%0$N(B METHOD + $BB0@-$N@_Dj$G;XDj$7$^$9!#(B

    + +

    CGI $B%W%m%0%i%`$O!"$=$NJ8;zNs$rLr$KN)$D>pJs$KJ,3d$9$k@UG$$,$"$j$^$9!#(B + $B9,$$$K$b!"$=$N%G!<%?=hM}$r=u$1$k%i%$%V%i%j$d%b%8%e!<%k$,B8:_$7$^$9!#(B + $B$3$l$i$O!"(BCGI $B%W%m%0%i%`$NB>$NLL$G$bF1MM$KLr$KN)$A$^$9!#(B +

    +
    + +

    CGI $B%b%8%e!<%k(B/$B%i%$%V%i%j(B

    + +

    CGI $B%W%m%0%i%`$r=q$/$H$-!"LLE]$J;E;v$NBgItJ,$r$7$F$/$l$k(B + $B%3!<%I%i%$%V%i%j$^$?$O%b%8%e!<%k$r;H$&$3$H$r8!F$$9$Y$-$G$9!#(B + $B$3$l$O%(%i!<$r8:$i$7!"Aa$$3+H/$K$D$J$,$j$^$9!#(B

    + +

    Perl $B$G(B CGI $B%W%m%0%i%`$r=q$$$F$$$k$J$i!"%b%8%e!<%k$O(B + CPAN $B$GDs6!$5$l$F$$$^$9!#(B + $B$3$NL\E*$N$?$a$N:G$bIa5Z$7$F$$$k%b%8%e!<%k$O(B CGI.pm $B$G$9!#(B + CGI::Lite $B$b8!F$$7$^$7$g$&!#$3$l$O!"$[$H$s$I$N%W%m%0%i%`(B + $B$K$*$$$FI,MW$H$9$k$9$Y$F$N5!G=$N:G>.%;%C%H$N + +

    C $B$G(B CGI $B%W%m%0%i%`$r=q$$$F$$$k$J$i!"$$$m$$$m$J%*%W%7%g%s$,$"$j$^$9!#(B + $B$3$l$i$NFb$N0l$D$O(B http://www.boutell.com/cgic/ $B$GDs6!$5$l$F$$$k(B CGIC $B%i%$%V%i%j$G$9!#(B

    +
    + +

    $B99$J$k>pJs(B

    + +

    CGI $B$K4X$9$k>pJs$O%&%'%V$G?tB?$/Ds6!$5$l$F$$$^$9!#(B + CGI $B$NLdBj$K$D$$$F$O(B Usenet $B$N(B comp.infosystems.www.authoring.cgi + $B$G!"B>$N%f!<%6$HO@5D$9$k$3$H$,$G$-$^$9!#(BHTML Writers Guide $B$N(B -servers + $B%a!<%j%s%0%j%9%H$O!"$"$J$?$Nhttp://www.hwg.org/lists/hwg-servers/ $B$G99$KB?$/$rC5$7=P$9$3$H$,$G$-$^$9!#(B

    + +

    $B$=$7$F$b$A$m$s!"$*$=$i$/(B CGI + $B%W%m%0%i%`$NF0:n$K4X$9$k>\:Y$NA4$F$,5-=R$5$l$F$$$k(B CGI + $B$N;EMM$rFI$`$Y$-$G$9!#%*%j%8%J%k%P!<%8%g%s$r(B NCSA $B$G!"(B + $B%"%C%W%G!<%H$5$l$?%I%i%U%H$r(B Common Gateway Interface RFC + $B%W%m%8%'%/%H(B$B$G;2>H$9$k$3$H$,$G$-$^$9!#(B

    + +

    CGI $B$NLdBj$K$D$$$F!"(B + $B2C$o$C$F$$$k%a!<%j%s%0%j%9%H$^$?$O%K%e!<%9%0%k!<%W$KpJs$H!"(B + $B2DG=$G$"$l$PLdBj$N%3!<%I$rDs6!$9$k$h$&$K$7$F$/$@$5$$!#(B + $B$=$&$9$k$3$H$G!"LdBj$,$h$j4VC1$K8+$D$+$k$h$&$K$J$j$^$9!#(B

    + +

    Apache + $B$N%=!<%9%3!<%I$K$*$$$FLdBj$rH/8+$7$?$3$H$r3N?.$7$F$$$J$$8B$j!"(B + CGI $B$NLdBj$K4X$9$k + + + diff --git a/htdocs/manual/howto/footer.html b/htdocs/manual/howto/footer.html new file mode 100644 index 00000000000..10a731d1480 --- /dev/null +++ b/htdocs/manual/howto/footer.html @@ -0,0 +1,6 @@ +


    + +

    Apache HTTP Server Version 1.3

    + Index + Home + diff --git a/htdocs/manual/howto/header.html b/htdocs/manual/howto/header.html new file mode 100644 index 00000000000..272a770308e --- /dev/null +++ b/htdocs/manual/howto/header.html @@ -0,0 +1,6 @@ +
    + [APACHE DOCUMENTATION] + +

    Apache HTTP Server Version 1.3

    +
    + diff --git a/htdocs/manual/howto/htaccess.html b/htdocs/manual/howto/htaccess.html new file mode 100755 index 00000000000..794e5bb09b7 --- /dev/null +++ b/htdocs/manual/howto/htaccess.html @@ -0,0 +1,416 @@ + + + + + + + Apache Tutorial: .htaccess files + + + + + +

    .htaccess files

    + + + + + + + + + + + +
    Related Modules
    +
    + core
    + mod_auth
    + mod_cgi
    + mod_include
    +
    mod_mine
    +
    Related Directives
    +
    + AccessFileName
    + AllowOverride
    + Options
    + AddHandler
    + SetHandler
    + AuthType
    + AuthName
    + AuthUserFile
    + AuthGroupFile
    + Require
    +
    +
    + +

    What they are/How to use them

    + +

    .htaccess files (or "distributed configuration files") + provide a way to make configuration changes on a per-directory basis. A + file, containing one or more configuration directives, is placed in a + particular document directory, and the directives apply to that + directory, and all subdirectories thereof.

    + +

    Note: If you want to call your .htaccess file something + else, you can change the name of the file using the AccessFileName + directive. For example, if you would rather call the file + .config then you can put the following in your server + configuration file:

    + +
    + + + + +
    AccessFileName .config
    +
    + +

    What you can put in these files is determined by the AllowOverride + directive. This directive specifies, in categories, what directives + will be honored if they are found in a .htaccess file. If + a directive is permitted in a .htaccess file, the + documentation for that directive will contain an Override section, + specifying what value must be in AllowOverride in order + for that directive to be permitted.

    + +

    For example, if you look at the documentation for the AddDefaultCharset + directive, you will find that it is permitted in .htaccess + files. (See the Context line in the directive summary.) The Override line reads + "FileInfo". Thus, you must have at least + "AllowOverride FileInfo" in order for this directive to be + honored in .htaccess files.

    + +

    Example:

    + +
    + + + + + + + + + + + + +
    Context:server config, virtual host, directory, .htaccess
    Override:FileInfo
    +
    + +

    If you are unsure whether a particular directive is permitted in a + .htaccess file, look at the documentation for that + directive, and check the Context line for ".htaccess."

    + +

    When (not) to use .htaccess files

    + +

    In general, you should never use .htaccess files unless + you don't have access to the main server configuration file. There is, + for example, a prevailing misconception that user authentication should + always be done in .htaccess files. This is simply not the + case. You can put user authentication configurations in the main server + configuration, and this is, in fact, the preferred way to do + things.

    + +

    .htaccess files should be used in a case where the + content providers need to make configuration changes to the server on a + per-directory basis, but do not have root access on the server system. + In the event that the server administrator is not willing to make + frequent configuration changes, it might be desirable to permit + individual users to make these changes in .htaccess files + for themselves. This is particularly true, for example, in cases where + ISPs are hosting multiple user sites on a single machine, and want + their users to be able to alter their configuration.

    + +

    However, in general, use of .htaccess files should be + avoided when possible. Any configuration that you would consider + putting in a .htaccess file, can just as effectively be + made in a <Directory> + section in your main server configuration file.

    + +

    There are two main reasons to avoid the use of + .htaccess files.

    + +

    The first of these is performance. When AllowOverride + is set to allow the use of .htaccess files, Apache will + look in every directory for .htaccess files. Thus, + permitting .htaccess files causes a performance hit, + whether or not you actually even use them! Also, the + .htaccess file is loaded every time a document is + requested.

    + +

    Further note that Apache must look for .htaccess files + in all higher-level directories, in order to have a full complement of + directives that it must apply. (See section on how + directives are applied.) Thus, if a file is requested out of a + directory /www/htdocs/example, Apache must look for the + following files:

    + +
    + + + + +
    /.htaccess
    + /www/.htaccess
    + /www/htdocs/.htaccess
    + /www/htdocs/example/.htaccess
    +
    + +

    And so, for each file access out of that directory, there are 4 + additional file-system accesses, even if none of those files are + present. (Note that this would only be the case if .htaccess files were + enabled for /, which is not usually the case.)

    + +

    The second consideration is one of security. You are permitting + users to modify server configuration, which may result in changes over + which you have no control. Carefully consider whether you want to give + your users this privilege.

    + +

    Note that it is completely equivalent to put a .htaccess file in a + directory /www/htdocs/example containing a directive, and + to put that same directive in a Directory section <Directory + /www/htdocs/example> in your main server configuration:

    + +

    .htaccess file in /www/htdocs/example:

    + +
    + + + + +
    AddType text/example .exm +
    +
    + +

    httpd.conf

    + +
    + + + + +
    <Directory + /www/htdocs/example>
    + AddType text/example .exm
    + </Directory>
    +
    + +

    However, putting this configuration in your server configuration + file will result in less of a performance hit, as the configuration is + loaded once when Apache starts, rather than every time a file is + requested.

    + +

    The use of .htaccess files can be disabled completely + by setting the AllowOverride directive to "none"

    + +
    + + + + +
    AllowOverride None
    +
    + +

    How directives are applied

    + +

    The configuration directives found in a .htaccess file + are applied to the directory in which the .htaccess file + is found, and to all subdirectories thereof. However, it is important + to also remember that there may have been .htaccess files + in directories higher up. Directives are applied in the order that they + are found. Therefore, a .htaccess file in a particular + directory may override directives found in .htaccess files + found higher up in the directory tree. And those, in turn, may have + overridden directives found yet higher up, or in the main server + configuration file itself.

    + +

    Example:

    + +

    In the directory /www/htdocs/example1 we have a + .htaccess file containing the following:

    + +
    + + + + +
    Options +ExecCGI
    +
    + +

    (Note: you must have "AllowOverride Options" in effect + to permit the use of the "Options" directive in + .htaccess files.)

    + +

    In the directory /www/htdocs/example1/example2 we have + a .htaccess file containing:

    + +
    + + + + +
    Options Includes
    +
    + +

    Because of this second .htaccess file, in the directory + /www/htdocs/example1/example2, CGI execution is not + permitted, as only Options Includes is in effect, which + completely overrides any earlier setting that may have been in + place.

    + +

    Authentication example

    + +

    If you jumped directly to this part of the document to find out how + to do authentication, it is important to note one thing. There is a + common misconception that you are required to use + .htaccess files in order to implement password + authentication. This is not the case. Putting authentication directives + in a <Directory> section, in your main server + configuration file, is the preferred way to implement this, and + .htaccess files should be used only if you don't have + access to the main server configuration file. See above for a + discussion of when you should and should not use .htaccess + files.

    + +

    Having said that, if you still think you need to use a + .htaccess file, you may find that a configuration such as + what follows may work for you.

    + +

    You must have "AllowOverride AuthConfig" in effect for + these directives to be honored.

    + +

    .htaccess file contents:

    + +
    + + + + +
    AuthType Basic
    + AuthName "Password Required"
    + AuthUserFile /www/passwords/password.file
    + AuthGroupFile /www/passwords/group.file
    + Require Group admins
    +
    + +

    Note that AllowOverride AuthConfig must be in effect + for these directives to have any effect.

    + +

    Please see the authentication tutorial for a + more complete discussion of authentication and authorization.

    + +

    Server side includes example

    + +

    Another common use of .htaccess files is to enable + Server Side Includes for a particular directory. This may be done with + the following configuration directives, placed in a + .htaccess file in the desired directory:

    + +
    + + + + +
    Options +Includes
    + AddType text/html shtml
    + AddHandler server-parsed shtml
    +
    + +

    Note that AllowOverride Options and AllowOverride + FileInfo must both be in effect for these directives to have any + effect.

    + +

    Please see the SSI tutorial for a more + complete discussion of server-side includes.

    + +

    CGI example

    + +

    Finally, you may wish to use a .htaccess file to permit + the execution of CGI programs in a particular directory. This may be + implemented with the following configuration:

    + +
    + + + + +
    Options +ExecCGI
    + AddHandler cgi-script cgi pl
    +
    + +

    Alternately, if you wish to have all files in the given directory be + considered to be CGI programs, this may be done with the following + configuration:

    + +
    + + + + +
    Options +ExecCGI
    + SetHandler cgi-script
    +
    + +

    Note that AllowOverride Options must be in effect for + these directives to have any effect.

    + +

    Please see the CGI tutorial for a more + complete discussion of CGI programming and configuration.

    + +

    Troubleshooting

    + +

    When you put configuration directives in a .htaccess + file, and you don't get the desired effect, there are a number of + things that may be going wrong.

    + +

    Most commonly, the problem is that AllowOverride is not + set such that your configuration directives are being honored. Make + sure that you don't have a AllowOverride None in effect + for the file scope in question. A good test for this is to put garbage + in your .htaccess file and reload. If a server error is + not generated, then you almost certainly have AllowOverride + None in effect.

    + +

    If, on the other hand, you are getting server errors when trying to + access documents, check your Apache error log. It will likely tell you + that the directive used in your .htaccess file is not permitted. + Alternately, it may tell you that you had a syntax error, which you + will then need to fix.

    + + + diff --git a/htdocs/manual/howto/ssi.html.en b/htdocs/manual/howto/ssi.html.en new file mode 100644 index 00000000000..78c2e68d1f7 --- /dev/null +++ b/htdocs/manual/howto/ssi.html.en @@ -0,0 +1,548 @@ + + + + + + + Apache Tutorial: Introduction to Server Side + Includes + + + + + + +

    Apache Tutorial: Introduction to Server Side + Includes

    + + + + + +
    + +

    Apache + Tutorial: Introduction to Server Side Includes

    + + + + + + + +
    Related Modules
    +
    + mod_include
    + mod_cgi
    + mod_expires
    +
    Related Directives
    +
    + Options
    + XBitHack
    + AddType
    + AddHandler
    + BrowserMatchNoCase
    +
    + +

    This article deals with Server Side Includes, usually called + simply SSI. In this article, I'll talk about configuring your + server to permit SSI, and introduce some basic SSI techniques + for adding dynamic content to your existing HTML pages.

    + +

    In the latter part of the article, we'll talk about some of + the somewhat more advanced things that can be done with SSI, + such as conditional statements in your SSI directives.

    +
    + +

    What are SSI?

    + +

    SSI (Server Side Includes) are directives that are placed in + HTML pages, and evaluated on the server while the pages are + being served. They let you add dynamically generated content to + an existing HTML page, without having to serve the entire page + via a CGI program, or other dynamic technology.

    + +

    The decision of when to use SSI, and when to have your page + entirely generated by some program, is usually a matter of how + much of the page is static, and how much needs to be + recalculated every time the page is served. SSI is a great way + to add small pieces of information, such as the current time. + But if a majority of your page is being generated at the time + that it is served, you need to look for some other + solution.

    +
    + +

    Configuring your server + to permit SSI

    + +

    To permit SSI on your server, you must have mod_include installed and + enabled. Additionally, you must have the following + directive either in your httpd.conf file, or in a + .htaccess file:

    +
    +        Options +Includes
    +
    + +

    This tells Apache that you want to permit files to be parsed + for SSI directives. Note that most configurations contain + multiple Options directives + that can override each other. You will probably need to apply the + Options to the specific directory where you want SSI + enabled in order to assure that it gets evaluated last.

    + +

    Not just any file is parsed for SSI directives. You have to + tell Apache which files should be parsed. There are two ways to + do this. You can tell Apache to parse any file with a + particular file extension, such as .shtml, with + the following directives:

    +
    +        AddType text/html .shtml
    +        AddHandler server-parsed .shtml
    +
    + +

    One disadvantage to this approach is that if you wanted to + add SSI directives to an existing page, you would have to + change the name of that page, and all links to that page, in + order to give it a .shtml extension, so that those + directives would be executed.

    + +

    The other method is to use the XBitHack + directive:

    +
    +        XBitHack on
    +
    + +

    XBitHack tells Apache to parse files for SSI + directives if they have the execute bit set. So, to add SSI + directives to an existing page, rather than having to change + the file name, you would just need to make the file executable + using chmod.

    +
    +        chmod +x pagename.html
    +
    + +

    A brief comment about what not to do. You'll occasionally + see people recommending that you just tell Apache to parse all + .html files for SSI, so that you don't have to + mess with .shtml file names. These folks have + perhaps not heard about XBitHack. The thing to + keep in mind is that, by doing this, you're requiring that + Apache read through every single file that it sends out to + clients, even if they don't contain any SSI directives. This + can slow things down quite a bit, and is not a good idea.

    + +

    Of course, on Windows, there is no such thing as an execute + bit to set, so that limits your options a little.

    + +

    In its default configuration, Apache does not send the last + modified date or content length HTTP headers on SSI pages, + because these values are difficult to calculate for dynamic + content. This can prevent your document from being cached, and + result in slower perceived client performance. There are two + ways to solve this:

    + +
      +
    1. Use the XBitHack Full configuration. This + tells Apache to determine the last modified date by looking + only at the date of the originally requested file, ignoring + the modification date of any included files.
    2. + +
    3. Use the directives provided by mod_expires to set an + explicit expiration time on your files, thereby letting + browsers and proxies know that it is acceptable to cache + them.
    4. +
    +
    + +

    Basic + SSI directives

    + +

    SSI directives have the following syntax:

    +
    +        <!--#element attribute=value attribute=value ... -->
    +
    + +

    It is formatted like an HTML comment, so if you don't have + SSI correctly enabled, the browser will ignore it, but it will + still be visible in the HTML source. If you have SSI correctly + configured, the directive will be replaced with its + results.

    + +

    The element can be one of a number of things, and we'll talk + some more about most of these in the next installment of this + series. For now, here are some examples of what you can do with + SSI

    + +

    Today's + date

    +
    +        <!--#echo var="DATE_LOCAL" -->
    +
    + +

    The echo element just spits out the value of a + variable. There are a number of standard variables, which + include the whole set of environment variables that are + available to CGI programs. Also, you can define your own + variables with the set element.

    + +

    If you don't like the format in which the date gets printed, + you can use the config element, with a + timefmt attribute, to modify that formatting.

    +
    +        <!--#config timefmt="%A %B %d, %Y" -->
    +        Today is <!--#echo var="DATE_LOCAL" -->
    +
    + +

    Modification date of the + file

    +
    +        This document last modified <!--#flastmod file="index.html" -->
    +
    + +

    This element is also subject to timefmt format + configurations.

    + +

    Including the results + of a CGI program

    + +

    This is one of the more common uses of SSI - to output the + results of a CGI program, such as everybody's favorite, a ``hit + counter.''

    +
    +        <!--#include virtual="/cgi-bin/counter.pl" -->
    +
    +
    + +

    Additional examples

    + +

    Following are some specific examples of things you can do in + your HTML documents with SSI.

    +
    + +

    When was this document + modified?

    + +

    Earlier, we mentioned that you could use SSI to inform the + user when the document was most recently modified. However, the + actual method for doing that was left somewhat in question. The + following code, placed in your HTML document, will put such a + time stamp on your page. Of course, you will have to have SSI + correctly enabled, as discussed above.

    +
    +        <!--#config timefmt="%A %B %d, %Y" -->
    +        This file last modified <!--#flastmod file="ssi.shtml" -->
    +
    + +

    Of course, you will need to replace the + ssi.shtml with the actual name of the file that + you're referring to. This can be inconvenient if you're just + looking for a generic piece of code that you can paste into any + file, so you probably want to use the + LAST_MODIFIED variable instead:

    +
    +        <!--#config timefmt="%D" -->
    +        This file last modified <!--#echo var="LAST_MODIFIED" -->
    +
    + +

    For more details on the timefmt format, go to + your favorite search site and look for strftime(). The + syntax is the same.

    +
    + +

    Including a standard + footer

    + +

    If you are managing any site that is more than a few pages, + you may find that making changes to all those pages can be a + real pain, particularly if you are trying to maintain some kind + of standard look across all those pages.

    + +

    Using an include file for a header and/or a footer can + reduce the burden of these updates. You just have to make one + footer file, and then include it into each page with the + include SSI command. The include + element can determine what file to include with either the + file attribute, or the virtual + attribute. The file attribute is a file path, + relative to the current directory. That means that it + cannot be an absolute file path (starting with /), nor can it + contain ../ as part of that path. The virtual + attribute is probably more useful, and should specify a URL + relative to the document being served. It can start with a /, + but must be on the same server as the file being served.

    +
    +        <!--#include virtual="/footer.html" -->
    +
    + +

    I'll frequently combine the last two things, putting a + LAST_MODIFIED directive inside a footer file to be + included. SSI directives can be contained in the included file, + and includes can be nested - that is, the included file can + include another file, and so on.

    +
    + +

    What + else can I config?

    + +

    In addition to being able to config the time + format, you can also config two other things.

    + +

    Usually, when something goes wrong with your SSI directive, + you get the message

    +
    +        [an error occurred while processing this directive]
    +
    + +

    If you want to change that message to something else, you + can do so with the errmsg attribute to the + config element:

    +
    +        <!--#config errmsg="[It appears that you don't know how to use SSI]" -->
    +
    + +

    Hopefully, end users will never see this message, because + you will have resolved all the problems with your SSI + directives before your site goes live. (Right?)

    + +

    And you can config the format in which file + sizes are returned with the sizefmt attribute. You + can specify bytes for a full count in bytes, or + abbrev for an abbreviated number in Kb or Mb, as + appropriate.

    +
    + +

    Executing commands

    + +

    I expect that I'll have an article some time in the coming + months about using SSI with small CGI programs. For now, here's + something else that you can do with the exec + element. You can actually have SSI execute a command using the + shell (/bin/sh, to be precise - or the DOS shell, + if you're on Win32). The following, for example, will give you + a directory listing.

    +
    +        <pre>
    +        <!--#exec cmd="ls" -->
    +        </pre>
    +
    + +

    or, on Windows

    +
    +        <pre>
    +        <!--#exec cmd="dir" -->
    +        </pre>
    +
    + +

    You might notice some strange formatting with this directive + on Windows, because the output from dir contains + the string ``<dir>'' in it, which confuses + browsers.

    + +

    Note that this feature is exceedingly dangerous, as it will + execute whatever code happens to be embedded in the + exec tag. If you have any situation where users + can edit content on your web pages, such as with a + ``guestbook'', for example, make sure that you have this + feature disabled. You can allow SSI, but not the + exec feature, with the IncludesNOEXEC + argument to the Options directive.

    +
    + +

    Advanced SSI techniques

    + +

    In addition to spitting out content, Apache SSI gives you + the option of setting variables, and using those variables in + comparisons and conditionals.

    + +

    Caveat

    + +

    Most of the features discussed in this article are only + available to you if you are running Apache 1.2 or later. Of + course, if you are not running Apache 1.2 or later, you need to + upgrade immediately, if not sooner. Go on. Do it now. We'll + wait.

    +
    + +

    Setting + variables

    + +

    Using the set directive, you can set variables + for later use. We'll need this later in the discussion, so + we'll talk about it here. The syntax of this is as follows:

    +
    +        <!--#set var="name" value="Rich" -->
    +
    + +

    In addition to merely setting values literally like that, + you can use any other variable, including + environment variables, or some of the + variables we discussed above (like LAST_MODIFIED, for + example) to give values to your variables. You will specify that + something is a variable, rather than a literal string, by using + the dollar sign ($) before the name of the variable.

    +
    +        <!--#set var="modified" value="$LAST_MODIFIED" -->
    +
    + +

    To put a literal dollar sign into the value of your + variable, you need to escape the dollar sign with a + backslash.

    +
    +        <!--#set var="cost" value="\$100" -->
    +
    + +

    Finally, if you want to put a variable in the midst of a + longer string, and there's a chance that the name of the + variable will run up against some other characters, and thus be + confused with those characters, you can place the name of the + variable in braces, to remove this confusion. (It's hard to + come up with a really good example of this, but hopefully + you'll get the point.)

    +
    +        <!--#set var="date" value="${DATE_LOCAL}_${DATE_GMT}" -->
    +
    +
    + +

    Conditional expressions

    + +

    Now that we have variables, and are able to set and compare + their values, we can use them to express conditionals. This + lets SSI be a tiny programming language of sorts. + mod_include provides an if, + elif, else, endif + structure for building conditional statements. This allows you + to effectively generate multiple logical pages out of one + actual page.

    + +

    The structure of this conditional construct is:

    +
    +        <!--#if expr="test_condition" -->
    +    <!--#elif expr="test_condition" -->
    +    <!--#else -->
    +    <!--#endif -->
    +
    + +

    A test_condition can be any sort of logical + comparison - either comparing values to one another, or testing + the ``truth'' of a particular value. (A given string is true if + it is nonempty.) For a full list of the comparison operators + available to you, see the mod_include + documentation. Here are some examples of how one might use this + construct.

    + +

    In your configuration file, you could put the following + line:

    +
    +        BrowserMatchNoCase macintosh Mac
    +        BrowserMatchNoCase MSIE InternetExplorer
    +
    + +

    This will set environment variables ``Mac'' and + ``InternetExplorer'' to true, if the client is running Internet + Explorer on a Macintosh.

    + +

    Then, in your SSI-enabled document, you might do the + following:

    +
    +        <!--#if expr="${Mac} && ${InternetExplorer}" -->
    +        Apologetic text goes here
    +        <!--#else -->
    +        Cool JavaScript code goes here
    +        <!--#endif -->
    +
    + +

    Not that I have anything against IE on Macs - I just + struggled for a few hours last week trying to get some + JavaScript working on IE on a Mac, when it was working + everywhere else. The above was the interim workaround.

    + +

    Any other variable (either ones that you define, or normal + environment variables) can be used in conditional statements. + With Apache's ability to set environment variables with the + SetEnvIf directives, and other related directives, + this functionality can let you do some pretty involved dynamic + stuff without ever resorting to CGI.

    +
    + +

    Conclusion

    + +

    SSI is certainly not a replacement for CGI, or other + technologies used for generating dynamic web pages. But it is a + great way to add small amounts of dynamic content to pages, + without doing a lot of extra work.

    + + + diff --git a/htdocs/manual/howto/ssi.html.html b/htdocs/manual/howto/ssi.html.html new file mode 100644 index 00000000000..868693b3a46 --- /dev/null +++ b/htdocs/manual/howto/ssi.html.html @@ -0,0 +1,4 @@ + + + diff --git a/htdocs/manual/howto/ssi.html.ja.jis b/htdocs/manual/howto/ssi.html.ja.jis new file mode 100644 index 00000000000..9024a9fcdd3 --- /dev/null +++ b/htdocs/manual/howto/ssi.html.ja.jis @@ -0,0 +1,548 @@ + + + + + + Apache $B%A%e!<%H%j%"%k(B: Server Side Includes $BF~Lg(B + + + + + + + + +

    Apache $B%A%e!<%H%j%"%k(B: + Server Side Includes $BF~Lg(B

    + + + + + +
    + +

    Apache + $B%A%e!<%H%j%"%k(B: Server Side Includes $BF~Lg(B

    + + + + + + + +
    $B4XO"%b%8%e!<%k(B
    +
    + mod_include
    + mod_cgi
    + mod_expires
    +
    $B4XO"%G%#%l%/%F%#%V(B
    +
    + Options
    + XBitHack
    + AddType
    + AddHandler
    + BrowserMatchNoCase
    +
    + +

    $B$3$N5-;v$O!"DL>o$OC1$K(B SSI $B$H8F$P$l$k(B Server Side Includes + $B$r07$$$^$9!#$3$N5-;v$K$*$$$F$O!"%5!<%P$G$N(B SSI $B$r5v2D$9$k$?$a$N@_Dj$H!"(B + $B8=:_$N(B HTML $B%Z!<%8$KF0E*$J%3%s%F%s%D$r2C$($k$?$a$N$$$/$D$+$N4pK\E*$J(B + SSI $B5;=Q$r>R2p$7$^$9!#(B

    + +

    $B5-;v$N8eH>$G$O!"(BSSI $B%G%#%l%/%F%#%V$G(B SSI + $B$H6&$Kr7oJ8$N$h$&$J(B + $B4vJ,9bEY$J;vJA$K$D$$$F=R$Y$F$$$^$9!#(B

    +
    + +

    SSI $B$H$O(B?

    + +

    SSI (Server Side Includes) $B$O!"(BHTML + $B%Z!<%8Cf$KG[CV$5$l$k%G%#%l%/%F%#%V$G$"$j!"(B + $B%5!<%P$G%Z!<%8$rDs6!$9$k;~$KI>2A$5$l$^$9!#(BSSI $B$O!"(BCGI + $B%W%m%0%i%`$d$=$NB>$NF0E*$J5;=Q$GA4$F$N%Z!<%8$rDs6!$;$:$K!"(B + $BF0E*$K@8@.$5$l$?%3%s%F%s%D$r8=:_$N(B HTML $B%Z!<%8$K2C$($^$9!#(B

    + +

    $B$I$&$$$&>l9g$K(B SSI $B$r;H$$!"$I$&$$$&>l9g$K%W%m%0%i%`$G(B + $B%Z!<%8$r40A4$K@8@.$9$k$+$O!"%Z!<%8$N$&$A$I$NDxEY$,@EE*$G$"$j!"(B + $B%Z!<%8$,Ds6!$5$l$k$?$S$K:F7W;;$9$kI,MW$,$I$NDxEY$"$k$+$GDL>o$O7hDj$7$^$9!#(B + SSI $B$O8=:_;~9o$N$h$&$J>.$5$$>pJs$r2C$($k$K$O$&$C$F$D$1$NJ}K!$G$9!#(B + $B$7$+$7!"$=$N%Z!<%8$N$[$H$s$I$NItJ,$,Ds6!;~$K@8@.$5$l$k>l9g$O!"(B + $BB>$NJ}K!$rC5$9I,MW$,$"$j$^$9!#(B +

    +
    + + +

    SSI + $B$r5v2D$9$k$?$a$N%5!<%P$N@_Dj(B

    + +

    $B%5!<%P$G(B SSI $B$r5v2D$9$k$K$O!"(Bmod_include + $B$r%$%s%9%H!<%k!"M-8z2=$9$kI,MW$,$"$j$^$9!#$5$i$K!"(B + httpd.conf $B%U%!%$%k$^$?$O(B .htaccess + $B%U%!%$%k$K +

    +        Options +Includes
    +
    + +

    $B$3$N;XDj$O!"%U%!%$%k$r(B SSI $B%G%#%l%/%F%#%V$G2r@O$5$;$k$3$H$r5v2D$9$k(B + $B$H$$$&$3$H$r(B Apache $B$KEA$($^$9!#(B + $B$[$H$s$I$N@_Dj$G$O$*8_$$$r>e=q$-$G$-$k!"J#?t$N(B + Options $B$,$"$k$3$H$K(B + $BCm0U$7$F$/$@$5$$!#$*$=$i$/!"@_Dj$,:G8e$KI>2A$5$l$k$3$H$r(B + $BJ]>Z$5$l$k$?$a$K!"(BSSI $B$r;HMQ$7$?$$%G%#%l%/%H%j$K(B Options + $B%G%#%l%/%F%#%V$rE,MQ$9$kI,MW$,$"$k$G$7$g$&!#(B

    + +

    $BA4$F$N%U%!%$%k$,(B SSI $B%G%#%l%/%F%#%V$G2r@O$5$l$k$H$$$&$o$1$G$O$"$j$^$;$s!#(B + $B$I$N%U%!%$%k$,2r@O$5$l$k$+$r(B Apache $B$KEA$($kI,MW$,$"$j$^$9!#(B + $B$3$l$r9T$J$&$K$OFs$DJ}K!$,$"$j$^$9!#.shtml $B$N$h$&$JFCJL$J%U%!%$%k3HD%;R$r;}$D(B + $B%U%!%$%k$r2r@O$9$k$h$&(B Apache $B$KEA$($k$3$H$,$G$-$^$9(B:

    +
    +        AddType text/html .shtml
    +        AddHandler server-parsed .shtml
    +
    + +

    $B$3$NJ}K!$N7gE@$O!"$b$78=:_$N%Z!<%8$K(B SSI + $B%G%#%l%/%F%#%V$r2C$($?$$>l9g!"$=$l$i$N%G%#%l%/%F%#%V$,.shtml $B3HD%;R$K$9$k$?$a!"$=$N%Z!<%8$NL>A0$H!"(B + $B$=$N%Z!<%8$X$NA4$F$N%j%s%/$rJQ99$7$J$1$l$P$J$i$J$$$3$H$G$9!#(B +

    + +

    $B$b$&0l$D$NJ}K!$O!"(BXBitHack + $B%G%#%l%/%F%#%V$r;HMQ$9$k$3$H$G$9(B:

    +
    +        XBitHack on
    +
    + +

    XBitHack $B$O!"%U%!%$%k$Nl9g!"(B + SSI $B%G%#%l%/%F%#%V$K$h$j2r@O$9$k$3$H$r(B Apache $B$KEA$($^$9!#(B + $B=>$C$F!"(BSSI $B%G%#%l%/%F%#%V$r8=:_$N%Z!<%8$K2C$($k$?$a$K$O!"(B + $B%U%!%$%kL>$rJQ99$7$J$/$F$b$h$/!"C1$K(B chmod + $B$r;HMQ$7$F%U%!%$%k$r +

    +        chmod +x pagename.html
    +
    + +

    $B9T$J$&$Y$-$G$O$J$$$3$H$K4X$9$kC;$$%3%a%s%H!#;~!9C/$+$,!"A4$F$N(B + .html $B%U%!%$%k$r(B SSI $B$G2r@O$9$k$h$&(B Apache $B$KEA$($l$P!"(B + $B$o$6$o$6(B .shtml $B$H$$$&%U%!%$%kL>$K$9$kI,MW$,$J$$$H$$$C$F(B + $BA&$a$k$N$r8+$k$3$H$G$7$g$&!#$3$&$$$&?M$?$A$O!"$*$=$i$/(B + XBitHack $B$K$D$$$FJ9$$$?$3$H$,$J$$$N$G$7$g$&!#(B + $B$3$NJ}K!$K$D$$$FCm0U$9$k$3$H$O!"$?$H$((B SSI + $B%G%#%l%/%F%#%V$rA4$/4^$^$J$$>l9g$G$b!"(BApache $B$,%/%i%$%"%s%H$K(B + $BAw$kA4$F$N%U%!%$%k$r:G8e$^$GFI$_9~$^$;$k$3$H$K$J$j$^$9!#(B + $B$3$NJ}K!$O$+$J$j=hM}$rCY$/$9$k$b$N$G$"$j!"NI$/$J$$%"%$%G%"$G$9!#(B

    + +

    $B$b$A$m$s!"(BWindows $B$G$O$=$N$h$&$J/$7@)8B$5$l$F$$$^$9!#(B

    + +

    $B%G%U%)%k%H$N@_Dj$G$O!"(BApache $B$O(B SSI $B%Z!<%8$K$D$$$F:G=*JQ99;~9o$d(B + $B%3%s%F%s%D$ND9$5$r(B HTTP $B%X%C%@$KAw$j$^$;$s!#(B + $BF0E*$J%3%s%F%s%D$G$"$k$?$a!"$=$l$i$NCM$r7W;;$9$k$N$,Fq$7$$$+$i$G$9!#(B + $B$3$N$?$a%I%-%e%a%s%H$,%-%c%C%7%e$5$l$J$/$J$j!"(B + $B7k2L$H$7$F%/%i%$%"%s%H$N@-G=$,CY$/$J$C$?$h$&$K46$8$5$;$k$3$H$K$J$j$^$9!#(B + $B$3$l$r2r7h$9$kJ}K!$,Fs$D$"$j$^$9(B:

    + +
      +
    1. XBitHack Full $B@_Dj$r;HMQ$9$k!#(B + $B$3$N@_Dj$K$h$j!"$b$H$b$HMW5a$5$l$?%U%!%$%k$N;~9o$r;2>H$7!"(B + $BFI$_9~$^$l$k%U%!%$%k$NJQ99;~9o$rL5;k$7$F:G=*JQ99;~9o$r7hDj$9$k$h$&(B + Apache $B$KEA$($^$9!#(B
    2. + +
    3. mod_expires + $B$GDs6!$5$l$F$$$k%G%#%l%/%F%#%V$r;HMQ$7$F!"(B + $B%U%!%$%k$,L58z$K$J$k;~9o$rL@<($7$^$9!#$3$l$K$h$j!"(B + $B%V%i%&%6$H%W%m%-%7$K%-%c%C%7%e$,M-8z$G$"$k$3$H$rDLCN$7$^$9!#(B +
    4. +
    +
    + +

    $B4pK\E*$J(B + SSI $B%G%#%l%/%F%#%V(B

    + +

    SSI $B%G%#%l%/%F%#%V$O0J2<$NJ8K!$G5-=R$7$^$9(B:

    +
    +        <!--#element attribute=value attribute=value ... -->
    +
    + +

    HTML $B$N%3%a%s%H$N$h$&$J=q<0$r$7$F$$$k$N$G!"$b$7(B SSI + $B$r@5$7$/F0:n2DG=$K$7$J$1$l$P!"%V%i%&%6$O$=$l$rL5;k$9$k$G$7$g$&!#(B + $B$7$+$7!"(BHTML $B%=!<%9Cf$G$O8+$($^$9!#$b$7(B SSI $B$r@5$7$/@_Dj$7$?$J$i!"(B + $B%G%#%l%/%F%#%V$O$=$N7k2L$HCV$-49$($i$l$^$9!#(B +

    + +

    element $B$O$?$/$5$s$"$k$b$N$+$i0l$D;XDj$9$k$3$H$,$G$-$^$9!#(B + $B;XDj$G$-$k$b$N$NBgB??t$K$D$$$F$O!"/$7>\$7$/@bL@$7$^$9!#(B + $B$3$3$G$O!"(BSSI $B$G9T$J$&$3$H$,$G$-$kNc$r$$$/$D$+<($7$^$9!#(B +

    + +

    $B:#F|$NF|IU(B

    +
    +        <!--#echo var="DATE_LOCAL" -->
    +
    + + +

    echo $BMWAG$OC1$KJQ?t$NCM$r=PNO$7$^$9!#(B + CGI $B%W%m%0%i%`$KMxMQ2DG=$J4D6-JQ?t$NA4$F$N(B + $B%;%C%H$r4^$`B?$/$NI8=`JQ?t$,$"$j$^$9!#$^$?!"(Bset + $BMWAG$rMQ$$$k$3$H$G!"FH<+$NJQ?t$rDj5A$9$k$3$H$,$G$-$^$9!#(B +

    + +

    $B=PNO$5$l$kF|IU$N=q<0$,9%$-$G$O$J$$>l9g!"$=$N=q<0$r=$@5$9$k$?$a$K!"(B + config $BMWAG$K(B timefmt + $BB0@-$r;HMQ$9$k$3$H$,$G$-$^$9!#(B

    +
    +        <!--#config timefmt="%A %B %d, %Y" -->
    +        Today is <!--#echo var="DATE_LOCAL" -->
    +
    + +

    $B%U%!%$%k$NJQ99F|(B

    +
    +        This document last modified <!--#flastmod file="index.html" -->
    +
    + + +

    $B$3$NMWAG$b(B timefmt + $B%U%)!<%^%C%H$N@_Dj$K=>$$$^$9!#(B

    + +

    CGI + $B%W%m%0%i%`$N7k2L$r

    + +

    $B$3$l$O!"A4$F$N?M$N$*5$$KF~$j$G$"$k(B ``$B%R%C%H%+%&%s%?(B'' $B$N$h$&$J(B + CGI $B%W%m%0%i%`$N7k2L$r=PNO$9$k(B SSI + $B$N$h$j0lHLE*$J;HMQ$N$&$A$N0l$D$G$9!#(B

    +
    +        <!--#include virtual="/cgi-bin/counter.pl" -->
    +
    +
    + +

    $BDI2C$NNc(B

    + +

    $B0J2<$O!"(BSSI $B$r;HMQ$7$F(B HTML + $B%I%-%e%a%s%H$K$*$$$F$G$-$k$3$H$N$$$/$D$+$NFCJL$JNc$G$9!#(B

    +
    + +

    $B$$$D$3$N%I%-%e%a%s%H$O=$@5$5$l$?$N$+(B?

    + +

    $B@h$K!"%I%-%e%a%s%H$,:G8e$KJQ99$5$l$?$N$O$$$D$J$N$+$r(B + $B%f!<%6$KDLCN$9$k$?$a$K(B SSI $B$r;HMQ$9$k$3$H$,$G$-$k$3$H$r=R$Y$^$7$?!#(B + $B$7$+$7$J$,$i!"e=R$N$h$&$K!"(B + SSI $B$r@5$7$/F0:n2DG=$K$7$F$*$/I,MW$,$"$j$^$9!#(B

    +
    +        <!--#config timefmt="%A %B %d, %Y" -->
    +        This file last modified <!--#flastmod file="ssi.shtml" -->
    +
    + +

    $B$b$A$m$s!"(Bssi.shtml + $B$NItJ,$r$HCV$-49$($kI,MW$,$"$j$^$9!#(B + $B$b$7!"$"$i$f$k%U%!%$%k$KD%$k$3$H$,$G$-$k0lHLE*$J%3!<%I$rC5$7$F$$$k$J$i!"(B + $B$3$l$OITJX$G$"$k$+$b$7$l$^$;$s!#$*$=$i$/$=$N>l9g$O!"(B + $B$=$&$9$kBe$o$j$KJQ?t(B LAST_MODIFIED + $B$r;HMQ$7$?$$$H9M$($k$G$7$g$&(B:

    +
    +        <!--#config timefmt="%D" -->
    +        This file last modified <!--#echo var="LAST_MODIFIED" -->
    +
    + +

    timefmt + $B=q<0$K$D$$$F$N$h$j>\:Y$K$D$$$F$O!"$*9%$_$N8!:w%5%$%H$K9T$-!"(B + strftime $B$G8!:w$7$F$_$F$/$@$5$$!#J8K!$OF1$8$G$9!#(B

    +
    + +

    $BI8=`$N%U%C%?$rA^F~$9$k(B

    + + +

    $B$b$7?t%Z!<%8$rD6$($k%Z!<%8$r;}$D%5%$%H$r4IM}$7$F$$$k$J$i$P!"(B + $BA4%Z!<%8$KBP$7$FJQ99$r9T$J$&$3$H$,K\Ev$K6lDK$H$J$jF@$k$3$H$,(B + $BJ,$+$k$G$7$g$&!#A4$F$N%Z!<%8$KEO$C$F$"$k + +

    $B%X%C%@$d%U%C%?MQ$NA^F~MQ%U%!%$%k$r;HMQ$9$k$3$H$G!"(B + $B$3$N$h$&$J99?7$K$+$+$kIiC4$r8:$i$9$3$H$,$G$-$^$9!#(B + $B0l$D$N%U%C%?%U%!%$%k$r:n@.$7!"$=$l$r(B include + SSI $B%3%^%s%I$G3F%Z!<%8$KF~$l$k$@$1$G:Q$_$^$9!#(Binclude + $BMWAG$O!"(Bfile $BB0@-$^$?$O(B virtual + $BB0@-$N$$$:$l$+$r;HMQ$7$F$I$N%U%!%$%k$rA^F~$9$k$+$r7h$a$k$3$H$,$G$-$^$9!#(B + file $BB0@-$O!"(B + $B%+%l%s%H%G%#%l%/%H%j$+$i$NAjBP%Q%9$G<($5$l$?(B$B%U%!%$%k%Q%9$G$9!#(B + $B$=$l$O(B / $B$G;O$^$k@dBP%U%!%$%k%Q%9$K$O$G$-$:!"$^$?!"$=$N%Q%9$N0lIt$K(B ../ + $B$r4^$`$3$H$,$G$-$J$$$3$H$r0UL#$7$^$9!#(Bvirtual + $BB0@-$O!"$*$=$i$/$h$jJXMx$@$H;W$$$^$9$,!"Ds6!$9$k%I%-%e%a%s%H$+$i$NAjBP(B + URL $B$G;XDj$9$Y$-$G$9!#$=$l$O(B / $B$G;O$a$k$3$H$,$G$-$^$9$,!"(B + $BDs6!$9$k%U%!%$%k$HF1$8%5!<%P>e$KB8:_$7$J$/$F$O$J$j$^$;$s!#(B

    +
    +        <!--#include virtual="/footer.html" -->
    +
    + +

    $B;d$O:G8e$NFs$D$rAH$_9g$o$;$F!"(BLAST_MODIFIED + $B%G%#%l%/%F%#%V$r%U%C%?%U%!%$%k$NCf$KCV$/$3$H$,$h$/$"$j$^$9!#(B + SSI $B%G%#%l%/%F%#%V$O!"A^F~MQ$N%U%!%$%k$K4^$^$;$?$j!"(B + $BA^F~%U%!%$%k$N%M%9%H$r$7$?$j$9$k$3$H$,$G$-$^$9!#$9$J$o$A!"(B + $BA^F~MQ$N%U%!%$%k$OB>$N%U%!%$%k$r:F5"E*$KA^F~$9$k$3$H$,$G$-$^$9!#(B

    +
    + +

    $BB>$K2?$,@_Dj$G$-$k$N$+(B?

    + +

    $B;~9o=q<0$r(B config $B$G@_Dj$G$-$k$3$H$K2C$($F!"(B + $B99$KFs$D(B config $B$G@_Dj$9$k$3$H$,$G$-$^$9!#(B

    + +

    $BDL>o!"(BSSI $B%G%#%l%/%F%#%V$G2?$+$,$&$^$/$$$+$J$$$H$-$O!"(B + $B +

    +        [an error occurred while processing this directive]
    +
    + +

    $B$3$N%a%C%;!<%8$rB>$N$b$N$K$7$?$$>l9g!"(Bconfig + $BMWAG$N(B errmsg $BB0@-$GJQ99$9$k$3$H$,$G$-$^$9(B:

    + +
    +        <!--#config errmsg="[It appears that you don't know how to use SSI]" -->
    +
    + +

    $B$*$=$i$/!"%(%s%I%f!<%6$O$3$N%a%C%;!<%8$r7h$7$F8+$k$3$H$O$"$j$^$;$s!#(B + $B$J$<$J$i!"$=$N%5%$%H$,@8$-$?>uBV$K$J$kA0$K(B SSI $B%G%#%l%/%F%#%V$K4X$9$k(B + $BA4$F$NLdBj$r2r7h$7$F$$$k$O$:$@$+$i$G$9!#(B($B$=$&$G$9$h$M(B?)

    + +

    $B$=$7$F!"(Bconfig $B$K$*$$$F(B sizefmt + $BB0@-$r;HMQ$9$k$3$H$G!"(B + $BJV$5$l$k%U%!%$%k%5%$%:$N=q<0$r@_Dj$9$k$3$H$,$G$-$^$9!#(B + $B%P%$%H?t$K$O(B bytes $B$r!"E,Ev$K(B Kb $B$d(B Mb + $B$KC;=L$5$;$k$K$O(B abbrev $B$r;XDj$9$k$3$H$,$G$-$^$9!#(B

    +
    + +

    $B%3%^%s%I$N

    + +

    $B:#8e?t%v7n$N$&$A$K!">.$5$J(B CGI $B%W%m%0%i%`$H(B SSI + $B$r;HMQ$9$k5-;v$r=P$7$?$$$H9M$($F$$$^$9!#$3$3$G$O$=$l$H$OJL$K!"(B + exec $BMWAG$K$h$C$F9T$J$&$3$H$,$G$-$k$3$H$r<($7$^$9!#(B + SSI $B$K%7%'%k(B ($B@53N$K$O(B /bin/sh$B!#(BWin32 $B$J$i$P(B DOS $B%7%'%k(B) + $B$r;HMQ$7$F%3%^%s%I$r + +

    +        <pre>
    +        <!--#exec cmd="ls" -->
    +        </pre>
    +
    + +

    Windows $B>e$G$O!"(B

    +
    +        <pre>
    +        <!--#exec cmd="dir" -->
    +        </pre>
    +
    + +

    Windows $B>e$G$O!"$3$N%G%#%l%/%F%#%V$K$h$C$F$$$/$D$+$N4qL/$J(B + $B=q<0$K5$$E$/$G$7$g$&!#$J$<$J$i(B dir $B$N=PNO$,J8;zNs(B + ``<dir>'' $B$r4^$_!"%V%i%&%6$r:.Mp$5$;$k$+$i$G$9!#(B +

    + +

    $B$3$N5!G=$OHs>o$K4m81$G$"$j!"$I$s$J%3!<%I$G$b(B exec + $B%?%0$KKd$a9~$^$l$F$7$^$($Pu67$K$"$k$J$i$P!"(B + $B$3$N5!G=$r3NOptions + $B%G%#%l%/%F%#%V$N(B IncludesNOEXEC $B0z?t$r;XDj$9$k$3$H$G!"(B + SSI $B$O5v2D$9$k$1$l$I(B exec + $B5!G=$O5v2D$7$J$$$h$&$K$9$k$3$H$,$G$-$^$9!#(B

    +
    + +

    $B9bEY$J(B SSI $B%F%/%K%C%/(B

    + +

    $B%3%s%F%s%D$r=PNO$9$k$3$H$K2C$(!"(BApache SSI $B$OJQ?t$r@_Dj$7!"(B + $B$=$7$FHf3S$H>r7oJ,4t$K$=$NJQ?t$r;HMQ$G$-$k5!G=$rDs6!$7$F$$$^$9!#(B +

    + +

    $B7Y9p(B

    + +

    $B$3$N5-;v$G=R$Y$?BgItJ,$N5!G=$O!"(BApache 1.2 + $B0J9_$r;HMQ$7$F$$$k>l9g$N$_MxMQ2DG=$G$9!#EvA3$J$,$i!"$b$7(B Apache 1.2 + $B0J9_$r;HMQ$7$F$J$$>l9g!"D>$A$K%"%C%W%0%l!<%I$9$kI,MW$,$"$j$^$9!#(B + $B$5$!!":#$=$l$r9T$J$$$J$5$$!#$=$l$^$GBT$C$F$$$^$9!#(B +

    +
    + +

    $BJQ?t$r@_Dj$9$k(B

    + +

    set $B%G%#%l%/%F%#%V$r;HMQ$7$F!"(B + $B8e$G;HMQ$9$k$?$a$KJQ?t$r@_Dj$9$k$3$H$,$G$-$^$9!#(B + $B$3$l$O8e$N@bL@$GI,MW$K$J$k$N$G!"$3$3$G$=$l$K$D$$$F=R$Y$F$$$^$9!#(B + $BJ8K!$O0J2<$N$H$*$j$G$9(B:

    +
    +        <!--#set var="name" value="Rich" -->
    +
    + +

    $B$3$N$h$&$KC1=c$KJ8;z$I$*$j$K@_Dj$9$k$3$H$K2C$(!"(B + $B4D6-JQ?t(B$B$d>e$G=R$Y$?JQ?t(B + ($BNc$($P(B LAST_MODIFIED$B$N$h$&$J(B) + $B$r4^$`B>$N$"$i$f$kJQ?t$rCM$r@_Dj$9$k$N$K;HMQ$9$k$3$H$,$G$-$^$9!#(B + $BJQ?tL>$NA0$K%I%k5-9f(B ($) $B$r;HMQ$9$k$3$H$G!"(B + $B$=$l$,%j%F%i%kJ8;zNs$G$O$J$/$FJQ?t$G$"$k$3$H$r<($7$^$9!#(B

    +
    +        <!--#set var="modified" value="$LAST_MODIFIED" -->
    +
    + +

    $B%I%k5-9f(B ($) $B$rJ8;z$H$7$FJQ?t$NCM$KF~$l$k$K$O!"(B + $B%P%C%/%9%i%C%7%e$K$h$C$F%I%k5-9f$r%(%9%1!<%W$9$kI,MW$,$"$j$^$9!#(B +

    +
    +        <!--#set var="cost" value="\$100" -->
    +
    + +

    $B:G8e$K$J$j$^$9$,!"D9$$J8;zNs$NCf$KJQ?t$rCV$-$?$$>l9g$G!"(B + $BJQ?tL>$,B>$NJ8;z$H$V$D$+$k2DG=@-$,$"$j!"(B + $B$=$l$i$NJ8;z$K$D$$$F:.Mp$7$F$7$^$&>l9g!"$3$N:.Mp$r$rCf3g8L$G0O$`$3$H$,$G$-$^$9(B + ($B$3$l$K$D$$$F$NNI$$Nc$r<($9$N$OFq$7$$$N$G$9$,!"(B + $B$*$=$i$/J,$+$C$F$$$?$@$1$k$G$7$g$&(B)$B!#(B +

    +
    +        <!--#set var="date" value="${DATE_LOCAL}_${DATE_GMT}" -->
    +
    +
    + +

    $B>r7o<0(B

    + +

    $B$5$F!"JQ?t$r;}$C$F$$$F!"(B + $B$=$l$i$NCM$r@_Dj$7$FHf3S$9$k$3$H$,$G$-$k$N$G$9$+$i!"(B + $B>r7o$rI=$9$?$a$K$=$l$i$r;HMQ$9$k$3$H$,$G$-$^$9!#$3$l$K$h$j(B + SSI $B$O$"$k.$5$J%W%m%0%i%_%s%08@8l$K$J$C$F$$$^$9!#(B + mod_include $B$O>r7o$rI=8=$9$k$?$a$K(B if, + elif, else, endif + $B9=B$$rDs6!$7$F$$$^$9!#$3$l$K$h$C$F!"(B + $B0l$D$N + +

    $B>r7o9=B$$O0J2<$N$H$*$j$G$9(B:

    +
    +        <!--#if expr="test_condition" -->
    +        <!--#elif expr="test_condition" -->
    +        <!--#else -->
    +        <!--#endif -->
    +
    + +

    test_condition + $B$O$"$i$f$k2A$7$^$9(B + ($B6u$G$J$$$J$iM?$($i$l$?J8;zNs$O??$G$9(B)$B!#(B + $BMxMQ2DG=$JHf3S1i;;;R$NA4$F$N%j%9%H$K$D$$$F$O!"(B + mod_include $B%I%-%e%a%s%F!<%7%g%s$r;2>H$7$F$/$@$5$$!#(B + $B$3$3$G$O!"$3$N9=B$$r$I$&;HMQ$9$k$+$NNc$r$$$/$D$+<($7$^$9!#(B

    + +

    $B@_Dj%U%!%$%k$G + +

    +        BrowserMatchNoCase macintosh Mac
    +        BrowserMatchNoCase MSIE InternetExplorer
    +
    + +

    $B$3$l$O%/%i%$%"%s%H$,(B Macintosh + $B>e$G%$%s%?!<%M%C%H%(%/%9%W%m!<%i$,F0$$$F$$$k>l9g!"4D6-JQ?t(B + ``Mac'' $B$H(B ``InternetExplorer'' $B$r??$H@_Dj$7$^$9!#(B

    + +

    $B + +

    +        <!--#if expr="${Mac} && ${InternetExplorer}" -->
    +        Apologetic text goes here
    +        <!--#else -->
    +        Cool JavaScript code goes here
    +        <!--#endif -->
    +
    + +

    Mac $B>e$N(B IE $B$KBP$7$F2?$+;W$&$H$3$m$,$"$k$o$1$G$"$j$^$;$s!#(B + $BB>$G$Oe$N(B IE + $B$Ge$NNc$O$=$N;CDjE*$JBP=hJ}K!$G$9!#(B

    + +

    $BB>$N$I$s$JJQ?t(B ($B$"$J$?$,Dj5A$9$k$b$N!"(B + $B$^$?$OIaDL$N4D6-JQ?t$N$$$:$l$+(B) $B$b!">r7oJ8$K;HMQ$9$k$3$H$,$G$-$^$9!#(B + Apache $B$O(B SetEnvIf $B%G%#%l%/%F%#%V$dB>$N4XO"(B + $B%G%#%l%/%F%#%V$r;HMQ$7$F4D6-JQ?t$r@_Dj$9$k$3$H$,$G$-$^$9!#(B + $B$3$N5!G=$K$h$j!"(BCGI + $B$KMj$k$3$H$J$/$+$J$jJ#;($JF0E*$J$3$H$r$5$;$k$3$H$,$G$-$^$9!#(B

    +
    + +

    $B=*$o$j$K(B

    + +

    SSI $B$O3N$+$K(B CGI + $B$dF0E*$J%&%'%V%Z!<%8$r@8@.$9$kB>$N5;=Q$KBe$o$k$b$N$G$O$"$j$^$;$s!#(B + $B$7$+$7!"$?$/$5$s$NM>J,$J:n6H$r$;$:$K!"(B + $B>/NL$NF0E*$J%3%s%F%s%D$r2C$($k$K$O$9$0$l$?J}K!$G$9!#(B

    + + diff --git a/htdocs/manual/images/apache_header.gif b/htdocs/manual/images/apache_header.gif new file mode 100644 index 00000000000..260e421bf4a Binary files /dev/null and b/htdocs/manual/images/apache_header.gif differ diff --git a/htdocs/manual/images/custom_errordocs.gif b/htdocs/manual/images/custom_errordocs.gif new file mode 100644 index 00000000000..d566c5d891e Binary files /dev/null and b/htdocs/manual/images/custom_errordocs.gif differ diff --git a/htdocs/manual/images/home.gif b/htdocs/manual/images/home.gif new file mode 100644 index 00000000000..11299c1cb7e Binary files /dev/null and b/htdocs/manual/images/home.gif differ diff --git a/htdocs/manual/images/index.gif b/htdocs/manual/images/index.gif new file mode 100644 index 00000000000..741c8939d77 Binary files /dev/null and b/htdocs/manual/images/index.gif differ diff --git a/htdocs/manual/images/mod_rewrite_fig1.fig b/htdocs/manual/images/mod_rewrite_fig1.fig new file mode 100644 index 00000000000..7c80fea3f1d --- /dev/null +++ b/htdocs/manual/images/mod_rewrite_fig1.fig @@ -0,0 +1,60 @@ +#FIG 3.2 +Landscape +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +0 32 #efefef +0 33 #cfcfef +0 34 #bebebe +2 1 0 4 4 7 0 0 -1 0.000 0 0 -1 1 0 6 + 1 1 2.00 120.00 240.00 + 6675 5250 6900 5250 6900 4650 4950 4650 4950 4050 5475 4050 +2 1 0 4 4 7 0 0 -1 0.000 0 0 -1 1 0 2 + 1 1 2.00 120.00 240.00 + 6900 4050 7650 4050 +2 1 0 4 4 7 0 0 -1 0.000 0 0 -1 1 0 6 + 1 1 2.00 120.00 240.00 + 9375 4050 9900 4050 9900 4650 7200 4650 7200 5250 7650 5250 +2 1 0 4 9 7 0 0 -1 0.000 0 0 -1 1 0 4 + 1 1 2.00 120.00 240.00 + 9300 5250 9900 5250 9900 6300 6975 6300 +2 1 2 4 0 7 0 0 -1 7.500 1 1 -1 0 0 2 + 3900 2100 3900 1500 +2 1 2 4 0 7 0 0 -1 7.500 1 1 -1 0 0 2 + 3900 7950 3900 7350 +2 1 1 4 9 7 0 0 -1 10.000 0 0 -1 1 0 4 + 1 1 2.00 120.00 240.00 + 5625 6300 2700 6300 2700 7050 3225 7050 +2 1 0 4 9 7 0 0 -1 0.000 0 0 -1 1 0 4 + 1 1 2.00 120.00 240.00 + 5550 3000 2700 3000 2700 5250 3225 5250 +2 1 1 4 9 7 0 0 -1 10.000 0 0 -1 1 0 4 + 1 1 2.00 120.00 240.00 + 9225 2325 9900 2325 9900 3000 6975 3000 +2 1 0 4 9 7 0 0 -1 0.000 0 0 -1 1 0 2 + 1 1 2.00 120.00 240.00 + 4800 5250 5550 5250 +2 4 0 2 9 7 0 0 -1 0.000 0 0 7 0 0 5 + 6900 3300 5700 3300 5700 2700 6900 2700 6900 3300 +2 4 0 2 9 7 0 0 -1 0.000 0 0 7 0 0 5 + 6900 6600 5700 6600 5700 6000 6900 6000 6900 6600 +4 0 0 0 0 0 20 0.0000 4 195 1455 3300 5400 RewriteRule\001 +4 0 0 0 0 1 20 0.0000 4 210 1440 7800 4200 CondPattern\001 +4 0 0 0 0 1 20 0.0000 4 270 1110 5625 4200 TestString\001 +4 0 0 0 0 0 20 0.0000 4 195 1905 3300 4200 RewriteCond \001 +4 0 0 0 0 1 20 0.0000 4 210 1320 7800 5400 Substitution\001 +4 0 0 0 0 1 20 0.0000 4 195 825 5700 5400 Pattern\001 +4 0 0 0 0 0 20 0.0000 4 195 1455 3300 7200 RewriteRule\001 +4 0 0 0 0 0 20 0.0000 4 195 1455 3300 2400 RewriteRule\001 +4 0 0 0 0 1 20 0.0000 4 195 825 5700 7200 Pattern\001 +4 0 0 0 0 1 20 0.0000 4 210 1320 7800 7200 Substitution\001 +4 0 0 0 0 1 20 0.0000 4 210 1320 7800 2400 Substitution\001 +4 0 0 0 0 1 20 0.0000 4 195 825 5700 2400 Pattern\001 +4 0 9 0 0 18 12 0.0000 4 135 645 6000 2925 current\001 +4 0 9 0 0 18 12 0.0000 4 135 375 6075 3150 URL\001 +4 0 9 0 0 18 12 0.0000 4 135 825 5925 6225 rewritten\001 +4 0 9 0 0 18 12 0.0000 4 135 375 6075 6450 URL\001 diff --git a/htdocs/manual/images/mod_rewrite_fig1.gif b/htdocs/manual/images/mod_rewrite_fig1.gif new file mode 100644 index 00000000000..664ac1e7bb7 Binary files /dev/null and b/htdocs/manual/images/mod_rewrite_fig1.gif differ diff --git a/htdocs/manual/images/mod_rewrite_fig2.fig b/htdocs/manual/images/mod_rewrite_fig2.fig new file mode 100644 index 00000000000..facf410fc98 --- /dev/null +++ b/htdocs/manual/images/mod_rewrite_fig2.fig @@ -0,0 +1,50 @@ +#FIG 3.2 +Landscape +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +0 32 #efefef +0 33 #cfcfef +0 34 #bebebe +2 1 2 4 0 7 0 0 -1 10.000 1 1 -1 0 0 2 + 4050 3750 4050 4425 +2 1 0 2 9 7 0 0 -1 0.000 0 0 -1 1 0 2 + 1 1 2.00 120.00 240.00 + 4950 4800 5550 4800 +2 1 0 2 9 7 0 0 -1 0.000 0 0 -1 1 0 2 + 1 1 2.00 120.00 240.00 + 4950 3600 5550 3600 +2 1 0 2 9 7 0 0 -1 0.000 0 0 -1 1 0 2 + 1 1 2.00 120.00 240.00 + 6600 5700 7725 5700 +2 1 0 2 9 7 0 0 -1 0.000 0 0 -1 1 0 6 + 1 1 2.00 120.00 240.00 + 6600 5550 6900 5550 6900 5100 4950 5100 4950 2850 5550 2850 +2 1 0 2 4 7 0 0 -1 0.000 0 0 -1 1 0 6 + 1 1 2.00 120.00 240.00 + 9525 4800 9750 4800 9750 5100 7200 5100 7200 5550 7725 5550 +2 1 0 2 4 7 0 0 -1 0.000 0 0 -1 1 0 6 + 1 1 2.00 120.00 240.00 + 9450 3000 9750 3000 9750 3225 5100 3225 5100 3450 5550 3450 +2 1 0 2 4 7 0 0 -1 0.000 0 0 -1 1 0 6 + 1 1 2.00 120.00 240.00 + 9450 3600 9750 3600 9750 3825 5100 3825 5100 4050 5550 4050 +2 1 0 2 4 7 0 0 -1 0.000 0 0 -1 1 0 6 + 1 1 2.00 120.00 240.00 + 9450 4200 9750 4200 9750 4425 5100 4425 5100 4650 5550 4650 +4 0 0 0 0 0 20 0.0000 4 195 1905 3300 4800 RewriteCond \001 +4 0 0 0 0 1 20 0.0000 4 210 1620 7800 4800 CondPatternN\001 +4 0 0 0 0 0 20 0.0000 4 195 1905 3300 3600 RewriteCond \001 +4 0 0 0 0 1 20 0.0000 4 210 1575 7800 3600 CondPattern2\001 +4 0 0 0 0 1 20 0.0000 4 270 1290 5625 4800 TestStringN\001 +4 0 0 0 0 1 20 0.0000 4 270 1245 5625 3600 TestString2\001 +4 0 0 0 0 0 20 0.0000 4 195 1905 3300 3000 RewriteCond \001 +4 0 0 0 0 1 20 0.0000 4 270 1245 5625 3000 TestString1\001 +4 0 0 0 0 1 20 0.0000 4 210 1575 7800 3000 CondPattern1\001 +4 0 0 0 0 1 20 0.0000 4 210 1320 7800 5700 Substitution\001 +4 0 0 0 0 1 20 0.0000 4 195 825 5700 5700 Pattern\001 +4 0 0 0 0 0 20 0.0000 4 195 1455 3300 5700 RewriteRule\001 diff --git a/htdocs/manual/images/mod_rewrite_fig2.gif b/htdocs/manual/images/mod_rewrite_fig2.gif new file mode 100644 index 00000000000..3ea8cb65a3f Binary files /dev/null and b/htdocs/manual/images/mod_rewrite_fig2.gif differ diff --git a/htdocs/manual/images/pixel.gif b/htdocs/manual/images/pixel.gif new file mode 100644 index 00000000000..c0801475d27 Binary files /dev/null and b/htdocs/manual/images/pixel.gif differ diff --git a/htdocs/manual/images/sub.gif b/htdocs/manual/images/sub.gif new file mode 100644 index 00000000000..93061c5ad7f Binary files /dev/null and b/htdocs/manual/images/sub.gif differ diff --git a/htdocs/manual/index.html.en b/htdocs/manual/index.html.en new file mode 100644 index 00000000000..eba1c9365a9 --- /dev/null +++ b/htdocs/manual/index.html.en @@ -0,0 +1,311 @@ + + + + + + + Apache HTTP Server Version 1.3 Documentation + + + +
    + + + + + + + + + + + + + + + + +
    [Apache Documentation]
    + + + + + + + + + + + + +
    FAQ SiteMapDirectives + Modules Search +
    +
     
    +

    Apache HTTP Server Version 1.3

    +
    +
    + +
    + + + + +
    +
    + + + +
    +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + +
    + Release Notes
    New Features in + Version 1.3
    Upgrading to + Version 1.3
    Apache License
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + Reference Manual
    Compiling and + Installing
    Starting
    Stopping or + Restarting
    Run-time + Configuration Directives
    Modules: By + Type or Alphabetical
    Server and Supporting + Programs
    Dynamic Shared Object (DSO) + Support
    The Apache API +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    + Platform Specific Notes
    Microsoft Windows | + Cygwin
    Novell Netware +
    HP MPE/iX
    UnixWare
    TPF
    +
    + + + + +
    .
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Using + the Apache HTTP Server
    Authentication, + Authorization, and Access Control
    CGI: Dynamic Content with + CGI
    Configuration + Files
    Content + negotiation
    Environment Variables +
    General + Performance hints
    Handlers
    Log Files
    Security + tips
    Server Side + Includes
    Server-Wide + Configuration
    suexec: Using SetUserID Execution + for CGI
    URL Mapping: Mapping + URLs to the Filesystem
    URL Rewriting + Guide
    Virtual Hosts +
    + + + + + + + + + + + + + + + + + + + + + +
    Other + Topics
    Frequently Asked + Questions
    SiteMap +
    Tutorials +
    Other Notes
    +
    +
    +
    +
    + +

    Maintained by the Apache HTTP Server + Documentation Project.

    + + + + diff --git a/htdocs/manual/index.html.fr b/htdocs/manual/index.html.fr new file mode 100644 index 00000000000..153575f296b --- /dev/null +++ b/htdocs/manual/index.html.fr @@ -0,0 +1,281 @@ + + + + + + + + Documentation du serveur HTTP Apache version 1.3 + + + +
    + + + + + + + + + + + + + + + + +
    [Documentation d'Apache]
    + + + + + + + + + + +
    FAQ Directives + Modules Rechercher +
    +
     
    +

    Serveur HTTP Apache version 1.3

    +
    +
    + +
    + + + + +
    +
    + + + +
    +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + +
    Notes + sur cette version
    Nouvelles + fonctionnalités de la version 1.3
    Migrer vers la + version 1.3
    Licence Apache
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Manuel + de référence
    Compilation et + installation
    Démarrage +
    Arrêt et + redémarrage
    Directives de + configuration de l'exécution
    Modules: par + type or par ordre + alphabétique
    Support des Objets + partagés dynamiques (DSO)
    L'API Apache
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Notes + liées aux plates-formes
    Microsoft Windows | + Cygwin
    Novell Netware +
    HP MPE/iX
    UnixWare
    TPF
    +
    + + + + +
    .
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + Utilisation du serveur HTTP Apache +
    Fichiers de + configuration
    Configuration + globale du serveur
    Hôtes + virtuels
    Inclusion + côté serveur (SSI)
    Contenu dynamique avec + les CGI
    Handlers
    Négotiation + de contenu
    Variables + d'environnement
    Using SetUserID Execution + for CGI
    Aides sur les + performances générales
    Trucs sur la + sécurité
    Guide de + réécriture d'URLs
    + + + + + + + + + + + + + + + + + +
    Autres + sujets
    Foires aux + questions
    Tutoriels +
    Autres notes
    +
    +
    + + + + diff --git a/htdocs/manual/index.html.html b/htdocs/manual/index.html.html new file mode 100644 index 00000000000..f2710912dc8 --- /dev/null +++ b/htdocs/manual/index.html.html @@ -0,0 +1,4 @@ + + + diff --git a/htdocs/manual/index.html.ja.jis b/htdocs/manual/index.html.ja.jis new file mode 100644 index 00000000000..f6693ad6849 --- /dev/null +++ b/htdocs/manual/index.html.ja.jis @@ -0,0 +1,310 @@ + + + + + + + Apache HTTP $B%5!<%P(B $B%P!<%8%g%s(B 1.3 $B%I%-%e%a%s%H(B + + + +
    + + + + + + + + + + + + + + + + +
    [Apache $B%I%-%e%a%s%H(B]
    + + + + + + + + + + + + +
    FAQ $B%5%$%H%^%C%W(B$B%G%#%l%/%F%#%V(B + $B%b%8%e!<%k(B $B8!:w(B +
    +
     
    +

    Apache HTTP Server Version 1.3

    +
    +
    + +
    + + + + +
    +
    + + + +
    +
    + + + + + + + + + +
    + + + + + + + + + + + + + + + + +
    + $B%j%j!<%9%N!<%H(B
    Apache 1.3 $B$N?75!G=(B +
    Apache 1.3 + $B$X$N%"%C%W%0%l!<%I(B
    Apache $B$N%i%$%;%s%9(B
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + $B%j%U%!%l%s%9%^%K%e%"%k(B
    $B%3%s%Q%$%k$H%$%s%9%H!<%k(B +
    $B5/F0(B
    $B=*N;$^$?$O:F5/F0(B +
    $B +
    $B%b%8%e!<%k(B: $B $B$H(B + $B%"%k%U%!%Y%C%H=g(B
    $B%5!<%P$H%5%]!<%H%W%m%0%i%`(B +
    Dynamic Shared Object (DSO) + $B$N%5%]!<%H(B
    Apache API +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    + $B%W%i%C%H%U%)!<%`8GM-$N>pJs(B
    Microsoft Windows | + Cygwin
    Novell Netware +
    HP MPE/iX
    UnixWare
    TPF
    +
    + + + + +
    .
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Apache + HTTP $B%5!<%P$r;H$&(B
    $BG'>Z!"5v2D!"(B + $B%"%/%;%9@)8f(B
    CGI + $B$K$h$kF0E*%3%s%F%s%D(B
    $B@_Dj%U%!%$%k(B +
    $B%3%s%F%s%H%M%4%7%(!<%7%g%s(B
    $B4D6-JQ?t(B +
    $B0lHLE*$J@-G=$K4X$9$k%R%s%H(B
    $B%O%s%I%i(B
    $B%m%0%U%!%$%k(B
    + $B%;%-%e%j%F%#>pJs(B
    Server Side Include +
    $B%5!<%PA4BN$N@_Dj(B +
    CGI $B$G(B SetUserID + $B
    URL + $B$r%U%!%$%k%7%9%F%`$K%^%C%W$9$k(B
    URL Rewriting + $B$N%,%$%I(B
    $B%P!<%A%c%k%[%9%H(B +
    + + + + + + + + + + + + + + + + + + + + + +
    + $B$=$NB>(B
    FAQ +
    $B%5%$%H%^%C%W(B +
    $B%A%e!<%H%j%"%k(B +
    $B$=$NB>(B
    +
    +
    +
    +
    + +

    Apache HTTP Server + Documentation Project $B$K$h$j%a%s%F%J%s%9$5$l$F$$$^$9!#(B

    + + + diff --git a/htdocs/manual/install-tpf.html b/htdocs/manual/install-tpf.html new file mode 100644 index 00000000000..e9600d7e686 --- /dev/null +++ b/htdocs/manual/install-tpf.html @@ -0,0 +1,978 @@ + + + + + + + Installing Apache on TPF4.1 + + + + +
    +

    Installing the Apache 1.3 HTTP Server on + TPF4.1

    +
    + [ Download | + Compilation | + Installation | + Link Map ] +
    +
    + +

    This document outlines the steps needed to install Apache + onto an IBM TPF4.1 system. (There are separate + installation instructions for + z/TPF.)

    + +

    You should first review + readme-tpf.html for basic + information on the port of Apache to TPF including a list of + supported modules and required PUT levels.

    + +

    The allocated CHTA program name is used throughout + these instructions to refer to Apache. You can use a different + program name if you wish.
    + Likewise the directory structure apache/src is used + for the Apache source code directory. You can use different + directories than apache if you wish.

    + +

    If you change the program or directory names be sure to + change the entries shown in these instructions.


    + + +
    +

    Download

    +
    + +

    Releases of the Apache server are compressed into a + "tarball" file which must be downloaded to your PC. + Additionally the source code from the tarball will need to be + copied onto an OS/390 UNIX System Services machine (later + referred to simply as "OS/390 UNIX") for compiling. Here are + all the details on how to get Apache and how to get it where it + needs to be:

    + +
      +
    1. +

      Download the compressed Apache files (the "tarball") + to your PC. The file name on the web site will be + apache_1.3.vv.tar.Z.

      + +

      + TIP: + Be sure to keep the .tar.Z extension when + saving the file.

      +
    2. + +
    3. +

      Decompress the tarball on your PC using WinZip or + some other PC decompression tool.

      + +

      + TIP: + If you are using WinZip verify that the "TAR File + Smart CR/LF Conversion" option (under Options, + Configuration) is not checked.

      + +

      This is what you can expect if you use WinZip:

      + +
        +
      • open the tarball with WinZip (this can usually + be done simply by double-clicking on the downloaded + tarball)
      • + +
      • you will be told that the archive contains one + file (apache_1.3.vv.tar) - allow WinZip to + decompress it to a temporary folder
      • + +
      • extract the archived files onto your PC - + you'll be using files from the  conf, + htdocs, and icons directories later + in the install phase
        +
      • +
      +
    4. + +
    5. +

      FTP the tarball to your OS/390 UNIX machine using + binary mode:

      + +
        +
      • activate FTP in an MSDOS window:
        +    ftp your.os390.unix.machine.com 
      • + +
      • sign in 
      • + +
      • set mode to + binary:  binary 
      • + +
      • send the file to OS/390 UNIX:
        +    send "c:/path/apache_1.3. + vv.tar.Z" apache_1.3.vv.tar.Z
      • + +
      • exit FTP:  bye
      • +
      + +

      + TIP: + UNIX file names are case sensitive. If you use an NFS + client to transfer files from your PC to OS/390 UNIX + (instead of using FTP as described above) verify that + the NFS drive will transfer the file names with + upper/lower case preserved.

      +
    6. + +
    7. +

      Decompress and extract the archived files necessary + for compiling Apache:

      + +

      + pax -rvzkf apache_1.3.vv.tar.Z -o from=ISO8859-1,to=IBM-1047 "*/src"

      +
    8. + +
    9. +

      Remove unnecessary + subdirectories:

      + +

      + cd apache_1.3.vv/src/lib
      + rm -r expat-lite sdbm
      + cd ../os
      + rm -fr bs2000 cygwin mpeix netware os2 os390 unix + win32
      + cd ..

      +
    10. +
    + +
    +

    Compilation

    +
    + +

    Apache supports the notion of "optional modules". However, + the server has to know which modules are compiled into it. In + order for those modules to be effective, it is necessary to + generate a short bit of code (modules.c) which simply has a + list of them. If you are using the Configure utility + and make, modules.c and other necessary files will be + created for you automatically.

    + +

    The provided instructions assume a c89 compiler and have + been tested on an OS/390 UNIX machine running at version 2.6 + that contained both OS/390 UNIX and TPF C header files. If you + are using a platform other that OS/390 UNIX you may need to + modify src/os/tpf/TPFExport and src/Configure to match your + environment.

    + +

    TIP: + Editing files on your PC prior to moving them to OS/390 UNIX + may result in the loss/addition of unprintable characters. + Files of concern include shell scripts and src/Configuration. + The most common problems are with tab characters and CR/LF + characters. Most editors will handle the CR/LF problem + correctly but none seem to handle tab characters. If you need + to edit files prior to moving them to OS/390 UNIX, edit them in + a UNIX editor such as vi or emacs.

    + +

    Note that OS/390 UNIX commands in this section are shown in + bold, are case sensitive, and must be made from + the "src" directory.

    + +
      +
    1. +

      Switch to the Apache source code subdirectory:

      + +

      + cd apache_1.3.vv/src

      +
    2. + +
    3. +

      Overlay src/Configuration with + src/Configuration.tmpl:

      + +

      + cp Configuration.tmpl Configuration

      +
    4. + +
    5. +

      The src/Configuration file controls which optional + modules are compiled into Apache.
      + Leave the file as-is if you want to use the default + set of modules.
      + Otherwise edit the src/Configuration file to customize + which modules are used:

      + +
        +
      • Comment out (by preceding the line with a "#") + lines corresponding to those modules you do + not wish to include.
      • + +
      • Uncomment (by removing the initial "#", if + present) lines corresponding to those modules you + wish to include.
        + (The readme-tpf.html + document lists the modules that have been tested on + TPF).
      • + +
      • Add lines for any custom or third party modules + you wish to include.
        + The modules placed in the Apache distribution are + the ones that have been tested and are used + regularly by various members of the Apache + development group. Additional modules contributed + by members or third parties with specific needs or + functions are available at + http://modules.apache.org/. + There are instructions on that page for linking + these modules into the core Apache code.
      • + +
      • If you did not delete the src/lib/expat-lite + directory as noted in the + download instructions, + add "Rule EXPAT=no" to the + src/Configuration file.
      • + +
      • Adjust the other rules, EXTRA_CFLAGS, + EXTRA_LIBS, EXTRA_LDFLAGS, and + EXTRA_INCLUDES settings if you feel so + inclined.
        +  
      • +
      +
    6. + +
    7. +

      Indicate whether the non_socket_select + function is implemented on your system.

      + +

      If you are on a PUT12 or higher system, or have + PJ26895 installed, then you probably support + non_socket_select.
      + You can verify this by looking for the + non_socket_select prototype in your system + header files (specifically i$pwbl.h).

      + +

      If your TPF system supports + non_socket_select do one of the + following:

      + +
        +
      • add + "#define TPF_HAVE_NONSOCKET_SELECT" + to + src/os/tpf/os.h   or
      • + +
      • add "-DTPF_HAVE_NONSOCKET_SELECT" to + the _C89_OPTIONS export in + src/os/tpf/TPFExport
      • +
      + +

      Otherwise:

      + +
        +
      • add + "#define TPF_NO_NONSOCKET_SELECT" to + src/os/tpf/os.h   or
      • + +
      • add "-DTPF_NO_NONSOCKET_SELECT" to the + _C89_OPTIONS export in + src/os/tpf/TPFExport
      • +
      + +

      Without non_socket_select CGI output is + buffered and only sent to the browser when the CGI + program finishes.

      +
    8. + +
    9. +

      Indicate whether the tpf_sawnc function is + implemented on your system.

      + +

      If you are on a PUT10 or higher system, or have + PJ27387/PJ26188 installed, then you probably support + tpf_sawnc.
      + You can verify this by looking for the + tpf_sawnc prototype in your system header + files (either tpfapi.h or + i$fsdd.h).

      + +

      If your TPF system supports tpf_sawnc do + one of the following:

      + +
        +
      • add "#define TPF_HAVE_SAWNC" to + src/os/tpf/os.h   or
      • + +
      • add "-DTPF_HAVE_SAWNC" to the + _C89_OPTIONS export in + src/os/tpf/TPFExport
      • +
      + +

      Otherwise:

      + +
        +
      • add "#define TPF_NO_SAWNC" to + src/os/tpf/os.h   or
      • + +
      • add "-DTPF_NO_SAWNC" to the + _C89_OPTIONS export in + src/os/tpf/TPFExport
      • +
      + +

      The use of tpf_sawnc allows for a cleaner + shutdown of Apache.

      +
    10. + +
    11. +

      Indicate if you have the Syslog + Daemon message logging facility.

      + +

      If you are on a PUT13 or higher system, or have + PJ27214 installed, you can use syslog for Apache's + ErrorLog.
      + To have the option of using syslog you must do + one of the following:

      + +
        +
      • add "#define HAVE_SYSLOG" to + src/os/tpf/os.h   or
      • + +
      • add "-DHAVE_SYSLOG" to the + _C89_OPTIONS export in + src/os/tpf/TPFExport
      • +
      + +

      You also need to add "INCLUDE + OBJLIB(CSYLOG40)" to your link JCL.

      + +

      See the syslog + section of readme-tpf.html for more + information.

      +
    12. + +
    13. +

      Indicate if you would like to use the TCP/IP network + services database. (This only applies if you are using + TCP/IP native stack.)

      + +

      If you are on a PUT16 or higher system, or have + PJ28195 installed, you can use the TCP/IP network + services database. To do so, you must do one + of the following:

      + +
        +
      • add "#define TPF_HAVE_NSD" to + src/os/tpf/os.h   or
      • + +
      • add "-DTPF_HAVE_NSD" to the + _C89_OPTIONS export in + src/os/tpf/TPFExport
      • +
      + +

      See "Network Services Database Support" in the + IBM + TPF Product Information Center for details.

      +
    14. + +
    15. +

      Set the TPF environment + variables:

      + +

      + . os/tpf/TPFExport 

      + +

      This script will set the environment variables + required to compile the programs for TPF. Verify that + the export variables are valid for your installation, + in particular, the system include file directories. The + system include files must reside on your OS/390 UNIX + system in the appropriate file structure similar to + /usr/include and /usr/include/sys. Do not + modify the TPF=YES export variable. If this is + changed, the "Configure" script will not recognize + TPF.

      +
    16. + +
    17. +

      Run the "Configure" script + to generate modules.c, include/ap_config_auto.h, and + necessary Makefiles:

      + +

      Configure

      + + + + + +
      +
      +Using config file:
      +Configuration
      +Creating Makefile
      ++ configured for TPF platform
      ++ setting C compiler to c89
      ++ setting C pre-processor to c89 -E
      ++ using "tr [a-z] [A-Z]" to uppercase
      ++ checking for system header files
      ++ adding selected modules
      ++ checking sizeof various data types
      +Creating Makefile in support
      +Creating Makefile in regex
      +Creating Makefile in os/tpf
      +Creating Makefile in ap
      +Creating Makefile in main
      +Creating Makefile in modules/standard
      +$
      +                        
      +
      + +

      Use the -file option if + you want to maintain multiple configurations:

      + +

      + Configure -file Configuration.2nd

      + + + + + +
      +
      +Using config file: Configuration.2nd 
      +Creating Makefile
      ++ configured for TPF platform
      ++ setting C compiler to c89
      +et cetera
      +                        
      +
      + +

      If you receive an error such as "Configure 146: + FSUM7351 not found" the most likely explanation is + that one or more of the make related files + were edited on a non-UNIX platform, corrupting the + end-of-line marks. Verify that lines ending with "\" in + the flagged file do not have trailing spaces. Using the + vi editor and the sample error above as an + example...

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      pull up the flagged file:vi Configure
      turn on punctuation::set list
      go to the line in + question:     146G
      or find a line with a "\":/\\
      + +

      The end of line should display as + "\$". If it is displayed as + "\ $" (with a blank between \ and $) then + you should revert to the distributed version of the + file and make the site-specific changes again using a + UNIX compatible editor such as vi or emacs. Then try + the Configure command again.

      + + + + + + + +
      close the + file:                      :q (or + :quit!)
        +
    18. + +
    19. +

      Edit src/os/tpf/os.h if you want to use the + sigaction() function.

      + +

      The sigaction() function supersedes the + signal() interface and should be used in + preference. This function was implemented with APAR + PJ26188 which shipped with PUT10.

      + +

      To use sigaction() remove #define + NO_USE_SIGACTION in os.h.

      + +

      The change will only take effect after Apache is + (re)compiled.

      +
    20. + +
    21. +

      Edit src/os/tpf/os.h if you do not want the + scoreboard kept in shared memory.

      + +

      The default behavior for Apache on all platforms + except TPF is to use the file system for + maintaining the scoreboard (which holds current Apache + children status). The default behavior for Apache on + TPF is to use shared memory. This reduces file activity + and improves performance.

      + +

      If you are on a pre-PUT10 system, or for some reason + you do not want to use shared memory for the + scoreboard, you must remove + "#define USE_SHMGET_SCOREBOARD" from + os.h

      + +

      The change will only take effect after Apache is + (re)compiled.

      +
    22. + +
    23. +

      Now compile the programs:

      + +

      make

      + +

      Besides compiling, make also runs + src/main/gen_test_char.c and src/main/gen_uri_delims.c + in order to create src/main/test_char.h and + src/main/uri_delims.h respectively

      + +

      The following compilation warning may or may not + occur. It should be ignored:

      + +

      + main/http_main.c:   Infinite loop + detected in function child_main. Program may not + stop.

      + +

      If during compilation you get a warning about a + missing 'regex.h', set WANTHSREGEX=yes in the + src/Configuration file and start back at the + Configure + step.

      + +

      If you get a + 'Duplicate type specifier "long" ignored' + error, add "-W 0,langlvl(extended)" to + the _C89_OPTIONS export in + src/os/tpf/TPFExport and start back at the + export step

      +
    24. +

    + + +
    +

    Installation

    +
    + +

    The allocated CHTA program name is used throughout + these instructions to refer to Apache. You can use a different + program name if you wish.

    + +
      +
    1. +

      Link the compiled object files into a DLL. Sample + link JCL has been included as + src/os/tpf/samples/linkhttp.jcl. You will need to + modify this JCL:

      + +
        +
      • Change the IDs, data set names, and libraries + for your particular site.
      • + +
      • Add/remove mod_xxx.o files so + they correspond to the mod_xxx.o + lines in your src/Configuration file.
      • +
      + +

      + TIP: + Do not include gen_test_char.o or + gen_uri_delims.o in the link JCL since these files are + only used during the make step.

      + +

      If you receive an "Unresolved references" error for + "XML_ErrorString" you probably need to + remove the expat-lite + directory and start back at the + "Run the Configure script" + step

      + +

      If you receive an "unable to open" error for + lib/expat-lite/hashtable.o" you probably need + to remove all of the expat-lite .o's from your link + JCL

      + +

      + TIP: + Apache uses cinet6 from CLTY, which is part of the + Internet Daemon (ZINET). Ensure that you link Apache + with the proper version of CLTY for your system. If you + apply changes to CLTY you should re-link Apache to + prevent the inetd_getServer and/or + inetd_getServerStatus functions from + failing.

      +
    2. + +
    3. +

      Create a loadset. Sample loadset JCL has been + included as src/os/tpf/samples/loadset.jcl. You will + need to modify this JCL for your particular site.

      + +

      A JCL condition code of 4 is expected since the C + load module will contain no link map data.

      + +

      If you require a link map refer to the + instructions below.

      +
    4. + +
    5. +

      Load (ZOLDR LOAD) and activate (ZOLDR + ACT) the loadset on your test system.

      +
    6. + +
    7. +

      Ensure that the program name you are using for + Apache has RESTRICT and KEY0 + authorization:

      + +

      zdpat chta + (c-c)

      + +

      If necessary you can use the zapat entry to + alter the authorization:

      + +

      zapat chta restrict key0 + (c-c)

      + +

      Note that if the program name is unallocated, you + must have the loadset for it activated or you will + receive INVALID PROGRAM NAME from the + zdpat/zapat entries.

      +
    8. + +
    9. +

      General documentation for Apache is located at + http://httpd.apache.org/docs/ + and in the HTML pages included with the distribution + (tarball) under the htdocs/manual + directory.

      +
    10. + +
    11. +

      Create the Apache run-time configuration file. The + server requires a configuration file to initialize + itself during activation.
      + Copy the distribution version, conf/httpd.conf-dist, + to conf/httpd.conf and then edit the conf/httpd.conf + copy with your site specific information.

      + +

      You must change every occurrence of + "@@ServerRoot@@" to your document server root + (for example "/usr/local/apache")

      + +

      You should also add the following line to the + httpd.conf file to prevent Apache from doing a host + name lookup on your test system:

      + +

      ServerName 127.0.0.1

      +
    12. + +
    13. +

      On TPF activate your TCP/IP Offload (ZCLAW) or + Native Stack communications device.
      + Refer to the + IBM + TPF Product Information Center for details.

      +
    14. + +
    15. +

      Using either TFTP or FTP, transfer the configuration + file, icons, and web pages to your TPF system. A + typical directory structure for Apache is as + follows:

      + +

      /usr/local/apache/conf
      + /usr/local/apache/logs
      + /usr/local/apache/icons
      + /usr/local/apache/htdocs

      + +

      At a minimum you will need these files on TPF:

      + +

      + /usr/local/apache/conf/httpd.conf
      + /usr/local/apache/conf/mime.types
      + /usr/local/apache/htdocs/index.html.en
      + /usr/local/apache/htdocs/apache_pb.gif

      + +

      All gif, jpg, and zip files should be transferred as + binary; the configuration file and html pages should be + transferred as text.

      + +

      Refer to the + IBM + TPF Product Information Center for details on TFTP + and FTP.

      +
    16. + +
    17. +

      The logs directory must exist and be accessible in + order to avoid an fopen error while running + Apache:

      + +

      If you're running a PUT10 or higher version of TPF + make the directory using a zfile commands:

      + +

      + zfile mkdir /usr/local/apache/logs
      + + zfile chmod 777 /usr/local/apache/logs

      + +

      If you're running TPF version PUT09 TFTP an empty + file into the logs subdirectory to create + it. 
      + Then make sure Apache can write into the logs + subdirectory:

      + +

      zfile chmod 777 + /usr/local/apache/logs

      +
    18. + +
    19. +

      Add Apache to the Internet Daemon's tables using + ZINET entries

      + +

      For PUT11 and later use the DAEMON model for + Apache:

      + +

      + ZINET ADD S-APACHE PGM-chta MODEL-DAEMON USER-root

      + +

      On pre-PUT11 systems use the NOLISTEN model + instead:

      + +

      + ZINET ADD S-APACHE PGM-chta MODEL-NOLISTEN

      + +

      TIP: Logic changes implemented + with PUT11 cause ZINET to not restart + NOLISTEN servers after ZOLDR ACT + and ZOLDR DEACT entries. This means + that Apache running as NOLISTEN on a PUT11 or + later system will exit whenever any + ZOLDR ACT or + ZOLDR DEACT entry is made. + Therefore at PUT11 you should switch to the + DAEMON model and ensure that you have APARs + PJ25761 and PJ27363 applied.

      + +

      Refer to the + IBM + TPF Product Information Center for details on the + Internet Daemon and ZINET commands.

      +
    20. + +
    21. +

      Start the server:

      + +

      + zinet start s-apache

      +
    22. + +
    23. +

      Verify Apache was successfully started:

      + +

      zfile cat + /usr/local/apache/logs/error_log

      + + + + + +
      +
      +[timestamp] [notice] Apache/1.3.vv (TPF) configured -- resuming normal operations
      +[timestamp] [notice] Accept mutex: tpfcore (Default: tpfcore)
      +                        
      +
      + +

      If there are severe errors correct the conf file and + restart the server:

      + +

      + zinet stop s-apache
      + correct the httpd.conf file and transfer it to + TPF
      + zfile rm /usr/local/apache/logs/error_log
      + + zinet start s-apache

      +
    24. + +
    25. +

      Request a page from your browser:

      + +

      + http://xx.xx.xx.xx   (where + xx.xx.xx.xx is your test system IP address)

      +
    26. +

    + + +
    +

    Generating an Apache Link Map

    +
    + +

    Three different tools can be used to generate a link map for + Apache: TPF Build Tools, TPF Toolkit, and VisualAge TPF.

    + +

    TPF Build Tools on OS/390 UNIX

    + +
      +
    1. Download and install the + TPF Build Tools if you have not already done so.
    2. + +
    3. Follow the instructions to set up any necessary + variables for your installation.
    4. + +
    5. + Create a shell script in your Apache src + directory: + + + + + +
      +
      +ld -M --dlm -O'<your-dsd-dsn>(CHTA<vv>)' \
      +CSTRTD40 \
      +CINET640 \
      +buildmark.o \
      +modules.o \
      +ap/ap_base64.o \
      +   .
      +   .
      +   .
      +regex/regexec.o \
      +regex/regfree.o
      +                        
      +
      In your script... + +
        +
      • Each line must end with a backwards slash (\) + except for the last line. Be sure there are no + trailing blanks after the backward slashes.
      • + +
      • Replace the two items in angle brackets (< + >) with your dataset name and program + version.
      • + +
      • Add any additional libraries prior to the first + ".o" line.
      • + +
      • Add a line for each .o to be linked into your + configuration of Apache.
      • +

      +
    6. + +
    7. Change the shell script's permission settings to + executable using the chmod command.
    8. + +
    9. Run the script.
    10. +
    + +

    TPF Toolkit

    + +
      +
    1. Copy the sample linkhttp.dlm file from the + src/os/tpf/samples directory to your Apache + src directory on OS/390 UNIX.
    2. + +
    3. This sample file contains the components for the + default configuration of Apache. Add and delete components + (such as modules) as necessary so it matches your + configuration of Apache. Basically, it should match your + link JCL with the ".../apache/src" portion of the + filenames removed.
    4. + +
    5. Change items in angle brackets (< >) to also + match your JCL. Be sure to remove the angle brackets as + well.
    6. + +
    7. In the TPF Toolkit create a project with your modified + dlm file as its sole contents.
    8. + +
    9. Right click on the dlm file in your new project and + choose "Build DLM".
    10. +
    + +

    VisualAge TPF

    + +
      +
    1. Copy the sample linkhttp.dlm file from the + src/os/tpf/samples directory to your Apache + src directory on OS/390 UNIX.
    2. + +
    3. This sample file contains the components for the + default configuration of Apache. Add and delete components + (such as modules) as necessary so it matches your + configuration of Apache. Basically, it should match your + link JCL with the ".../apache/src" portion of the + filenames removed.
    4. + +
    5. Change items in angle brackets (< >) to also + match your JCL. Be sure to remove the angle brackets as + well.
    6. + +
    7. In VisualAge TPF create a container with your modified + dlm file as its sole contents.
    8. + +
    9. Right click on the dlm file in your new container and + choose "Build DLM".
    10. +
    +
    + +
    + [ top | Download + | Compilation | + Installation | + Link Map ] +
    + + diff --git a/htdocs/manual/install-ztpf.html b/htdocs/manual/install-ztpf.html new file mode 100644 index 00000000000..85e80ed9424 --- /dev/null +++ b/htdocs/manual/install-ztpf.html @@ -0,0 +1,555 @@ + + + + + + + Installing Apache on z/TPF + + + + +
    +

    Installing the Apache 1.3 HTTP Server on + z/TPF

    +
    + [ Download | + MakeTPF Setup | + Compilation | + Installation ] +
    +
    + +

    This document outlines the steps needed to install Apache + onto an IBM z/TPF Enterprise Edition V1 R1 system. (There are + separate installation instructions + for TPF4.1.)

    + +

    You should first review + readme-tpf.html for basic + information on the port of Apache to TPF including a list of + supported modules.

    + +

    The allocated CHTA program name is used throughout + these instructions to refer to Apache. You can use a different + program name if you wish.
    + Likewise the directory structure + opensource/apache/src is used for the Apache source + code directory. You can use different directories than + opensource/apache if you wish.

    + +

    If you change the program or directory names be sure to + change the entries shown in these instructions, all + MakeTPF-related files, and the sample files + accordingly.


    + + +
    +

    Download

    +
    + +

    Releases of the Apache server are compressed into a + "tarball" file which must be downloaded to your PC. + Additionally the source code from the tarball will need to be + copied onto your Linux build system for compiling. Here are all + the details on how to get Apache and how to get it where it + needs to be:

    + +
      +
    1. +

      Download the compressed Apache files (the "tarball") + to your PC. The file name on the web site will be + apache_1.3.vv.tar.Z.

      + +

      + TIP: + Be sure to keep the .tar.Z extension when + saving the file.

      +
    2. + +
    3. +

      Decompress the tarball on your PC using WinZip or + some other PC decompression tool.

      + +

      + TIP: + If you are using WinZip verify that the "TAR File + Smart CR/LF Conversion" option (under Options, + Configuration) is not checked.

      + +

      This is what you can expect if you use WinZip:

      + +
        +
      • open the tarball with WinZip (this can usually + be done simply by double-clicking on the downloaded + tarball)
      • + +
      • you will be told that the archive contains one + file (apache_1.3.vv.tar) - allow WinZip to + decompress it to a temporary folder
      • + +
      • extract the archived files onto your PC - + you'll be using files from the  conf, + htdocs, and icons directories later + in the install phase
        +
      • +
      +
    4. + +
    5. +

      FTP the tarball to your Linux build machine using + binary mode:

      + +
        +
      • activate FTP in an MSDOS window:
        +    ftp your.linux.build.machine.com 
      • + +
      • sign in 
      • + +
      • set mode to + binary:  binary 
      • + +
      • send the file to your Linux build + machine:
        +    send "c:/path/apache_1.3. + vv.tar.Z" apache_1.3.vv.tar.Z
      • + +
      • exit FTP:  bye
      • +
      + +

      + TIP: + Linux file names are case sensitive.

      +
    6. + +
    7. +

      Decompress and extract the archived files necessary + for compiling Apache:

      + +

      tar -xzkf + apache_1.3.vv.tar.Z "*/src"

      + +

      Note that the following "src" + subdirectories are not used for Apache on z/TPF and may + be removed if desired:

      + +

      lib/expat-lite, + lib/sdbm, regex, and all os + subdirectories except for os/tpf.

      +
    8. + +
    9. +

      Create header files that are automatically generated + for other platforms but are not for z/TPF:

      + +

      cp + apache_1.3.vv/src/os/tpf/samples/test_char.txt  apache_1.3. + vv/src/main/test_char.h
      + cp + apache_1.3.vv/src/os/tpf/samples/uri_delims.txt + apache_1.3.vv/src/main/uri_delims.h

      +
    10. +

    + + +
    +

    MakeTPF Setup

    +
    + +
      +
    1. +

      Move the source code into your desired directory + structure for MakeTPF with the following entries.
      + Replace "foobar" below with your actual + directory name:

      + +

      mkdir -p + foobar/opensource
      + export AROOT="foobar/opensource/apache"
      + mv apache_1.3.vv $AROOT

      +
    2. + +
    3. +

      CHTA is already in the tpf_app_base.cntl + control file. Adjust any settings if necessary.

      +
    4. + +
    5. +

      Create an environment file for Apache named + maketpf.env_apache using + $AROOT/src/os/tpf/samples/sample_env.txt as a + guide.
      + Place maketpf.env_apache in the same + directory as your other environment files.

      +
    6. + +
    7. +

      Create a .mak file for Apache named + $AROOT/src/chta.mak using + $AROOT/src/os/tpf/samples/sample_mak.txt as a + guide
      + Verify that the maketpf_env assignments in + chta.mak are correct for your build + environment.

      +
    8. + +
    9. +

      Create a configuration file named + $AROOT/src/maketpf.cfg.
      + Ensure that the first assignment of TPF_ROOT + in maketpf.cfg is the absolute path to your + "foobar" directory.

      +
    10. + +
    11. +

      Later if you want to include Apache in your full + build add APACHE=YES to the CONFIG + macro in your Stage 1 deck.

      +
    12. +

    + + +
    +

    Compilation

    +
    + +
      +
    1. +

      Switch to the Apache source code subdirectory:

      + +

      cd $AROOT/src

      +
    2. + +
    3. +

      Overlay src/Configuration with + src/Configuration.tmpl:

      + +

      + cp Configuration.tmpl Configuration

      +
    4. + +
    5. +

      The src/Configuration file controls which optional + modules are compiled into Apache.
      + Leave the file as-is if you want to use the default + set of modules.
      + Otherwise edit the src/Configuration file to customize + which modules are used:

      + +
        +
      • Comment out (by preceding the line with a "#") + lines corresponding to those modules you do + not wish to include.
      • + +
      • Uncomment (by removing the initial "#", if + present) lines corresponding to those modules you + wish to include.
        + (The readme-tpf.html + document lists the modules that have been tested on + TPF).
      • + +
      • Add lines for any custom or third party modules + you wish to include.
        + The modules placed in the Apache distribution are + the ones that have been tested and are used + regularly by various members of the Apache + development group. Additional modules contributed + by members or third parties with specific needs or + functions are available at + http://modules.apache.org/. + There are instructions on that page for linking + these modules into the core Apache code.
        +  
      • +
      +
    6. + +
    7. +

      If you would like to use the TCP/IP network services + database add "CFLAGS_CHTA += -DTPF_HAVE_NSD" + to either src/chta.mak or + src/maketpf.cfg. See "Network Services + Database Support" in the + IBM + TPF Product Information Center for details.

      +
    8. + +
    9. +

      Run the "Configure" + script:

      + +

      export TPF=YES; export + TPF64BIT=YES
      + Configure

      + + + + + +
      +
      +Using config file: Configuration
      +Creating Makefile
      ++ configured for TPF platform
      ++ setting C compiler to c89
      ++ setting C pre-processor to /usr/bin/cpp 
      ++ using "tr [a-z] [A-Z]" to uppercase
      ++ checking for system header files
      ++ adding selected modules
      ++ checking sizeof various data types
      +Creating Makefile in support
      +Creating Makefile in os/tpf
      +Creating Makefile in ap
      +Creating Makefile in main
      +Creating Makefile in modules/standard
      +$
      +                        
      +
      + +

      This generates modules.c and the apache.modules text + file for use later by MakeTPF.
      + (Other files created by Configure are + not used on z/TPF such as + include/ap_config_auto.h and the various Makefiles, so + don't be concerned that the C compiler and + pre-processor shown in the Configure output + are incorrect.)

      + +

      Use the -file option if + you want to maintain multiple configurations:

      + +

      + Configure -file Configuration.2nd

      + + + + + +
      +
      +Using config file: Configuration.2nd
      +Creating Makefile
      ++ configured for TPF platform
      ++ setting C compiler to c89
      +et cetera
      +                        
      +
        +
    10. + +
    11. +

      Edit src/os/tpf/os.h if you do not want the + scoreboard kept in shared memory.

      + +

      The default behavior for Apache on all platforms + except TPF is to use the file system for + maintaining the scoreboard (which holds current Apache + children status). The default behavior for Apache on + TPF is to use shared memory. This reduces file activity + and improves performance.

      + +

      If for some reason you do not want to use shared + memory for the scoreboard, you must remove + "#define USE_SHMGET_SCOREBOARD" from the + os.h. The change will only take effect after + Apache is (re)compiled.

      +
    12. + +
    13. +

      Compile and link Apache:

      + +

      maketpf chta -f

      + +

      + TIP: + Apache uses cinet6 from CLTY, which is part of the + Internet Daemon (ZINET). Ensure that you link Apache + with the proper version of CLTY for your system. If you + apply changes to CLTY you should re-link Apache to + prevent the inetd_getServer and/or + inetd_getServerStatus functions from + failing.

      +
    14. +

    + + +
    +

    Installation

    +
    + +
      +
    1. +

      Load and activate Apache on your test system.

      +
    2. + +
    3. +

      Ensure that the program name you are using for + Apache has RESTRICT and KEY0 + authorization:

      + +

      zdpat chta

      + +

      If necessary you can use the zapat entry to + alter the authorization:

      + +

      zapat chta restrict + key0

      +
    4. + +
    5. +

      General documentation for Apache is located at + http://httpd.apache.org/docs/ + and in the HTML pages included with the distribution + (tarball) under the htdocs/manual + directory.

      +
    6. + +
    7. +

      Create the Apache run-time configuration file. The + server requires a configuration file to initialize + itself during activation.
      + Copy the distribution version, conf/httpd.conf-dist, + to conf/httpd.conf and then edit the conf/httpd.conf + copy with your site specific information.

      + +

      You must change every occurrence of + "@@ServerRoot@@" to your document server root + (for example "/usr/local/apache")

      + +

      You should also add the following line to the + httpd.conf file to prevent Apache from doing a host + name lookup on your test system:

      + +

      ServerName 127.0.0.1

      +
    8. + +
    9. +

      Be sure your Native Stack communications device is + active on TPF.
      + Refer to the + IBM + TPF Product Information Center for details.

      +
    10. + +
    11. +

      Using either TFTP or FTP, transfer the configuration + file, icons, and web pages to your TPF system. A + typical directory structure for Apache is as + follows:

      + +

      /usr/local/apache/conf
      + /usr/local/apache/logs
      + /usr/local/apache/icons
      + /usr/local/apache/htdocs

      + +

      At a minimum you will need these files on TPF:

      + +

      + /usr/local/apache/conf/httpd.conf
      + /usr/local/apache/conf/mime.types
      + /usr/local/apache/htdocs/index.html.en
      + /usr/local/apache/htdocs/apache_pb.gif

      + +

      All gif, jpg, and zip files should be transferred as + binary; the configuration file and html pages should be + transferred as text.

      + +

      Refer to the + IBM + TPF Product Information Center for details on TFTP + and FTP.

      +
    12. + +
    13. +

      The logs directory must exist and be accessible in + order to avoid an fopen error while running + Apache:

      + +

      zfile mkdir + /usr/local/apache/logs
      + zfile chmod 777 + /usr/local/apache/logs

      +
    14. + +
    15. +

      Add Apache to the Internet Daemon's tables using + ZINET entries:

      + +

      + zinet add s-apache pgm-chta model-daemon user-root

      + +

      Refer to the + IBM + TPF Product Information Center for details on the + Internet Daemon and ZINET commands.

      +
    16. + +
    17. +

      Start the server:

      + +

      + zinet start s-apache

      +
    18. + +
    19. +

      Verify Apache was successfully started:

      + +

      zfile cat + /usr/local/apache/logs/error_log

      + +

      The output should be similar to this:

      + + + + + +
      +
      +[timestamp] [notice] Apache/1.3.vv (TPF) configured -- resuming normal operations
      +[timestamp] [notice] Accept mutex: tpfcore (Default: tpfcore)
      +                        
      +
      + +

      If there are severe errors correct the conf file and + restart the server:

      + +

      + zinet stop s-apache
      + correct the httpd.conf file and transfer it to + TPF
      + zfile rm /usr/local/apache/logs/error_log
      + + zinet start s-apache

      +
    20. + +
    21. +

      Request a page from your browser:

      + +

      + http://xx.xx.xx.xx   (where + xx.xx.xx.xx is your test system IP address)

      +
    22. +
    +
    + +
    + [ top | Download + [ MakeTPF Setup | + Compilation | + Installation ] +
    + + diff --git a/htdocs/manual/install.html.en b/htdocs/manual/install.html.en new file mode 100644 index 00000000000..d0c885c46ac --- /dev/null +++ b/htdocs/manual/install.html.en @@ -0,0 +1,415 @@ + + + + + + + Compiling and Installing Apache + + + + + + +

    Compiling and Installing Apache 1.3

    + + + +

    This document covers compilation and installation of Apache on Unix + systems. For compiling and installation on other platforms, see

    + + + +

    Downloading Apache

    + +

    You may download the latest version of Apache either directly from the + Download Page.

    + +

    Introduction

    + +

    Like all good things, there are two ways to configure, compile, and + install Apache. You can go for the 3-minute installation process using + the APACI process described below; or, you can opt for the same mechanism + used in previous versions of Apache, as described in the file + 'src/INSTALL'. Each mechanism has its benefits and drawbacks - APACI is + newer and a little more raw, but it gets you up and running the least + amount of time, whereas the "Configuration.tmpl" mechanism may be more + familiar and give you some more flexibility to the power user. We'd be + very interested in your comments and feedback regarding each + approach.

    + +

    Installing the Apache 1.3 HTTP server with + APACI

    + +

    Overview for the impatient

    +
    +     $ ./configure --prefix=PREFIX
    +     $ make
    +     $ make install
    +     $ PREFIX/bin/apachectl start
    +
    + +

    NOTE: PREFIX is not the string "PREFIX". Instead + use the Unix filesystem path under which Apache should be installed. For + instance use "/usr/local/apache" for PREFIX above.

    + +

    Requirements

    + +

    The following requirements exist for building Apache:

    + +
    +
    Disk Space:
    + +
    Make sure you have approximately 12 MB of temporary free disk space + available. After installation Apache occupies approximately 3 MB of + disk space (the actual required disk space depends on the amount of + compiled in third party modules, etc).
    + +
    ANSI-C Compiler:
    + +
    Make sure you have an ANSI-C compiler installed. The GNU C compiler + (GCC) from the Free Software Foundation (FSF) is recommended (version + 2.7.2 is fine). If you don't have GCC then at least make sure your + vendors compiler is ANSI compliant. You can find the homepage of GNU at + http://www.gnu.org/ and the GCC distribution under + http://www.gnu.org/order/ftp.html .
    + +
    Perl 5 Interpreter [OPTIONAL]:
    + +
    For some of the support scripts like `apxs' or `dbmmanage' (which + are written in Perl) the Perl 5 interpreter is required (versions 5.003 + and 5.004 are fine). If no such interpreter is found by APACI's + `configure' script this is no harm. Of course, you still can build and + install Apache 1.3. Only those support scripts cannot be used. If you + have multiple Perl interpreters installed (perhaps a Perl 4 from the + vendor and a Perl 5 from your own), then it is recommended to use the + --with-perl option (see below) to make sure the correct one is selected + by APACI.
    + +
    Dynamic Shared Object (DSO) support [OPTIONAL]:
    + +
    +

    To provide maximum flexibility Apache now is able to load modules + under runtime via the DSO mechanism by using the pragmatic + dlopen()/dlsym() system calls. These system calls are not available + under all operating systems therefore you cannot use the DSO + mechanism on all platforms. And Apache currently has only limited + built-in knowledge on how to compile shared objects because this is + heavily platform-dependent. The current state is this:

    + +
      +
    • + Out-of-the-box supported platforms are: + +

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      LinuxSunOSUnixWareDarwin/Mac OS
      FreeBSDSolarisAIXOpenStep/Mach
      OpenBSDIRIXSCODYNIX/ptx
      NetBSDHPUXReliantUNIXBSDI
      Digital UnixDGUX
      +

      +
    • + +
    • + Entirely unsupported platforms are: + +

      Ultrix

      +
    • +
    + +

    If your system is not on these lists but has the dlopen-style + interface, you either have to provide the appropriate compiler and + linker flags (see CFLAGS_SHLIB, LDFLAGS_SHLIB and + LDFLAGS_SHLIB_EXPORT below) manually or at least make sure a Perl 5 + interpreter is installed from which Apache can guess the options.

    + +

    For more in-depth information about DSO support in Apache 1.3 + please read the document htdocs/manual/dso.html carefully. Especially + the section entitled "Advantages & Disadvantages" because using + the DSO mechanism can have strange side-effects if you are not + careful. BE WARNED!

    +
    +
    + +

    Configuring the source tree

    + +

    The next step is to configure the Apache source tree for your + particular platform and personal requirements. The most important setup + here is the location prefix where Apache is to be installed later, + because Apache has to be configured for this location to work correctly. + But there are a lot of other options available for your pleasure.

    + +

    For a short impression of what possibilities you have, here is a + typical example which compiles Apache for the installation tree + /sw/pkg/apache with a particular compiler and flags plus the two + additional modules mod_rewrite and mod_proxy for later loading through + the DSO mechanism:

    +
    +     $ CC="pgcc" OPTIM="-O2" \
    +       ./configure --prefix=/usr/local/apache \
    +                   --enable-module=rewrite --enable-shared=rewrite \
    +                   --enable-module=proxy   --enable-shared=proxy
    +
    + +

    For a complete list of the available options, type the following + command:

    +

    ./configure --help

    + +

    See also the file README.configure for listings of + example configurations.

    + +

    Building the package

    + +

    Now you can build the various parts which form the Apache package by + simply running the command

    +
    +        $ make 
    +
    + +

    Please be patient here, this takes approximately 2 minutes to complete + under a Pentium-166/FreeBSD-2.2 system, dependent on the amount of + modules you have enabled.

    + +

    Installing the package

    + +

    Now its time to install the package under the configured installation + PREFIX (see the --prefix option above):

    +
    +        $ make install
    +
    + +

    In the following examples, PREFIX is not the literal string + "PREFIX", but whatever argument you provided to + the--prefix option.

    + + + +

    Building and installing Apache in the traditional way

    + + Before the advent of APACI, there was just one way to build and + install Apache. While APACI gave a configuration interface which is + more familiar to some people, the older method gives a way to + configure the installation without typing a large number of + command-line options. + +

    Configuring the installation

    + + Compiling Apache consists of three steps: First select which + Apache modules you want to include into the + server. Second create a configuration for your operating + system. Third compile the executable. + +

    All configuration of Apache is performed in the + src directory of the Apache distribution. Change + into this directory.

    + +
      +
    1. + Select modules to compile into Apache in the Configuration + file src/Configuration.tmpl. Uncomment lines + corresponding to those optional modules you wish to include + (among the AddModule lines at the bottom of the file), or + add new lines corresponding to additional modules you have + downloaded or written. (See API.html for preliminary docs on + how to write Apache modules). Advanced users can comment + out some of the default modules if they are sure they will + not need them (be careful though, since many of the default + modules are vital for the correct operation and security of + the server). + +

      You should also read the instructions in the + Configuration file to see if you need to set + any of the Rule lines.

      +
    2. + +
    3. + Configure Apache for your operating system. Normally you + can just run the Configure script as given + below. However if this fails or you have any special + requirements (e.g., to include an additional + library required by an optional module) you might need to + edit one or more of the following options in the + Configuration file: EXTRA_CFLAGS, LIBS, + LDFLAGS, INCLUDES. + +

      Run the Configure script:

      + +
      +
      +    % Configure
      +    Using 'Configuration' as config file
      +     + configured for <whatever> platform
      +     + setting C compiler to <whatever> *
      +     + setting C compiler optimization-level to <whatever> *
      +     + Adding selected modules
      +     + doing sanity check on compiler and options
      +    Creating Makefile in support
      +    Creating Makefile in main
      +    Creating Makefile in os/unix
      +    Creating Makefile in modules/standard
      +  
      +
      +
      + (*: Depending on Configuration and your system, Configure + might not print these lines. That's OK). + +

      This generates a Makefile for use in stage 3. It also + creates a Makefile in the support directory, for + compilation of the optional support programs.

      + +

      (If you want to maintain multiple configurations, you + can give an option to Configure to tell it to + read an alternative Configuration file, such as + Configure -file Configuration.ai).

      +
    4. + +

      Compiling Apache

      + +
    5. Type make.
    6. +
    + The modules we place in the Apache distribution are the ones we + have tested and are used regularly by various members of the + Apache development group. Additional modules contributed by + members or third parties with specific needs or functions are + available at <http://www.apache.org/dist/httpd/contrib/modules/>. + There are instructions on that page for linking these modules + into the core Apache code. + +

    Installing Apache

    + You will have a binary file called httpd in the + src directory. A binary distribution of Apache + will supply this file. + +

    The next step is to install the program and configure it. + Apache is designed to be configured and run from the same set + of directories where it is compiled. If you want to run it from + somewhere else, make a directory and copy the + conf, logs and icons + directories into it. In either case you should read the security tips + describing how to set the permissions on the server root + directory.

    + +

    The next step is to edit the configuration files for the + server. This consists of setting up various + directives in up to three central + configuration files. By default, these files are located in the + conf directory and are called + srm.conf, access.conf and + httpd.conf. To help you get started there are same + files in the conf directory of the distribution, + called srm.conf-dist, + access.conf-dist and httpd.conf-dist. + Copy or rename these files to the names without the + -dist. Then edit each of the files. Read the + comments in each file carefully. Failure to setup these files + correctly could lead to your server not working or being + insecure. You should also have an additional file in the + conf directory called mime.types. + This file usually does not need editing.

    + +

    First edit httpd.conf. This sets up general + attributes about the server: the port number, the user it runs + as, etc. Next edit the srm.conf file; + this sets up the root of the document tree, special functions + like server-parsed HTML or internal imagemap parsing, + etc. Finally, edit the access.conf file + to at least set the base cases of access.

    + +

    In addition to these three files, the server behavior can be + configured on a directory-by-directory basis by using + .htaccess files in directories accessed by the + server.

    + +

    Compiling Support Programs

    + In addition to the main httpd server which is + compiled and configured as above, Apache includes a number of + support programs. These are not compiled by default. The + support programs are in the support directory of + the distribution. To compile the support programs, change into + this directory and type +
    +    make
    +
    + +

    Testing the package

    + +

    Now you can fire up your Apache HTTP server by immediately running

    +
    +        $ PREFIX/bin/apachectl start
    +
    + +

    and then you should be able to request your first document via URL + http://localhost/ (when you built and installed Apache as root or at + least used the --without-confadjust option) or http://localhost:8080/ + (when you built and installed Apache as a regular user). Then stop the + server again by running:

    +
    +        $ PREFIX/bin/apachectl stop
    +
    + +

    Set your system time properly!

    + Proper operation of a public web server requires accurate time + keeping, since elements of the HTTP protocol are expressed as + the time of day. So, it's time to investigate setting up NTP or + some other time synchronization system on your Unix box, or + the net time command on NT. + + + + + diff --git a/htdocs/manual/install.html.es b/htdocs/manual/install.html.es new file mode 100644 index 00000000000..213b6176179 --- /dev/null +++ b/htdocs/manual/install.html.es @@ -0,0 +1,233 @@ + + + + + + + + + Compilación e Instalación de + Apache + + + + + + +

    Compilación e Instalación de + Apache 1.3

    + +

    Este documento cubre la compilación e + instalación de Apache en sistemas Unix, usando el + método manual de construcción e + instalación. Si desea usar la interfaz estilo autoconf, + deberá leer el fichero INSTALL en el + directorio raíz de la distribución fuente de + Apache. Para la compilación e instalación en + plataformas específicas, consulte

    + + + +

    Bajarse Apache

    + +

    La información de la última versión de + Apache puede encontrarla en http://www.apache.org/. En + esta web podrá encontrar las versiones finales, + versiones beta e información de sitios y réplicas + en la web y por ftp anónimo.

    + +

    Si se ha bajado la distribución binaria, vaya a Instalación de Apache. Si no es + así lea la siguiente sección como compilar el + servidor.

    + +

    Compilación de Apache

    + +

    La compilación de Apache consiste en tres pasos. + Primero seleccionar qué módulos + de Apache quiere incluir en el servidor. Segundo crear una + configuración para su sistema operativo. Tercero + compilar el ejecutable.

    + +

    Toda la configuración de Apache está en el + directorio src de la distribución. Vaya al + directorio src.

    + +
      +
    1. +

      Seleccione módulos para compilar, en el fichero + de configuración de Apache. Descomente + las líneas correspondientes a los módulos + opcionales que desee incluir (entre las líneas + AddModule al final del fichero), o escriba + nuevas líneas correspondientes a módulos + adicionales que haya bajado o programado. (Vea API.html para ver la + documentación preliminar de cómo escribir + módulos Apache). Los usuarios avanzados pueden + comentar los módulos por defecto si están + seguros de que no los necesitan (tenga cuidado, ya que + algunos de estos módulos son necesarios para el buen + funcionamiento y una correcta seguridad del servidor).

      + +

      Debería leer también las instrucciones del + fichero de Configuración para comprobar + si necesita configurar unas líneas u + otras.

      +
    2. + +
    3. +

      Configure Apache para su sistema operativo. Usted puede + ejecutar un script como el mostrado más abajo. + Aunque si esto falla o usted tiene algún + requerimiento especial (por ejemplo incluir una + librería adicional exigida por un módulo + opcional) puede editarlo para utilizar en el fichero de + Configuración las siguientes opciones: + EXTRA_CFLAGS, LIBS, LDFLAGS,INCLUDES.

      + +

      Ejecute el script de + configuración:

      + +
      +
      +    % Configure
      +    Using 'Configuration' as config file
      +     + configured for <whatever> platform
      +     + setting C compiler to <whatever> *
      +     + setting C compiler optimization-level to <whatever> *
      +     + Adding selected modules
      +     + doing sanity check on compiler and options
      +    Creating Makefile in support
      +    Creating Makefile in main
      +    Creating Makefile in os/unix
      +    Creating Makefile in modules/standard
      +
      +
      + +

      (*: Dependiendo de la configuración y de su + sistema. El resultado podría no coincidir con el + mostrado; no hay problema).

      + +

      Esto genera un fichero Makefile a ser usado + en el tercer paso. También crea un + Makefile en el directorio + support, para la compilación de + programas de soporte.

      + +

      (Si quiere mantener varias configuraciones, puede + indicarle a Configure una de las opciones en + un fichero, como Configure -fichero + configuración.ai).

      +
    4. + +
    5. Escriba make.
    6. +
    + +

    Los módulos de la distribución de Apache son + aquellos que hemos probado y utilizado regularmente varios + miembros del grupo de desarrollo de Apache. Los módulos + adicionales (creados por miembros del grupo o por terceras + personas) para necesidades o funciones específicas + están disponibles en <http://www.apache.org/dist/httpd/contrib/modules/>. + Hay instrucciones en esa página para añadir estos + módulos en el núcleo de Apache.

    + +

    Instalación de + Apache

    + +

    Tendrá un fichero binario llamado hhtpd + en el directorio src. Una distribución + binaria de Apache ya traerá este fichero.

    + +

    El próximo paso es instalar el programa y + configurarlo. Apache esta diseñado para ser configurado + y ejecutado desde los directorios donde fue compilado. Si + quiere ejecutarlo desde otro lugar, cree un directorio y copie + los directorios conf, logs e + icons. En cualquier caso debería leer las + sugerencias de + seguridad que describen cómo poner los permisos del + directorio raíz.

    + +

    El paso siguiente es editar los ficheros de + configuración del servidor. Consiste en configurar + varias directivas en los tres ficheros + principales. Por defecto, estos ficheros están en el + directorio conf y se llaman srm.conf, + access.conf y httpd.conf. Para + ayudarle a comenzar, hay ejemplos de estos ficheros en el + directorio de la distribución, llamados + srm.conf-dist, access.conf-dist y + httpd.conf-dist. Copie o renombre estos ficheros a + los correspondientes nombres sin la terminación + -dist. Edite cada uno de ellos. Lea los + comentarios cuidadosamente. Un error en la configuración + de estos ficheros podría provocar fallos en el servidor + o volverlo inseguro. Tendrá también un fichero + adicional en el directorio conf llamado + mime.conf. Este fichero normalmente no tiene que + ser editado.

    + +

    Primero edite el fichero http.conf. Este + configura atributos generales del servidor: el número de + puerto, el usuario que lo ejecuta, etc. El siguiente a + editar es srm.conf; este fichero configura la + raíz del árbol de los documentos, funciones + especiales como HTML analizado sintácticamente por el + servidor, mapa de imagen, etc. Finalmente, edite + access.conf que configura los accesos.

    + +

    Además de estos tres ficheros, el comportamiento del + servidor puede ser modificado directorio a directorio usando + los ficheros .htaccess para los directorios en los + que acceda el servidor.

    + +

    ¡Configure el sistema de tiempo correctamente!

    + +

    Una operación de un servidor web requiere un tiempo + concreto, ya que algunos elementos del protocolo HTTP se + expresan en función de la hora y el día. Por eso, + es hora de investigar la configuración de NTP o de otro + sistema de sincronización de su Unix o lo que haga de + equivalente en NT.

    + +

    Programas de soporte para la compilación

    + +

    Además del servidor principal httpd que + se compila y configura como hemos visto, Apache incluye + programas de soporte. Estos no son compilados por defecto. Los + programas de soporte están en el directorio + support. Para compilar esos programas, entre en el + directorio indicado y ejecute el comando:

    + +
    +
    +    make
    +
    +
    + + + + diff --git a/htdocs/manual/install.html.fr b/htdocs/manual/install.html.fr new file mode 100644 index 00000000000..7fe6b0e29d7 --- /dev/null +++ b/htdocs/manual/install.html.fr @@ -0,0 +1,325 @@ + + + + + + + + Compilation et installation d'Apache + + + + + + +

    Compilation et installation d'Apache + 1.3

    + +

    Ce document décrit la compilation et l'installation + d'Apache sur les systèmes Unix, en employant la + compilation et l'installation manuelle. Si vous souhaitez + utiliser l'interface de configuration semblable à + autoconf, il est conseillé de lire plutôt le + fichier INSTALL situé dans la racine des fichiers + sources de la distribution d'Apache. Pour compiler et installer + Apache sur d'autres plates-formes, consultez

    + + + +

    Téléchargement d'Apache

    + Les informations sur la dernière version d'Apache se + trouvent sur le site web d'Apache à l'adresse http://www.apache.org/. Ce + site réunit la version actuelle, les récentes + versions beta, ainsi que la liste des sites miroirs web et ftp + anonymes. + +

    Si vous avez téléchargé une + distribution composée des binaires, passez directement + à l'installation d'Apache. Sinon + lisez la section suivante afin de savoir comment compiler le + serveur.

    + +

    Compilation d'Apache

    + La compilation d'Apache se compose de trois étapes : la + sélection des modules que vous + souhaitez inclure dans le serveur; la création de la + configuration pour votre système d'exploitation; la + compilation les sources pour créer les + exécutables. + +

    La configuration d'Apache s'effectue dans le + répertoire src de la distribution. Entrez + dans ce répertoire.

    + +
      +
    1. + Sélection des modules à compiler dans Apache + définis dans le fichier Configuration. + Décommentez les lignes correspondant aux modules que + vous souhaitez inclure (parmi les lignes commençant + par AddModule situées à la fin du fichier), + ou ajoutez de nouvelles lignes correspondant à des + modules additionnels que vous avez + téléchargés ou écrits. (Voir API.html comme documentation + préliminaire à l'écriture de modules + Apache). Les utilisateurs avertis peuvent commenter + certains des modules actifs par défaut si ils sont + sûrs qu'ils n'en ont pas besoin (il faut + néanmoins faire attention, car la plupart des + modules actifs par défaut sont vitaux au bon + fonctionnement et à la sécurité du + serveur). + +

      Vous pouvez également lire les instructions + contenues dans le fichier Configuration afin + de savoir si devez activer certaines lignes + commençant par Rule.

      +
    2. + +
    3. + Création de la configuration pour votre + système d'exploitation. Normalement vous n'avez + qu'à exécuter le script + Configure comme décrit ci-dessous. + Cependant si le script échoue ou si vous avez des + besoins particuliers (par exemple inclure une librairie + nécessaire à un module optionnel) vous devrez + modifier une ou plusieurs des options contenues dans le + fichier Configuration : EXTRA_CFLAGS, + LIBS, LDFLAGS, INCLUDES. + +

      Lancement du script Configure :

      + +
      +
      +    % Configure
      +    Using 'Configuration' as config file
      +     + configured for <whatever> platform
      +     + setting C compiler to <whatever> *
      +     + setting C compiler optimization-level to <whatever> *
      +     + Adding selected modules
      +     + doing sanity check on compiler and options
      +    Creating Makefile in support
      +    Creating Makefile in main
      +    Creating Makefile in os/unix
      +    Creating Makefile in modules/standard
      +  
      +
      +
      + (*: selon le fichier Configuration et votre système, + Configure peut ne pas afficher ces lignes). + +

      Ceci crée un fichier Makefile qui sera + utilisé lors de l'étape trois. Il crée + également un fichier Makefile dans le + répertoire support, pour compiler les + programmes optionnels d'assistance.

      + +

      (Si vous souhaitez maintenir différentes + configurations, Configure accepte une option + lui disant de lire un autre fichier de configuration, comme + : Configure -file Configuration.ai).

      +
    4. + +
    5. + Compilation des sources. Tapez : +
      +make
      +
      +
    6. +
    + Les modules contenus dans la distribution Apache sont ceux que + nous avons testés et qui ont été + utilisés par plusieurs membres de l'équipe de + développement d'Apache. Les modules additionnels + proposés par les membres ou par d'autres contributeurs + correspondant à des besoins ou des fonctions + spécifiques sont disponibles à l'adresse <http://www.apache.org/dist/httpd/contrib/modules/>. + Des instructions sont fournies sur cette page pour lier ces + modules au noyau d'Apache. + +

    Installation + d'Apache

    + Vous devez avoir un exécutable appelé + httpd dans le répertoire src. + Une distribution des binaires doit fournir ce fichier. + +

    La prochaine étape est d'installer le programme et de + le configurer. Apache est conçu pour être + configuré et lancé à partir du même + groupe de répertoires que celui où il a + été compilé. Si vous souhaitez le lancer + d'un autre emplacement, créer un répertoire et y + copier les répertoires conf, + logs et icons. Dans tous les cas + lisez le document trucs sur la + sécurité qui décrit comment affecter + les droits sur le répertoire racine du serveur.

    + +

    L'étape suivante est la modification des fichiers de + configuration du serveur. Cela consiste à définir + différentes directives dans les trois + fichiers centraux de configuration. Par défaut ces + fichiers sont situés dans le répertoire + conf et s'appellent srm.conf, + access.conf et httpd.conf. Pour vous + aider, les mêmes fichiers existent dans le + répertoire conf de la distribution et sont + appelés srm.conf-dist, + access.conf-dist et httpd.conf-dist. + Copiez ou renommez ces fichiers en supprimant le + -dist pour le nouveau nom. Ensuite éditez + chacun de ces fichiers. Lisez attentivement les commentaires de + chacun de ces fichiers. Une mauvaise configuration de ces + fichiers empêcherait votre serveur de démarrer, ou + introduirait un problème de sécurité. Vous + devez également trouver dans le répertoire + conf un fichier mime.types. + Généralement, ce fichier n'a pas besoin + d'être modifié.

    + +

    Premièrement éditez le fichier + httpd.conf. Celui ci fixe les paramètres + généraux du serveur : le numéro de port, + l'utilisateur qui l'exécute, etc. Ensuite éditez + le fichier srm.conf. Ce fichier définit la + racine de l'arborescence des documents, les fonctions + spéciales telles que les pages HTML dynamiques, + l'analyse des imagemap, etc. Enfin, éditez le fichier + access.conf pour au moins définir les + schémas d'accès de base.

    + +

    En plus de ces trois fichiers, le comportement du serveur + peut être configuré dans chaque répertoire + en utilisant les fichiers .htaccess pour les + répertoires accédés par le serveur.

    + +

    Définissez l'heure du système correctement + !

    + Un bon fonctionnement d'un site web public nécessite une + heure juste, car des éléments du protocole HTTP + sont exprimés en termes de date et heure du jour. Il est + donc temps de chercher comment configurer NTP ou un autre + produit de synchronisation temporelle sur votre système + UNIX, ou un équivalent sous NT. + +

    Démarrage et arrêt du serveur

    + Pour démarrer le serveur, exécutez + httpd. Il cherchera le fichier + httpd.conf à l'emplacement + spécifié lors de la compilation (par + défaut /usr/local/apache/conf/httpd.conf). + Si ce fichier est situé autre part, vous pouvez indiquer + son emplacement en utilisant l'option -f. Par exemple : +
    +    /usr/local/apache/httpd -f /usr/local/apache/conf/httpd.conf
    +
    + Si tout se passe bien, vous devez vous retrouver de nouveau sur + l'invite de commande. Ceci indique que le serveur est actif et + s'exécute. Si quelque chose se passe mal durant + l'initialisation du serveur, un message d'erreur s'affichera + à l'écran. Si le serveur démarre + correctement, vous pouvez utiliser votre navigateur, vous + connecter au serveur et lire la documentation. Si vous lancez + le navigateur à partir de la machine où + s'exécute le serveur et que vous utilisez le port par + défaut 80, une URL valide à taper dans votre + navigateur est : +
    +    http://localhost/
    +
    + +

    Notez que lors du démarrage du serveur un certain + nombre de processus fils sont créés afin + de traiter les requêtes. Si vous démarrez le + serveur en étant root, le processus père + s'exécutera avec les droits de root, tandis que les + processus fils s'exécuteront avec les droits de + l'utilisateur défini dans le fichier httpd.conf.

    + +

    Si au lancement de httpd celui ci indique qu'il + n'arrive pas à s'attacher à une adresse, cela + signifie soit qu'un autre processus s'exécute + déjà en utilisant le numéro de port + défini dans la configuration d'Apache, soit que vous + essayez de lancer httpd en tant qu'utilisateur normal et que + vous essayez d'utiliser un port inférieur à 1024 + (comme le port 80 par exemple).

    + +

    Si le serveur ne s'exécute pas, lisez le message + affiché quand vous lancez httpd. Vous devez + également vérifier le fichier error_log pour plus + d'informations (dans la configuration par défaut ce + fichier est situé dans le fichier error_log + du répertoire logs).

    + +

    Si vous voulez que votre serveur continue à + s'exécuter après une relance du système, + vous devez ajouter un appel à httpd dans + vos fichiers de démarrage du système (typiquement + rc.local ou un fichier dans un répertoire + rc.N). Ceci lancera le serveur Apache + avec les droits de root. Avant de le faire, vérifiez que + votre serveur est correctement configuré au niveau de la + sécurité et des restrictions d'accès.

    + +

    Pour arrêter Apache, envoyez au processus parent un + signal TERM. Le PID de ce processus est écrit dans le + fichier httpd.pid situé dans le + répertoire logs (à moins qu'Apache + soit configuré autrement). N'essayez pas de supprimer + les processus fils car d'autres seront créés par + le processus père. Une commande typique pour + arrêter le serveur est :

    +
    +    kill -TERM `cat /usr/local/apache/logs/httpd.pid`
    +
    + +

    Pour plus d'information sur les options de la ligne de + commande, sur les fichiers de configuration et les fichiers de + trace, voir Démarrage + d'Apache. Pour un guide de référence de + toutes les directives Apache autorisées par les modules + distribués, voir les directives Apache .

    + +

    Compilation des programmes d'assistance

    + En plus du serveur httpd qui est compilé et + configuré comme ci dessus, Apache inclut un certain + nombre de programmes d'assistance. Ceux ci ne sont pas + compilés par défaut. Les programmes d'assistance + sont situés dans le répertoire + support de la distribution. Pour les compiler, + allez dans ce répertoire et tapez : +
    +    make
    +
    + + + + diff --git a/htdocs/manual/install.html.html b/htdocs/manual/install.html.html new file mode 100644 index 00000000000..21e6e1b967d --- /dev/null +++ b/htdocs/manual/install.html.html @@ -0,0 +1,4 @@ + + + diff --git a/htdocs/manual/install.html.ja.jis b/htdocs/manual/install.html.ja.jis new file mode 100644 index 00000000000..4c75fff2307 --- /dev/null +++ b/htdocs/manual/install.html.ja.jis @@ -0,0 +1,422 @@ + + + + + + Compiling and Installing Apache + + + + + + + +

    Apache 1.3 $B$N%3%s%Q%$%k!&%$%s%9%H!<%k(B

    + + + +

    $B$3$NJ8=q$O(B Apache $B$r(B Unix $B%7%9%F%`>e$G!"%3%s%Q%$%k5Z$S%$%s%9%H!<%k(B + $B$9$k$?$a$N$b$N$G$9!#$=$l0J30$N%W%i%C%H%[!<%`>e$G$N%3%s%Q%$%k5Z$S(B + $B%$%s%9%H!<%k$K$D$$$F$O!"0J2<$N9`L\$r;2>H$7$F$/$@$5$$!#(B

    + + +

    Apache $B$N%@%&%s%m!<%I(B

    + +

    Apache $B$N:G?7HG$O(B Download Page + $B$+$iD>@\%@%&%s%m!<%I$9$k$3$H$,=PMh$^$9!#(B

    + +

    $BF3F~(B

    + +

    $B$9$Y$F$NNI$$J*$HF1MM!"(BApache $B$r@_Dj!"%3%s%Q%$%k!"%$%s%9%H!<%k(B + $B$9$kJ}K!$OFs$D$"$j$^$9!#0J2<$G@bL@$9$k(B APACI $B%W%m%;%9$r;H$C$?(B + 3$BJ,%$%s%9%H!<%k!"$^$?$O(B 'src/INSTALL' $B%U%!%$%k$G@bL@$5$l$F$$$k!"(B + $B0JA0$N%P!<%8%g%s$N(B Apache $B$HF1$85!9=$rA*Br$9$k$3$H$,=PMh$^$9!#(B + $B$=$l$>$l$KMxE@$H7gE@$,$"$j$^$9!#(B- APACI $B$O$h$j?7$7$/!"(B + $B>/$7=O@.$5$l$F$$$^$;$s$,$=$l$KHq$d$9;~4V$O:G>.8B$G:Q$_$^$9!#(B + $BBP$7$F!"(B"Configuration.tmpl" + $B$N5!9=$r;H$C$?=>Mh$NJ}K!$O%Q%o!<%f!<%6$K$H$C$F$O$h$j=@Fp$K07$&$3$H$,=PMh$^$9!#(B + $B2f!9$O!"$=$l$>$l$N$d$jJ}$KBP$9$k0U8+$d%U%#!<%I%P%C%/$K$OBgJQ6=L#$,$"$j$^$9(B +

    + +

    APACI $B$r;H$C$?(B Apache 1.3 HTTP + $B%5!<%P$N%$%s%9%H!<%k(B

    + +

    Overview for the impatient

    +
    +     $ ./configure --prefix=PREFIX
    +     $ make
    +     $ make install
    +     $ PREFIX/bin/apachectl start
    +
    + +

    $BCm0U(B: PREFIX $B$O(B "PREFIX" + $B$H$$$&J8;zNs$G$O$"$j$^$;$s!#Be$o$j$K(B Apache $B$r%$%s%9%H!<%k$7$?$$(B + Unix $B$N%U%!%$%k%7%9%F%`>e$N%Q%9$r;H$$$^$9!#$?$H$($P>e$N(B PREFIX + $B$NItJ,$K$O(B "/usr/local/apache" $B$,F~$j$^$9!#(B

    + +

    $BI,MW$J%7%9%F%`(B

    +

    Apache $B$N%S%k%I$K$O0J2<$K5s$2$k$b$N$,I,MW$K$J$j$^$9(B

    + +
    +
    $B%G%#%9%/%9%Z!<%9(B
    + +
    $BLs(B 12 MB $B$N%G%#%9%/%9%Z!<%9$,0l;~E*$KI,MW$K$J$k$3$H$r3NG'$7$F$/$@$5$$!#(B + $B%$%s%9%H!<%k8e$K$OLs(B 3 MB $B$N%G%#%9%/%9%Z!<%9$,I,MW$K$J$j$^$9!#(B + ($B + +
    ANSI-C $B%3%s%Q%$%i(B
    + +
    ANSI-C $B%3%s%Q%$%i$,%$%s%9%H!<%k$5$l$F$$$k$3$H$r3NG'$7$F$/$@$5$$!#(B + Free Software Foundation (FSF) $B$K$h$k(B GNU C $B%3%s%Q%$%i(B (GCC) + $B$r?d>)$7$^$9(B($B%P!<%8%g%s(B 2.7.2 $B$GBg>fIW(B)$B!#(BGCC $B$r;}$C$F$$$J$$>l9g$O(B + $B%Y%s%@$K$h$k%3%s%Q%$%i$,:GDc8B(B ANSI $B8_49$G$"$k$3$H$r3NG'$7$F$/$@$5$$!#(B + GNU $B$N%[!<%`%Z!<%8$O(B http://www.gnu.org/ $B$K!"(BGCC $BG[I[$O(B + http://www.gnu.org/order/ftp.html $B$+$i8+$D$1$k$3$H$,=PMh$^$9!#(B
    + +
    Perl 5 $B%$%s%?%W%j%?(B [$B%*%W%7%g%s(B]
    + +
    `apxs' $B$d(B `dbmmanage' $B$N$h$&$J(B(Perl $B$G=q$+$l$?(B) + $B%5%]!<%H%9%/%j%W%H$NCf$K$O(B Perl 5 $B%$%s%?%W%j%?(B ($B%P!<%8%g%s(B 5.003 + $B$^$?$O(B 5.004 $B$,K>$^$7$$(B) $B$,I,MW$J$b$N$,$"$j$^$9!#(BAPACI $B$N(B + `configure' $B%9%/%j%W%H$K$=$N$h$&$J%$%s%?%W%j%?$,8+$D$+$i$J$+$C$?>l9g!"(B + $B32$K$O$J$j$^$;$s!#EvA3!"(BApache 1.3 $B$r%S%k%I5Z$S%$%s%9%H!<%k(B + $B$9$k$3$H$,$G$-$^$9!#$b$7!"J#?t$N(B Perl $B%$%s%?%W%j%?$,%$%s%9%H!<%k(B + $B$5$l$F$$$k>l9g(B ($B62$i$/$O%Y%s%@$K$h$k(B Perl 4 $B$H<+J,$GF3F~$7$?(B Perl 5)$B!"(B + --with-perl $B%*%W%7%g%s(B ($B0J2<;2>H(B) $B$r;H$C$F@5$7$$$b$N$rA*Br$7(B APACI + $B$KCN$i$;$F$d$k$3$H$r?d>)$7$^$9!#(B
    + +
    $BF0E*6&M-%*%V%8%'%/%H(B (DSO) $B%5%]!<%H(B [$B%*%W%7%g%s(B]
    + +
    +

    $B8=:_!":GBg8B$N=@Fp@-$N$?$a$K(B Apache $B$O(B dlopen()/dlsym() + $B%7%9%F%`%3!<%k$rMxMQ$7$?(B DSO $B5!9=$r7PM3$5$;$?%i%s%?%$%`$K$h$j!"(B + $B%b%8%e!<%k$r%m!<%I$9$k$3$H$,=PMh$^$9!#$3$l$i$N%7%9%F%`%3!<%k$O$9$Y$F$N(B + OS $B$GM-8z$J$o$1$G$O$J$$$N$G$I$N%W%i%C%H%[!<%`$G$b(B DSO + $B5!9=$r;H$($k$H$O8B$j$^$;$s!#%7%'%"!<%I%*%V%8%'%/%H$N%3%s%Q%$%k$O(B + $BHs>o$K%W%i%C%H%U%)!<%`$K0MB8$7$?$b$N$G$"$k$?$a!"(BApache $B$O8=;~E@$G$O(B + $B$$$/$D$+$N%W%i%C%H%U%)!<%`$K4X$7$F$N$_$=$NJ}K!$rCN$C$F$$$^$9!#(B + $B8=:_$N>u67$O$3$N$h$&$K$J$j$^$9!#(B

    + +
      +
    • + $B%5%]!<%H$5$l$F$$$k%W%i%C%H%U%)!<%`(B: + +

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      LinuxSunOSUnixWareDarwin/Mac OS
      FreeBSDSolarisAIXOpenStep/Mach
      OpenBSDIRIXSCODYNIX/ptx
      NetBSDHPUXReliantUNIXBSDI
      Digital UnixDGUX
      +

      +
    • + +
    • + $B40A4$K%5%]!<%H30$N%W%i%C%H%U%)!<%`(B: + +

      Ultrix

      +
    • +
    + +

    $B$"$J$?$N%7%9%F%`$,$3$N%j%9%H$K$J$$$1$l$I!"(Bdlopen + $B7A<0$N%$%s%?%U%'!<%9$,$"$k>l9g!"E,@Z$J%3%s%Q%$%i$H%j%s%+%U%i%0(B + (CFLAGS_SHLIB, LDFLAGS_SHLIB $B5Z$S(B LDFLAGS_SHLIB_EXPORT $B;2>H(B) + $B$r + +

    Apache 1.3 $B$G$N(B DSO $B%5%]!<%H$K4X$9$k!"$h$j:YIt$N>pJs$K$D$$$F$O(B + htdocs/manual/dso.html $B$NJ8=q$r$h$/FI$s$G$/$@$5$$!#(B + $B==J,$KCm0U$7$J$$$G(B DSO $B5!9=$r;H$&$HL/$JI{:nMQ$,H/@8$9$k$3$H$,$"$k$?$a!"(B + $BFC$K(B + "Advantages & Disadvantages" $B$HL>IU$1$i$l$?@a$O(B + $BCm0U$7$FFI$s$G$/$@$5$$!#7Y9p$O$7$^$7$?$h(B!

    +
    +
    + +

    $B%=!<%9%D%j!<$N@_Dj(B

    + +

    $B$K$b4uK>$K1~$8$FB?$/$N%*%W%7%g%s$,M-8z$G$9!#(B

    + +

    $B$I$s$J$3$H$,=PMh$k$N$+4JC1$K46$8$F$b$i$&$?$a!"$3$3$G$O(B + $BI8=`E*$JNc$H$7$F!"%$%s%9%H!<%k%D%j!<$r(B /sw/pkg/apache, + $BFCDj$N%3%s%Q%$%i5Z$S%U%i%0!"$=$7$F(B 2 $B$D$NDI2C%b%8%e!<%k(B mod_rewrite + $B5Z$S(B mod_proxy $B$r8e$G(B DSO $B5!9=$K$h$j%m!<%I$5$;$k$h$&$K(B Apache + $B$r%3%s%Q%$%k$9$k$b$N$H$7$^$9(B>$B!#(B

    +
    +     $ CC="pgcc" OPTIM="-O2" \
    +       ./configure --prefix=/usr/local/apache \
    +                   --enable-module=rewrite --enable-shared=rewrite \
    +                   --enable-module=proxy   --enable-shared=proxy
    +
    + +

    $BM-8z$J%*%W%7%g%s$N40A4$J%j%9%H$O0J2<$N%3%^%s%I$rBG$A9~$s$G$/$@$5$$!#(B +

    +

    ./configure --help

    + +

    $B@_DjNc$N%j%9%H$O(B README.configure + $B%U%!%$%k$b8+$F$/$@$5$$!#(B

    + +

    $B%Q%C%1!<%8$N%S%k%I(B

    + +

    $B$3$l$G(B Apache $B%Q%C%1!<%8$N3FItJ,$r%3%^%s%I(B

    +
    +        $ make 
    +
    + +

    $B$rl9g$GLs(B 2 $BJ,$+$+$j$^$9!#$8$C$HBT$C$F$/$@$5$$!#(B +

    + +

    $B%Q%C%1!<%8$N%$%s%9%H!<%k(B

    + +

    $B%$%s%9%H!<%k$N(B PREFIX ($B>e$N(B --prefix + $B%*%W%7%g%s;2>H(B)$B@_Dj$K$h$j%Q%C%1!<%8$r%$%s%9%H!<%k$9$k;~$G$9!#(B

    +
    +        $ make install
    +
    + +

    $B0J2<$NNc$G$O(B PREFIX $B$O$=$N$^$^(B "PREFIX" + $B$G$O$J$/!"(B--prefix + $B%*%W%7%g%s$K$h$jM?$($i$l$?0z?t$K$J$j$^$9!#(B

    + + + +

    $BEAE}E*$JJ}K!$K$h$k%S%k%I$H%$%s%9%H!<%k(B

    + +

    APACI $B$,=P$F$/$k0JA0$O(B Apache $B$N%S%k%I5Z$S%$%s%9%H!<%k$NJ}K!$O(B + 1 $B$D$7$+$"$j$^$;$s$G$7$?!#(BAPACI $B$O(B + $B?M$K$h$C$F$O$h$j$o$+$j$d$9$$@_Dj$N%$%s%?!<%U%'!<%9$rDs6!$7$^$9$,!"(B + $B=>Mh$+$i$NJ}K!$OBgNL$N%3%^%s%I%i%$%s(B + $B%*%W%7%g%s$rBG$A9~$`$3$H$J$/%$%s%9%H!<%k$N@_Dj$r(B + $B=PMh$kJ}K!$,MQ0U$5$l$F$$$^$9!#(B

    + +

    $B%$%s%9%H!<%k$N@_Dj(B

    + +

    Apache $B$N%3%s%Q%$%k$O;0CJ3,$G9=@.$5$l$^$9!#(B + $B$^$:%5!<%P$K4^$a$?$$(B Apache $B%b%8%e!<%k(B + $B$rA*Br$7$F$/$@$5$$!# + +

    Apache $B$NA4$F$N@_Dj$O!"(BApache $BG[I[$N(B src + $B%G%#%l%/%H%j$G9T$o$l$^$9!#$3$N%G%#%l%/%H%j$KF~$C$F$/$@$5$$!#(B +

    + +
      +
    1. + Configuration $B%U%!%$%k(B src/Configuration.tmpl + $B$NCf$G(B Apache + $B$K%3%s%Q%$%k$9$k%b%8%e!<%k$rA*Br$7$^$9!#API.html + $B$r;2>H$7$F$/$@$5$$(B) $B!#(B + $B$"$k%b%8%e!<%k$,3NRule + $B9T$N$$$/$D$+$r@_Dj$9$kI,MW$,$"$k$+$I$&$+$rCN$k$?$a$K(B + Configuration $B%U%!%$%k$N;X<($bFI$s$G$/$@$5$$!#(B

      +
    2. + +
    3. + Apache $B$r(B OS $B$K9g$o$;$F@_Dj$7$^$9!#DL>o$O$?$@(B + Configure $B%9%/%j%W%H$r2<5-$NNc$N$h$&$K$BNc$($P(B$B!"DI2C$7$?%b%8%e!<%k$K$h$C$F2?$i$+$N%i%$%V%i%j$,(B + $BI,MW$J>l9g$J$I(B) $B$K$O(B Configure + $B%U%!%$%k$NEXTRA_CFLAGS, LIBS, LDFLAGS, INCLUDES. + + +

      Configure $B%9%/%j%W%H$r + +

      +
      +    % Configure
      +    Using 'Configuration' as config file
      +     + configured for <whatever> platform
      +     + setting C compiler to <whatever> *
      +     + setting C compiler optimization-level to <whatever> *
      +     + Adding selected modules
      +     + doing sanity check on compiler and options
      +    Creating Makefile in support
      +    Creating Makefile in main
      +    Creating Makefile in os/unix
      +    Creating Makefile in modules/standard
      +
      +
      +
      + (*: $B@_DjFbMF$H%7%9%F%`$K$h$C$F$O!"(BConfigure $B$O$3$NDL$j$K(B + $BI=<($7$J$$$3$H$,$"$j$^$9$,!"$=$l$GLdBj$"$j$^$;$s!#(B) + +

      $B$3$l$G(B 3 $B$NCJ3,$G;H$o$l$k(B Makefile $B$,@8@.$5$l$^$9!#(B + $B$^$?!"%*%W%7%g%s$N%5%]!<%H%W%m%0%i%`$r%3%s%Q%$%k$9$k$?$a$K!"(B + $B%5%]!<%H%G%#%l%/%H%j$NCf$K(B Makefile $B$,@8@.$5$l$^$9!#(B

      + +

      ($B$b$7!"MM!9$J@_Dj$r4IM}$9$k$D$b$j$J$i$P!"(B + Configure $B$K(B Configure -file + Configuration.ai $B$N$h$&$K!"JL$N(B Configuration + $B%U%!%$%k$rFI$_9~$`$h$&$K%*%W%7%g%s$rIU$1$k$H$$$$$G$7$g$&!#(B)

      +
    4. + +

      Apache $B$N%3%s%Q%$%k(B

      + +
    5. make $B$r +
    + Apache $BG[I[J*$K$"$k%b%8%e!<%k$O(B Apache $B3+H/%0%k!<%W$K$h$C$F%F%9%H$,9T$o$l!"(B + $BB?$/$N%a%s%P!<$K$h$C$FF|>oE*$K;H$o$l$F$$$k$b$N$G$9!#(B + $B%a%s%P!<$d%5!<%I%Q!<%F%#$K$h$C$F3+H/$5$l$?FCDj$N%K!<%:$d5!G=$r$b$D(B + $BDI2C%b%8%e!<%k$O!"(B<http://www.apache.org/dist/httpd/contrib/modules/>. + $B$+$iF~Apache $B$N%$%s%9%H!<%k(B

    + + $B%3%s%Q%$%k$r9T$&$H!"(Bhttpd $B$H$$$&%P%$%J%j%U%!%$%k$,(B + src $B%G%#%l%/%H%j$K:n@.$5$l$^$9!#(BApache + $B$N%P%$%J%jG[I[$O$3$N%U%!%$%k$rDs6!$7$^$9!#(B + +

    $B$N$H$3$m$+$il9g$O!"%G%#%l%/%H%j$r:n@.$7!"(B + $B$=$3$K(B conf, logs $B5Z$S(B icons + $B%G%#%l%/%H%j$r%3%T!<$7$F$/$@$5$$!#$I$A$i$N>l9g$G$b!"(B + $B%5!<%P%k!<%H$N%G%#%l%/%H%j$N%Q!<%_%C%7%g%s$r$I$&@_Dj$9$k$+$K$D$$$F!"(B + security $B>pJs(B + $B$rFI$`$Y$-$G$9!#(B

    + +

    $B$B%G%#%l%/%F%#%V(B $B$r@_Dj$7$^$9!#I8=`>uBV$G$O!"(B + $B$3$l$i$N%U%!%$%k$O(B conf $B%G%#%l%/%H%j$KG[CV$5$l$k!"(B + srm.conf, access.conf, httpd.conf + $B$G$9!#@_Dj$N;29M$K$J$k$h$&$K!"G[I[$N(B conf + $B%G%#%l%/%H%j$KF1$8FbMF$N%U%!%$%k!"(Bsrm.conf-dist, + access.conf-dist, httpd.conf-dist + $B$,$"$j$^$9!#(B-dist $B$J$7$G!"(B + $B$=$NL>A0$N$3$l$i$N%U%!%$%k$r%3%T!<$9$k$+!"L>A0$rJQ$($F$/$@$5$$!#(B + $B$=$l$+$i$=$l$>$l$N%U%!%$%k$rJT=8$7$F$/$@$5$$!#(B + $B$=$l$>$l$N%U%!%$%k$K$"$k%3%a%s%H$rCm0U?<$/FI$s$G$/$@$5$$!#(B + $B$3$l$i$N%U%!%$%k$N@53N$J@_Dj$K<:GT$9$k$H!"%5!<%P$,F0$+$J$/$J$C$?$j!"(B + $B%;%-%e%j%F%#E*$K4m81$K$J$C$?$j$7$^$9!#(B + conf $B%G%#%l%/%H%j$K$O(B mime.types + $B$H$$$&DI2C%U%!%$%k$,$"$j$^$9!#(B + $BDL>o$3$N%U%!%$%k$rJT=8$9$kI,MW$O$"$j$^$;$s!#(B

    + +

    $B:G=i$K(B httpd.conf $B$rJT=8$7$F$/$@$5$$!#(B + $B$3$N%U%!%$%k$O%5!<%P$K4X$9$k0lHLE*$JB0@-$r@_Dj$7$^$9(B; + $B%]!<%HHV9f$d5/F0%f!<%6(B $BEy!9(B$B$G$9!#srm.conf + $B%U%!%$%k$rJT=8$7$F$/$@$5$$(B; $B$3$l$O%I%-%e%a%s%H%D%j!<$N%k!<%H!"(B + server-parsed HTML $B$dFbItE*$J%$%a!<%8%^%C%W$N2r@O$N$h$&$JFCJL$J5!G=(B + $BEy!9(B $B$r@_Dj$7$^$9!#:G8e$K%"%/%;%9$K4X$9$k4pK\;v9`$r(B + $B@_Dj$9$k$?$a$K(B access.conf $B%U%!%$%k$rJT=8$7$^$9!#(B

    + +

    $B$3$l$i(B3$B$D$N%U%!%$%k$K2C$($F!"%5!<%P$NF0:n$O%"%/%;%9$5$l$?(B + $B%G%#%l%/%H%j$K$"$k(B .htaccess $B%U%!%$%k$r;H$&$3$H$K$h$C$F!"(B + $B%G%#%l%/%H%jKh$K@_Dj$G$-$^$9!#(B

    + + +

    $B%5%]!<%H%W%m%0%i%`$N%3%s%Q%$%k(B

    + $B>e5-$G%3%s%Q%$%k!"@_Dj$5$l$k%a%$%s$N(B httpd + $B%5!<%P$NB>$K!"(BApache $B$K$OB??t$N%5%]!<%H%W%m%0%i%`$,4^$^$l$F$$$^$9!#(B + $B$3$l$i$OI8=`$G$O%3%s%Q%$%k$5$l$^$;$s!#%5%]!<%H%W%m%0%i%`$O(B + support $B%G%#%l%/%H%j$K$"$j$^$9!#(B + $B%5%]!<%H%W%m%0%i%`$r%3%s%Q%$%k$9$k$K$O!"$3$N%G%#%l%/%H%j$KF~$j!"(B + $B0J2<$N$h$&$KF~NO$7$F$/$@$5$$!#(B +
    +    make
    +
    + +

    $B%Q%C%1!<%8$N%F%9%H(B

    + +

    $B$3$3$G!"0J2<$N%3%^%s%I$r +

    +        $ PREFIX/bin/apachectl start
    +
    + +

    $B$=$l$+$i(B URL http://localhost/ (Apache $B$r(B root $B$H$7$F$"$k$$$O(B + --without-confadjust $B%*%W%7%g%s$r;H$C$F%S%k%I!"%$%s%9%H!<%k$7$?>l9g(B) + $B$^$?$O(B http://localhost:8080/ (Apache $B$rIaDL$N%f!<%6$G%S%k%I!"(B + $B%$%s%9%H!<%k$7$?>l9g(B) $B$K$h$j:G=i$NJ8=q$r%j%/%(%9%H$G$-$^$9!#(B + $B$=$l$+$i0J2<$K$h$j%5!<%P$r;_$a$F$/$@$5$$!#(B

    +
    +        $ PREFIX/bin/apachectl stop
    +
    + +

    $B@5$7$$%7%9%F%`;~4V$N@_Dj(B!

    +

    $B8x3+$5$l$k%&%'%V%5!<%P$NE,@Z$JA`:n$K$O!"(BHTTP + $B%W%m%H%3%k$NMWAG$,$=$NF|$N;~4V$H$7$F<($5$l$k$?$a!"(B + $B@53N$J;~4V$,I,MW$H$5$l$^$9!#$G$9$+$i!"$3$l$r5!2q$K(B UNIX $B$K$*$$$F$O(B + NTP $B$d$J$s$i$+$N;~4V$NF14|$r + + + + diff --git a/htdocs/manual/invoking.html.en b/htdocs/manual/invoking.html.en new file mode 100644 index 00000000000..5beffce7204 --- /dev/null +++ b/htdocs/manual/invoking.html.en @@ -0,0 +1,145 @@ + + + + + + + Starting Apache + + + + + + +

    Starting Apache

    + + +
    + +

    Starting Apache On + Windows

    + +

    On Windows, Apache is normally run as a service on Windows + NT, or as a console application on Windows 95. This does not + apply in its full extend for the Cygwin platform. For details, + see running Apache for + Windows.

    + +

    Starting Apache on Unix

    + +

    On Unix, the httpd program + is run as a daemon which executes continuously in the + background to handle requests. It is possible to have Apache + invoked by the Internet daemon inetd each time a + connection to the HTTP service is made using the ServerType directive, but + this is not recommended.

    + +

    If the Port specified in + the configuration file is the default of 80 (or any other port + below 1024), then it is necessary to have root privileges in + order to start Apache, so that it can bind to this privileged + port. Once the server has started and completed a few + preliminary activities such as opening its log files, it will + launch several child processes which do the work of + listening for and answering requests from clients. The main + httpd process continues to run as the root user, + but the child processes run as a less privileged user. This is + controlled by Apache's process creation + directives.

    + +

    The first thing that httpd does when it is + invoked is to locate and read the configuration file + httpd.conf. The location of this file is set at + compile-time, but it is possible to specify its location at run + time using the -f command-line option as in

    + +
    + /usr/local/apache/bin/httpd -f + /usr/local/apache/conf/httpd.conf +
    + +

    As an alternative to invoking the httpd binary + directly, a shell script called apachectl is provided which + can be used to control the daemon process with simple commands + such as apachectl start and apachectl + stop.

    + +

    If all goes well during startup, the server will detach from + the terminal and the command prompt will return almost + immediately. This indicates that the server is up and running. + You can then use your browser to connect to the server and view + the test page in the DocumentRoot directory + and the local copy of the documentation linked from that + page.

    + +

    Errors During + Start-up

    + +

    If Apache suffers a fatal problem during startup, it will + write a message describing the problem either to the console or + to the ErrorLog before + exiting. One of the most common error messages is "Unable + to bind to Port ...". This message is usually caused by + either:

    + +
      +
    • Trying to start the server on a privileged port when not + logged in as the root user; or
    • + +
    • Trying to start the server when there is another instance + of Apache or some other web server already bound to the same + port.
    • +
    + +

    For further trouble-shooting instructions, consult the + Apache FAQ.

    + +

    Starting at Boot-Time

    + +

    If you want your server to continue running after a system + reboot, you should add a call to httpd or + apachectl to your system startup files (typically + rc.local or a file in an rc.N + directory). This will start Apache as root. Before doing this + ensure that your server is properly configured for security and + access restrictions. The apachectl script is + designed so that it can often be linked directly as an init + script, but be sure to check the exact requirements of your + system.

    + +

    Additional Information

    + +

    Additional information about the command-line options of httpd and apachectl as well as other + support programs included with the server is available on the + Server and Supporting Programs page. + There is also documentation on all the modules included with the Apache distribution + and the directives that they + provide.

    + + + + diff --git a/htdocs/manual/invoking.html.fr b/htdocs/manual/invoking.html.fr new file mode 100644 index 00000000000..54666bd9f36 --- /dev/null +++ b/htdocs/manual/invoking.html.fr @@ -0,0 +1,168 @@ + + + + + + + + + Démarrage d'Apache + + + + + + +

    Démarrage d'Apache

    + + +
    + +

    Démarrage d'Apache + sur Windows

    + +

    Sur Windows, Apache est normalement lancé en tant que + service sur Windows NT, ou en tant qu'application en mode + console sur Windows 95. Pour plus de détails, voir lancer Apache pour Windows.

    + +

    Démarrage d'Apache sur Unix

    + +

    Sur Unix, le programme httpd est lancé + en tant que démon qui s'exécute en tâche de + fond pour traiter les requêtes. Il est possible + d'invoquer Apache par le démon Internet + inetd à chaque fois qu'une connexion au + service HTTP est faite (if faut pour cela utiliser la directive + ServerType) mais cela + n'est pas recommandé.

    + +

    Si le Port + spécifié dans le fichier de configuration est le + port par défaut 80 (ou tout autre port inérieur + à 1024), il est alors nécessaire d'avoir les + privilèges root pour lancer Apache. Une fois que + l'initialisation du serveur s'est achevée ainsi que + quelques activités préliminaires telles que + l'ouverture des fichiers de trace, le serveur lance un certain + nombre de processus fils ayant pour rôle + d'attendre et de répondre aux requêtes des + clients. Le processus père httpd continue + à s'exécuter avec les privilèges root, + mais les processus fils s'exécute sous un utilisateur + avec moins de privilèges. Ceci est contrôlé + par les directives de création de processus

    + +

    La première chose qu'httpd fait + lorsqu'il est appelé est de chercher et lire le fichier de configuration + httpd.conf. L'emplacement de ce fichier est + défini à la compilation, mais il est possible de + spécifier son emplacement à l'exécution en + utilisant l'option -f. Exemple :

    + +
    + /usr/local/apache/bin/httpd -f + /usr/local/apache/conf/httpd.conf +
    + +

    Comme alternative à l'appel direct de + l'exécutable httpd un script appelé + apachectl est fourni qui + permet de contrôler le processus démon avec des + commandes simples telles que apachectl start ou + apachectl stop.

    + +

    Si tout ce passe correctement durant l'initialisation, le + serveur se détache du terminal et l'invite de commande + réapparaît presque immédiatement. Ceci + indique que le serveur est actif et s'exécute. Vous + pouvez utiliser un navigateur pour vous connecter au serveur et + voir la page de test située dans le répertoire DocumentRoot ainsi qu'une + copie locale de la documentation à partir d'un lien de + cette page.

    + +

    Erreurs durant + l'initialisation

    + +

    Si Apache rencontre un problème fatal durant + l'initialisation, il écrira, avant de se terminer, un + message décrivant le problème, soit sur la + console, soit dans le fichier ErrorLog. Un des messages les + plus courants est "Unable to bind to Port ...". Ce + message est généralement dû à

    + +
      +
    • une tentative de lancer le serveur sur un port + privilégié alors que vous n'êtes pas + connecté comme utilisateur root, ou à
    • + +
    • une tentative de lancer le serveur alors qu'une autre + instance d'Apache ou d'un autre serveur web est + déjà connectée à ce port.
    • +
    + +

    Pour plus d'informations sur la correction des + problèmes, consultez la FAQ + d'Apache.

    + +

    Démarrage à + l'initialisation du système

    + +

    Si vous souhaitez que votre serveur continue à + s'exécuter après une relance du système, + vous devez ajouter un appel à httpd ou + apachectl dans votre fichier de lancement du + système (généralement + rc.local ou un fichier dans un répertoire + rc.N). Ceci lancera Apache sous l'utilisateur + root. Avant de le faire, vérifiez que votre serveur est + correctement configuré en termes de + sécurité et de restrictions d'accès. Le + script apachectl est conçu de + manière à ce qu'il soit directement lié + comme script d'initialisation, mais assurez vous qu'il + correspond aux besoins précis de votre + système.

    + +

    Informations + complémentaires

    + +

    Des informations complémentaires sur les options en + ligne de commande d'httpd et + d'apachectl ainsi que des + autres programmes d'assistance inclus avec le serveur, sont + disponibles à la page Serveur et + programmes d'assistance. Il existe également une + documentation de tous les modules inclus + dans la distribution Apache ainsi que les directives qu'ils + fournissent.

    + + + + diff --git a/htdocs/manual/invoking.html.html b/htdocs/manual/invoking.html.html new file mode 100644 index 00000000000..2817fc92a20 --- /dev/null +++ b/htdocs/manual/invoking.html.html @@ -0,0 +1,4 @@ + + + diff --git a/htdocs/manual/invoking.html.ja.jis b/htdocs/manual/invoking.html.ja.jis new file mode 100644 index 00000000000..fbb79fb1366 --- /dev/null +++ b/htdocs/manual/invoking.html.ja.jis @@ -0,0 +1,136 @@ + + + + + + Apache $B$N3+;O(B + + + + + + + +

    Apache $B$N3+;O(B

    + + +
    + +

    Apache $B$r(B + Windows $B$G3+;O$9$k(B

    + +

    Windows $B>e$G$O!"(BApache $B$ODL>o!"(B Windows NT, 2000, XP + $B$G$O%5!<%S%9$H$7$F!"(BWindows 95, ME + $B$G$O%3%s%=!<%k%"%W%j%1!<%7%g%s$H$7$F\:Y$O(B Windows $BMQ$N(B Apache $B$r + $B$r8+$F$/$@$5$$!#(B

    + +

    Apache $B$r(B Unix $B$G3+;O$9$k(B

    + +

    Unix $B$G$O(B httpd + $B%W%m%0%i%`$O%P%C%/%0%i%&%s%I$G7QB3E*$KF0:n$7$F%j%/%(%9%H$r=hM}$9$k(B + $B%G!<%b%s$H$7$FServerType + $B%G%#%l%/%F%#%V$K$h$C$F(BHTTP $B%5!<%S%9$X$N@\B3$N$?$S$K(B + $B%$%s%?!<%M%C%H%G!<%b%s(B inetd $B$+$i5/F0$9$k;v$b(B + $B2DG=$G$9$,$3$l$O?d>)$5$l$^$;$s!#(B

    + +

    $B$b$7@_Dj%U%!%$%k$G;XDj$7$?(B$B%]!<%H(B$B$,(B + $B%G%U%)%k%H$N(B 80 ($B$b$7$/$O(B 1024 $BL$K~$N%]!<%H$N$I$l$+(B) $B$G$"$k$J$i!"(B + $B$3$NFC8"%]!<%H$K%P%$%s%I$G$-$k$h$&$K!"(BApache $B$N5/F0$K$O(B root + $B8"8B$,I,MW$G$9!#%5!<%P$,!"%m%0%U%!%$%k$r3+$/$J$I$$$/$D$+=`Hw$NF0:n$r=*$($k$H!"(B + $BBT$A$B;R(B$B%W%m%;%9$r$$$/$D$+(B + $B%9%?!<%H$7$^$9!#%a%$%s$N(B httpd $B%W%m%;%9$O(B root + $B%f!<%6$H$7$FF0$-B3$1$^$9$,!";R%W%m%;%9$O$h$jDc$$8"8B$N%f!<%6$H$7$FF0$-$^$9!#(B + $B$3$l$O(B Apache $B$N(B$B%W%m%;%9@8@.%G%#%l%/%F%#%V(B + $B$K$h$j@)8f$5$l$^$9!#(B

    + +

    httpd $B$N5/F0;~$K:G=i$K$9$k$3$H$O(B$B@_Dj%U%!%$%k(B httpd.conf + $B$r8+$D$1$FFI$_9~$`$3$H$G$9!#$3$N%U%!%$%k$N0LCV$O%3%s%Q%$%k;~$K@_Dj$5$l$^$9$,!"(B + $B%3%^%s%I%i%$%s%*%W%7%g%s(B -f $B$r;H$C$F + +

    + /usr/local/apache/bin/httpd -f + /usr/local/apache/conf/httpd.conf +
    + +

    httpd $B%P%$%J%j$rD>@\5/F0$9$kBe$o$j$K(B apachectl + $B$H8F$P$l$k%7%'%k%9%/%j%W%H$r;H$&$3$H$b=PMh$^$9!#$3$l$K$h$j%G!<%b%s%W%m%;%9$r(B + apachectl start $B$d(B apachectl stop + $B$J$I$N4JC1$J%3%^%s%I$K$h$C$F@)8f$9$k$3$H$,$G$-$^$9!#(B

    + +

    $B3+;O$NCJ3,$,$9$Y$F$&$^$/9T$1$P!"%5!<%P$O%?!<%_%J%k$r@Z$jN%$7!"(B + $B%3%^%s%I%W%m%s%W%H$,$[$\0l=V$GLa$C$FMh$^$9!#$3$l$O!"(B + $B%5!<%P$,F0:n$7$F$$$k$3$H$r<($7$F$$$^$9!#$=$N8e$G!"%V%i%&%6$r;HMQ$7$F(B + $B%5!<%P$K@\B3$7!"(BDocumentRoot + $B%G%#%l%/%H%j$N%F%9%H%Z!<%8$d$=$N%Z!<%8$+$i%j%s%/$5$l$?J8=q$N(B + $B%m!<%+%k%3%T!<$r8+$k$3$H$,$G$-$^$9!#(B

    + +

    $B3+;O;~$N%(%i!<(B

    + +

    $B$b$7(B Apache $B$,3+;O;~$KCWL?E*$JLdBj$KAx$&$H!"(B + $B=*N;$9$kA0$KLdBj$r@bL@$9$k%a%C%;!<%8$r%3%s%=!<%k$^$?$O(B + ErrorLog $B$K=q$-$@$7$^$9!#(B + $B:G$b$h$/$"$k%(%i!<%a%C%;!<%8$N0l$D$O(B + "Unable to bind to Port ..." + $B$G$9!#$3$N%a%C%;!<%8$ODL>o$3$l$i$N860x$,$"$j$^$9(B:

    + +
      +
    • root $B%f!<%6$H$7$F%m%0%$%s$7$F$$$J$$;~$KFC8"%]!<%H$G(B + $B%5!<%P$r;O$a$h$&$H$7$?(B;
    • + +
    • $BB>$N(B Apache $B$^$?$OB>$N%&%'%V%5!<%P$,4{$KF1$8%]!<%H$K(B + $B%P%$%s%I$7$F$$$k;~$K%5!<%P$r;O$a$h$&$H$7$?!#(B
    • +
    + +

    $B%H%i%V%k%7%e!<%F%#%s%0$NFAQ $B$r;2>H$7$F$/$@$5$$!#(B

    + +

    $B%V!<%H;~$N5/F0(B

    + +

    $B%7%9%F%`$N%j%V!<%H8e$K$b%5!<%P$rl9g$O!"(B + httpd $B$^$?$O(B apachectl + $B$N8F$S=P$7$r%7%9%F%`$N%9%?!<%H%"%C%W%U%!%$%k(B($BI8=`$G$O(B + rc.local $B$^$?$O!"(Brc.N + $B%G%#%l%/%H%j$N%U%!%$%k(B)$B$KDI2C$7$F2<$5$$!#$3$l$O(B root $B$G(B Apache + $B$r3+;O$7$^$9!#$3$N@_Dj$r$9$kA0$K%;%-%e%j%F%#$d%"%/%;%9@)8B$,(B + $B%5!<%P$KBP$7$FE,@Z$K@_Dj$5$l$k$h$&$K$7$F$/$@$5$$!#(B + apachectl $B%9%/%j%W%H$O(B init + $B%9%/%j%W%H$H$7$FD>@\%j%s%/$G$-$k$h$&$K@_7W$5$l$F$$$^$9$,!"(B + $B%7%9%F%`$N@53N$J;EMM$rGD0.$7$F$+$i;HMQ$7$F$/$@$5$$!#(B

    + +

    $BDI2C$N>pJs(B

    + +

    $B%5!<%P$K4^$^$l$F$$$kB>$N%5%]!<%H%W%m%0%i%`$HF1MM$K(B + httpd $B$H(B + apachectl + $B$N%3%^%s%I%i%$%s%*%W%7%g%s$K$D$$$F$NDI2C$N>pJs$O!"(B + $B%5!<%P$H%5%]!<%H%W%m%0%i%`(B + $B%Z!<%8$GF~$B%b%8%e!<%k(B $B$d$=$l$K$h$jDs6!$5$l$k(B + $B%G%#%l%/%F%#%V(B + $B$NJ8=q$b$"$j$^$9!#(B

    + + + diff --git a/htdocs/manual/keepalive.html.en b/htdocs/manual/keepalive.html.en new file mode 100644 index 00000000000..3f8ec14a604 --- /dev/null +++ b/htdocs/manual/keepalive.html.en @@ -0,0 +1,93 @@ + + + + + + + Apache Keep-Alive Support + + + + + + +

    Apache Keep-Alive Support

    +
    + +

    What is Keep-Alive?

    + The Keep-Alive extension to HTTP, as defined by the + HTTP/1.1 draft, allows persistent connections. + These long-lived HTTP sessions allow multiple requests to be + send over the same TCP connection, and in some cases have been + shown to result in an almost 50% speedup in latency times for + HTML documents with lots of images. + +

    Enabling Keep-Alive Support

    + Apache 1.1 comes with Keep-Alive support on by default, however + there are some directives you can use to modify Apache's + behavior: + +

    Note: Apache 1.2 uses a different syntax + for the KeepAlive + directive.

    + +

    KeepAlive

    + Syntax: KeepAlive + max-requests
    + Default: KeepAlive + 5
    + Context: server config
    + Status: Core + +

    This directive enables Keep-Alive support. Set + max-requests to the maximum number of requests you + want Apache to entertain per connection. A limit is imposed to + prevent a client from hogging your server resources. Set this + to 0 to disable support.

    + +

    KeepAliveTimeout

    + Syntax: KeepAliveTimeout + seconds
    + Default: KeepAliveTimeout + 15
    + Context: server config
    + Status: Core + +

    The number of seconds Apache will wait for a subsequent + request before closing the connection. Once a request has been + received, the timeout value specified by the Timeout directive + applies.

    + +

    When Keep-Alive Is Used

    + In order for Keep-Alive support to be used, first the browser + must support it. Many current browsers, including Netscape + Navigator 2.0, and Spyglass Mosaic-based browsers (including + Microsoft Internet Explorer) do. Note, however, that some + Windows 95-based browsers misbehave with Keep-Alive-supporting + servers; they may occasionally hang on a connect. This has been + observed with several Windows browsers, and occurs when + connecting to any Keep-Alive server, not just Apache. Netscape + 3.0b5 and later versions are known to work around this problem. + + +

    However, Keep-Alive support only is active with files where + the length is known beforehand. This means that most CGI + scripts, server-side included files and directory listings will + not use the Keep-Alive protocol. While this should be + completely transparent to the end user, it is something the + web-master may want to keep in mind.

    + + + + diff --git a/htdocs/manual/keepalive.html.html b/htdocs/manual/keepalive.html.html new file mode 100644 index 00000000000..4a89f0d9c49 --- /dev/null +++ b/htdocs/manual/keepalive.html.html @@ -0,0 +1,4 @@ + + + diff --git a/htdocs/manual/keepalive.html.ja.jis b/htdocs/manual/keepalive.html.ja.jis new file mode 100644 index 00000000000..c1b8c42e706 --- /dev/null +++ b/htdocs/manual/keepalive.html.ja.jis @@ -0,0 +1,93 @@ + + + + + + + Apache $B$N(B keep-alive $B%5%]!<%H(B + + + + + + + +

    Apache $B$G%5%]!<%H$9$k(B keep-alive

    +
    + +

    keep-alive $B$H$O(B

    + HTTP/1.1 $B%I%i%U%H$KDj5A$5$l$F$$$k$h$&$K!"(BHTTP + $B$N3HD%5!G=$G$"$k(B keep-alive $B$K$h$C$F;}B3E*$J%3%M%/%7%g%s$,2DG=$K$J$j$^$9!#(B + $B$3$l$i$N;}B3E*$J(B HTTP $B%;%C%7%g%s$N$*$+$2$G!"J#?t$N%j%/%(%9%H$rF10l$N(B + TCP $B%3%M%/%7%g%s$r7PM3$7$FAw?.$9$k$3$H$,2DG=$H$J$j$^$9!#(B + $BB??t$N%$%a!<%8$rE=$jIU$1$F$"$k(B HTML $B%I%-%e%a%s%H$rAw?.$9$k$H$-$K!"(B + $B>l9g$K$h$C$F$O!"BT$A;~4V$,$[$\(B 50% $B$H$J$k$[$IB.$/$J$k$3$H$,<($5$l$F$$$^$9!#(B + +

    Keep-Alive $B$N%5%]!<%H$rM-8z$K$9$k(B

    + Apache 1.1 $B$G$O%G%U%)%k%H$G(B keep-alive $B$N%5%]!<%H$OM-8z$K$J$C$F$$$^$9!#(B + $B$3$l$@$1$G$O$J$/!"(BApache $B$NF0:n$rJQ99$G$-$k%G%#%l%/%F%#%V$,(B + $B0J2<$N$h$&$K$$$/$D$+$"$j$^$9!#(B + +

    $BCm0U(B: Apache 1.2 $B$G$O(B KeepAlive + $B%G%#%l%/%F%#%V$N9=J8$O0[$J$j$^$9!#(B

    + +

    KeepAlive

    + $B9=J8(B: KeepAlive + max-requests
    + $B%G%U%)%k%H(B: KeepAlive + 5
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k(B
    + $B%9%F!<%?%9(B: Core + +

    $B$3$N%G%#%l%/%F%#%V$G(B keep-alive $B$N%5%]!<%H$rM-8z$K$7$^$9!#(B + max-requests $B$K$D$$$F$O(B Apache $B$K0 $B$r@_Dj$7$F$/$@$5$$!#(B

    + +

    KeepAliveTimeout

    + $B9=J8(B: KeepAliveTimeout + seconds
    + $B%G%U%)%k%H(B: KeepAliveTimeout + 15
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k(B
    + $B%9%F!<%?%9(B: Core + +

    Apache $B$K8eB3$N%j%/%(%9%H$,E~Ce$9$k$N$r(B seconds + $BIC$@$1BT$?$;$?8e!"(B($B%j%/%(%9%H$,E~Ce$7$J$$>l9g$K$O(B) + $B%3%M%/%7%g%s$r%/%m!<%:$7$^$9!#%j%/%(%9%H$rl9g$K$O!"(B + Timeout + $B%G%#%l%/%F%#%V$G;XDj$7$?(B timeout $BCM$rE,MQ$7$^$9!#(B

    + +

    keep-alive $B$,;HMQ$5$l$k>l9g(B

    + keep-alive $B%5%]!<%H$r;HMQ$9$k$K$O!"$^$:!"%V%i%&%6$,(B keep-alive $B$r%5%]!<%H(B + $B$7$F$$$J$1$l$P$J$j$^$;$s!#8=:_$NB?$/$N%V%i%&%6!"Nc$($P(B Netscape Navigator + 2.0 $B$d(B (Microsoft Internet Explorer $B$J$I$N(B) Spyglass Mosaic + $B$K4p$E$/%V%i%&%6$O$3$N5!G=$r%5%]!<%H$7$F$$$^$9!#$7$+$7!"(BWindows 95 + $B%Y!<%9$N$$$/$D$+$N%V%i%&%6$O!"(Bkeep-alive $B$r%5%]!<%H$7$F$$$k%5!<%P$K(B + $BBP$7$F8mF0:n$9$k$3$H$KCm0U$7$F$/$@$5$$!#$3$l$i$N%V%i%&%6$O%3%M%/%H(B + $B;~$K%O%s%0$9$k$3$H$,$"$j$^$9!#$3$N8mF0:n$O$$$/$D$+$N(B Windows + $B$N%V%i%&%6$K8+$i$l!"(BApache $B$@$1$G$O$J$/(B keep-alive $B$r%5%]!<%H$9$k(B + $B$9$Y$F$N%5!<%P$H%3%M%/%H$9$k$H$-$KH/@8$7$^$9!#(BNetscape 3.0b5 + $B0J9_$N%P!<%8%g%s$K$D$$$F$O$3$NLdBj$X$NBP=h$,$J$5$l$F$$$^$9!#(B + +

    $B$?$@$7!"(B keep-alive $B%5%]!<%H$,M-8z$K$J$k$N$O!"(B + $B$"$i$+$8$aD9$5$,H=L@$7$F$$$k%U%!%$%k$KBP$7$F$N$_$G$9!#(B + $B$=$N$?$a!"BgItJ,$N(B CGI $B%9%/%j%W%H!"%5!<%P%5%$%I%$%s%/%k!<%I%U%!%$%k!"(B + $B%G%#%l%/%H%j%j%9%H$G$O!"(Bkeep-alive $B%W%m%H%3%k$r;HMQ$7$J$$$3$H$K$J$j$^$9!#(B + $B$3$l$O%(%s%I%f!<%6$K$O40A4$KF)2aE*$K$J$C$F$$$k$Y$-$b$N$G$9$,!"(B + $B%&%'%V%^%9%?$OCN$C$F$*$$$?J}$,NI$$$3$H$G$7$g$&!#(B

    + + + diff --git a/htdocs/manual/location.html.en b/htdocs/manual/location.html.en new file mode 100644 index 00000000000..beb55a40516 --- /dev/null +++ b/htdocs/manual/location.html.en @@ -0,0 +1,65 @@ + + + + + + + Access Control by URL + + + + + + +

    Access Control by URL

    + +

    The + <Location> Directive

    + Syntax: <Location URL + prefix>
    + Context: server config, virtual + host
    + Status: core
    + + +

    The <Location> directive provides for access control + by URL. It is comparable to the <Directory> directive, + and should be matched with a </Location> directive. + Directives that apply to the URL given should be listed between + them. <Location> sections are processed in + the order they appear in the configuration file, after the + <Directory> sections and .htaccess files are + read.

    + +

    Note that, due to the way HTTP functions, URL + prefix should, save for proxy requests, be of the form + /path/, and should not include the + http://servername. It doesn't necessarily have to + protect a directory (it can be an individual file, or a number + of files), and can include wild-cards. In a wild-card string, + `?' matches any single character, and `*' matches any sequences + of characters.

    + +

    This functionality is especially useful when combined with + the SetHandler + directive. For example, to enable status requests, but allow + them only from browsers at foo.com, you might use:

    +
    +    <Location /status>
    +    SetHandler server-status
    +    Order Deny,Allow
    +    Deny from all
    +    Allow from .foo.com
    +    </Location>
    +
    + + + + diff --git a/htdocs/manual/location.html.html b/htdocs/manual/location.html.html new file mode 100644 index 00000000000..4267dff23a6 --- /dev/null +++ b/htdocs/manual/location.html.html @@ -0,0 +1,4 @@ + + + diff --git a/htdocs/manual/location.html.ja.jis b/htdocs/manual/location.html.ja.jis new file mode 100644 index 00000000000..8d729584724 --- /dev/null +++ b/htdocs/manual/location.html.ja.jis @@ -0,0 +1,63 @@ + + + + + + URL $B$G$N%"%/%;%9@)8f(B + + + + + + + +

    URL $B$G$N%"%/%;%9@)8f(B

    + +

    + <Location> $B%G%#%l%/%F%#%V(B

    + $B9=J8(B: <Location + URL $B%W%l%U%#%/%9(B>
    + $B%3%s%F%-%9%H(B: + $B%5!<%P@_Dj%U%!%$%k!"%P!<%A%c%k%[%9%H(B
    + $B%9%F!<%?%9(B: $B%3%"(B
    + +

    <Location> $B%G%#%l%/%F%#%V$O(B URL + $B$G$N%"%/%;%9@)8f$rDs6!$7$^$9!#$3$l$O(B<Directory> + $B%G%#%l%/%F%#%V$HI$E($7!"(B</Location> $B$HJ;$;$F;H$$$^$9!#(B + $B;XDj$5$l$?(B URL + $B$KBP$7$FE,MQ$5$;$k%G%#%l%/%F%#%V$O!"$=$l$i$N4V$KNs5s$7$^$9!#(B + <Location> $B%;%/%7%g%s$O(B <Directory> + $B%;%/%7%g%s5Z$S(B .htaccess + $B%U%!%$%k$,FI$^$l$?8e!"@_Dj%U%!%$%k$K8=$l$?=g$K=hM}$5$l$^$9!#(B

    + +

    HTTP $B$NF0:nJ}K!$N$?$a!"(BURL + $B@\F,<-(B$B$O!"%W%m%-%7%j%/%(%9%H$r=|$$$F!"(B/path/ $B$H$$$&(B + $B7A<0$K$J$C$F$$$k$Y$-$G!"(Bhttp://servername $B$r4^$a$F$$$O(B + $B$$$1$J$$$3$H$KCm0U$7$F$/$@$5$$!#$^$?!"I,$:$7$b%G%#%l%/%H%j(B + $B$rJ]8n$9$kI,MW$,$"$k$o$1$G$O$J$/(B ($B8D!9$N%U%!%$%k!"(B + $B$^$?$OB?$/$N%U%!%$%k$G$b9=$$$^$;$s(B)$B!"(B + $B%o%$%k%I%+!<%I$r4^$`$3$H$b$G$-$^$9!#%o%$%k%I%+!<%I$K$D$$$F$O!"(B + `?' $B$O2?$+0lJ8;z!"(B`*' $B$O$9$Y$F$NJ8;zNs$K%^%C%A$7$^$9!#(B

    + +

    $B$3$N5!G=$O!"(BSetHandler + $B%G%#%l%/%F%#%V$HAH$_9g$o$;$F;H$&$HFC$KM-1W$G$9!#(B + $BNc$($P!"%9%F!<%?%9MW5a$r2DG=$K$9$k$1$l$I$b!"(Bfoo.com + $B$+$iMh$?%V%i%&%6$@$1$K5v2D$r8BDj$7$?$$>l9g$O0J2<$r;H$&$3$H$,$G$-$^$9(B:

    +
    +    <Location /status>
    +    SetHandler server-status
    +    Order Deny,Allow
    +    Deny from all
    +    Allow from .foo.com
    +    </Location>
    +
    + + + diff --git a/htdocs/manual/logs.html b/htdocs/manual/logs.html new file mode 100644 index 00000000000..cd4ea09ac80 --- /dev/null +++ b/htdocs/manual/logs.html @@ -0,0 +1,650 @@ + + + + + + + Log Files - Apache HTTP Server + + + + + + +

    Log Files

    + +

    In order to effectively manage a web server, it is necessary + to get feedback about the activity and performance of the + server as well as any problems that may be occuring. The Apache + HTTP Server provides very comprehensive and flexible logging + capabilities. This document describes how to configure its + logging capabilities, and how to understand what the logs + contain.

    + + +
    + +

    Security Warning

    + +

    Anyone who can write to the directory where Apache is + writing a log file can almost certainly gain access to the uid + that the server is started as, which is normally root. Do + NOT give people write access to the directory the logs + are stored in without being aware of the consequences; see the + security tips document + for details.

    + +

    In addition, log files may contain information supplied + directly by the client, without escaping. Therefore, it is + possible for malicious clients to insert control-characters in + the log files, so care must be taken in dealing with raw + logs.

    +
    + +

    Error Log

    + + + + + +
    Related Directives
    +
    + ErrorLog
    + LogLevel
    + +

    The server error log, whose name and location is set by the + ErrorLog directive, is the + most important log file. This is the place where Apache httpd + will send diagnostic information and record any errors that it + encounters in processing requests. It is the first place to + look when a problem occurs with starting the server or with the + operation of the server, since it will often contain details of + what went wrong and how to fix it.

    + +

    The error log is usually written to a file (typically + error_log on unix systems and + error.log on Windows and OS/2). On unix systems it + is also possible to have the server send errors to + syslog or pipe them to a + program.

    + +

    The format of the error log is relatively free-form and + descriptive. But there is certain information that is contained + in most error log entries. For example, here is a typical + message.

    + +
    + [Wed Oct 11 14:32:52 2000] [error] [client 127.0.0.1] + client denied by server configuration: + /export/home/live/ap/htdocs/test +
    + +

    The first item in the log entry is the date and time of the + message. The second entry lists the severity of the error being + reported. The LogLevel + directive is used to control the types of errors that are sent + to the error log by restricting the severity level. The third + entry gives the IP address of the client that generated the + error. Beyond that is the message itself, which in this case + indicates that the server has been configured to deny the + client access. The server reports the file-system path (as + opposed to the web path) of the requested document.

    + +

    A very wide variety of different messages can appear in the + error log. Most look similar to the example above. The error + log will also contain debugging output from CGI scripts. Any + information written to stderr by a CGI script will + be copied directly to the error log.

    + +

    It is not possible to customize the error log by adding or + removing information. However, error log entries dealing with + particular requests have corresponding entries in the access log. For example, the above example + entry corresponds to an access log entry with status code 403. + Since it is possible to customize the access log, you can + obtain more information about error conditions using that log + file.

    + +

    During testing, it is often useful to continuously monitor + the error log for any problems. On unix systems, you can + accomplish this using:

    + +
    + tail -f error_log +
    +
    + +

    Access Log

    + + + + + + + +
    Related Modules
    +
    + mod_log_config
    +
    Related Directives
    +
    + CustomLog
    + LogFormat
    + SetEnvIf +
    + +

    The server access log records all requests processed by the + server. The location and content of the access log are + controlled by the CustomLog + directive. The LogFormat + directive can be used to simplify the selection of the contents + of the logs. This section describes how to configure the server + to record information in the access log.

    + +

    Of course, storing the information in the access log is only + the start of log management. The next step is to analyze this + information to produce useful statistics. Log analysis in + general is beyond the scope of this document, and not really + part of the job of the web server itself. For more information + about this topic, and for applications which perform log + analysis, check the + Open Directory or + Yahoo.

    + +

    Various versions of Apache httpd have used other modules and + directives to control access logging, including + mod_log_referer, mod_log_agent, and the + TransferLog directive. The CustomLog + directive now subsumes the functionality of all the older + directives.

    + +

    The format of the access log is highly configurable. The + format is specified using a format string that + looks much like a C-style printf(1) format string. Some + examples are presented in the next sections. For a complete + list of the possible contents of the format string, see the mod_log_config + documentation.

    + +

    Common Log Format

    + +

    A typical configuration for the access log might look as + follows.

    + +
    + LogFormat "%h %l %u %t \"%r\" %>s %b" common
    + CustomLog logs/access_log common
    +
    + +

    This defines the nickname common and + associates it with a particular log format string. The format + string consists of percent directives, each of which tell the + server to log a particular piece of information. Literal + characters may also be placed in the format string and will be + copied directly into the log output. The quote character + (") must be escaped by placing a back-slash before + it to prevent it from being interpreted as the end of the + format string. The format string may also contain the special + control characters "\n" for new-line and + "\t" for tab.

    + +

    The CustomLog directive sets up a new log file + using the defined nickname. The filename for the + access log is relative to the ServerRoot unless it begins + with a slash.

    + +

    The above configuration will write log entries in a format + known as the Common Log Format (CLF). This standard format can + be produced by many different web servers and read by many log + analysis programs. The log file entries produced in CLF will + look something like this:

    + +
    + 127.0.0.1 - frank [10/Oct/2000:13:55:36 -0700] "GET + /apache_pb.gif HTTP/1.0" 200 2326 +
    + +

    Each part of this log entry is described below.

    + +
    +
    127.0.0.1 (%h)
    + +
    This is the IP address of the client (remote host) which + made the request to the server. If HostnameLookups is + set to On, then the server will try to determine + the hostname and log it in place of the IP address. However, + this configuration is not recommended since it can + significantly slow the server. Instead, it is best to use a + log post-processor such as logresolve to determine + the hostnames. The IP address reported here is not + necessarily the address of the machine at which the user is + sitting. If a proxy server exists between the user and the + server, this address will be the address of the proxy, rather + than the originating machine.
    + +
    - (%l)
    + +
    The "hyphen" in the output indicates that the requested + piece of information is not available. In this case, the + information that is not available is the RFC 1413 identity of + the client determined by identd on the clients + machine. This information is highly unreliable and should + almost never be used except on tightly controlled internal + networks. Apache httpd will not even attempt to determine + this information unless IdentityCheck is set + to On.
    + +
    frank (%u)
    + +
    This is the userid of the person requesting the document + as determined by HTTP authentication. The same value is + typically provided to CGI scripts in the + REMOTE_USER environment variable. If the status + code for the request (see below) is 401, then this value + should not be trusted because the user is not yet + authenticated. If the document is not password protected, + this entry will be "-" just like the previous + one.
    + +
    [10/Oct/2000:13:55:36 -0700] + (%t)
    + +
    + The time that the server finished processing the request. + The format is: + +
    + [day/month/year:hour:minute:second zone]
    + day = 2*digit
    + month = 3*letter
    + year = 4*digit
    + hour = 2*digit
    + minute = 2*digit
    + second = 2*digit
    + zone = (`+' | `-') 4*digit
    +
    + It is possible to have the time displayed in another format + by specifying %{format}t in the log format + string, where format is as in + strftime(3) from the C standard library. +
    + +
    "GET /apache_pb.gif HTTP/1.0" + (\"%r\")
    + +
    The request line from the client is given in double + quotes. The request line contains a great deal of useful + information. First, the method used by the client is + GET. Second, the client requested the resource + /apache_pb.gif, and third, the client used the + protocol HTTP/1.0. It is also possible to log + one or more parts of the request line independently. For + example, the format string "%m %U%q %H" will log + the method, path, query-string, and protocol, resulting in + exactly the same output as "%r".
    + +
    200 (%>s)
    + +
    This is the status code that the server sends back to the + client. This information is very valuable, because it reveals + whether the request resulted in a successful response (codes + beginning in 2), a redirection (codes beginning in 3), an + error caused by the client (codes beginning in 4), or an + error in the server (codes beginning in 5). The full list of + possible status codes can be found in the HTTP + specification (RFC2616 section 10).
    + +
    2326 (%b)
    + +
    The last entry indicates the size of the object returned + to the client, not including the response headers. If no + content was returned to the client, this value will be + "-". To log "0" for no content, use + %B instead.
    +
    + +

    Combined Log + Format

    + +

    Another commonly used format string is called the Combined + Log Format. It can be used as follows.

    + +
    + LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" + \"%{User-agent}i\"" combined
    + CustomLog log/acces_log combined
    +
    + +

    This format is exactly the same as the Common Log Format, + with the addition of two more fields. Each of the additional + fields uses the percent-directive + %{header}i, where header can be + any HTTP request header. The access log under this format will + look like:

    + +
    + 127.0.0.1 - frank [10/Oct/2000:13:55:36 -0700] "GET + /apache_pb.gif HTTP/1.0" 200 2326 + "http://www.example.com/start.html" "Mozilla/4.08 [en] + (Win98; I ;Nav)" +
    + +

    The additional fields are:

    + +
    +
    "http://www.example.com/start.html" + (\"%{Referer}i\")
    + +
    The "Referer" (sic) HTTP request header. This gives the + site that the client reports having been referred from. (This + should be the page that links to or includes + /apache_pb.gif).
    + +
    "Mozilla/4.08 [en] (Win98; I ;Nav)" + (\"%{User-agent}i\")
    + +
    The User-Agent HTTP request header. This is the + identifying information that the client browser reports about + itself.
    +
    + +

    Multiple Access + Logs

    + +

    Multiple access logs can be created simply by specifying + multiple CustomLog directives in the configuration + file. For example, the following directives will create three + access logs. The first contains the basic CLF information, + while the second and third contain referer and browser + information. The last two CustomLog lines show how + to mimic the effects of the ReferLog and + AgentLog directives.

    + +
    + LogFormat "%h %l %u %t \"%r\" %>s %b" common
    + CustomLog logs/access_log common
    + CustomLog logs/referer_log "%{Referer}i -> %U"
    + CustomLog logs/agent_log "%{User-agent}i"
    +
    + +

    This example also shows that it is not necessary to define a + nickname with the LogFormat directive. Instead, + the log format can be specified directly in the + CustomLog directive.

    + +

    Conditional + Logging

    + +

    There are times when it is convenient to exclude certain + entries from the access logs based on characteristics of the + client request. This is easily accomplished with the help of environment variables. First, an + environment variable must be set to indicate that the request + meets certain conditions. This is usually accomplished with SetEnvIf. Then the + env= clause of the CustomLog + directive is used to include or exclude requests where the + environment variable is set. Some examples:

    + +
    + # Mark requests from the loop-back interface
    + SetEnvIf Remote_Addr "127\.0\.0\.1" dontlog
    + # Mark requests for the robots.txt file
    + SetEnvIf Request_URI "^/robots\.txt$" dontlog
    + # Log what remains
    + CustomLog logs/access_log common env=!dontlog
    +
    + +

    As another example, consider logging requests from + english-speakers to one log file, and non-english speakers to a + different log file.

    + +
    + SetEnvIf Accept-Language "en" english
    + CustomLog logs/english_log common env=english
    + CustomLog logs/non_english_log common env=!english
    +
    + +

    Although we have just shown that conditional logging is very + powerful and flexibly, it is not the only way to control the + contents of the logs. Log files are more useful when they + contain a complete record of server activity. It is often + easier to simply post-process the log files to remove requests + that you do not want to consider.

    +
    + +

    Log Rotation

    + +

    On even a moderately busy server, the quantity of + information stored in the log files is very large. The access + log file typically grows 1 MB or more per 10,000 requests. It + will consequently be necessary to periodically rotate the log + files by moving or deleting the existing logs. This cannot be + done while the server is running, because Apache will continue + writing to the old log file as long as it holds the file open. + Instead, the server must be restarted after the log files are + moved or deleted so that it will open new log files.

    + +

    By using a graceful restart, the server can be + instructed to open new log files without losing any existing or + pending connections from clients. However, in order to + accomplish this, the server must continue to write to the old + log files while it finishes serving old requests. It is + therefore necessary to wait for some time after the restart + before doing any processing on the log files. A typical + scenario that simply rotates the logs and compresses the old + logs to save space is:

    + +
    + mv access_log access_log.old
    + mv error_log error_log.old
    + apachectl graceful
    + sleep 600
    + gzip access_log.old error_log.old
    +
    + +

    Another way to perform log rotation is using piped logs as discussed in the next + section.

    +
    + +

    Piped Logs

    + +

    Apache httpd is capable of writing error and access log + files through a pipe to another process, rather than directly + to a file. This capability dramatically increases the + flexibility of logging, without adding code to the main server. + In order to write logs to a pipe, simply replace the filename + with the pipe character "|", followed by the name + of the executable which should accept log entries on its + standard input. Apache will start the piped-log process when + the server starts, and will restart it if it crashes while the + server is running. (This last feature is why we can refer to + this technique as "reliable piped logging".)

    + +

    Piped log processes are spawned by the parent Apache httpd + process, and inherit the userid of that process. This means + that piped log programs usually run as root. It is therefore + very important to keep the programs simple and secure.

    + +

    One important use of piped logs is to allow log rotation + without having to restart the server. The Apache HTTP Server + includes a simple program called rotatelogs for this + purpose. For example, to rotate the logs every 24 hours, you + can use:

    + +
    + CustomLog "|/usr/local/apache/bin/rotatelogs + /var/log/access_log 86400" common +
    + +

    A similar, but much more flexible log rotation program + called cronolog + is available at an external site.

    + +

    As with conditional logging, piped logs are a very powerful + tool, but they should not be used where a simpler solution like + off-line post-processing is available.

    +
    + +

    Virtual + Hosts

    + +

    When running a server with many virtual + hosts, there are several options for dealing with log + files. First, it is possible to use logs exactly as in a + single-host server. Simply by placing the logging directives + outside the <VirtualHost> sections in the + main server context, it is possible to log all requests in the + same access log and error log. This technique does not allow + for easy collection of statistics on individual virtual + hosts.

    + +

    If CustomLog or ErrorLog + directives are placed inside a <VirtualHost> + section, all requests or errors for that virtual host will be + logged only to the specified file. Any virtual host which does + not have logging directives will still have its requests sent + to the main server logs. This technique is very useful for a + small number of virtual hosts, but if the number of hosts is + very large, it can be complicated to manage. In addition, it + can often create problems with insufficient file + descriptors.

    + +

    For the access log, there is a very good compromise. By + adding information on the virtual host to the log format + string, it is possible to log all hosts to the same log, and + later split the log into individual files. For example, + consider the following directives.

    + +
    + LogFormat "%v %l %u %t \"%r\" %>s %b" + comonvhost
    + CustomLog logs/access_log comonvhost
    +
    + +

    The %v is used to log the name of the virtual + host that is serving the request. Then a program like split-logfile can be used to + post-process the access log in order to split it into one file + per virtual host.

    + +

    Unfortunately, no similar technique is available for the + error log, so you must choose between mixing all virtual hosts + in the same error log and using one error log per virtual + host.

    +
    + +

    Other Log Files

    + + + + + + + +
    Related Modules
    +
    + mod_cgi
    + mod_rewrite
    Related Directives
    +
    + PidFile
    + RewriteLog
    + RewriteLogLevel
    + ScriptLog
    + ScriptLogLength
    + ScriptLogBuffer +
    + +

    PID File

    + +

    On startup, Apache httpd saves the process id of the parent + httpd process to the file logs/httpd.pid. This + filename can be changed with the PidFile directive. The + process-id is for use by the administrator in restarting and + terminating the daemon by sending signals to the parent + process; on Windows, use the -k command line option instead. + For more information see the Stopping + and Restarting page.

    + +

    Script Log

    + +

    In order to aid in debugging, the ScriptLog directive + allows you to record the input to and output from CGI scripts. + This should only be used in testing - not for live servers. + More information is available in the mod_cgi documentation.

    + +

    Rewrite Log

    + +

    When using the powerful and complex features of mod_rewrite, it is almost + always necessary to use the RewriteLog to help + in debugging. This log file produces a detailed analysis of how + the rewriting engine transforms requests. The level of detail + is controlled by the RewriteLogLevel + directive.

    + + + + diff --git a/htdocs/manual/man-template.html b/htdocs/manual/man-template.html new file mode 100644 index 00000000000..2203a16e98f --- /dev/null +++ b/htdocs/manual/man-template.html @@ -0,0 +1,101 @@ + + + + + + + Apache module mod_foobar + + + + + + + +

    Module mod_foobar

    + +
    + Add this file as a link in mod/index.html +
    + +

    This module is contained in the mod_foobar.c + file, and is/is not compiled in by default. It + provides for the foobar feature. Any document + with the mime type foo/bar will be processed by + this module.

    + +
    + Add the magic mime type to the list in + magic_types.html +
    + +

    Summary

    + +

    General module documentation here.

    + +

    Directives

    + + + +
    + Add these directives to the list in directives.html +
    +
    + + +

    ADirective + directive

    + +

    Syntax: ADirective some + args
    + Default: ADirective + default value
    + Context: context-list
    +

    + +
    + context-list is where this directive can appear; allowed: + server config, virtual host, directory, .htaccess +
    + Override: override
    + + +
    + required if the directive is allowed in .htaccess files; + the AllowOverride option that allows the directive. +
    + Status: status
    + + +
    + Core if in core apache, Base if in one of the standard + modules, Extension if in an extension module (not compiled in + by default) or Experimental +
    + Module: mod_foobar
    + Compatibility: compatibility + notes + +
    + Describe any compatibility issues, such as "Only + available in Apache 1.2 or later," or "The Apache syntax for + this directive is not compatible with the NCSA directive of + the same name." +
    + +

    The ADirective directive does something.

    + + + + diff --git a/htdocs/manual/misc/API.html b/htdocs/manual/misc/API.html new file mode 100644 index 00000000000..6c9bd544990 --- /dev/null +++ b/htdocs/manual/misc/API.html @@ -0,0 +1,1243 @@ + + + + + + + Apache API notes + + + + + + +

    Apache API notes

    + These are some notes on the Apache API and the data structures + you have to deal with, etc. They are not yet nearly + complete, but hopefully, they will help you get your bearings. + Keep in mind that the API is still subject to change as we gain + experience with it. (See the TODO file for what might + be coming). However, it will be easy to adapt modules to any + changes that are made. (We have more modules to adapt than you + do). + +

    A few notes on general pedagogical style here. In the + interest of conciseness, all structure declarations here are + incomplete --- the real ones have more slots that I'm not + telling you about. For the most part, these are reserved to one + component of the server core or another, and should be altered + by modules with caution. However, in some cases, they really + are things I just haven't gotten around to yet. Welcome to the + bleeding edge.

    + +

    Finally, here's an outline, to give you some bare idea of + what's coming up, and in what order:

    + + + +

    Basic concepts.

    + We begin with an overview of the basic concepts behind the API, + and how they are manifested in the code. + +

    Handlers, Modules, and + Requests

    + Apache breaks down request handling into a series of steps, + more or less the same way the Netscape server API does + (although this API has a few more stages than NetSite does, as + hooks for stuff I thought might be useful in the future). These + are: + +
      +
    • URI -> Filename translation
    • + +
    • Auth ID checking [is the user who they say they + are?]
    • + +
    • Auth access checking [is the user authorized + here?]
    • + +
    • Access checking other than auth
    • + +
    • Determining MIME type of the object requested
    • + +
    • `Fixups' --- there aren't any of these yet, but the phase + is intended as a hook for possible extensions like + SetEnv, which don't really fit well + elsewhere.
    • + +
    • Actually sending a response back to the client.
    • + +
    • Logging the request
    • +
    + These phases are handled by looking at each of a succession of + modules, looking to see if each of them has a handler + for the phase, and attempting invoking it if so. The handler + can typically do one of three things: + +
      +
    • Handle the request, and indicate that it has + done so by returning the magic constant OK.
    • + +
    • Decline to handle the request, by returning the + magic integer constant DECLINED. In this case, + the server behaves in all respects as if the handler simply + hadn't been there.
    • + +
    • Signal an error, by returning one of the HTTP error + codes. This terminates normal handling of the request, + although an ErrorDocument may be invoked to try to mop up, + and it will be logged in any case.
    • +
    + Most phases are terminated by the first module that handles + them; however, for logging, `fixups', and non-access + authentication checking, all handlers always run (barring an + error). Also, the response phase is unique in that modules may + declare multiple handlers for it, via a dispatch table keyed on + the MIME type of the requested object. Modules may declare a + response-phase handler which can handle any request, + by giving it the key */* (i.e., a + wildcard MIME type specification). However, wildcard handlers + are only invoked if the server has already tried and failed to + find a more specific response handler for the MIME type of the + requested object (either none existed, or they all declined). + +

    The handlers themselves are functions of one argument (a + request_rec structure. vide infra), which returns + an integer, as above.

    + +

    A brief tour of a + module

    + At this point, we need to explain the structure of a module. + Our candidate will be one of the messier ones, the CGI module + --- this handles both CGI scripts and the + ScriptAlias config file command. It's actually a + great deal more complicated than most modules, but if we're + going to have only one example, it might as well be the one + with its fingers in every place. + +

    Let's begin with handlers. In order to handle the CGI + scripts, the module declares a response handler for them. + Because of ScriptAlias, it also has handlers for + the name translation phase (to recognize + ScriptAliased URIs), the type-checking phase (any + ScriptAliased request is typed as a CGI + script).

    + +

    The module needs to maintain some per (virtual) server + information, namely, the ScriptAliases in effect; + the module structure therefore contains pointers to a functions + which builds these structures, and to another which combines + two of them (in case the main server and a virtual server both + have ScriptAliases declared).

    + +

    Finally, this module contains code to handle the + ScriptAlias command itself. This particular module + only declares one command, but there could be more, so modules + have command tables which declare their commands, and + describe where they are permitted, and how they are to be + invoked.

    + +

    A final note on the declared types of the arguments of some + of these commands: a pool is a pointer to a + resource pool structure; these are used by the server + to keep track of the memory which has been allocated, files + opened, etc., either to service a particular request, + or to handle the process of configuring itself. That way, when + the request is over (or, for the configuration pool, when the + server is restarting), the memory can be freed, and the files + closed, en masse, without anyone having to write + explicit code to track them all down and dispose of them. Also, + a cmd_parms structure contains various information + about the config file being read, and other status information, + which is sometimes of use to the function which processes a + config-file command (such as ScriptAlias). With no + further ado, the module itself:

    +
    +/* Declarations of handlers. */
    +
    +int translate_scriptalias (request_rec *);
    +int type_scriptalias (request_rec *);
    +int cgi_handler (request_rec *);
    +
    +/* Subsidiary dispatch table for response-phase handlers, by MIME type */
    +
    +handler_rec cgi_handlers[] = {
    +{ "application/x-httpd-cgi", cgi_handler },
    +{ NULL }
    +};
    +
    +/* Declarations of routines to manipulate the module's configuration
    + * info.  Note that these are returned, and passed in, as void *'s;
    + * the server core keeps track of them, but it doesn't, and can't,
    + * know their internal structure.
    + */
    +
    +void *make_cgi_server_config (pool *);
    +void *merge_cgi_server_config (pool *, void *, void *);
    +
    +/* Declarations of routines to handle config-file commands */
    +
    +extern char *script_alias(cmd_parms *, void *per_dir_config, char *fake,
    +                          char *real);
    +
    +command_rec cgi_cmds[] = {
    +{ "ScriptAlias", script_alias, NULL, RSRC_CONF, TAKE2,
    +    "a fakename and a realname"},
    +{ NULL }
    +};
    +
    +module cgi_module = {
    +   STANDARD_MODULE_STUFF,
    +   NULL,                     /* initializer */
    +   NULL,                     /* dir config creator */
    +   NULL,                     /* dir merger --- default is to override */
    +   make_cgi_server_config,   /* server config */
    +   merge_cgi_server_config,  /* merge server config */
    +   cgi_cmds,                 /* command table */
    +   cgi_handlers,             /* handlers */
    +   translate_scriptalias,    /* filename translation */
    +   NULL,                     /* check_user_id */
    +   NULL,                     /* check auth */
    +   NULL,                     /* check access */
    +   type_scriptalias,         /* type_checker */
    +   NULL,                     /* fixups */
    +   NULL,                     /* logger */
    +   NULL                      /* header parser */
    +};
    +
    + +

    How handlers work

    + The sole argument to handlers is a request_rec + structure. This structure describes a particular request which + has been made to the server, on behalf of a client. In most + cases, each connection to the client generates only one + request_rec structure. + +

    A brief tour of the + request_rec

    + The request_rec contains pointers to a resource + pool which will be cleared when the server is finished handling + the request; to structures containing per-server and + per-connection information, and most importantly, information + on the request itself. + +

    The most important such information is a small set of + character strings describing attributes of the object being + requested, including its URI, filename, content-type and + content-encoding (these being filled in by the translation and + type-check handlers which handle the request, + respectively).

    + +

    Other commonly used data items are tables giving the MIME + headers on the client's original request, MIME headers to be + sent back with the response (which modules can add to at will), + and environment variables for any subprocesses which are + spawned off in the course of servicing the request. These + tables are manipulated using the ap_table_get and + ap_table_set routines.

    + +
    + Note that the Content-type header value + cannot be set by module content-handlers using the + ap_table_*() routines. Rather, it is set by + pointing the content_type field in the + request_rec structure to an appropriate string. + E.g., +
    +  r->content_type = "text/html";
    +
    +
    + Finally, there are pointers to two data structures which, in + turn, point to per-module configuration structures. + Specifically, these hold pointers to the data structures which + the module has built to describe the way it has been configured + to operate in a given directory (via .htaccess + files or <Directory> sections), for private + data it has built in the course of servicing the request (so + modules' handlers for one phase can pass `notes' to their + handlers for other phases). There is another such configuration + vector in the server_rec data structure pointed to + by the request_rec, which contains per (virtual) + server configuration data. + +

    Here is an abridged declaration, giving the fields most + commonly used:

    +
    +struct request_rec {
    +
    +  pool *pool;
    +  conn_rec *connection;
    +  server_rec *server;
    +
    +  /* What object is being requested */
    +
    +  char *uri;
    +  char *filename;
    +  char *path_info;
    +  char *args;           /* QUERY_ARGS, if any */
    +  struct stat finfo;    /* Set by server core;
    +                         * st_mode set to zero if no such file */
    +
    +  char *content_type;
    +  char *content_encoding;
    +
    +  /* MIME header environments, in and out.  Also, an array containing
    +   * environment variables to be passed to subprocesses, so people can
    +   * write modules to add to that environment.
    +   *
    +   * The difference between headers_out and err_headers_out is that
    +   * the latter are printed even on error, and persist across internal
    +   * redirects (so the headers printed for ErrorDocument handlers will
    +   * have them).
    +   */
    +
    +  table *headers_in;
    +  table *headers_out;
    +  table *err_headers_out;
    +  table *subprocess_env;
    +
    +  /* Info about the request itself... */
    +
    +  int header_only;     /* HEAD request, as opposed to GET */
    +  char *protocol;      /* Protocol, as given to us, or HTTP/0.9 */
    +  char *method;        /* GET, HEAD, POST, etc. */
    +  int method_number;   /* M_GET, M_POST, etc. */
    +
    +  /* Info for logging */
    +
    +  char *the_request;
    +  int bytes_sent;
    +
    +  /* A flag which modules can set, to indicate that the data being
    +   * returned is volatile, and clients should be told not to cache it.
    +   */
    +
    +  int no_cache;
    +
    +  /* Various other config info which may change with .htaccess files
    +   * These are config vectors, with one void* pointer for each module
    +   * (the thing pointed to being the module's business).
    +   */
    +
    +  void *per_dir_config;   /* Options set in config files, etc. */
    +  void *request_config;   /* Notes on *this* request */
    +
    +};
    +
    +
    + +

    Where request_rec + structures come from

    + Most request_rec structures are built by reading + an HTTP request from a client, and filling in the fields. + However, there are a few exceptions: + +
      +
    • If the request is to an imagemap, a type map + (i.e., a *.var file), or a CGI script + which returned a local `Location:', then the resource which + the user requested is going to be ultimately located by some + URI other than what the client originally supplied. In this + case, the server does an internal redirect, + constructing a new request_rec for the new URI, + and processing it almost exactly as if the client had + requested the new URI directly.
    • + +
    • If some handler signaled an error, and an + ErrorDocument is in scope, the same internal + redirect machinery comes into play.
    • + +
    • + Finally, a handler occasionally needs to investigate `what + would happen if' some other request were run. For instance, + the directory indexing module needs to know what MIME type + would be assigned to a request for each directory entry, in + order to figure out what icon to use. + +

      Such handlers can construct a sub-request, + using the functions ap_sub_req_lookup_file, + ap_sub_req_lookup_uri, and + ap_sub_req_method_uri; these construct a new + request_rec structure and processes it as you + would expect, up to but not including the point of actually + sending a response. (These functions skip over the access + checks if the sub-request is for a file in the same + directory as the original request).

      + +

      (Server-side includes work by building sub-requests and + then actually invoking the response handler for them, via + the function ap_run_sub_req).

      +
    • +
    + +

    Handling requests, + declining, and returning error codes

    + As discussed above, each handler, when invoked to handle a + particular request_rec, has to return an + int to indicate what happened. That can either be + +
      +
    • OK --- the request was handled successfully. This may or + may not terminate the phase.
    • + +
    • DECLINED --- no erroneous condition exists, but the + module declines to handle the phase; the server tries to find + another.
    • + +
    • an HTTP error code, which aborts handling of the + request.
    • +
    + Note that if the error code returned is REDIRECT, + then the module should put a Location in the + request's headers_out, to indicate where the + client should be redirected to. + +

    Special + considerations for response handlers

    + Handlers for most phases do their work by simply setting a few + fields in the request_rec structure (or, in the + case of access checkers, simply by returning the correct error + code). However, response handlers have to actually send a + request back to the client. + +

    They should begin by sending an HTTP response header, using + the function ap_send_http_header. (You don't have + to do anything special to skip sending the header for HTTP/0.9 + requests; the function figures out on its own that it shouldn't + do anything). If the request is marked + header_only, that's all they should do; they + should return after that, without attempting any further + output.

    + +

    Otherwise, they should produce a request body which responds + to the client as appropriate. The primitives for this are + ap_rputc and ap_rprintf, for + internally generated output, and ap_send_fd, to + copy the contents of some FILE * straight to the + client.

    + +

    At this point, you should more or less understand the + following piece of code, which is the handler which handles + GET requests which have no more specific handler; + it also shows how conditional GETs can be handled, + if it's desirable to do so in a particular response handler --- + ap_set_last_modified checks against the + If-modified-since value supplied by the client, if + any, and returns an appropriate code (which will, if nonzero, + be USE_LOCAL_COPY). No similar considerations apply for + ap_set_content_length, but it returns an error + code for symmetry.

    +
    +int default_handler (request_rec *r)
    +{
    +    int errstatus;
    +    FILE *f;
    +
    +    if (r->method_number != M_GET) return DECLINED;
    +    if (r->finfo.st_mode == 0) return NOT_FOUND;
    +
    +    if ((errstatus = ap_set_content_length (r, r->finfo.st_size))) {
    +        return errstatus;
    +    }
    +
    +    r->mtime = r->finfo.st_mtime;
    +    ap_set_last_modified (r);
    +
    +    f = ap_pfopen (r->pool, r->filename, "r");
    +
    +    if (f == NULL) {
    +        ap_log_rerror(APLOG_MARK, APLOG_ERR, r,
    +             "file permissions deny server access: %s", r->filename);
    +        return FORBIDDEN;
    +    }
    +
    +    ap_soft_timeout ("send", r);
    +    ap_send_http_header (r);
    +
    +    if (!r->header_only) ap_send_fd (f, r);
    +    ap_pfclose (r->pool, f);
    +
    +    ap_kill_timeout (r);
    +    return OK;
    +}
    +
    + Finally, if all of this is too much of a challenge, there are a + few ways out of it. First off, as shown above, a response + handler which has not yet produced any output can simply return + an error code, in which case the server will automatically + produce an error response. Secondly, it can punt to some other + handler by invoking ap_internal_redirect, which is + how the internal redirection machinery discussed above is + invoked. A response handler which has internally redirected + should always return OK. + +

    (Invoking ap_internal_redirect from handlers + which are not response handlers will lead to serious + confusion).

    + +

    Special + considerations for authentication handlers

    + Stuff that should be discussed here in detail: + +
      +
    • Authentication-phase handlers not invoked unless auth is + configured for the directory.
    • + +
    • Common auth configuration stored in the core per-dir + configuration; it has accessors ap_auth_type, + ap_auth_name, and ap_requires.
    • + +
    • Common routines, to handle the protocol end of things, at + least for HTTP basic authentication + (ap_get_basic_auth_pw, which sets the + connection->user structure field + automatically, and ap_note_basic_auth_failure, + which arranges for the proper WWW-Authenticate: + header to be sent back).
    • +
    + +

    Special + considerations for logging handlers

    + When a request has internally redirected, there is the question + of what to log. Apache handles this by bundling the entire + chain of redirects into a list of request_rec + structures which are threaded through the + r->prev and r->next pointers. + The request_rec which is passed to the logging + handlers in such cases is the one which was originally built + for the initial request from the client; note that the + bytes_sent field will only be correct in the last request in + the chain (the one for which a response was actually sent). + +

    Resource allocation and resource + pools

    + +

    One of the problems of writing and designing a server-pool + server is that of preventing leakage, that is, allocating + resources (memory, open files, etc.), without + subsequently releasing them. The resource pool machinery is + designed to make it easy to prevent this from happening, by + allowing resource to be allocated in such a way that they are + automatically released when the server is done with + them.

    + +

    The way this works is as follows: the memory which is + allocated, file opened, etc., to deal with a + particular request are tied to a resource pool which + is allocated for the request. The pool is a data structure + which itself tracks the resources in question.

    + +

    When the request has been processed, the pool is + cleared. At that point, all the memory associated with + it is released for reuse, all files associated with it are + closed, and any other clean-up functions which are associated + with the pool are run. When this is over, we can be confident + that all the resource tied to the pool have been released, and + that none of them have leaked.

    + +

    Server restarts, and allocation of memory and resources for + per-server configuration, are handled in a similar way. There + is a configuration pool, which keeps track of + resources which were allocated while reading the server + configuration files, and handling the commands therein (for + instance, the memory that was allocated for per-server module + configuration, log files and other files that were opened, and + so forth). When the server restarts, and has to reread the + configuration files, the configuration pool is cleared, and so + the memory and file descriptors which were taken up by reading + them the last time are made available for reuse.

    + +

    It should be noted that use of the pool machinery isn't + generally obligatory, except for situations like logging + handlers, where you really need to register cleanups to make + sure that the log file gets closed when the server restarts + (this is most easily done by using the function ap_pfopen, which also arranges + for the underlying file descriptor to be closed before any + child processes, such as for CGI scripts, are + execed), or in case you are using the timeout + machinery (which isn't yet even documented here). However, + there are two benefits to using it: resources allocated to a + pool never leak (even if you allocate a scratch string, and + just forget about it); also, for memory allocation, + ap_palloc is generally faster than + malloc.

    + +

    We begin here by describing how memory is allocated to + pools, and then discuss how other resources are tracked by the + resource pool machinery.

    + +

    Allocation of memory in pools

    + +

    Memory is allocated to pools by calling the function + ap_palloc, which takes two arguments, one being a + pointer to a resource pool structure, and the other being the + amount of memory to allocate (in chars). Within + handlers for handling requests, the most common way of getting + a resource pool structure is by looking at the + pool slot of the relevant + request_rec; hence the repeated appearance of the + following idiom in module code:

    +
    +int my_handler(request_rec *r)
    +{
    +    struct my_structure *foo;
    +    ...
    +
    +    foo = (foo *)ap_palloc (r->pool, sizeof(my_structure));
    +}
    +
    + +

    Note that there is no ap_pfree --- + ap_palloced memory is freed only when the + associated resource pool is cleared. This means that + ap_palloc does not have to do as much accounting + as malloc(); all it does in the typical case is to + round up the size, bump a pointer, and do a range check.

    + +

    (It also raises the possibility that heavy use of + ap_palloc could cause a server process to grow + excessively large. There are two ways to deal with this, which + are dealt with below; briefly, you can use malloc, + and try to be sure that all of the memory gets explicitly + freed, or you can allocate a sub-pool of the main + pool, allocate your memory in the sub-pool, and clear it out + periodically. The latter technique is discussed in the section + on sub-pools below, and is used in the directory-indexing code, + in order to avoid excessive storage allocation when listing + directories with thousands of files).

    + +

    Allocating initialized memory

    + +

    There are functions which allocate initialized memory, and + are frequently useful. The function ap_pcalloc has + the same interface as ap_palloc, but clears out + the memory it allocates before it returns it. The function + ap_pstrdup takes a resource pool and a char + * as arguments, and allocates memory for a copy of the + string the pointer points to, returning a pointer to the copy. + Finally ap_pstrcat is a varargs-style function, + which takes a pointer to a resource pool, and at least two + char * arguments, the last of which must be + NULL. It allocates enough memory to fit copies of + each of the strings, as a unit; for instance:

    +
    +     ap_pstrcat (r->pool, "foo", "/", "bar", NULL);
    +
    + +

    returns a pointer to 8 bytes worth of memory, initialized to + "foo/bar".

    + +

    Commonly-used pools in + the Apache Web server

    + +

    A pool is really defined by its lifetime more than anything + else. There are some static pools in http_main which are passed + to various non-http_main functions as arguments at opportune + times. Here they are:

    + +
    +
    permanent_pool
    + +
    +
      +
    • never passed to anything else, this is the ancestor + of all pools
    • +
    +
    + +
    pconf
    + +
    +
      +
    • subpool of permanent_pool
    • + +
    • created at the beginning of a config "cycle"; exists + until the server is terminated or restarts; passed to all + config-time routines, either via cmd->pool, or as the + "pool *p" argument on those which don't take pools
    • + +
    • passed to the module init() functions
    • +
    +
    + +
    ptemp
    + +
    +
      +
    • sorry I lie, this pool isn't called this currently in + 1.3, I renamed it this in my pthreads development. I'm + referring to the use of ptrans in the parent... contrast + this with the later definition of ptrans in the + child.
    • + +
    • subpool of permanent_pool
    • + +
    • created at the beginning of a config "cycle"; exists + until the end of config parsing; passed to config-time + routines via cmd->temp_pool. Somewhat of a + "bastard child" because it isn't available everywhere. + Used for temporary scratch space which may be needed by + some config routines but which is deleted at the end of + config.
    • +
    +
    + +
    pchild
    + +
    +
      +
    • subpool of permanent_pool
    • + +
    • created when a child is spawned (or a thread is + created); lives until that child (thread) is + destroyed
    • + +
    • passed to the module child_init functions
    • + +
    • destruction happens right after the child_exit + functions are called... (which may explain why I think + child_exit is redundant and unneeded)
    • +
    +
    + +
    ptrans
    + +
    +
      +
    • should be a subpool of pchild, but currently is a + subpool of permanent_pool, see above
    • + +
    • cleared by the child before going into the accept() + loop to receive a connection
    • + +
    • used as connection->pool
    • +
    +
    + +
    r->pool
    + +
    +
      +
    • for the main request this is a subpool of + connection->pool; for subrequests it is a subpool of + the parent request's pool.
    • + +
    • exists until the end of the request (i.e., + ap_destroy_sub_req, or in child_main after + process_request has finished)
    • + +
    • note that r itself is allocated from r->pool; + i.e., r->pool is first created and then r is + the first thing palloc()d from it
    • +
    +
    +
    + +

    For almost everything folks do, r->pool is the pool to + use. But you can see how other lifetimes, such as pchild, are + useful to some modules... such as modules that need to open a + database connection once per child, and wish to clean it up + when the child dies.

    + +

    You can also see how some bugs have manifested themself, + such as setting connection->user to a value from r->pool + -- in this case connection exists for the lifetime of ptrans, + which is longer than r->pool (especially if r->pool is a + subrequest!). So the correct thing to do is to allocate from + connection->pool.

    + +

    And there was another interesting bug in + mod_include/mod_cgi. You'll see in those that they do this test + to decide if they should use r->pool or r->main->pool. + In this case the resource that they are registering for cleanup + is a child process. If it were registered in r->pool, then + the code would wait() for the child when the subrequest + finishes. With mod_include this could be any old #include, and + the delay can be up to 3 seconds... and happened quite + frequently. Instead the subprocess is registered in + r->main->pool which causes it to be cleaned up when the + entire request is done -- i.e., after the output has + been sent to the client and logging has happened.

    + +

    Tracking open files, + etc.

    + +

    As indicated above, resource pools are also used to track + other sorts of resources besides memory. The most common are + open files. The routine which is typically used for this is + ap_pfopen, which takes a resource pool and two + strings as arguments; the strings are the same as the typical + arguments to fopen, e.g.,

    +
    +     ...
    +     FILE *f = ap_pfopen (r->pool, r->filename, "r");
    +
    +     if (f == NULL) { ... } else { ... }
    +
    + +

    There is also a ap_popenf routine, which + parallels the lower-level open system call. Both + of these routines arrange for the file to be closed when the + resource pool in question is cleared.

    + +

    Unlike the case for memory, there are functions to + close files allocated with ap_pfopen, and + ap_popenf, namely ap_pfclose and + ap_pclosef. (This is because, on many systems, the + number of files which a single process can have open is quite + limited). It is important to use these functions to close files + allocated with ap_pfopen and + ap_popenf, since to do otherwise could cause fatal + errors on systems such as Linux, which react badly if the same + FILE* is closed more than once.

    + +

    (Using the close functions is not mandatory, + since the file will eventually be closed regardless, but you + should consider it in cases where your module is opening, or + could open, a lot of files).

    + +

    Other sorts of resources --- cleanup functions

    + +
    + More text goes here. Describe the the cleanup primitives in + terms of which the file stuff is implemented; also, + spawn_process. +
    + +

    Pool cleanups live until clear_pool() is called: + clear_pool(a) recursively calls destroy_pool() on all subpools + of a; then calls all the cleanups for a; then releases all the + memory for a. destroy_pool(a) calls clear_pool(a) and then + releases the pool structure itself. i.e., + clear_pool(a) doesn't delete a, it just frees up all the + resources and you can start using it again immediately.

    + +

    Fine control --- creating and dealing with sub-pools, with + a note on sub-requests

    + On rare occasions, too-free use of ap_palloc() and + the associated primitives may result in undesirably profligate + resource allocation. You can deal with such a case by creating + a sub-pool, allocating within the sub-pool rather than + the main pool, and clearing or destroying the sub-pool, which + releases the resources which were associated with it. (This + really is a rare situation; the only case in which it + comes up in the standard module set is in case of listing + directories, and then only with very large + directories. Unnecessary use of the primitives discussed here + can hair up your code quite a bit, with very little gain). + +

    The primitive for creating a sub-pool is + ap_make_sub_pool, which takes another pool (the + parent pool) as an argument. When the main pool is cleared, the + sub-pool will be destroyed. The sub-pool may also be cleared or + destroyed at any time, by calling the functions + ap_clear_pool and ap_destroy_pool, + respectively. (The difference is that + ap_clear_pool frees resources associated with the + pool, while ap_destroy_pool also deallocates the + pool itself. In the former case, you can allocate new resources + within the pool, and clear it again, and so forth; in the + latter case, it is simply gone).

    + +

    One final note --- sub-requests have their own resource + pools, which are sub-pools of the resource pool for the main + request. The polite way to reclaim the resources associated + with a sub request which you have allocated (using the + ap_sub_req_... functions) is + ap_destroy_sub_req, which frees the resource pool. + Before calling this function, be sure to copy anything that you + care about which might be allocated in the sub-request's + resource pool into someplace a little less volatile (for + instance, the filename in its request_rec + structure).

    + +

    (Again, under most circumstances, you shouldn't feel obliged + to call this function; only 2K of memory or so are allocated + for a typical sub request, and it will be freed anyway when the + main request pool is cleared. It is only when you are + allocating many, many sub-requests for a single main request + that you should seriously consider the + ap_destroy_... functions).

    + +

    Configuration, commands and + the like

    + One of the design goals for this server was to maintain + external compatibility with the NCSA 1.3 server --- that is, to + read the same configuration files, to process all the + directives therein correctly, and in general to be a drop-in + replacement for NCSA. On the other hand, another design goal + was to move as much of the server's functionality into modules + which have as little as possible to do with the monolithic + server core. The only way to reconcile these goals is to move + the handling of most commands from the central server into the + modules. + +

    However, just giving the modules command tables is not + enough to divorce them completely from the server core. The + server has to remember the commands in order to act on them + later. That involves maintaining data which is private to the + modules, and which can be either per-server, or per-directory. + Most things are per-directory, including in particular access + control and authorization information, but also information on + how to determine file types from suffixes, which can be + modified by AddType and DefaultType + directives, and so forth. In general, the governing philosophy + is that anything which can be made configurable by + directory should be; per-server information is generally used + in the standard set of modules for information like + Aliases and Redirects which come into + play before the request is tied to a particular place in the + underlying file system.

    + +

    Another requirement for emulating the NCSA server is being + able to handle the per-directory configuration files, generally + called .htaccess files, though even in the NCSA + server they can contain directives which have nothing at all to + do with access control. Accordingly, after URI -> filename + translation, but before performing any other phase, the server + walks down the directory hierarchy of the underlying + filesystem, following the translated pathname, to read any + .htaccess files which might be present. The + information which is read in then has to be merged + with the applicable information from the server's own config + files (either from the <Directory> sections + in access.conf, or from defaults in + srm.conf, which actually behaves for most purposes + almost exactly like <Directory />).

    + +

    Finally, after having served a request which involved + reading .htaccess files, we need to discard the + storage allocated for handling them. That is solved the same + way it is solved wherever else similar problems come up, by + tying those structures to the per-transaction resource + pool.

    + +

    Per-directory configuration + structures

    + Let's look out how all of this plays out in + mod_mime.c, which defines the file typing handler + which emulates the NCSA server's behavior of determining file + types from suffixes. What we'll be looking at, here, is the + code which implements the AddType and + AddEncoding commands. These commands can appear in + .htaccess files, so they must be handled in the + module's private per-directory data, which in fact, consists of + two separate tables for MIME types and encoding + information, and is declared as follows: +
    +typedef struct {
    +    table *forced_types;      /* Additional AddTyped stuff */
    +    table *encoding_types;    /* Added with AddEncoding... */
    +} mime_dir_config;
    +
    + When the server is reading a configuration file, or + <Directory> section, which includes one of + the MIME module's commands, it needs to create a + mime_dir_config structure, so those commands have + something to act on. It does this by invoking the function it + finds in the module's `create per-dir config slot', with two + arguments: the name of the directory to which this + configuration information applies (or NULL for + srm.conf), and a pointer to a resource pool in + which the allocation should happen. + +

    (If we are reading a .htaccess file, that + resource pool is the per-request resource pool for the request; + otherwise it is a resource pool which is used for configuration + data, and cleared on restarts. Either way, it is important for + the structure being created to vanish when the pool is cleared, + by registering a cleanup on the pool if necessary).

    + +

    For the MIME module, the per-dir config creation function + just ap_pallocs the structure above, and a creates + a couple of tables to fill it. That looks like + this:

    +
    +void *create_mime_dir_config (pool *p, char *dummy)
    +{
    +    mime_dir_config *new =
    +      (mime_dir_config *) ap_palloc (p, sizeof(mime_dir_config));
    +
    +    new->forced_types = ap_make_table (p, 4);
    +    new->encoding_types = ap_make_table (p, 4);
    +
    +    return new;
    +}
    +
    + Now, suppose we've just read in a .htaccess file. + We already have the per-directory configuration structure for + the next directory up in the hierarchy. If the + .htaccess file we just read in didn't have any + AddType or AddEncoding commands, its + per-directory config structure for the MIME module is still + valid, and we can just use it. Otherwise, we need to merge the + two structures somehow. + +

    To do that, the server invokes the module's per-directory + config merge function, if one is present. That function takes + three arguments: the two structures being merged, and a + resource pool in which to allocate the result. For the MIME + module, all that needs to be done is overlay the tables from + the new per-directory config structure with those from the + parent:

    +
    +void *merge_mime_dir_configs (pool *p, void *parent_dirv, void *subdirv)
    +{
    +    mime_dir_config *parent_dir = (mime_dir_config *)parent_dirv;
    +    mime_dir_config *subdir = (mime_dir_config *)subdirv;
    +    mime_dir_config *new =
    +      (mime_dir_config *)ap_palloc (p, sizeof(mime_dir_config));
    +
    +    new->forced_types = ap_overlay_tables (p, subdir->forced_types,
    +                                        parent_dir->forced_types);
    +    new->encoding_types = ap_overlay_tables (p, subdir->encoding_types,
    +                                          parent_dir->encoding_types);
    +
    +    return new;
    +}
    +
    + As a note --- if there is no per-directory merge function + present, the server will just use the subdirectory's + configuration info, and ignore the parent's. For some modules, + that works just fine (e.g., for the includes module, + whose per-directory configuration information consists solely + of the state of the XBITHACK), and for those + modules, you can just not declare one, and leave the + corresponding structure slot in the module itself + NULL. + +

    Command handling

    + Now that we have these structures, we need to be able to figure + out how to fill them. That involves processing the actual + AddType and AddEncoding commands. To + find commands, the server looks in the module's command + table. That table contains information on how many + arguments the commands take, and in what formats, where it is + permitted, and so forth. That information is sufficient to + allow the server to invoke most command-handling functions with + pre-parsed arguments. Without further ado, let's look at the + AddType command handler, which looks like this + (the AddEncoding command looks basically the same, + and won't be shown here): +
    +char *add_type(cmd_parms *cmd, mime_dir_config *m, char *ct, char *ext)
    +{
    +    if (*ext == '.') ++ext;
    +    ap_table_set (m->forced_types, ext, ct);
    +    return NULL;
    +}
    +
    + This command handler is unusually simple. As you can see, it + takes four arguments, two of which are pre-parsed arguments, + the third being the per-directory configuration structure for + the module in question, and the fourth being a pointer to a + cmd_parms structure. That structure contains a + bunch of arguments which are frequently of use to some, but not + all, commands, including a resource pool (from which memory can + be allocated, and to which cleanups should be tied), and the + (virtual) server being configured, from which the module's + per-server configuration data can be obtained if required. + +

    Another way in which this particular command handler is + unusually simple is that there are no error conditions which it + can encounter. If there were, it could return an error message + instead of NULL; this causes an error to be + printed out on the server's stderr, followed by a + quick exit, if it is in the main config files; for a + .htaccess file, the syntax error is logged in the + server error log (along with an indication of where it came + from), and the request is bounced with a server error response + (HTTP error status, code 500).

    + +

    The MIME module's command table has entries for these + commands, which look like this:

    +
    +command_rec mime_cmds[] = {
    +{ "AddType", add_type, NULL, OR_FILEINFO, TAKE2,
    +    "a mime type followed by a file extension" },
    +{ "AddEncoding", add_encoding, NULL, OR_FILEINFO, TAKE2,
    +    "an encoding (e.g., gzip), followed by a file extension" },
    +{ NULL }
    +};
    +
    + The entries in these tables are: + +
      +
    • The name of the command
    • + +
    • The function which handles it
    • + +
    • a (void *) pointer, which is passed in the + cmd_parms structure to the command handler --- + this is useful in case many similar commands are handled by + the same function.
    • + +
    • A bit mask indicating where the command may appear. There + are mask bits corresponding to each + AllowOverride option, and an additional mask + bit, RSRC_CONF, indicating that the command may + appear in the server's own config files, but not in + any .htaccess file.
    • + +
    • A flag indicating how many arguments the command handler + wants pre-parsed, and how they should be passed in. + TAKE2 indicates two pre-parsed arguments. Other + options are TAKE1, which indicates one + pre-parsed argument, FLAG, which indicates that + the argument should be On or Off, + and is passed in as a boolean flag, RAW_ARGS, + which causes the server to give the command the raw, unparsed + arguments (everything but the command name itself). There is + also ITERATE, which means that the handler looks + the same as TAKE1, but that if multiple + arguments are present, it should be called multiple times, + and finally ITERATE2, which indicates that the + command handler looks like a TAKE2, but if more + arguments are present, then it should be called multiple + times, holding the first argument constant.
    • + +
    • Finally, we have a string which describes the arguments + that should be present. If the arguments in the actual config + file are not as required, this string will be used to help + give a more specific error message. (You can safely leave + this NULL).
    • +
    + Finally, having set this all up, we have to use it. This is + ultimately done in the module's handlers, specifically for its + file-typing handler, which looks more or less like this; note + that the per-directory configuration structure is extracted + from the request_rec's per-directory configuration + vector by using the ap_get_module_config function. + +
    +int find_ct(request_rec *r)
    +{
    +    int i;
    +    char *fn = ap_pstrdup (r->pool, r->filename);
    +    mime_dir_config *conf = (mime_dir_config *)
    +             ap_get_module_config(r->per_dir_config, &mime_module);
    +    char *type;
    +
    +    if (S_ISDIR(r->finfo.st_mode)) {
    +        r->content_type = DIR_MAGIC_TYPE;
    +        return OK;
    +    }
    +
    +    if((i=ap_rind(fn,'.')) < 0) return DECLINED;
    +    ++i;
    +
    +    if ((type = ap_table_get (conf->encoding_types, &fn[i])))
    +    {
    +        r->content_encoding = type;
    +
    +        /* go back to previous extension to try to use it as a type */
    +
    +        fn[i-1] = '\0';
    +        if((i=ap_rind(fn,'.')) < 0) return OK;
    +        ++i;
    +    }
    +
    +    if ((type = ap_table_get (conf->forced_types, &fn[i])))
    +    {
    +        r->content_type = type;
    +    }
    +
    +    return OK;
    +}
    +
    +
    + +

    Side notes --- per-server + configuration, virtual servers, etc.

    + The basic ideas behind per-server module configuration are + basically the same as those for per-directory configuration; + there is a creation function and a merge function, the latter + being invoked where a virtual server has partially overridden + the base server configuration, and a combined structure must be + computed. (As with per-directory configuration, the default if + no merge function is specified, and a module is configured in + some virtual server, is that the base configuration is simply + ignored). + +

    The only substantial difference is that when a command needs + to configure the per-server private module data, it needs to go + to the cmd_parms data to get at it. Here's an + example, from the alias module, which also indicates how a + syntax error can be returned (note that the per-directory + configuration argument to the command handler is declared as a + dummy, since the module doesn't actually have per-directory + config data):

    +
    +char *add_redirect(cmd_parms *cmd, void *dummy, char *f, char *url)
    +{
    +    server_rec *s = cmd->server;
    +    alias_server_conf *conf = (alias_server_conf *)
    +            ap_get_module_config(s->module_config,&alias_module);
    +    alias_entry *new = ap_push_array (conf->redirects);
    +
    +    if (!ap_is_url (url)) return "Redirect to non-URL";
    +
    +    new->fake = f; new->real = url;
    +    return NULL;
    +}
    +
    + + + + diff --git a/htdocs/manual/misc/FAQ-A.html b/htdocs/manual/misc/FAQ-A.html new file mode 100644 index 00000000000..ff0d7e2a479 --- /dev/null +++ b/htdocs/manual/misc/FAQ-A.html @@ -0,0 +1,395 @@ + + + + + + + + + + + + + + + + + + + + + + + + Apache Server Frequently Asked Questions + + + + + + +

    Apache Server Frequently Asked + Questions

    + +

    $Revision: 1.13 $ ($Date: 2002/12/23 02:12:13 $)

    + +

    The latest version of this FAQ is always available from the + main Apache web site, at <http://httpd.apache.org/docs/misc/FAQ.html>.

    + + + + + + + + + + + + + + + + +

    If you are reading a text-only version of this FAQ, you may + find numbers enclosed in brackets (such as "[12]"). These refer + to the list of reference URLs to be found at the end of the + document. These references do not appear, and are not needed, + for the hypertext version.

    + +

    The Questions

    + +
      + + + +
    1. + Background + +
        +
      1. What is Apache?
      2. + +
      3. How and why was Apache + created?
      4. + +
      5. Why the name "Apache"?
      6. + +
      7. OK, so how does Apache compare to + other servers?
      8. + +
      9. How thoroughly tested is + Apache?
      10. + +
      11. What are the future plans for + Apache?
      12. + +
      13. Whom do I contact for + support?
      14. + +
      15. Is there any more information on + Apache?
      16. + +
      17. Where can I get Apache?
      18. + +
      19. May I use the Apache logo on my + product or Web site?
      20. +
      +
    2. + + +
    +
    + +

    The Answers

    + + + +

    A. Background

    + +
      +
    1. + What is + Apache? + +

      The Apache httpd server

      + +
        +
      • is a powerful, flexible, HTTP/1.1 compliant web + server
      • + +
      • implements the latest protocols, including HTTP/1.1 + (RFC2616)
      • + +
      • is highly configurable and extensible with + third-party modules
      • + +
      • can be customised by writing 'modules' using the + Apache module API
      • + +
      • provides full source code and comes with an + unrestrictive license
      • + +
      • runs on Windows NT/9x, Netware 5.x and above, OS/2, and most + versions of Unix, as well as several other operating + systems
      • + +
      • is actively being developed
      • + +
      • encourages user feedback through new ideas, bug + reports and patches
      • + +
      • + implements many frequently requested features, + including:
        +
        + + +
        +
        DBM databases for authentication
        + +
        allows you to easily set up password-protected + pages with enormous numbers of authorized users, + without bogging down the server.
        + +
        Customized responses to errors and problems
        + +
        Allows you to set up files, or even CGI scripts, + which are returned by the server in response to + errors and problems, e.g. setup a script to intercept + 500 Server Errors and perform + on-the-fly diagnostics for both users and + yourself.
        + +
        Multiple DirectoryIndex directives
        + +
        Allows you to say DirectoryIndex index.html + index.cgi, which instructs the server to + either send back index.html or run + index.cgi when a directory URL is + requested, whichever it finds in the directory.
        + +
        Unlimited flexible URL rewriting and + aliasing
        + +
        Apache has no fixed limit on the numbers of + Aliases and Redirects which may be declared in the + config files. In addition, a powerful rewriting + engine can be used to solve most URL manipulation + problems.
        + +
        Content negotiation
        + +
        i.e. the ability to automatically serve clients + of varying sophistication and HTML level compliance, + with documents which offer the best representation of + information that the client is capable of + accepting.
        + +
        Virtual Hosts
        + +
        A much requested feature, sometimes known as + multi-homed servers. This allows the server to + distinguish between requests made to different IP + addresses or names (mapped to the same machine). + Apache also offers dynamically configurable + mass-virtual hosting.
        + +
        Configurable Reliable Piped Logs
        + +
        You can configure Apache to generate logs in the + format that you want. In addition, on most Unix + architectures, Apache can send log files to a pipe, + allowing for log rotation, hit filtering, real-time + splitting of multiple vhosts into separate logs, and + asynchronous DNS resolving on the fly.
        +
        +
      • +
      +
      +
    2. + +
    3. + How and why was Apache + created? + +

      The About + Apache document explains how the Apache project evolved + from its beginnings as an outgrowth of the NCSA httpd + project to its current status as one of the fastest, most + efficient, and most functional web servers in + existence.

      +
      +
    4. + +
    5. + Why the name + "Apache"? + +

      The name 'Apache' was chosen from respect for + the Native American Indian tribe of Apache (Indé), + well-known + for their superior skills in warfare strategy and their + inexhaustible endurance. For more information on the + Apache Nation, we suggest searching + Google, + Northernlight, or + AllTheWeb.

      + +

      Secondarily, and more popularly (though incorrectly) accepted, + it's a considered cute name which stuck. Apache is "A + PAtCHy server". It was based on + some existing code and a series of "patch files".

      + +
      +
    6. + +
    7. + OK, so how does + Apache compare to other servers? + +

      For an independent assessment, see Web + Compare.

      + +

      Apache has been shown to be substantially faster, more + stable, and more feature-full than many other web servers. + Although certain commercial servers have claimed to surpass + Apache's speed (it has not been demonstrated that any of + these "benchmarks" are a good way of measuring WWW server + speed at any rate), we feel that it is better to have a + mostly-fast free server than an extremely-fast server that + costs thousands of dollars. Apache is run on sites that get + millions of hits per day, and they have experienced no + performance difficulties.

      +
      +
    8. + +
    9. + How thoroughly tested + is Apache? + +

      Apache is run on over 6 million Internet servers (as of + February 2000). It has been tested thoroughly by both + developers and users. The Apache Group maintains rigorous + standards before releasing new versions of their server, + and our server runs without a hitch on over one half of all + WWW servers available on the Internet. When bugs do show + up, we release patches and new versions as soon as they are + available.

      +
      +
    10. + +
    11. + What are the future + plans for Apache? + +
        +
      • to continue to be an "open source" no-charge-for-use + HTTP server,
      • + +
      • to keep up with advances in HTTP protocol and web + developments in general,
      • + +
      • to collect suggestions for fixes/improvements from + its users,
      • + +
      • to respond to needs of large volume providers as well + as occasional users.
      • +
      +
      +
    12. + +
    13. + Whom do I contact + for support? + +

      There is no official support for Apache. None of the + developers want to be swamped by a flood of trivial + questions that can be resolved elsewhere. Bug reports and + suggestions should be sent via the bug + report page. Other questions should be directed to the + Apache HTTP + Server Users List or the + comp.infosystems.www.servers.unix + or comp.infosystems.www.servers.ms-windows + newsgroup (as appropriate for the platform you use), where + some of the Apache team lurk, in the company of many other + httpd gurus who should be able to help.

      + +

      Commercial support for Apache is, however, available + from a number of third parties.

      +
      +
    14. + +
    15. + Is there any more + information available on Apache? + +

      Indeed there is. See the main Apache web site. There + is also a regular electronic publication called Apache + Week available. Links to relevant Apache + Week articles are included below where appropriate. + There are also some Apache-specific + books available.

      +
      +
    16. + +
    17. + Where can I get + Apache? + +

      You can find out how to download the source for Apache + at the project's main + web page.

      +
      +
    18. + +
    19. + + +

      You may NOT use any original artwork from the + Apache Software Foundation, nor make or use modified + versions of such artwork, except under the following + conditions:

      + +
        +
      • You may use the 'Powered by Apache' + graphic on a Web site that is being served by the + Apache HTTP server software.
      • + +
      • You may use the aforementioned 'Powered by Apache' + graphic or the + Apache Software Foundation logo in product + description and promotional material IF and ONLY + IF such use can in no way be interpreted as anything + other than an attribution. Using the Apache name and + artwork in a manner that implies endorsement of a product + or service is strictly forbidden.
      • +
      +
      +
    20. +
    + + + + + + + + diff --git a/htdocs/manual/misc/FAQ-B.html b/htdocs/manual/misc/FAQ-B.html new file mode 100644 index 00000000000..2a89938b347 --- /dev/null +++ b/htdocs/manual/misc/FAQ-B.html @@ -0,0 +1,464 @@ + + + + + + + + + + + + + + + + + + + + + + + + Apache Server Frequently Asked Questions + + + + + + +

    Apache Server Frequently Asked + Questions

    + +

    $Revision: 1.14 $ ($Date: 2003/06/07 06:01:40 $)

    + +

    The latest version of this FAQ is always available from the + main Apache web site, at <http://httpd.apache.org/docs/misc/FAQ.html>.

    + + + + + + + + + + + + + + + + +

    If you are reading a text-only version of this FAQ, you may + find numbers enclosed in brackets (such as "[12]"). These refer + to the list of reference URLs to be found at the end of the + document. These references do not appear, and are not needed, + for the hypertext version.

    + +

    The Questions

    + +
      + + + +
    1. + General Technical Questions + +
        +
      1. "Why can't I ...? Why won't ... + work?" What to do in case of problems
      2. + +
      3. How compatible is Apache with + my existing NCSA 1.3 setup?
      4. + +
      5. Is Apache Year 2000 + compliant?
      6. + +
      7. How do I submit a patch to + the Apache Group?
      8. + +
      9. Why has Apache stolen my + favourite site's Internet address?
      10. + +
      11. Why am I getting spam mail from the + Apache site?
      12. + +
      13. May I include the Apache software + on a CD or other package I'm distributing?
      14. + +
      15. What's the best hardware/operating + system/... How do I get the most out of my Apache Web + server?
      16. + +
      17. What are "regular + expressions"?
      18. + +
      19. Why isn't there a binary for my + platform?
      20. +
      +
    2. + + +
    +
    + +

    The Answers

    + + + +

    B. General Technical Questions

    + +
      +
    1. + "Why can't I ...? + Why won't ... work?" What to do in case of + problems + +

      If you are having trouble with your Apache server + software, you should take the following steps:

      + +
        +
      1. + Check the errorlog! + +

        Apache tries to be helpful when it encounters a + problem. In many cases, it will provide some details by + writing one or messages to the server error log. + Sometimes this is enough for you to diagnose & fix + the problem yourself (such as file permissions or the + like). The default location of the error log is + /usr/local/apache/logs/error_log, but see + the ErrorLog + directive in your config files for the location on your + server.

        +
      2. + +
      3. + Check the FAQ! + + +

        The latest version of the Apache Frequently-Asked + Questions list can always be found at the main Apache + web site.

        +
      4. + +
      5. + Check the Apache bug database + +

        Most problems that get reported to The Apache Group + are recorded in the bug database. + Please check the existing reports, + open and closed, before adding + one. If you find that your issue has already been + reported, please don't add a "me, too" report. + If the original report isn't closed yet, we suggest + that you check it periodically. You might also consider + contacting the original submitter, because there may be + an email exchange going on about the issue that isn't + getting recorded in the database.

        +
      6. + +
      7. + Ask in a user support group. + +

        A lot of common problems never make it to the bug + database because there's already high Q&A traffic + about them in the Users + mailing list or comp.infosystems.www.servers.unix + and related newsgroups. These newsgroups are also + available via + Google. Many Apache users, and some of the developers, + can be found roaming their virtual halls, so it is suggested + that you seek wisdom there. The chances are good that + you'll get a faster answer there than from the bug + database, even if you don't see your question + already posted.

        +
      8. + +
      9. + If all else fails, report the problem in the + bug database + +

        If you've gone through those steps above that are + appropriate and have obtained no relief, then please + do let The Apache Group know about the problem + by logging + a bug report.

        + +

        If your problem involves the server crashing and + generating a core dump, please include a backtrace (if + possible). As an example,

        + +
        +
        # cd ServerRoot
        + # dbx httpd core
        + (dbx) where
        +
        + +

        (Substitute the appropriate locations for your + ServerRoot and your httpd and + core files. You may have to use + gdb instead of dbx.)

        +
      10. +
      +
      +
    2. + +
    3. + How compatible + is Apache with my existing NCSA 1.3 setup? + +

      Apache attempts to offer all the features and + configuration options of NCSA httpd 1.3, as well as many of + the additional features found in NCSA httpd 1.4 and NCSA + httpd 1.5.

      + +

      NCSA httpd appears to be moving toward adding + experimental features which are not generally required at + the moment. Some of the experiments will succeed while + others will inevitably be dropped. The Apache philosophy is + to add what's needed as and when it is needed.

      + +

      Friendly interaction between Apache and NCSA developers + should ensure that fundamental feature enhancements stay + consistent between the two servers for the foreseeable + future.

      +
      +
    4. + +
    5. + Is Apache Year + 2000 compliant? + +

      Yes, Apache is Year 2000 compliant.

      + +

      Apache internally never stores years as two digits. On + the HTTP protocol level RFC1123-style addresses are + generated which is the only format a HTTP/1.1-compliant + server should generate. To be compatible with older + applications Apache recognizes ANSI C's + asctime() and RFC850-/RFC1036-style date + formats, too. The asctime() format uses + four-digit years, but the RFC850 and RFC1036 date formats + only define a two-digit year. If Apache sees such a date + with a value less than 70 it assumes that the century is + 20 rather than 19.

      + +

      Although Apache is Year 2000 compliant, you may still + get problems if the underlying OS has problems with dates + past year 2000 (e.g., OS calls which accept or + return year numbers). Most (UNIX) systems store dates + internally as signed 32-bit integers which contain the + number of seconds since 1st January 1970, so the + magic boundary to worry about is the year 2038 and not + 2000. But modern operating systems shouldn't cause any + trouble at all.

      + +

      Users of Apache 1.2.x should upgrade to a current + version of Apache 1.3 (see year-2000 improvements + in Apache 1.3 for details).

      + +

      The Apache HTTP Server project is an open-source + software product of the Apache Software Foundation. The + project and the Foundation cannot offer legal + assurances regarding any suitability of the software for + your application. There are several commercial Apache + support organizations and derivative server products + available that may be able to stand behind the software and + provide you with any assurances you may require. You may + find links to some of these vendors at <http://www.apache.org/info/support.cgi>.

      + +

      The Apache HTTP server software is distributed with the + following disclaimer, found in the software license:

      +
      +   THIS SOFTWARE IS PROVIDED BY THE APACHE GROUP ``AS IS'' AND ANY
      +   EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
      +   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
      +   PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE APACHE GROUP OR
      +   ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
      +   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
      +   NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
      +   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
      +   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
      +   STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
      +   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
      +   OF THE POSSIBILITY OF SUCH DAMAGE.
      + 
      +
      +
      +
    6. + +
    7. + How do I + submit a patch to the Apache Group? + +

      The Apache Group encourages patches from outside + developers. There are 2 main "types" of patches: small + bugfixes and general improvements. Bugfixes should be + submitting using the Apache bug report + page. Improvements, modifications, and additions should + follow the instructions below.

      + +

      In general, the first course of action is to be a member + of the dev@httpd.apache.org mailing list. This + indicates to the Group that you are closely following the + latest Apache developments. Your patch file should be + generated using either 'diff -c' or + 'diff -u' against the latest CVS tree. To + submit your patch, send email to + dev@httpd.apache.org with a + Subject: line that starts with + [PATCH] and includes a general description of + the patch. In the body of the message, the patch should be + clearly described and then included at the end of the + message. If the patch-file is long, you can note a URL to + the file instead of the file itself. Use of MIME + enclosures/attachments should be avoided.

      + +

      Be prepared to respond to any questions about your + patches and possibly defend your code. If your patch + results in a lot of discussion, you may be asked to submit + an updated patch that incorporates all changes and + suggestions.

      +
      +
    8. + +
    9. + Why has Apache + stolen my favourite site's Internet address? + +

      The simple answer is: "It hasn't." This misconception is + usually caused by the site in question having migrated to + the Apache Web server software, but not having migrated the + site's content yet. When Apache is installed, the default + page that gets installed tells the Webmaster the + installation was successful. The expectation is that this + default page will be replaced with the site's real content. + If it doesn't, complain to the Webmaster, not to the Apache + project -- we just make the software and aren't responsible + for what people do (or don't do) with it.

      +
      +
    10. + +
    11. + Why am I getting spam + mail from the Apache site? + +

      The short answer is: "You aren't." Usually when someone + thinks the Apache site is originating spam, it's because + they've traced the spam to a Web site, and the Web site + says it's using Apache. See the previous FAQ entry for more details + on this phenomenon.

      + +

      No marketing spam originates from the Apache site. The + only mail that comes from the site goes only to addresses + that have been requested to receive the mail.

      +
      +
    12. + +
    13. + May I include the + Apache software on a CD or other package I'm + distributing? + +

      The detailed answer to this question can be found in the + Apache license, which is included in the Apache + distribution in the file LICENSE. You can also + find it on the Web at <http://www.apache.org/LICENSE.txt>.

      +
      +
    14. + +
    15. + What's the best + hardware/operating system/... How do I get the most out of + my Apache Web server? + +

      Check out Dean Gaudet's performance tuning page.

      +
      +
    16. + +
    17. + What are "regular + expressions"? + +

      Regular expressions are a way of describing a pattern - + for example, "all the words that begin with the letter A" + or "every 10-digit phone number" or even "Every sentence + with two commas in it, and no capital letter Q". Regular + expressions (aka "regex"s) are useful in Apache because + they let you apply certain attributes against collections + of files or resources in very flexible ways - for example, + all .gif and .jpg files under any "images" directory could + be written as /\/images\/.*(jpg|gif)$/.

      + +

      The best overview around is probably the one which comes + with Perl. We implement a simple subset of Perl's regex + support, but it's still a good way to learn what they mean. + You can start by going to the CPAN + page on regular expressions, and branching out from + there.


      +
    18. + +
    19. + Why isn't there a + binary for my platform? + +

      The developers make sure that the software builds and + works correctly on the platforms available to them; this + does not necessarily mean that your platform + is one of them. In addition, the Apache HTTP server project + is primarily source oriented, meaning that distributing + valid and buildable source code is the purpose of a + release, not making sure that there is a binary package for + all of the supported platforms.

      + +

      If you don't see a kit for your platform listed in the + binary distribution area (<URL:http://httpd.apache.org/dist/httpd/binaries/>), + it means either that the platform isn't available to any of + the developers, or that they just haven't gotten around to + preparing a binary for it. As this is a voluntary project, + they are under no obligation to do so. Users are encouraged + and expected to build the software themselves.

      + +

      The sole exception to these practices is the Windows + package. Unlike most Unix and Unix-like platforms, Windows + systems do not come with a bundled software development + environment, so we do prepare binary kits for + Windows when we make a release. Again, however, it's a + voluntary thing and only a limited number of the developers + have the capability to build the InstallShield package, so + the Windows release may lag somewhat behind the source + release. This lag should be no more than a few days at + most.

      +
      +
    20. +
    + + + + + + + + diff --git a/htdocs/manual/misc/FAQ-C.html b/htdocs/manual/misc/FAQ-C.html new file mode 100644 index 00000000000..56ef2852b32 --- /dev/null +++ b/htdocs/manual/misc/FAQ-C.html @@ -0,0 +1,276 @@ + + + + + + + + + + + + + + + + + + + + + + + + Apache Server Frequently Asked Questions + + + + + + +

    Apache Server Frequently Asked + Questions

    + +

    $Revision: 1.3 $ ($Date: 2001/10/08 01:26:54 $)

    + +

    The latest version of this FAQ is always available from the + main Apache web site, at <http://httpd.apache.org/docs/misc/FAQ.html>.

    + + + + + + + + + + + + + + + + +

    If you are reading a text-only version of this FAQ, you may + find numbers enclosed in brackets (such as "[12]"). These refer + to the list of reference URLs to be found at the end of the + document. These references do not appear, and are not needed, + for the hypertext version.

    + +

    The Questions

    + +
      + + + +
    1. + Building Apache + +
        +
      1. Why do I get an error about an + undefined reference to "__inet_ntoa" or + other __inet_* symbols?
      2. + +
      3. Why won't Apache compile with my + system's cc?
      4. + +
      5. Why do I get complaints about + redefinition of "struct iovec" when + compiling under Linux?
      6. + +
      7. I'm using gcc and I get some + compilation errors, what is wrong?
      8. + +
      9. I'm using RedHat Linux 5.0, or + some other glibc-based Linux system, and I + get errors with the crypt function when I + attempt to build Apache 1.2.
      10. +
      +
    2. + + +
    +
    + +

    The Answers

    + + + +

    C. Building Apache

    + +
      +
    1. + Why do I get an + error about an undefined reference to + "__inet_ntoa" or other __inet_* + symbols? + +

      If you have installed BIND-8 then this is + normally due to a conflict between your include files and + your libraries. BIND-8 installs its include files and + libraries /usr/local/include/ and + /usr/local/lib/, while the resolver that comes + with your system is probably installed in + /usr/include/ and /usr/lib/. If + your system uses the header files in + /usr/local/include/ before those in + /usr/include/ but you do not use the new + resolver library, then the two versions will conflict.

      + +

      To resolve this, you can either make sure you use the + include files and libraries that came with your system or + make sure to use the new include files and libraries. + Adding -lbind to the + EXTRA_LDFLAGS line in your + Configuration file, then re-running + Configure, should resolve the problem. (Apache + versions 1.2.* and earlier use EXTRA_LFLAGS + instead.)

      + +

      Note:As of BIND 8.1.1, the bind + libraries and files are installed under + /usr/local/bind by default, so you should not + run into this problem. Should you want to use the bind + resolvers you'll have to add the following to the + respective lines:

      + +
      +
      EXTRA_CFLAGS=-I/usr/local/bind/include
      + EXTRA_LDFLAGS=-L/usr/local/bind/lib
      + EXTRA_LIBS=-lbind
      +
      +
      +
    2. + +
    3. + Why won't Apache + compile with my system's cc? + +

      If the server won't compile on your system, it is + probably due to one of the following causes:

      + +
        +
      • The Configure script doesn't + recognize your system environment.
        + This might be either because it's completely unknown or + because the specific environment (include files, OS + version, et cetera) isn't explicitly handled. If + this happens, you may need to port the server to your OS + yourself.
      • + +
      • Your system's C compiler is + garbage.
        + Some operating systems include a default C compiler that + is either not ANSI C-compliant or suffers from other + deficiencies. The usual recommendation in cases like this + is to acquire, install, and use gcc.
      • + +
      • Your include files may be + confused.
        + In some cases, we have found that a compiler + installation or system upgrade has left the C header + files in an inconsistent state. Make sure that your + include directory tree is in sync with the compiler and + the operating system.
      • + +
      • Your operating system or compiler may be out + of revision.
        + Software vendors (including those that develop operating + systems) issue new releases for a reason; sometimes to + add functionality, but more often to fix bugs that have + been discovered. Try upgrading your compiler and/or your + operating system.
      • +
      + +

      The Apache Group tests the ability to build the server + on many different platforms. Unfortunately, we can't test + all of the OS platforms there are. If you have verified + that none of the above issues is the cause of your problem, + and it hasn't been reported before, please submit a problem + report. Be sure to include complete details, + such as the compiler & OS versions and exact error + messages.

      +
      +
    4. + +
    5. + Why do I get + complaints about redefinition of "struct + iovec" when compiling under Linux? + +

      This is a conflict between your C library includes and + your kernel includes. You need to make sure that the + versions of both are matched properly. There are two + workarounds, either one will solve the problem:

      + +
        +
      • Remove the definition of struct iovec + from your C library includes. It is located in + /usr/include/sys/uio.h. + Or,
      • + +
      • Add -DNO_WRITEV to the + EXTRA_CFLAGS line in your + Configuration and reconfigure/rebuild. This + hurts performance and should only be used as a last + resort.
      • +
      +
      +
    6. + +
    7. + I'm using gcc + and I get some compilation errors, what is + wrong? + +

      GCC parses your system header files and produces a + modified subset which it uses for compiling. This behavior + ties GCC tightly to the version of your operating system. + So, for example, if you were running IRIX 5.3 when you + built GCC and then upgrade to IRIX 6.2 later, you will have + to rebuild GCC. Similarly for Solaris 2.4, 2.5, or 2.5.1 + when you upgrade to 2.6. Sometimes you can type "gcc -v" + and it will tell you the version of the operating system it + was built against.

      + +

      If you fail to do this, then it is very likely that + Apache will fail to build. One of the most common errors is + with readv, writev, or + uio.h. This is not a bug with + Apache. You will need to re-install GCC.

      +
      +
    8. + +
    9. + I'm using + RedHat Linux 5.0, or some other glibc-based + Linux system, and I get errors with the crypt + function when I attempt to build Apache 1.2. + +

      glibc puts the crypt function + into a separate library. Edit your + src/Configuration file and set this:

      + +
      +
      EXTRA_LIBS=-lcrypt
      +
      + +

      Then re-run src/Configure and re-execute + the make.

      +
      +
    10. +
    + + + + + + + + diff --git a/htdocs/manual/misc/FAQ-D.html b/htdocs/manual/misc/FAQ-D.html new file mode 100644 index 00000000000..1c768f27fdf --- /dev/null +++ b/htdocs/manual/misc/FAQ-D.html @@ -0,0 +1,569 @@ + + + + + + + + + + + + + + + + + + + + + + + + Apache Server Frequently Asked Questions + + + + + + +

    Apache Server Frequently Asked + Questions

    + +

    $Revision: 1.21 $ ($Date: 2003/07/01 22:42:13 $)

    + +

    The latest version of this FAQ is always available from the + main Apache web site, at <http://httpd.apache.org/docs/misc/FAQ.html>.

    + + + + + + + + + + + + + + + + +

    If you are reading a text-only version of this FAQ, you may + find numbers enclosed in brackets (such as "[12]"). These refer + to the list of reference URLs to be found at the end of the + document. These references do not appear, and are not needed, + for the hypertext version.

    + +

    The Questions

    + +
      + + + +
    1. + Error Log Messages and Problems Starting + Apache + +
        +
      1. Why do I get "setgid: Invalid + argument" at startup?
      2. + +
      3. Why am I getting "httpd: + could not set socket option TCP_NODELAY" in my + error log?
      4. + +
      5. Why am I getting + "connection reset by peer" in my error + log?
      6. + +
      7. The errorlog says Apache + dumped core, but where's the dump file?
      8. + +
      9. When I run it under Linux I + get "shmget: function not found", what should I + do?
      10. + +
      11. Server hangs, or fails to + start, and/or error log fills with "fcntl: + F_SETLKW: No record locks available" or similar + messages
      12. + +
      13. Why am I getting "Expected + </Directory> but saw </Directory>" + when I try to start Apache?
      14. + +
      15. I'm using RedHat Linux and I have + problems with httpd dying randomly or not restarting + properly
      16. + +
      17. I upgraded from an Apache version + earlier than 1.2.0 and suddenly I have problems with + Apache dying randomly or not restarting properly
      18. + +
      19. When I try to start Apache + from a DOS window, I get a message like "Cannot + determine host name. Use ServerName directive to set it + manually." What does this mean?
      20. + +
      21. When I try to start Apache for + Windows, I get a message like "Unable To Locate + WS2_32.DLL...". What should I do?
      22. + +
      23. Apache for Windows does + not start. Error log contains this message "[crit] + (10045) The attempted operation is not supported for the + type of object referenced: Parent: WSADuplicateSocket + failed for socket ###". What does this + mean?
      24. + +
      25. When I try to start Apache on + Windows, I get a message like "System error 1067 + has occurred. The process terminated + unexpectedly." What does this mean?
      26. + +
      27. On a SuSE Linux system, I try and + configure access control using basic authentication. + Although I follow the example exactly, authentication + fails, and an error message "admin: not a valid + FDN: ...." is logged.
      28. + +
      29. Why do I have weird entries in my + logs asking for default.ida and + cmd.exe?
      30. + +
      31. Why am I getting server restart + messages periodically, when I did not restart the + server?
      32. + +
      33. Why am I getting "module + module-name is not compatible with this version of + Apache" messages in my error log?
      34. + +
      +
    2. + + +
    +
    + +

    The Answers

    + + + +

    D. Error Log Messages and Problems Starting Apache

    + +
      +
    1. + Why do I get + "setgid: Invalid argument" at + startup? + +

      Your Group + directive (probably in conf/httpd.conf) needs + to name a group that actually exists in the + /etc/group file (or your system's equivalent). + This problem is also frequently seen when a negative number + is used in the Group directive (e.g., + "Group #-1"). Using a group name -- not + group number -- found in your system's group database + should solve this problem in all cases.

      +
      +
    2. + +
    3. + Why am I getting + "httpd: could not set socket option + TCP_NODELAY" in my error log? + +

      This message almost always indicates that the client + disconnected before Apache reached the point of calling + setsockopt() for the connection. It shouldn't + occur for more than about 1% of the requests your server + handles, and it's advisory only in any case.

      +
      +
    4. + +
    5. + Why am I getting + "connection reset by peer" in my error + log? + +

      This is a normal message and nothing about which to be + alarmed. It simply means that the client canceled the + connection before it had been completely set up - such as + by the end-user pressing the "Stop" button. People's + patience being what it is, sites with response-time + problems or slow network links may experience this more + than high capacity ones or those with large pipes to the + network.

      +
      +
    6. + +
    7. + The + errorlog says Apache dumped core, but where's the dump + file? + +

      In Apache version 1.2, the error log message about + dumped core includes the directory where the dump file + should be located. However, many Unixes do not allow a + process that has called setuid() to dump core + for security reasons; the typical Apache setup has the + server started as root to bind to port 80, after which it + changes UIDs to a non-privileged user to serve + requests.

      + +

      Dealing with this is extremely operating + system-specific, and may require rebuilding your system + kernel. Consult your operating system documentation or + vendor for more information about whether your system does + this and how to bypass it. If there is a + documented way of bypassing it, it is recommended that you + bypass it only for the httpd server process if + possible.

      + +

      The canonical location for Apache's core-dump files is + the ServerRoot + directory. As of Apache version 1.3, the location can be + set via the CoreDumpDirectory + directive to a different directory. Make sure that this + directory is writable by the user the server runs as (as + opposed to the user the server is started as).

      +
      +
    8. + +
    9. + When I run + it under Linux I get "shmget: function not found", what + should I do? + +

      Your kernel has been built without SysV IPC support. You + will have to rebuild the kernel with that support enabled + (it's under the "General Setup" submenu). Documentation for + kernel building is beyond the scope of this FAQ; you should + consult the + Kernel HOWTO, or the documentation provided with your + distribution, or a + Linux newsgroup/mailing list. As a last-resort + workaround, you can comment out the + #define USE_SHMGET_SCOREBOARD definition + in the LINUX section of + src/conf.h and rebuild the server (prior to + 1.3b4, simply removing + #define HAVE_SHMGET would have sufficed). + This will produce a server which is slower and less + reliable.

      +
      +
    10. + +
    11. + Server hangs, + or fails to start, and/or error log fills with + "fcntl: F_SETLKW: No record locks available" + or similar messages + +

      These are symptoms of a fine locking problem, which + usually means that the server is trying to use a + synchronization file on an NFS filesystem.

      + +

      Because of its parallel-operation model, the Apache Web + server needs to provide some form of synchronization when + accessing certain resources. One of these synchronization + methods involves taking out locks on a file, which means + that the filesystem whereon the lockfile resides must + support locking. In many cases this means it can't + be kept on an NFS-mounted filesystem.

      + +

      To cause the Web server to work around the NFS locking + limitations, include a line such as the following in your + server configuration files:

      + +
      +
      LockFile /var/run/apache-lock
      +
      + +

      The directory should not be generally writable + (e.g., don't use /var/tmp). See the + LockFile + documentation for more information.

      +
      +
    12. + +
    13. + Why am I getting + "Expected </Directory> but saw + </Directory>" when I try to start + Apache? + +

      This is a known problem with certain versions of the AIX + C compiler. IBM are working on a solution, and the issue is + being tracked by problem + report #2312.

      +
      +
    14. + +
    15. + I'm using RedHat Linux + and I have problems with httpd dying randomly or not + restarting properly + +

      RedHat Linux versions 4.x (and possibly earlier) RPMs + contain various nasty scripts which do not stop or restart + Apache properly. These can affect you even if you're not + running the RedHat supplied RPMs.

      + +

      If you're using the default install then you're probably + running Apache 1.1.3, which is outdated. From RedHat's ftp + site you can pick up a more recent RPM for Apache 1.2.x. + This will solve one of the problems.

      + +

      If you're using a custom built Apache rather than the + RedHat RPMs then you should rpm -e apache. In + particular you want the mildly broken + /etc/logrotate.d/apache script to be removed, + and you want the broken /etc/rc.d/init.d/httpd + (or httpd.init) script to be removed. The + latter is actually fixed by the apache-1.2.5 RPMs but if + you're building your own Apache then you probably don't + want the RedHat files.

      + +

      We can't stress enough how important it is for folks, + especially vendors to follow the stopping Apache directions + given in our documentation. In RedHat's defense, the broken + scripts were necessary with Apache 1.1.x because the Linux + support in 1.1.x was very poor, and there were various race + conditions on all platforms. None of this should be + necessary with Apache 1.2 and later.

      +
      +
    16. + +
    17. + I upgraded from an + Apache version earlier than 1.2.0 and suddenly I have + problems with Apache dying randomly or not restarting + properly + +

      You should read the previous note + about problems with RedHat installations. It is entirely + likely that your installation has start/stop/restart + scripts which were built for an earlier version of Apache. + Versions earlier than 1.2.0 had various race conditions + that made it necessary to use kill -9 at times + to take out all the httpd servers. But that should not be + necessary any longer. You should follow the directions on how to stop and + restart Apache.

      + +

      As of Apache 1.3 there is a script + src/support/apachectl which, after a bit of + customization, is suitable for starting, stopping, and + restarting your server.

      +
      +
    18. + +
    19. + When I try to + start Apache from a DOS window, I get a message like + "Cannot determine host name. Use ServerName directive + to set it manually." What does this mean? + +

      It means what it says; the Apache software can't + determine the hostname of your system. Edit your + conf\httpd.conf file, look for the string + "ServerName", and make sure there's an uncommented + directive such as

      + +
      +
      ServerName localhost
      +
      + +

      or

      + +
      +
      ServerName www.foo.com
      +
      + +

      in the file. Correct it if there one there with wrong + information, or add one if you don't already have one.

      + +

      Also, make sure that your Windows system has DNS + enabled. See the TCP/IP setup component of the Networking + or Internet Options control panel.

      + +

      After verifying that DNS is enabled and that you have a + valid hostname in your ServerName directive, + try to start the server again.

      +
      +
    20. + +
    21. + When I try to start + Apache for Windows, I get a message like "Unable To + Locate WS2_32.DLL...". What should I do? + +

      Short answer: You need to install Winsock 2, available + from http://www.microsoft.com/windows95/downloads/

      + +

      Detailed answer: Prior to version 1.3.9, Apache for + Windows used Winsock 1.1. Beginning with version 1.3.9, + Apache began using Winsock 2 features (specifically, + WSADuplicateSocket()). WS2_32.DLL implements the Winsock 2 + API. Winsock 2 ships with Windows NT 4.0 and Windows 98. + Some of the earlier releases of Windows 95 did not include + Winsock 2.

      +
      +
    22. + +
    23. + Apache for Windows does not + start. Error log contains this message: "[crit] + (10045) The attempted operation is not supported for the + type of object referenced: Parent: WSADuplicateSocket + failed for socket ###". What does this mean? + + +

      We have seen this problem when Apache is run on systems + along with Virtual Private Networking clients like Aventail + Connect. Aventail Connect is a Layered Service Provider + (LSP) that inserts itself, as a "shim," between the Winsock + 2 API and Window's native Winsock 2 implementation. The + Aventail Connect shim does not implement + WSADuplicateSocket, which is the cause of the failure.

      + +

      The shim is not unloaded when Aventail Connect is shut + down. Once observed, the problem persists until the shim is + either explicitly unloaded or the machine is rebooted. + Another potential solution (not tested) is to add + apache.exe to the Aventail "Connect Exclusion + List".

      + +

      Apache is affected in a similar way by any + firewall program that isn't correctly configured. Assure + you exclude your Apache server ports (usually port 80) from + the list of ports to block. Refer to your firewall + program's documentation for the how-to.

      +
      +
    24. + +
    25. + When I try to start + Apache on Windows, I get a message like "System error + 1067 has occurred. The process terminated + unexpectedly." What does this mean? + +

      This message means that the Web server was unable to + start correctly for one reason or another. To find out why, + execute the following commands in a DOS window:

      +
      +    c:
      +    cd "\Program Files\Apache Group\Apache"
      +    apache
      + 
      +
      + +

      (If you don't get the prompt back, hit Control-C to + cause Apache to exit.)

      + +

      The error you see will probably be one of those + preceding this question in the FAQ.

      + +

      As of Apache 1.3.14, first check the Windows NT Event + Log for Application errors using the Windows NT/2000 Event + Viewer program. Any errors that occur prior to opening the + Apache error log will be stored here, if Apache is run as a + Service on NT or 2000. As with any error, also check your + Apache error log.

      +
      +
    26. + +
    27. On a SuSE Linux system, I try and + configure access control using basic authentication. + Although I follow the example exactly, authentication + fails, and an error message "admin: not a valid + FDN: ...." is logged. + +

      + In the SuSE distribution, additional 3rd party authentication + modules have been added and activated by default. These modules + interfere with the Apache standard modules and cause Basic + authentication to fail. Our recommendation is to comment all + those modules in /etc/httpd/suse_addmodule.conf + and /etc/httpd/suse_loadmodule.conf which are not + actually required for running your server. +


      +
    28. + +
    29. Why do I have weird entries in my + logs asking for default.ida and + cmd.exe? + +

      The host requesting pages from your website and creating + those entries is a Windows machine running IIS that has been + infected by an Internet worm such as Nimda or Code Red. You + can safely ignore these error messages as they do not affect + Apache. ApacheWeek has an article + with more information.


      +
    30. + +
    31. Why am I getting server restart + messages periodically, when I did not restart the server? + +

      Problem: You are noticing restart messages in your error log, + periodically, when you know you did not restart the server + yourself:

      + +
      +[Thu Jun  6 04:02:01 2002] [notice] SIGHUP received.  Attempting to restart
      +[Thu Jun  6 04:02:02 2002] [notice] Apache configured -- resuming normal operations
      +
      + +

      Check your cron jobs to see when/if your server logs are being + rotated. Compare the time of rotation to the error message time. + If they are the same, you can somewhat safely assume that the + restart is due to your server logs being rotated.


      +
    32. + +
    33. Why am I getting + "module module-name is not compatible with this version + of Apache" messages in my error log? + +

      Module Magic Number (MMN) is a constant defined in Apache + source that is associated with binary compatibility of + modules. It is changed when internal Apache structures, + function calls and other significant parts of API change in + such a way that binary compatibility cannot be guaranteed any + more. On MMN change, all third party modules have to be at + least recompiled, sometimes even slightly changed in order + to work with the new version of Apache.

      + +

      If you're getting the above error messages, contact the + vendor of the module for the new binary, or compile it if + you have access to the source code.


      +
    34. + +
    + + + + + + + + diff --git a/htdocs/manual/misc/FAQ-E.html b/htdocs/manual/misc/FAQ-E.html new file mode 100644 index 00000000000..19b44f3deb8 --- /dev/null +++ b/htdocs/manual/misc/FAQ-E.html @@ -0,0 +1,972 @@ + + + + + + + + + + + + + + + + + + + + + + + + Apache Server Frequently Asked Questions + + + + + + +

    Apache Server Frequently Asked + Questions

    + +

    $Revision: 1.26 $ ($Date: 2004/03/16 17:48:46 $)

    + +

    The latest version of this FAQ is always available from the + main Apache web site, at <http://httpd.apache.org/docs/misc/FAQ.html>.

    + + + + + + + + + + + + + + + + +

    If you are reading a text-only version of this FAQ, you may + find numbers enclosed in brackets (such as "[12]"). These refer + to the list of reference URLs to be found at the end of the + document. These references do not appear, and are not needed, + for the hypertext version.

    + +

    The Questions

    + +
      + + + +
    1. + Configuration Questions + +
        +
      1. Why can't I run more than + <n> virtual hosts?
      2. + +
      3. Can I increase + FD_SETSIZE on FreeBSD?
      4. + +
      5. Why doesn't my + ErrorDocument 401 work?
      6. + +
      7. Why does Apache send a cookie on + every response?
      8. + +
      9. Why don't my cookies work, I even + compiled in mod_cookies?
      10. + +
      11. Why do my Java app[let]s + give me plain text when I request an URL from an Apache + server?
      12. + +
      13. How do I get Apache to send a MIDI + file so the browser can play it?
      14. + +
      15. How do I add browsers and referrers + to my logs?
      16. + +
      17. Why does accessing + directories only work when I include the trailing "/" + (e.g.http://foo.domain.com/~user/) + but not when I omit it + (e.g.http://foo.domain.com/~user)?
      18. + +
      19. Why doesn't mod_info + list any directives?
      20. + +
      21. I upgraded to Apache 1.3 and now + my virtual hosts don't work!
      22. + +
      23. I'm using RedHat Linux and my + .htm files are showing up as HTML source rather than + being formatted!
      24. + +
      25. My .htaccess + files are being ignored.
      26. + +
      27. Why do I get a + "Forbidden" message whenever I try to access + a particular directory?
      28. + +
      29. Why do I get a + "Forbidden/You don't have permission to access / on + this server" message whenever I try to access my + server?
      30. + +
      31. Why do my files appear + correctly in Internet Explorer, but show up as source or + trigger a save window with Netscape; or, Why doesn't + Internet Explorer render my text/plain document + correctly?
      32. + +
      33. My site is accessible + under many different hostnames; how do I redirect clients + so that they see only a single name?
      34. + +
      35. Why can I access my website from the + server or from my local network, but I can't access it from + elsewhere on the Internet?
      36. + +
      37. How do I turn automatic directory listings + on or off?
      38. + +
      39. Why do my Options directives not have + the desired effect?
      40. + +
      41. How can I change the information + that Apache returns about itself in the headers?
      42. + +
      43. Why do I see requests for other sites + appearing in my log files?
      44. + +
      +
    2. + + +
    +
    + +

    The Answers

    + + + +

    E. Configuration Questions

    + +
      +
    1. + Why can't I run more + than <n> virtual hosts? + +

      You are probably running into resource limitations in + your operating system. The most common limitation is the + per-process limit on file + descriptors, which is almost always the cause of + problems seen when adding virtual hosts. Apache often does + not give an intuitive error message because it is normally + some library routine (such as gethostbyname()) + which needs file descriptors and doesn't complain + intelligibly when it can't get them.

      + +

      Each log file requires a file descriptor, which means + that if you are using separate access and error logs for + each virtual host, each virtual host needs two file + descriptors. Each Listen + directive also needs a file descriptor.

      + +

      Typical values for <n> that we've seen + are in the neighborhood of 128 or 250. When the server + bumps into the file descriptor limit, it may dump core with + a SIGSEGV, it might just hang, or it may limp along and + you'll see (possibly meaningful) errors in the error log. + One common problem that occurs when you run into a file + descriptor limit is that CGI scripts stop being executed + properly.

      + +

      As to what you can do about this:

      + +
        +
      1. Reduce the number of Listen + directives. If there are no other servers running on the + machine on the same port then you normally don't need any + Listen directives at all. By default Apache listens to + all addresses on port 80.
      2. + +
      3. Reduce the number of log files. You can use mod_log_config + to log all requests to a single log file while including + the name of the virtual host in the log file. You can + then write a script to split the logfile into separate + files later if necessary. Such a script is provided with + the Apache 1.3 distribution in the + src/support/split-logfile file.
      4. + +
      5. + Increase the number of file descriptors available to + the server (see your system's documentation on the + limit or ulimit commands). + For some systems, information on how to do this is + available in the performance + hints page. There is a specific note for FreeBSD below. + +

        For Windows 95, try modifying your + C:\CONFIG.SYS file to include a line + like

        + +
        +
        FILES=300
        +
        + +

        Remember that you'll need to reboot your Windows 95 + system in order for the new value to take effect.

        +
      6. + +
      7. "Don't do that" - try to run with fewer virtual + hosts
      8. + +
      9. Spread your operation across multiple server + processes (using Listen + for example, but see the first point) and/or ports.
      10. +
      + +

      Since this is an operating-system limitation, there's + not much else available in the way of solutions.

      + +

      As of 1.2.1 we have made attempts to work around various + limitations involving running with many descriptors. More information is + available.

      +
      +
    2. + +
    3. + Can + I increase FD_SETSIZE on FreeBSD? + + +

      On versions of FreeBSD before 3.0, the + FD_SETSIZE define defaults to 256. This means + that you will have trouble usefully using more than 256 + file descriptors in Apache. This can be increased, but + doing so can be tricky.

      + +

      If you are using a version prior to 2.2, you need to + recompile your kernel with a larger + FD_SETSIZE. This can be done by adding a line + such as:

      + +
      +
      options FD_SETSIZE nnn
      +
      + +

      to your kernel config file. Starting at version 2.2, + this is no longer necessary.

      + +

      If you are using a version of 2.1-stable from after + 1997/03/10 or 2.2 or 3.0-current from before 1997/06/28, + there is a limit in the resolver library that prevents it + from using more file descriptors than what + FD_SETSIZE is set to when libc is compiled. To + increase this, you have to recompile libc with a higher + FD_SETSIZE.

      + +

      In FreeBSD 3.0, the default FD_SETSIZE has + been increased to 1024 and the above limitation in the + resolver library has been removed.

      + +

      After you deal with the appropriate changes above, you + can increase the setting of FD_SETSIZE at + Apache compilation time by adding + "-DFD_SETSIZE=nnn" to the + EXTRA_CFLAGS line in your + Configuration file.

      +
      +
    4. + +
    5. + Why doesn't + my ErrorDocument 401 work? + +

      You need to use it with a URL in the form + "/foo/bar" and not one with a method and + hostname such as "http://host/foo/bar". See + the ErrorDocument + documentation for details. This was incorrectly documented + in the past.

      +
      +
    6. + +
    7. + Why does Apache + send a cookie on every response? + +

      Apache does not automatically send a cookie on + every response, unless you have re-compiled it with the mod_usertrack + module, and specifically enabled it with the CookieTracking + directive. This module has been in Apache since version + 1.2. This module may help track users, and uses cookies to + do this. If you are not using the data generated by + mod_usertrack, do not compile it into + Apache.

      +
      +
    8. + +
    9. + Why don't my + cookies work, I even compiled in + mod_cookies? + +

      Firstly, you do not need to compile in + mod_cookies in order for your scripts to work + (see the previous question for more + about mod_cookies). Apache passes on your + Set-Cookie header fine, with or without this + module. If cookies do not work it will be because your + script does not work properly or your browser does not use + cookies or is not set-up to accept them.

      +
      +
    10. + +
    11. + Why do my Java app[let]s + give me plain text when I request an URL from an Apache + server? + +

      As of version 1.2, Apache is an HTTP/1.1 (HyperText + Transfer Protocol version 1.1) server. This fact is + reflected in the protocol version that's included in the + response headers sent to a client when processing a + request. Unfortunately, low-level Web access classes + included in the Java Development Kit (JDK) version 1.0.2 + expect to see the version string "HTTP/1.0" and do not + correctly interpret the "HTTP/1.1" value Apache is sending + (this part of the response is a declaration of what the + server can do rather than a declaration of the dialect of + the response). The result is that the JDK methods do not + correctly parse the headers, and include them with the + document content by mistake.

      + +

      This is definitely a bug in the JDK 1.0.2 foundation + classes from Sun, and it has been fixed in version 1.1. + However, the classes in question are part of the virtual + machine environment, which means they're part of the Web + browser (if Java-enabled) or the Java environment on the + client system - so even if you develop your + classes with a recent JDK, the eventual users might + encounter the problem. The classes involved are replaceable + by vendors implementing the Java virtual machine + environment, and so even those that are based upon the + 1.0.2 version may not have this problem.

      + +

      In the meantime, a workaround is to tell Apache to + "fake" an HTTP/1.0 response to requests that come from the + JDK methods; this can be done by including a line such as + the following in your server configuration files:

      + +
      +
      BrowserMatch Java1.0 force-response-1.0
      + BrowserMatch JDK/1.0 force-response-1.0
      +
      + +

      More information about this issue can be found in the Java + and HTTP/1.1 page at the Apache web site.

      +
      +
    12. + +
    13. + How do I get Apache to + send a MIDI file so the browser can play it? + +

      Even though the registered MIME type for MIDI files is + audio/midi, some browsers are not set up to + recognize it as such; instead, they look for + audio/x-midi. There are two things you can do + to address this:

      + +
        +
      1. Configure your browser to treat documents of type + audio/midi correctly. This is the type that + Apache sends by default. This may not be workable, + however, if you have many client installations to change, + or if some or many of the clients are not under your + control.
      2. + +
      3. + Instruct Apache to send a different + Content-type header for these files by + adding the following line to your server's + configuration files: + +
        +
        AddType audio/x-midi .mid .midi + .kar
        +
        + +

        Note that this may break browsers that do + recognize the audio/midi MIME type unless + they're prepared to also handle + audio/x-midi the same way.

        +
      4. +
      +
      +
    14. + +
    15. + How do I add browsers + and referrers to my logs? + +

      Apache provides a couple of different ways of doing + this. The recommended method is to compile the mod_log_config + module into your configuration and use the CustomLog + directive.

      + +

      You can either log the additional information in files + other than your normal transfer log, or you can add them to + the records already being written. For example:

      + +

      + CustomLog logs/access_log "%h %l %u %t \"%r\" %s %b \"%{Referer}i\" \"%{User-Agent}i\""

      + +

      This will add the values of the User-agent: + and Referer: headers, which indicate the + client and the referring page, respectively, to the end of + each line in the access log.

      + +

      You may want to check out the Apache Week + article entitled: "Gathering Visitor Information: Customizing + Your Logfiles".

      +
      +
    16. + +
    17. + Why + does accessing directories only work when I include the + trailing "/" + (e.g.http://foo.domain.com/~user/) + but not when I omit it + (e.g.http://foo.domain.com/~user)? + + +

      When you access a directory without a trailing "/", + Apache needs to send what is called a redirect to the + client to tell it to add the trailing slash. If it did not + do so, relative URLs would not work properly. When it sends + the redirect, it needs to know the name of the server so + that it can include it in the redirect. There are two ways + for Apache to find this out; either it can guess, or you + can tell it. If your DNS is configured correctly, it can + normally guess without any problems. If it is not, however, + then you need to tell it.

      + +

      Add a ServerName directive + to the config file to tell it what the domain name of the + server is.

      + +

      The other thing that can occasionally cause this symptom is a + misunderstanding of the Alias directive, + resulting in an alias working with a trailing slash, and not + without one. The Alias directive is very literal, + and aliases what you tell it to. Consider the following + example:

      + +
      +        Alias /example/ /home/www/example/
      +        
      + +

      The above directive creates an alias for URLs starting with + /example/, but does not alias URLs + starting with /example. That is to say, a URL such + as http://servername.com/example/ will get the + desired content, but a URL such as + http://servername.com/example will result in a + "file not found" error.

      + +

      The following Alias, on the other hand, will + work for both cases:

      + +
      +        Alias /example /home/www/example
      +        
      + +
      +
    18. + +
    19. + Why doesn't mod_info list + any directives? + +

      The mod_info + module allows you to use a Web browser to see how your + server is configured. Among the information it displays is + the list modules and their configuration directives. The + "current" values for the directives are not necessarily + those of the running server; they are extracted from the + configuration files themselves at the time of the request. + If the files have been changed since the server was last + reloaded, the display will not match the values actively in + use. If the files and the path to the files are not + readable by the user as which the server is running (see + the User + directive), then mod_info cannot read them in + order to list their values. An entry will be made + in the error log in this event, however.

      +
      +
    20. + +
    21. + I upgraded to + Apache 1.3 and now my virtual hosts don't + work! + +

      In versions of Apache prior to 1.3b2, there was a lot of + confusion regarding address-based virtual hosts and + (HTTP/1.1) name-based virtual hosts, and the rules + concerning how the server processed + <VirtualHost> definitions were very + complex and not well documented.

      + +

      Apache 1.3b2 introduced a new directive, NameVirtualHost, + which simplifies the rules quite a bit. However, changing + the rules like this means that your existing name-based + <VirtualHost> containers probably won't + work correctly immediately following the upgrade.

      + +

      To correct this problem, add the following line to the + beginning of your server configuration file, before + defining any virtual hosts:

      + +
      +
      NameVirtualHost n.n.n.n
      +
      + +

      Replace the "n.n.n.n" with the IP address + to which the name-based virtual host names resolve; if you + have multiple name-based hosts on multiple addresses, + repeat the directive for each address.

      + +

      Make sure that your name-based + <VirtualHost> blocks contain + ServerName and possibly + ServerAlias directives so Apache can be sure + to tell them apart correctly.

      + +

      Please see the Apache Virtual Host + documentation for further details about + configuration.

      +
      +
    22. + +
    23. + I'm using + RedHat Linux and my .htm files are showing up as HTML + source rather than being formatted! + +

      RedHat messed up and forgot to put a content type for + .htm files into /etc/mime.types. + Edit /etc/mime.types, find the line containing + html and add htm to it. Then + restart your httpd server:

      + +
      +
      kill -HUP `cat /var/run/httpd.pid`
      +
      + +

      Then clear your browsers' caches. (Many + browsers won't re-examine the content type after they've + reloaded a page.)

      +
      +
    24. + +
    25. + My + .htaccess files are being + ignored. + +

      This is almost always due to your AllowOverride + directive being set incorrectly for the directory in + question. If it is set to None then .htaccess + files will not even be looked for. If you do have one that + is set, then be certain it covers the directory you are + trying to use the .htaccess file in. This is normally + accomplished by ensuring it is inside the proper Directory + container.

      +
      +
    26. + +
    27. + Why do I get a + "Forbidden" message whenever I try to access a + particular directory? + +

      This message is generally caused because either

      + +
        +
      • The underlying file system permissions do not allow + the User/Group under which Apache is running to access + the necessary files; or
      • + +
      • The Apache configuration has some access restrictions + in place which forbid access to the files.
      • +
      + +

      You can determine which case applies to your situation + by checking the error log.

      + +

      In the case where file system permission are at fault, + remember that not only must the directory and files in + question be readable, but also all parent directories must + be at least searchable (i.e., chmod +x /directory/path) + by the web server in order for the content to be accessible.

      +
      +
    28. + +
    29. + Why do I get a + "Forbidden/You don't have permission to access / on + this server" message whenever I try to access my + server? + +

      Search your conf/httpd.conf file for this + exact string: <Files ~>. If you find it, + that's your problem -- that particular <Files> + container is malformed. Delete it or replace it with + <Files ~ "^\.ht"> and restart your + server and things should work as expected.

      + +

      This error appears to be caused by a problem with the + version of linuxconf distributed with Redhat 6.x. It may + reappear if you use linuxconf again.

      + +

      If you don't find this string, check out the previous question.

      +
      +
    30. + +
    31. + Why + do my files appear correctly in Internet Explorer, but show + up as source or trigger a save window with + Netscape; or, Why doesn't Internet Explorer render + my text/plain document correctly? + +

      MS Internet Explorer (MSIE) and Netscape handle mime type + detection in different ways, and therefore will display the + document differently. In particular, IE sometimes relies on + the file extension or the contents of the file to determine + the mime type. This can happen when the server specifies a + mime type of application/octet-stream or + text/plain. This behavior violates the the HTTP + standard and makes it impossible to deliver plain text + documents to MSIE clients in some cases. More details are + available on MSIE's mime type detection behavior in an + MSDN article and a note + by Alan J. Flavell.

      + +

      The best you can do as a server administrator is to + accurately configure the mime type of your documents by editing + the mime.types file or using an AddType + directive in the Apache configuration files. In some cases, + you may be able to fool MSIE into rendering text/plain documents + correctly by assuring they have a .txt filename + extension, but this will not work if MSIE thinks the content + looks like another file type. +


      +
    32. +
    33. + My site is accessible + under many different hostnames; how do I redirect clients + so that they see only a single name? + +

      Many sites map a variety of hostnames to the same content. + For example, www.example.com, + example.com and www.example.net may + all refer to the same site. It is best to make sure that, + regardless of the name clients use to access the site, they + will be redirected to a single, canonical hostname. This + makes the site easier to maintain and assures that there will + be only one version of the site in proxy caches and search + engines.

      + +

      There are two techniques to implement canonical hostnames:

      + +
        +
      1. Use mod_rewrite + as described in the "Canonical Hostnames" section of the + URL Rewriting Guide.
      2. + +
      3. Use name-based + virtual hosting: + +
        +NameVirtualHost *
        +
        +<VirtualHost *>
        +  ServerName www.example.net
        +  ServerAlias example.com
        +  Redirect permanent / http://www.example.com/
        +</VirtualHost>
        +
        +<VirtualHost *>
        +  ServerName www.example.com
        +  DocumentRoot /usr/local/apache/htdocs
        +</VirtualHost> +
        +
      +
    34. + +
    35. Why can I access my + website from the server or from my local network, but I + can't access it from elsewhere on the Internet? + +

      There are many possible reasons for this, and almost all + of them are related to the configuration of your network, not + the configuration of the Apache HTTP Server. One of the most + common problems is that a firewall blocks access to the + default HTTP port 80. In particular, many consumer ISPs + block access to this port. You can see if this is the case + by changing any Port and Listen + directives in httpd.conf to use port 8000 and + then request your site using + http://yourhost.example.com:8000/. (Of course, + a very restrictive firewall may block this port as well.)

      + +
    36. + +
    37. How do I turn automatic + directory listings on or off? + +

      If a client requests a URL that designates a directory and + the directory does not contain a filename that matches the DirectoryIndex + directive, then mod_autoindex can be + configured to present a listing of the directory contents.

      + +

      To turn on automatic directory indexing, find the + Options directive that + applies to the directory and add the Indexes + keyword. For example:

      + +
      + <Directory /path/to/directory>
      +    Options +Indexes
      + </Directory> +
      + +

      To turn off automatic directory indexing, remove + the Indexes keyword from the appropriate + Options line. To turn off directory listing + for a particular subdirectory, you can use + Options -Indexes. For example:

      + +
      + <Directory /path/to/directory>
      +    Options -Indexes
      + </Directory> +
      + +
    38. + +
    39. Why do my Options + directives not have the desired effect? + +

      Directives placed in the configuration files are applied + in a very particular order, as described by How Directory, Location, and Files + sections work. In addition, each Options directive has the + effect of resetting the options to none before + adding the specified options (unless only "+" and "-" options + are used). The consequence is that Options set + in the main server or virtual host context (outside any + directory, location, or files section) will usually have no + effect, because they are overridden by more specific + Options directives. For example, in the following

      + +
      +<Directory /usr/local/apache/htdocs>
      +    Options Indexes
      +</Directory>
      +Options Includes ExecCGI
      +
      + +

      Includes and ExecCGI will be + off in the /usr/local/apache/htdocs + directory.

      + +

      You can usually avoid problems by either finding the + Options directive that already applies to a + specific directory and changing it, or by putting your + Options directive inside the most specific possible + <Directory> section.

      + +
    40. + + +
    41. How can I change + the information that Apache returns about itself in the + headers? + +

      When a client connects to Apache, part of the information returned in + the headers is the name "Apache" Additional information that can be sent + is the version number, such as "1.3.26", the operating system, and a + list of non-standard modules you have installed.

      + +

      For example:

      + +
      +Server: Apache/1.3.26 (Unix) mod_perl/1.26 +
      + +

      Frequently, people want to remove this information, under the mistaken + understanding that this will make the system more secure. This is + probably not the case, as the same exploits will likely be attempted + regardless of the header information you provide.

      + +

      There are, however, two answers to this question: the correct answer, + and the answer that you are probably looking for.

      + +

      The correct answer to this question is that you should use the + ServerTokens directive to alter the quantity of information which is + passed in the headers. Setting this directive to Prod will + pass the least possible amount of information:

      + +
      +Server: Apache +
      + +

      The answer you are probably looking for is how to make Apache lie + about what what it is, ie send something like:

      + +
      +Server: Bob's Happy HTTPd Server +
      + +

      In order to do this, you will need to modify the Apache source code and + rebuild Apache. This is not advised, as it is almost certain not to + provide you with the added security you think that you are gaining. The + exact method of doing this is left as an exercise for the reader, as we + are not keen on helping you do something that is intrinsically a bad + idea.

      + +
    42. + +
    43. Why do I see requests + for other sites appearing in my log files? + +

      A an access_log entry showing this situation could look + like this:

      + +
      63.251.56.142 - - + [25/Jul/2002:12:48:04 -0700] "GET http://www.yahoo.com/ + HTTP/1.0" 200 1456
      + +

      The question is: why did a request for + www.yahoo.com come to your server instead of + Yahoo's server? And why does the response have a status + code of 200 (success)?

      + +

      This is usually the result of malicious clients trying to + exploit open proxy servers to access a website without + revealing their true location. If you find entries like this + in your log, the first thing to do is to make sure you have + properly configured your server not to proxy for unknown + clients. If you don't need to provide a proxy server at all, + you should simply assure that the ProxyRequests + directive is not set on. + If you do need to run a proxy server, then you must ensure + that you secure your + server properly so that only authorized clients can use + it.

      + +

      If your server is configured properly, then the attempt to + proxy through your server will fail. If you see a status + code of 404 (file not found) in the log, then + you know that the request failed. If you see a status code + of 200 (success), that does not necessarily mean + that the attempt to proxy succeeded. RFC2616 section 5.1.2 + mandates that Apache must accept requests with absolute URLs + in the request-URI, even for non-proxy requests. Since + Apache has no way to know all the different names that your + server may be known under, it cannot simply reject hostnames + it does not recognize. Instead, it will serve requests for + unknown sites locally by stripping off the hostname and using + the default server or virtual host. Therefore you can + compare the size of the file (1456 in the above example) to + the size of the corresponding file in your default server. + If they are the same, then the proxy attempt failed, since a + document from your server was delivered, not a document from + www.yahoo.com.

      + +

      If you wish to prevent this type of request entirely, then + you need to let Apache know what hostnames to accept and what + hostnames to reject. You do this by configuring name-virtual + hosts, where the first listed host is the default host that + will catch and reject unknown hostnames. For example:

      + +
      +
      +NameVirtualHost *
      +
      +<VirtualHost *>
      +  ServerName default.only
      +  <Location />
      +    Order allow,deny
      +    Deny from all
      +  </Location>
      +</VirtualHost>
      +
      +<VirtualHost *>
      +  ServerName realhost1.example.com
      +  ServerAlias alias1.example.com alias2.example.com
      +  DocumentRoot /path/to/site1
      +</VirtualHost>
      +
      +...
      +
      +
      +
    44. + +
    + + + + + + + + diff --git a/htdocs/manual/misc/FAQ-F.html b/htdocs/manual/misc/FAQ-F.html new file mode 100644 index 00000000000..8f1cc8c48f5 --- /dev/null +++ b/htdocs/manual/misc/FAQ-F.html @@ -0,0 +1,574 @@ + + + + + + + + + + + + + + + + + + + + + + + + Apache Server Frequently Asked Questions + + + + + + +

    Apache Server Frequently Asked + Questions

    + +

    $Revision: 1.11 $ ($Date: 2002/06/07 01:48:13 $)

    + +

    The latest version of this FAQ is always available from the + main Apache web site, at <http://httpd.apache.org/docs/misc/FAQ.html>.

    + + + + + + + + + + + + + + + + +

    If you are reading a text-only version of this FAQ, you may + find numbers enclosed in brackets (such as "[12]"). These refer + to the list of reference URLs to be found at the end of the + document. These references do not appear, and are not needed, + for the hypertext version.

    + +

    The Questions

    + +
      + + + +
    1. + Dynamic Content (CGI and SSI) + +
        +
      1. How do I enable CGI + execution in directories other than the + ScriptAlias?
      2. + +
      3. What does it mean + when my CGIs fail with "Premature end of script + headers"?
      4. + +
      5. Why do I keep getting + "Method Not Allowed" for form POST requests?
      6. + +
      7. How can I get my script's + output without Apache buffering it? Why doesn't my server + push work?
      8. + +
      9. Where can I find the "CGI + specification"?
      10. + +
      11. Why isn't FastCGI included with + Apache any more?
      12. + +
      13. How do I enable SSI (parsed + HTML)?
      14. + +
      15. Why don't my parsed files get + cached?
      16. + +
      17. How can I have my script + output parsed?
      18. + +
      19. SSIs don't work for + VirtualHosts and/or user home directories
      20. + +
      21. How can I use + ErrorDocument and SSI to simplify customized + error messages?
      22. + +
      23. Why is the environment + variable REMOTE_USER not set?
      24. + +
      25. How do I allow each of my user + directories to have a cgi-bin directory?
      26. +
      +
    2. + + +
    +
    + +

    The Answers

    + + + +

    F. Dynamic Content (CGI and SSI)

    + +
      +
    1. + How do I enable CGI + execution in directories other than the + ScriptAlias? + +

      Apache recognizes all files in a directory named as a ScriptAlias + as being eligible for execution rather than processing as + normal documents. This applies regardless of the file name, + so scripts in a ScriptAlias directory don't need to be + named "*.cgi" or "*.pl" or + whatever. In other words, all files in a + ScriptAlias directory are scripts, as far as Apache is + concerned.

      + +

      To persuade Apache to execute scripts in other + locations, such as in directories where normal documents + may also live, you must tell it how to recognize them - and + also that it's okay to execute them. For this, you need to + use something like the AddHandler + directive.

      + +
        +
      1. + In an appropriate section of your server configuration + files, add a line such as + +
        +
        AddHandler cgi-script .cgi
        +
        + +

        The server will then recognize that all files in + that location (and its logical descendants) that end in + ".cgi" are script files, not + documents.

        +
      2. + +
      3. Make sure that the directory location is covered by + an Options + declaration that includes the ExecCGI + option.
      4. +
      + +

      In some situations, you might not want to actually allow + all files named "*.cgi" to be executable. + Perhaps all you want is to enable a particular file in a + normal directory to be executable. This can be + alternatively accomplished via mod_rewrite + and the following steps:

      + +
        +
      1. + Locally add to the corresponding .htaccess + file a ruleset similar to this one: + +
        +
        RewriteEngine on
        + RewriteBase /~foo/bar/
        + RewriteRule ^quux\.cgi$ - + [T=application/x-httpd-cgi]
        +
        +
      2. + +
      3. Make sure that the directory location is covered by + an Options + declaration that includes the ExecCGI and + FollowSymLinks option.
      4. +
      +
      +
    2. + +
    3. + What does it mean + when my CGIs fail with "Premature end of script + headers"? + +

      It means just what it says: the server was expecting a + complete set of HTTP headers (one or more followed by a + blank line), and didn't get them.

      + +

      The most common cause of this problem is the script + dying before sending the complete set of headers, or + possibly any at all, to the server. To see if this is the + case, try running the script standalone from an interactive + session, rather than as a script under the server. If you + get error messages, this is almost certainly the cause of + the "premature end of script headers" message. Even if the + CGI runs fine from the command line, remember that the + environment and permissions may be different when running + under the web server. The CGI can only access resources + allowed for the User and Group + specified in your Apache configuration. In addition, the + environment will not be the same as the one provided on the + command line, but it can be adjusted using the directives + provided by mod_env.

      + +

      The second most common cause of this (aside from people + not outputting the required headers at all) is a result of + an interaction with Perl's output buffering. To make Perl + flush its buffers after each output statement, insert the + following statements around the print or + write statements that send your HTTP + headers:

      + +
      +
      {
      +  local ($oldbar) = $|;
      +  $cfh = select (STDOUT);
      +  $| = 1;
      +  #
      +  # print your HTTP headers here
      +  #
      +  $| = $oldbar;
      +  select ($cfh);
      + }
      +
      + +

      This is generally only necessary when you are calling + external programs from your script that send output to + stdout, or if there will be a long delay between the time + the headers are sent and the actual content starts being + emitted. To maximize performance, you should turn + buffer-flushing back off (with $| = 0 + or the equivalent) after the statements that send the + headers, as displayed above.

      + +

      If your script isn't written in Perl, do the equivalent + thing for whatever language you are using + (e.g., for C, call fflush() after + writing the headers).

      + +

      Another cause for the "premature end of script headers" + message are the RLimitCPU and RLimitMEM directives. You may + get the message if the CGI script was killed due to a + resource limit.

      + +

      In addition, a configuration problem in suEXEC, mod_perl, or another + third party module can often interfere with the execution + of your CGI and cause the "premature end of script headers" + message.

      +
      +
    4. + +
    5. + Why do + I keep getting "Method Not Allowed" for form POST + requests? + +

      This is almost always due to Apache not being configured + to treat the file you are trying to POST to as a CGI + script. You can not POST to a normal HTML file; the + operation has no meaning. See the FAQ entry on CGIs outside ScriptAliased + directories for details on how to configure Apache to + treat the file in question as a CGI.

      +
      +
    6. + +
    7. + How can I + get my script's output without Apache buffering it? Why + doesn't my server push work? + +

      As of Apache 1.3, CGI scripts are essentially not + buffered. Every time your script does a "flush" to output + data, that data gets relayed on to the client. Some + scripting languages, for example Perl, have their own + buffering for output - this can be disabled by setting the + $| special variable to 1. Of course this does + increase the overall number of packets being transmitted, + which can result in a sense of slowness for the end + user.

      + +

      Prior to 1.3, you needed to use "nph-" scripts to + accomplish non-buffering. Today, the only difference + between nph scripts and normal scripts is that nph scripts + require the full HTTP headers to be sent.

      +
      +
    8. + +
    9. + Where can I find + the "CGI specification"? + +

      The Common Gateway Interface (CGI) specification can be + found at the original NCSA site < + http://hoohoo.ncsa.uiuc.edu/cgi/interface.html>. + This version hasn't been updated since 1995, and there have + been some efforts to update it.

      + +

      A new draft is being worked on with the intent of making + it an informational RFC; you can find out more about this + project at <http://web.golux.com/coar/cgi/>.

      +
      +
    10. + +
    11. + Why isn't FastCGI + included with Apache any more? + +

      The simple answer is that it was becoming too difficult + to keep the version being included with Apache synchronized + with the master copy at the FastCGI web site. When a + new version of Apache was released, the version of the + FastCGI module included with it would soon be out of + date.

      + +

      You can still obtain the FastCGI module for Apache from + the master FastCGI web site.

      +
      +
    12. + +
    13. + How do I + enable SSI (parsed HTML)? + +

      SSI (an acronym for Server-Side Include) directives + allow static HTML documents to be enhanced at run-time + (e.g., when delivered to a client by Apache). The + format of SSI directives is covered in the mod_include manual; + suffice it to say that Apache supports not only SSI but + xSSI (eXtended SSI) directives.

      + +

      Processing a document at run-time is called + parsing it; hence the term "parsed HTML" sometimes + used for documents that contain SSI instructions. Parsing + tends to be resource-consumptive compared to serving static + files, and is not enabled by default. It can also interfere + with the cachability of your documents, which can put a + further load on your server. (See the next question for more information + about this.)

      + +

      To enable SSI processing, you need to

      + +
        +
      • Build your server with the mod_include + module. This is normally compiled in by default.
      • + +
      • Make sure your server configuration files have an Options + directive which permits Includes.
      • + +
      • + Make sure that the directory where you want the SSI + documents to live is covered by the "server-parsed" + content handler, either explicitly or in some ancestral + location. That can be done with the following AddHandler + directive: + +
        +
        AddHandler server-parsed .shtml
        +
        + +

        This indicates that all files ending in ".shtml" in + that location (or its descendants) should be parsed. + Note that using ".html" will cause all normal HTML + files to be parsed, which may put an inordinate load on + your server.

        +
      • +
      + +

      For additional information, see the Apache + Week article on Using Server Side Includes.

      +
      +
    14. + +
    15. + Why don't my + parsed files get cached? + +

      Since the server is performing run-time processing of + your SSI directives, which may change the content shipped + to the client, it can't know at the time it starts parsing + what the final size of the result will be, or whether the + parsed result will always be the same. This means that it + can't generate Content-Length or + Last-Modified headers. Caches commonly work by + comparing the Last-Modified of what's in the + cache with that being delivered by the server. Since the + server isn't sending that header for a parsed document, + whatever's doing the caching can't tell whether the + document has changed or not - and so fetches it again to be + on the safe side.

      + +

      You can work around this in some cases by causing an + Expires header to be generated. (See the mod_expires documentation for + more details.) Another possibility is to use the XBitHack Full mechanism, which + tells Apache to send (under certain circumstances detailed + in the XBitHack directive description) a + Last-Modified header based upon the last + modification time of the file being parsed. Note that this + may actually be lying to the client if the parsed file + doesn't change but the SSI-inserted content does; if the + included content changes often, this can result in stale + copies being cached.

      +
      +
    16. + +
    17. + How can I + have my script output parsed? + +

      So you want to include SSI directives in the output from + your CGI script, but can't figure out how to do it? The + short answer is "you can't." This is potentially a security + liability and, more importantly, it can not be cleanly + implemented under the current server API. The best + workaround is for your script itself to do what the SSIs + would be doing. After all, it's generating the rest of the + content.

      + +

      This is a feature The Apache Group hopes to add in the + next major release after 1.3.

      +
      +
    18. + +
    19. + SSIs don't + work for VirtualHosts and/or user home + directories. + +

      This is almost always due to having some setting in your + config file that sets "Options Includes" or some other + setting for your DocumentRoot but not for other + directories. If you set it inside a Directory section, then + that setting will only apply to that directory.

      +
      +
    20. + +
    21. + How can I + use ErrorDocument and SSI to simplify + customized error messages? + +

      Have a look at this + document. It shows in example form how you can a + combination of XSSI and negotiation to tailor a set of + ErrorDocuments to your personal taste, and + returning different internationalized error responses based + on the client's native language.

      +
      +
    22. + +
    23. + Why + is the environment variable REMOTE_USER not + set? + +

      This variable is set and thus available in SSI or CGI + scripts if and only if the requested + document was protected by access authentication. For an + explanation on how to implement these restrictions, see Apache + Week's articles on Using + User Authentication or DBM + User Authentication.

      + +

      Hint: When using a CGI script to receive the data of a + HTML FORM notice that protecting the document + containing the FORM is not sufficient to + provide REMOTE_USER to the CGI script. You + have to protect the CGI script, too. Or alternatively only + the CGI script (then authentication happens only after + filling out the form).

      +
      +
    24. + +
    25. + How do I allow + each of my user directories to have a cgi-bin + directory? + +

      Remember that CGI execution does not need to be + restricted only to cgi-bin directories. You can allow CGI script execution in + arbitrary parts of your filesystem.

      + +

      There are many ways to give each user directory a + cgi-bin directory such that anything requested as + http://example.com/~user/cgi-bin/program will + be executed as a CGI script. Two alternatives are:

      + +
        +
      1. + Place the cgi-bin directory next to the public_html + directory: + +
        +
        ScriptAliasMatch ^/~([^/]*)/cgi-bin/(.*) + /home/$1/cgi-bin/$2
        +
        +
      2. + +
      3. + Place the cgi-bin directory underneath the public_html + directory: + +
        +
        <Directory + /home/*/public_html/cgi-bin>
        +     Options ExecCGI
        +     SetHandler cgi-script
        + </Directory>
        +
        +
      4. +
      +

      If you are using suexec, the first technique will not work + because CGI scripts must be stored under the public_html + directory.

      + +
      +
    26. +
    + + + + + + + + diff --git a/htdocs/manual/misc/FAQ-G.html b/htdocs/manual/misc/FAQ-G.html new file mode 100644 index 00000000000..9732c2bbbb3 --- /dev/null +++ b/htdocs/manual/misc/FAQ-G.html @@ -0,0 +1,461 @@ + + + + + + + + + + + + + + + + + + + + + + + + Apache Server Frequently Asked Questions + + + + + + +

    Apache Server Frequently Asked + Questions

    + +

    $Revision: 1.11 $ ($Date: 2003/01/13 03:29:32 $)

    + +

    The latest version of this FAQ is always available from the + main Apache web site, at <http://httpd.apache.org/docs/misc/FAQ.html>.

    + + + + + + + + + + + + + + + + +

    If you are reading a text-only version of this FAQ, you may + find numbers enclosed in brackets (such as "[12]"). These refer + to the list of reference URLs to be found at the end of the + document. These references do not appear, and are not needed, + for the hypertext version.

    + +

    The Questions

    + +
      + + + +
    1. + Authentication and Access Restrictions + +
        +
      1. Why isn't restricting access by + host or domain name working correctly?
      2. + +
      3. How do I set up Apache + to require a username and password to access certain + documents?
      4. + +
      5. How do I set up Apache to + allow access to certain documents only if a site is + either a local site or the user supplies a + password and username?
      6. + +
      7. Why does my + authentication give me a server error?
      8. + +
      9. Do I have to keep the + (mSQL) authentication information on the same + machine?
      10. + +
      11. Why is my mSQL authentication + terribly slow?
      12. + +
      13. Can I use my + /etc/passwd file for Web page + authentication?
      14. + +
      15. Why does Apache ask for my + password twice before serving a file?
      16. + +
      17. How can I prevent people from + "stealing" the images from my web site?
      18. + +
      +
    2. + + +
    +
    + +

    The Answers

    + + + +

    G. Authentication and Access Restrictions

    + +
      +
    1. + Why isn't + restricting access by host or domain name working + correctly? + +

      Two of the most common causes of this are:

      + +
        +
      1. An error, inconsistency, or unexpected + mapping in the DNS registration
        + This happens frequently: your configuration restricts + access to Host.FooBar.Com, but you can't get + in from that host. The usual reason for this is that + Host.FooBar.Com is actually an alias for + another name, and when Apache performs the + address-to-name lookup it's getting the real + name, not Host.FooBar.Com. You can verify + this by checking the reverse lookup yourself. The easiest + way to work around it is to specify the correct host name + in your configuration.
      2. + +
      3. + Inadequate checking and verification in your + configuration of Apache
        + If you intend to perform access checking and + restriction based upon the client's host or domain + name, you really need to configure Apache to + double-check the origin information it's supplied. You + do this by adding the -DMAXIMUM_DNS clause + to the EXTRA_CFLAGS definition in your + Configuration file. For example: + +
        +
        EXTRA_CFLAGS=-DMAXIMUM_DNS
        +
        + +

        This will cause Apache to be very paranoid about + making sure a particular host address is + really assigned to the name it claims to be. + Note that this can incur a significant + performance penalty, however, because of all the name + resolution requests being sent to a nameserver.

        +
      4. +
      +
      +
    2. + +
    3. + How do I set up Apache + to require a username and password to access certain + documents? + +

      There are several ways to do this; some of the more + popular ones are to use the mod_auth, mod_auth_db, or mod_auth_dbm + modules.

      + +

      For an explanation on how to implement these + restrictions, see Apache + Week's articles on Using + User Authentication or DBM + User Authentication, or see the authentication tutorial in the + Apache documentation.

      +
      +
    4. + +
    5. + How do I set up Apache to + allow access to certain documents only if a site is either + a local site or the user supplies a password and + username? + +

      Use the Satisfy + directive, in particular the Satisfy Any + directive, to require that only one of the access + restrictions be met. For example, adding the following + configuration to a .htaccess or server + configuration file would restrict access to people who + either are accessing the site from a host under domain.com + or who can supply a valid username and password:

      + +
      +
      Deny from all
      + Allow from .domain.com
      + AuthType Basic
      + AuthUserFile /usr/local/apache/conf/htpasswd.users
      + AuthName "special directory"
      + Require valid-user
      + Satisfy any
      +
      + +

      See the user + authentication question and the mod_access module for + details on how the above directives work.

      +
      +
    6. + +
    7. + Why does my authentication + give me a server error? + +

      Under normal circumstances, the Apache access control + modules will pass unrecognized user IDs on to the next + access control module in line. Only if the user ID is + recognized and the password is validated (or not) will it + give the usual success or "authentication failed" + messages.

      + +

      However, if the last access module in line 'declines' + the validation request (because it has never heard of the + user ID or because it is not configured), the + http_request handler will give one of the + following, confusing, errors:

      + +
        +
      • check access
      • + +
      • check user. No user file?
      • + +
      • check access. No groups file?
      • +
      + +

      This does not mean that you have to add an + 'AuthUserFile /dev/null' line as some + magazines suggest!

      + +

      The solution is to ensure that at least the last module + is authoritative and CONFIGURED. By + default, mod_auth is authoritative and will + give an OK/Denied, but only if it is configured with the + proper AuthUserFile. Likewise, if a valid + group is required. (Remember that the modules are processed + in the reverse order from that in which they appear in your + compile-time Configuration file.)

      + +

      A typical situation for this error is when you are using + the mod_auth_dbm, mod_auth_msql, + mod_auth_mysql, mod_auth_anon or + mod_auth_cookie modules on their own. These + are by default not authoritative, and this + will pass the buck on to the (non-existent) next + authentication module when the user ID is not in their + respective database. Just add the appropriate + 'XXXAuthoritative yes' line to the + configuration.

      + +

      In general it is a good idea (though not terribly + efficient) to have the file-based mod_auth a + module of last resort. This allows you to access the web + server with a few special passwords even if the databases + are down or corrupted. This does cost a file + open/seek/close for each request in a protected area.

      +
      +
    8. + +
    9. + Do I have to keep the + (mSQL) authentication information on the same + machine? + +

      Some organizations feel very strongly about keeping the + authentication information on a different machine than the + webserver. With the mod_auth_msql, + mod_auth_mysql, and other SQL modules + connecting to (R)DBMses this is quite possible. Just + configure an explicit host to contact.

      + +

      Be aware that with mSQL and Oracle, opening and closing + these database connections is very expensive and time + consuming. You might want to look at the code in the + auth_* modules and play with the compile time + flags to alleviate this somewhat, if your RDBMS licences + allow for it.

      +
      +
    10. + +
    11. + Why is my mSQL + authentication terribly slow? + +

      You have probably configured the Host by specifying a + FQHN, and thus the libmsql will use a full + blown TCP/IP socket to talk to the database, rather than a + fast internal device. The libmsql, the mSQL + FAQ, and the mod_auth_msql documentation warn + you about this. If you have to use different hosts, check + out the mod_auth_msql code for some compile + time flags which might - or might not - suit you.

      +
      +
    12. + +
    13. + Can I use my + /etc/passwd file for Web page + authentication? + +

      Yes, you can - but it's a very bad + idea. Here are some of the reasons:

      + +
        +
      • The Web technology provides no governors on how often + or how rapidly password (authentication failure) retries + can be made. That means that someone can hammer away at + your system's root password using the Web, + using a dictionary or similar mass attack, just as fast + as the wire and your server can handle the requests. Most + operating systems these days include attack detection + (such as n failed passwords for the same account + within m seconds) and evasion (breaking the + connection, disabling the account under attack, disabling + all logins from that source, et + cetera), but the Web does not.
      • + +
      • An account under attack isn't notified (unless the + server is heavily modified); there's no "You have 19483 + login failures" message when the legitimate owner logs + in.
      • + +
      • Without an exhaustive and error-prone examination of + the server logs, you can't tell whether an account has + been compromised. Detecting that an attack has occurred, + or is in progress, is fairly obvious, though - + if you look at the logs.
      • + +
      • Web authentication passwords (at least for Basic + authentication) generally fly across the wire, and + through intermediate proxy systems, in what amounts to + plain text. "O'er the net we go/Caching all the way;/O + what fun it is to surf/Giving my password away!"
      • + +
      • Since HTTP is stateless, information about the + authentication is transmitted each and every + time a request is made to the server. Essentially, + the client caches it after the first successful access, + and transmits it without asking for all subsequent + requests to the same server.
      • + +
      • It's relatively trivial for someone on your system to + put up a page that will steal the cached password from a + client's cache without them knowing. Can you say + "password grabber"?
      • +
      + +

      If you still want to do this in light of the above + disadvantages, the method is left as an exercise for the + reader. It'll void your Apache warranty, though, and you'll + lose all accumulated UNIX guru points.

      +
      +
    14. + +
    15. + Why + does Apache ask for my password twice before serving a + file? + +

      If the hostname under which you are accessing the server + is different than the hostname specified in the ServerName + directive, then depending on the setting of the UseCanonicalName + directive, Apache will redirect you to a new hostname when + constructing self-referential URLs. This happens, for + example, in the case where you request a directory without + including the trailing slash.

      + +

      When this happens, Apache will ask for authentication + once under the original hostname, perform the redirect, and + then ask again under the new hostname. For security + reasons, the browser must prompt again for the password + when the host name changes.

      + +

      To eliminate this problem you should

      + +
        +
      1. Always use the trailing slash when requesting + directories;
      2. + +
      3. Change the ServerName to match the name + you are using in the URL; and/or
      4. + +
      5. Set UseCanonicalName off.
      6. +
      +
      +
    16. + +
    17. + How can I prevent + people from "stealing" the images from my web site? + +

      The goal here is to prevent people from inlining your images + directly from their web site, but accessing them only if they + appear inline in your pages.

      + +

      This can be accomplished with a combination of SetEnvIf and + the Deny and Allow directives. However, it is important to + understand that any access restriction based on the REFERER + header is intrinsically problematic due to the fact that + browsers can send an incorrect REFERER, either because they + want to circumvent your restriction or simply because they don't + send the right thing (or anything at all).

      + +

      The following configuration will produce the desired effect + if the browser passes correct REFERER headers.

      + +
      +SetEnvIf REFERER "www\.mydomain\.com" linked_from_here
      +SetEnvIf REFERER "^$" linked_from_here
      +
      +<Directory /www/images>
      +    Order deny,allow
      +    Deny from all
      +    Allow from env=linked_from_here
      +</Directory>
      +
      + +

      Further examples can be found in the Environment Variables documentation.

      + +
      +
    18. + + +
    + + + + + + + + diff --git a/htdocs/manual/misc/FAQ-H.html b/htdocs/manual/misc/FAQ-H.html new file mode 100644 index 00000000000..d2c33967c2c --- /dev/null +++ b/htdocs/manual/misc/FAQ-H.html @@ -0,0 +1,272 @@ + + + + + + + + + + + + + + + + + + + + + + + + Apache Server Frequently Asked Questions + + + + + + +

    Apache Server Frequently Asked + Questions

    + +

    $Revision: 1.4 $ ($Date: 2001/10/08 01:26:54 $)

    + +

    The latest version of this FAQ is always available from the + main Apache web site, at <http://httpd.apache.org/docs/misc/FAQ.html>.

    + + + + + + + + + + + + + + + + +

    If you are reading a text-only version of this FAQ, you may + find numbers enclosed in brackets (such as "[12]"). These refer + to the list of reference URLs to be found at the end of the + document. These references do not appear, and are not needed, + for the hypertext version.

    + +

    The Questions

    + +
      + + + +
    1. + URL Rewriting + +
        +
      1. Where can I find + mod_rewrite rulesets which already solve particular + URL-related problems?
      2. + +
      3. Where can I find any + published information about URL-manipulations and + mod_rewrite?
      4. + +
      5. Why is mod_rewrite so + difficult to learn and seems so complicated?
      6. + +
      7. What can I do if my + RewriteRules don't work as expected?
      8. + +
      9. Why don't some of my + URLs get prefixed with DocumentRoot when using + mod_rewrite?
      10. + +
      11. How can I make all my URLs + case-insensitive with mod_rewrite?
      12. + +
      13. Why are RewriteRules in + my VirtualHost parts ignored?
      14. + +
      15. How can I use + strings with whitespaces in RewriteRule's ENV + flag?
      16. +
      +
    2. + + +
    +
    + +

    The Answers

    + + + +

    H. URL Rewriting

    + +
      +
    1. + Where can I find + mod_rewrite rulesets which already solve particular + URL-related problems? + +

      There is a collection of Practical + Solutions for URL-Manipulation where you can find all + typical solutions the author of mod_rewrite + currently knows of. If you have more interesting rulesets + which solve particular problems not currently covered in + this document, send it to Ralf S. Engelschall for + inclusion. The other webmasters will thank you for avoiding + the reinvention of the wheel.

      +
      +
    2. + +
    3. + Where can I find any + published information about URL-manipulations and + mod_rewrite? + +

      There is an article from Ralf S. Engelschall about + URL-manipulations based on mod_rewrite + in the "iX Multiuser Multitasking Magazin" issue #12/96. + The german (original) version can be read online at <http://www.heise.de/ix/artikel/9612149/>, + the English (translated) version can be found at <http://www.heise.de/ix/artikel/E/9612149/>.

      +
      +
    4. + +
    5. + Why is mod_rewrite so + difficult to learn and seems so complicated? + +

      Hmmm... there are a lot of reasons. First, mod_rewrite + itself is a powerful module which can help you in really + all aspects of URL rewriting, so it can be + no trivial module per definition. To accomplish its hard + job it uses software leverage and makes use of a powerful + regular expression library by Henry Spencer which is an + integral part of Apache since its version 1.2. And regular + expressions itself can be difficult to newbies, while + providing the most flexible power to the advanced + hacker.

      + +

      On the other hand mod_rewrite has to work inside the + Apache API environment and needs to do some tricks to fit + there. For instance the Apache API as of 1.x really was not + designed for URL rewriting at the .htaccess level + of processing. Or the problem of multiple rewrites in + sequence, which is also not handled by the API per design. + To provide this features mod_rewrite has to do some special + (but API compliant!) handling which leads to difficult + processing inside the Apache kernel. While the user usually + doesn't see anything of this processing, it can be + difficult to find problems when some of your RewriteRules + seem not to work.

      +
      +
    6. + +
    7. + What can I do if my + RewriteRules don't work as expected? + +

      Use "RewriteLog somefile" and + "RewriteLogLevel 9" and have a precise look at + the steps the rewriting engine performs. This is really the + only one and best way to debug your rewriting + configuration.

      +
      +
    8. + +
    9. + Why don't some of my + URLs get prefixed with DocumentRoot when using + mod_rewrite? + +

      If the rule starts with /somedir/... make + sure that really no /somedir exists on the + filesystem if you don't want to lead the URL to match this + directory, i.e., there must be no root directory + named somedir on the filesystem. Because if + there is such a directory, the URL will not get prefixed + with DocumentRoot. This behavior looks ugly, but is really + important for some other aspects of URL rewriting.

      +
      +
    10. + +
    11. + How + can I make all my URLs case-insensitive with + mod_rewrite? + +

      You can't! The reasons are: first, that, case + translations for arbitrary length URLs cannot be done + via regex patterns and corresponding + substitutions. One needs a per-character pattern like the + sed/Perl tr|..|..| feature. Second, just + making URLs always upper or lower case does not solve the + whole problem of case-INSENSITIVE URLs, because URLs + actually have to be rewritten to the correct case-variant + for the file residing on the filesystem in order to allow + Apache to access the file. And the Unix filesystem is + always case-SENSITIVE.

      + +

      But there is a module named mod_speling.c in + the Apache distribution. Try this module to help correct + people who use mis-cased URLs.

      +
      +
    12. + +
    13. + Why are RewriteRules in my + VirtualHost parts ignored? + +

      Because you have to enable the engine for every virtual + host explicitly due to security concerns. Just add a + "RewriteEngine on" to your virtual host configuration + parts.

      +
      +
    14. + +
    15. + How can I use strings + with whitespaces in RewriteRule's ENV flag? + +

      There is only one ugly solution: You have to surround + the complete flag argument by quotation marks + ("[E=...]"). Notice: The argument to quote + here is not the argument to the E-flag, it is the argument + of the Apache config file parser, i.e., the third + argument of the RewriteRule here. So you have to write + "[E=any text with whitespaces]".

      +
      +
    16. +
    + + + + + + + + diff --git a/htdocs/manual/misc/FAQ-I.html b/htdocs/manual/misc/FAQ-I.html new file mode 100644 index 00000000000..fe5f2c08507 --- /dev/null +++ b/htdocs/manual/misc/FAQ-I.html @@ -0,0 +1,336 @@ + + + + + + + + + + + + + + + + + + + + + + + + Apache Server Frequently Asked Questions + + + + + + +

    Apache Server Frequently Asked + Questions

    + +

    $Revision: 1.18 $ ($Date: 2004/05/13 13:11:38 $)

    + +

    The latest version of this FAQ is always available from the + main Apache web site, at <http://httpd.apache.org/docs/misc/FAQ.html>.

    + + + + + + + + + + + + + + + + +

    If you are reading a text-only version of this FAQ, you may + find numbers enclosed in brackets (such as "[12]"). These refer + to the list of reference URLs to be found at the end of the + document. These references do not appear, and are not needed, + for the hypertext version.

    + +

    The Questions

    + +
      + + + +
    1. + Features + +
        +
      1. Does or will Apache act as a Proxy + server?
      2. + +
      3. What are "multiviews"?
      4. + +
      5. Why can't I publish to my + Apache server using PUT on Netscape Gold and other + programs?
      6. + +
      7. Why doesn't Apache include + SSL?
      8. + +
      9. How can I attach a footer to my + documents without using SSI?
      10. + +
      11. Does Apache include a search + engine?
      12. + +
      13. How can I rotate my log + files?
      14. + +
      15. How do I keep certain + requests from appearing in my logs?
      16. + +
      17. Does Apache include any sort of + database integration?
      18. + +
      19. Can I use Active Server Pages (ASP) + with Apache?
      20. + +
      21. Does Apache come with Java + support?
      22. +
      +
    2. + + +
    +
    + +

    The Answers

    + + + +

    I. Features

    + +
      +
    1. + Does or will Apache act + as a Proxy server? + +

      Apache version 1.1 and above comes with a proxy module. If compiled + in, this will make Apache act as a caching-proxy + server.

      +
      +
    2. + +
    3. + What are + "multiviews"? + +

      "Multiviews" is the general name given to the Apache + server's ability to provide language-specific document + variants in response to a request. This is documented quite + thoroughly in the content negotiation description page. In + addition, Apache Week carried an article on + this subject entitled "Content Negotiation + Explained".

      +
      +
    4. + +
    5. + Why can't I + publish to my Apache server using PUT on Netscape Gold and + other programs? + +

      Because you need to install and configure a script to + handle the uploaded files. This script is often called a + "PUT" handler. There are several available, but they may + have security problems. Using FTP uploads may be easier and + more secure, at least for now. For more information, see + the Apache Week article Publishing + Pages with PUT.

      +
      +
    6. + +
    7. + Why doesn't Apache + include SSL? + +

      SSL (Secure Socket Layer) data transport requires + encryption, and many governments have restrictions upon the + import, export, and use of encryption technology. If Apache + included SSL in the base package, its distribution would + involve all sorts of legal and bureaucratic issues, and it + would no longer be freely available. Also, some of the + technology required to talk to current clients using SSL is + patented by RSA Data + Security, who restricts its use without a license.

      + +

      Some SSL implementations of Apache are available, + however; see the "related + projects" page at the main Apache web site.

      + +

      You can find out more about this topic in the + Apache Week article about Apache and Secure + Transactions.

      +
      +
    8. + +
    9. + How can I attach a + footer to my documents without using SSI? + +

      You can make arbitrary changes to static documents by + configuring an Action which + launches a CGI script. The CGI is then responsible for + setting a content-type and delivering the requested + document (the location of which is passed in the + PATH_TRANSLATED environment variable), along + with whatever footer is needed.

      + +

      Busy sites may not want to run a CGI script on every + request, and should consider using an Apache module to add + the footer. There are several third party modules available + through the Apache + Module Registry which will add footers to documents. + These include mod_trailer, PHP + (php3_auto_append_file), mod_layout, and + mod_perl (Apache::Sandwich).

      +
      +
    10. + +
    11. + Does Apache include a + search engine? + +

      Apache does not include a search engine, but there are + many good commercial and free search engines which can be + used easily with Apache. Some of them are listed on the Web Site + Search Tools page. Open source search engines that are + often used with Apache include ht://Dig and SWISH-E.

      +
      +
    12. + +
    13. + How can I rotate my + log files? + +

      The simple answer: by piping the transfer log into an + appropriate log file rotation utility.

      + +

      The longer answer: In the src/support/ directory, you + will find a utility called rotatelogs which can + be used like this:

      +
      +   TransferLog "|/path/to/rotatelogs /path/to/logs/access_log 86400"
      +
      + +

      to enable daily rotation of the log files.
      + A more sophisticated solution of a logfile rotation + utility is available under the name cronolog + from Andrew Ford's site at http://www.cronolog.org/. + It can automatically create logfile subdirectories based on + time and date, and can have a constant symlink point to the + rotating logfiles. (As of version 1.6.1, cronolog is + available under the Apache + License). Use it like this:

      +
      +   CustomLog "|/path/to/cronolog --symlink=/usr/local/apache/logs/access_log /usr/local/apache/logs/%Y/%m/access_log" combined
      +
      +
      +
    14. + +
    15. + How do I keep certain + requests from appearing in my logs? + +

      The maximum flexibility for removing unwanted + information from log files is obtained by post-processing + the logs, or using piped-logs to feed the logs through a + program which does whatever you want. However, Apache does + offer the ability to prevent requests from ever appearing + in the log files. You can do this by using the SetEnvIf + directive to set an environment variable for certain + requests and then using the conditional + CustomLog syntax to prevent logging when the + environment variable is set.

      +
      +
    16. + +
    17. + Does Apache support any + sort of database integration? + +

      No. Apache is a Web (HTTP) server, not an application + server. The base package does not include any such + functionality. See the PHP + project and the mod_perl project for + examples of modules that allow you to work with databases + from within the Apache environment.

      +
      +
    18. + +
    19. + Can I use Active Server Pages + (ASP) with Apache? + +

      The base Apache Web Server package does not include ASP + support. However, a number of projects provide ASP or + ASP-like functionality for Apache. Some of these are:

      + +

      See also the related + projects page to find out more.

      +
      +
    20. + +
    21. + Does Apache come with Java + support? + +

      The base Apache Web server package does not include + support for Java, Java Server Pages, Enterprise Java Beans, + or Java servlets. Those features are available as add-ons + from the Apache/Java project site, <URL:http://jakarta.apache.org/>.

      +
      +
    22. +
    + + + + + + + + diff --git a/htdocs/manual/misc/FAQ.html b/htdocs/manual/misc/FAQ.html new file mode 100644 index 00000000000..54ebee0839b --- /dev/null +++ b/htdocs/manual/misc/FAQ.html @@ -0,0 +1,108 @@ + + + + + + + Apache Server Frequently Asked Questions + + + + + + + +

    Apache Server Frequently Asked + Questions

    + +

    The latest version of this FAQ is always available from the + main Apache web site, at <http://httpd.apache.org/docs/misc/FAQ.html>.

    + + + + + + + + + + + + + + + + +

    If you are reading a text-only version of this FAQ, you may + find numbers enclosed in brackets (such as "[12]"). These refer + to the list of reference URLs to be found at the end of the + document. These references do not appear, and are not needed, + for the hypertext version.

    + +

    The Questions

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + + + + + + + + + +
    +
    + +

    The Answers

    + + + + + + + + + + + + + diff --git a/htdocs/manual/misc/HTTP_Features.tsv b/htdocs/manual/misc/HTTP_Features.tsv new file mode 100644 index 00000000000..893403d898f --- /dev/null +++ b/htdocs/manual/misc/HTTP_Features.tsv @@ -0,0 +1,142 @@ +This tab-separated-value file is for use as a checklist +for features against , +since two independently developed and interoperable +implementations are needed for each feature. For each entry, + ? means not filled-in + - means not applicable + n means no + y means yes + Y means yes with the addition of a module that uses feature + +The contents should be placed in the form at +by someone who wants to be the contact for the Apache Group. + +Section Feature Implemented Tested +8.1 Persistent Connections y y +8.2.3 Automatic retrying of requests - - +8.2.4 Use of the 100 (Continue) status n n +9.2 OPTIONS y y +9.3 GET y y +9.4 HEAD y y +9.5 POST y y +9.6 PUT Y y +9.7 DELETE Y y +9.8 TRACE y y +9.9 CONNECT y y +10.1.1 100 Continue y y +10.1.2 101 Switching Protocols Y n +10.2.1 200 OK y y +10.2.2 201 Created y y +10.2.3 202 Accepted y y +10.2.4 203 Non-Authoritative Information y y +10.2.5 204 No Content y y +10.2.6 205 Reset Content y y +10.2.7 206 Partial Content y y +10.3.1 300 Multiple Choices y y +10.3.2 301 Moved Permanently y y +10.3.3 302 Found y y +10.3.4 303 See Other y y +10.3.5 304 Not Modified y y +10.3.6 305 Use Proxy y n +10.3.7 307 Temporary Redirect n n +10.4.1 400 Bad Request y y +10.4.2 401 Unauthorized y y +10.4.3 402 Payment Required Y n +10.4.4 403 Forbidden y y +10.4.5 404 Not Found y y +10.4.6 405 Method Not Allowed y y +10.4.7 406 Not Acceptable y y +10.4.8 407 Proxy Authentication Required y y +10.4.9 408 Request Timeout y y +10.4.10 409 Conflict Y n +10.4.11 410 Gone y y +10.4.12 411 Length Required y y +10.4.13 412 Precondition Failed y y +10.4.14 413 Request Entity Too Large y y +10.4.15 414 Request-URI Too Long y y +10.4.16 415 Unsupported Media Type y n +10.4.17 416 Requested range not satisfiable n n +10.4.18 417 Expectation Failed n n +10.5.1 500 Internal Server Error y y +10.5.2 501 Not Implemented y y +10.5.3 502 Bad Gateway y y +10.5.4 503 Service Unavailable y y +10.5.5 504 Gateway Timeout y y +10.5.6 505 HTTP Version Not Supported Y n +13.3.3 Strong entity tags y y +13.3.3 Weak entity tags y y +14.1 Accept y y +14.2 Accept-Charset y y +14.3 Accept-Encoding n n +14.4 Accept-Language y y +14.5 Accept-Ranges y y +14.6 Age - - +14.7 Allow y y +14.8 Authorization y y +14.9 Cache-Control y y +14.10 Connection y y +14.11 Content-Encoding y y +14.12 Content-Language y y +14.13 Content-Length y y +14.14 Content-Location Y n +14.15 Content-MD5 y n +14.16 Content-Range y y +14.17 Content-Type y y +14.18 Date y y +14.19 ETag y y +14.20 Expect n n +14.21 Expires y y +14.22 From - - +14.23 Host y y +14.24 If-Modified-Since y y +14.25 If-Match y y +14.26 If-None-Match y y +14.27 If-Range y y +14.28 If-Unmodified-Since y y +14.29 Last-Modified y y +14.30 Location y y +14.31 Max-Forwards n n +14.32 Pragma y y +14.33 Proxy-Authenticate y y +14.34 Proxy-Authorization y y +14.35 Range y y +14.36 Referer y y +14.37 Retry-After y y +14.38 Server y y +14.39 TE n n +14.40 Trailer n n +14.41 Transfer-Encoding y y +14.42 Upgrade Y n +14.43 User-Agent - - +14.44 Vary y y +14.45 Via n n +14.46 Warning Y n +14.47 WWW-Authenticate y y +===== ===================================== +Same for : + +A 2 Basic Authentication y y +A 3.2.1 WWW-Authenticate Digest y n +A 3.2.1 qop-options auth n n +A 3.2.1 qop-options auth-int n n +A 3.2.2 Authorization Digest y n +A 3.2.2 request qop auth n n +A 3.2.2 request qop auth-int n n +A 3.2.3 Authentication-Info Digest n n +A 3.2.3 response qop auth n n +A 3.2.3 response qop auth-int n n +A 4.1 Proxy-Authenticate Basic y y +A 4.2 Proxy-Authenticate Digest y n +A 4.2 Proxy qop-options auth n n +A 4.2 Proxy qop-options auth-int n n +A 4.2 Proxy Authorization Digest y n +A 4.2 Proxy request qop auth n n +A 4.2 Proxy request qop auth-int n n +A 4.2 Proxy Authentication-Info Digest n n +A 4.2 Proxy response qop auth n n +A 4.2 Proxy response qop auth-int n n + + +NOTES: +100 Continue sent on all bodied requests, as per RFC 2068. +Accept-Encoding does not allow q-values, as per RFC 2068. diff --git a/htdocs/manual/misc/client_block_api.html b/htdocs/manual/misc/client_block_api.html new file mode 100644 index 00000000000..3e8ba74b2e9 --- /dev/null +++ b/htdocs/manual/misc/client_block_api.html @@ -0,0 +1,87 @@ + + + + + + + Reading Client Input in Apache 1.2 + + + + + + +

    Reading Client Input in Apache 1.2

    +
    + +

    Apache 1.1 and earlier let modules handle POST and PUT + requests by themselves. The module would, on its own, determine + whether the request had an entity, how many bytes it was, and + then called a function (read_client_block) to get + the data.

    + +

    However, HTTP/1.1 requires several things of POST and PUT + request handlers that did not fit into this module, and all + existing modules have to be rewritten. The API calls for + handling this have been further abstracted, so that future HTTP + protocol changes can be accomplished while remaining + backwards-compatible.

    +
    + +

    The New API Functions

    +
    +   int ap_setup_client_block (request_rec *, int read_policy);
    +   int ap_should_client_block (request_rec *);
    +   long ap_get_client_block (request_rec *, char *buffer, int buffer_size);
    +
    + +
      +
    1. + Call ap_setup_client_block() near the + beginning of the request handler. This will set up all the + necessary properties, and will return either OK, or an + error code. If the latter, the module should return that + error code. The second parameter selects the policy to + apply if the request message indicates a body, and how a + chunked transfer-coding should be interpreted. Choose one + of +
      +    REQUEST_NO_BODY          Send 413 error if message has any body
      +    REQUEST_CHUNKED_ERROR    Send 411 error if body without Content-Length
      +    REQUEST_CHUNKED_DECHUNK  If chunked, remove the chunks for me.
      +    REQUEST_CHUNKED_PASS     Pass the chunks to me without removal.
      +
      + In order to use the last two options, the caller MUST + provide a buffer large enough to hold a chunk-size line, + including any extensions. +
    2. + +
    3. When you are ready to possibly accept input, call + ap_should_client_block(). This will tell the + module whether or not to read input. If it is 0, the module + should assume that the input is of a non-entity type + (e.g., a GET request). A nonzero response indicates + that the module should proceed (to step 3). This step also + sends a 100 Continue response to HTTP/1.1 clients, so should + not be called until the module is + *definitely* ready to read content. + (otherwise, the point of the 100 response is defeated). Never + call this function more than once.
    4. + +
    5. Finally, call ap_get_client_block in a loop. + Pass it a buffer and its size. It will put data into the + buffer (not necessarily the full buffer, in the case of + chunked inputs), and return the length of the input block. + When it is done reading, it will return 0 if EOF, or -1 if + there was an error.
    6. +
    + +

    As an example, please look at the code in + mod_cgi.c. This is properly written to the new API + guidelines.

    + + + + diff --git a/htdocs/manual/misc/compat_notes.html b/htdocs/manual/misc/compat_notes.html new file mode 100644 index 00000000000..a84fa943ca5 --- /dev/null +++ b/htdocs/manual/misc/compat_notes.html @@ -0,0 +1,125 @@ + + + + + + + Apache HTTP Server: Notes about Compatibility with + NCSA's Server + + + + + + +

    Compatibility Notes with NCSA's Server

    +
    + While Apache is for the most part a drop-in replacement for + NCSA's httpd, there are a couple gotcha's to watch out for. + These are mostly due to the fact that the parser for config and + access control files was rewritten from scratch, so certain + liberties the earlier servers took may not be available here. + These are all easily fixable. If you know of other problems + that belong here, let us know. + + +

    Please also check the known client problems + page.

    + +
      +
    1. As of Apache 1.3.1, methods named in a <Limit> + section must be listed in upper-case. Lower- or + mixed-case method names will result in a configuration + error.
    2. + +
    3. The basic mod_auth AuthGroupFile-specified + group file format allows commas between user names - Apache + does not.
    4. + +
    5. If you follow the NCSA guidelines for setting up access + restrictions based on client domain, you may well have added + entries for AuthType, AuthName, AuthUserFile or + AuthGroupFile. None of these + are needed (or appropriate) for restricting access based on + client domain. When Apache sees AuthType it + (reasonably) assumes you are using some authorization type + based on username and password. Please remove + AuthType, it's unnecessary even for NCSA.
    6. + +
    7. OldScriptAlias is no longer supported.
    8. + +
    9. exec cgi="" produces reasonable + malformed header responses when used to + invoke non-CGI scripts.
      + The NCSA code ignores the missing header (bad idea).
      + Solution: write CGI to the CGI spec and use + include virtual, or use exec + cmd="" instead.
    10. + +
    11. Icons for FancyIndexing broken - well, no, they're not + broken, we've just upgraded the icons from flat .xbm files to + pretty and much smaller .gif files, courtesy of Kevin Hughes at EIT. If you are using the same + srm.conf from an old distribution, make sure you add the new + AddIcon, AddIconByType, + and DefaultIcon + directives.
    12. + +
    13. Apache versions before 1.2b1 will ignore the last line of + configuration files if the last line does not have a trailing + newline. This affects configuration files (httpd.conf, + access.conf and srm.conf), and htpasswd and htgroup + files.
    14. + +
    15. Apache does not permit commas delimiting the methods in + <Limit>.
    16. + +
    17. Apache's <VirtualHost> treats all + addresses as "optional" (i.e., the server should + continue booting if it can't resolve the address). Whereas in + NCSA the default is to fail booting unless an added + optional keyword is included.
    18. + +
    19. Apache does not implement OnDeny; use ErrorDocument + instead.
    20. + +
    21. Apache (as of 1.3) always performs the equivalent of + HostnameLookups minimal. minimal is + not an option to HostnameLookups.
    22. + +
    23. To embed spaces in directive arguments NCSA used a + backslash before the space. Apache treats backslashes as + normal characters. To embed spaces surround the argument with + double-quotes instead.
    24. + +
    25. Apache does not implement the NCSA referer + directive. See PR#968 for a + few brief suggestions on alternative ways to implement the + same thing under Apache.
    26. + +
    27. Apache does not allow ServerRoot settings inside a + VirtualHost container. There is only one global ServerRoot in + Apache; any desired changes in paths for virtual hosts need + to be made with the explicit directives, e.g., + DocumentRoot, TransferLog, etc.
    28. + +
    29. The AddType directive cannot be used to set + the type of particular files. Instead, you can scope you + directives using <Files> blocks.
    30. +
    + More to come when we notice them.... + + + + diff --git a/htdocs/manual/misc/custom_errordocs.html b/htdocs/manual/misc/custom_errordocs.html new file mode 100644 index 00000000000..0d7ab2fbd9b --- /dev/null +++ b/htdocs/manual/misc/custom_errordocs.html @@ -0,0 +1,483 @@ + + + + + + + International Customized Server Error Messages + + + + + + +

    Using XSSI and ErrorDocument to + configure customized international server error responses

    + +

    Index

    + + +
    + +

    Introduction

    + +

    This document describes an easy way to provide your apache + WWW server with a set of customized error messages which take + advantage of Content + Negotiation and eXtended + Server Side Includes (XSSI) to return error messages + generated by the server in the client's native language.

    + +

    By using XSSI, all customized messages + can share a homogenous and consistent style and layout, and + maintenance work (changing images, changing links) is kept to a + minimum because all layout information can be kept in a single + file.
    + Error documents can be shared across different servers, or + even hosts, because all varying information is inserted at the + time the error document is returned on behalf of a failed + request.

    + +

    Content Negotiation then selects the appropriate language + version of a particular error message text, honoring the + language preferences passed in the client's request. (Users + usually select their favorite languages in the preferences + options menu of today's browsers). When an error document in + the client's primary language version is unavailable, the + secondary languages are tried or a default (fallback) version + is used.

    + +

    You have full flexibility in designing your error documents + to your personal taste (or your company's conventions). For + demonstration purposes, we present a simple generic error + document scheme. For this hypothetic server, we assume that all + error messages...

    + +
      +
    • possibly are served by different virtual hosts (different + host name, different IP address, or different port) on the + server machine,
    • + +
    • show a predefined company logo in the right top of the + message (selectable by virtual host),
    • + +
    • print the error title first, followed by an explanatory + text and (depending on the error context) help on how to + resolve the error,
    • + +
    • have some kind of standardized background image,
    • + +
    • display an apache logo and a feedback email address at + the bottom of the error message.
    • +
    + +

    An example of a "document not found" message for a german + client might look like this:
    + [Needs graphics capability to display]
    + All links in the document as well as links to the server's + administrator mail address, and even the name and port of the + serving virtual host are inserted in the error document at + "run-time", i.e., when the error actually occurs.

    + +

    Creating an + ErrorDocument directory

    + For this concept to work as easily as possible, we must take + advantage of as much server support as we can get: + +
      +
    1. By defining the MultiViews option, we + enable the language selection of the most appropriate + language alternative (content negotiation).
    2. + +
    3. By setting the LanguagePriority + directive we define a set of default fallback languages in + the situation where the client's browser did not express any + preference at all.
    4. + +
    5. By enabling Server Side + Includes (and disallowing execution of cgi scripts for + security reasons), we allow the server to include building + blocks of the error message, and to substitute the value of + certain environment variables into the generated document + (dynamic HTML) or even to conditionally include or omit parts + of the text.
    6. + +
    7. The AddHandler and AddType directives + are useful for automatically XSSI-expanding all files with a + .shtml suffix to text/html.
    8. + +
    9. By using the Alias directive, we + keep the error document directory outside of the document + tree because it can be regarded more as a server part than + part of the document tree.
    10. + +
    11. The <Directory>-Block + restricts these "special" settings to the error document + directory and avoids an impact on any of the settings for the + regular document tree.
    12. + +
    13. For each of the error codes to be handled (see RFC2068 + for an exact description of each error code, or look at + src/main/http_protocol.c if you wish to see + apache's standard messages), an ErrorDocument in + the aliased /errordocs directory is defined. + Note that we only define the basename of the document here + because the MultiViews option will select the best candidate + based on the language suffixes and the client's preferences. + Any error situation with an error code not handled + by a custom document will be dealt with by the server in the + standard way (i.e., a plain error message in + english).
    14. + +
    15. Finally, the AllowOverride + directive tells apache that it is not necessary to look for a + .htaccess file in the /errordocs directory: a minor speed + optimization.
    16. +
    + The resulting httpd.conf configuration would then + look similar to this: (Note that you can define your own + error messages using this method for only part of the document + tree, e.g., a /~user/ subtree. In this case, the configuration + could as well be put into the .htaccess file at the root of the + subtree, and the <Directory> and </Directory> + directives -but not the contained directives- must be + omitted.) +
    +  LanguagePriority en fr de 
    +  Alias  /errordocs  /usr/local/apache/errordocs
    +  <Directory /usr/local/apache/errordocs>
    +   AllowOverride none
    +   Options MultiViews IncludesNoExec FollowSymLinks
    +   AddType text/html .shtml
    +   AddHandler server-parsed .shtml
    +  </Directory>
    +  #    "400 Bad Request",
    +  ErrorDocument  400  /errordocs/400
    +  #    "401 Authorization Required",
    +  ErrorDocument  401  /errordocs/401
    +  #    "403 Forbidden",
    +  ErrorDocument  403  /errordocs/403
    +  #    "404 Not Found",
    +  ErrorDocument  404  /errordocs/404
    +  #    "500 Internal Server Error",
    +  ErrorDocument  500  /errordocs/500
    +
    + The directory for the error messages (here: + /usr/local/apache/errordocs/) must then be created + with the appropriate permissions (readable and executable by + the server uid or gid, only writable for the administrator). + +

    Naming the individual + error document files

    + By defining the MultiViews option, the server was + told to automatically scan the directory for matching variants + (looking at language and content type suffixes) when a + requested document was not found. In the configuration, we + defined the names for the error documents to be just their + error number (without any suffix). + +

    The names of the individual error documents are now + determined like this (I'm using 403 as an example, think of it + as a placeholder for any of the configured error + documents):

    + +
      +
    • No file errordocs/403 should exist. Otherwise, it would + be found and served (with the DefaultType, usually + text/plain), all negotiation would be bypassed.
    • + +
    • For each language for which we have an internationalized + version (note that this need not be the same set of languages + for each error code - you can get by with a single language + version until you actually have translated + versions), a document + errordocs/403.shtml.lang is created and + filled with the error text in that language (see below).
    • + +
    • One fallback document called + errordocs/403.shtml is created, usually by + creating a symlink to the default language variant (see below).
    • +
    + +

    The common header and + footer files

    + By putting as much layout information in two special "include + files", the error documents can be reduced to a bare minimum. + +

    One of these layout files defines the HTML document header + and a configurable list of paths to the icons to be shown in + the resulting error document. These paths are exported as a set + of XSSI environment variables and are later evaluated by the + "footer" special file. The title of the current error (which is + put into the TITLE tag and an H1 header) is simply passed in + from the main error document in a variable called + title.
    + By changing this file, the layout of all generated + error messages can be changed in a second. (By + exploiting the features of XSSI, you can easily define + different layouts based on the current virtual host, or even + based on the client's domain name).

    + +

    The second layout file describes the footer to be displayed + at the bottom of every error message. In this example, it shows + an apache logo, the current server time, the server version + string and adds a mail reference to the site's webmaster.

    + +

    For simplicity, the header file is simply called + head.shtml because it contains server-parsed + content but no language specific information. The footer file + exists once for each language translation, plus a symlink for + the default language.

    + +

    Example: for English, French and German + versions (default english)
    + foot.shtml.en,
    + foot.shtml.fr,
    + foot.shtml.de,
    + foot.shtml symlink to + foot.shtml.en

    + +

    Both files are included into the error document by using the + directives <!--#include virtual="head" --> + and <!--#include virtual="foot" --> + respectively: the rest of the magic occurs in mod_negotiation + and in mod_include.

    + +

    See the listings below to see an + actual HTML implementation of the discussed example.

    + +

    Creating + ErrorDocuments in different languages

    + After all this preparation work, little remains to be said + about the actual documents. They all share a simple common + structure: +
    +<!--#set var="title" value="error description title" -->
    +<!--#include virtual="head" -->
    +   explanatory error text
    +<!--#include virtual="foot" -->
    +
    + In the listings section, you can see an + example of a [400 Bad Request] error document. Documents as + simple as that certainly cause no problems to translate or + expand. + +

    The fallback + language

    + Do we need a special handling for languages other than those we + have translations for? We did set the LanguagePriority, didn't + we?! + +

    Well, the LanguagePriority directive is for the case where + the client does not express any language priority at all. But + what happens in the situation where the client wants one of the + languages we do not have, and none of those we do have?

    + +

    Without doing anything, the Apache server will usually + return a [406 no acceptable variant] error, listing the choices + from which the client may select. But we're in an error message + already, and important error information might get lost when + the client had to choose a language representation first.

    + +

    So, in this situation it appears to be easier to define a + fallback language (by copying or linking, e.g., the + english version to a language-less version). Because the + negotiation algorithm prefers "more specialized" variants over + "more generic" variants, these generic alternatives will only + be chosen when the normal negotiation did not succeed.

    + +

    A simple shell script to do it (execute within the + errordocs/ dir):

    +
    +  for f in *.shtml.en
    +  do
    +     ln -s $f `basename $f .en`
    +  done
    +
    + +

    Customizing Proxy Error + Messages

    + +

    As of Apache-1.3, it is possible to use the + ErrorDocument mechanism for proxy error messages + as well (previous versions always returned fixed predefined + error messages).

    + +

    Most proxy errors return an error code of [500 Internal + Server Error]. To find out whether a particular error document + was invoked on behalf of a proxy error or because of some other + server error, and what the reason for the failure was, you can + check the contents of the new ERROR_NOTES CGI + environment variable: if invoked for a proxy error, this + variable will contain the actual proxy error message text in + HTML form.

    + +

    The following excerpt demonstrates how to exploit the + ERROR_NOTES variable within an error document:

    +
    + <!--#if expr="$REDIRECT_ERROR_NOTES = ''" -->
    +  <p>
    +   The server encountered an unexpected condition
    +   which prevented it from fulfilling the request. 
    +  </p>
    +  <p>
    +   <A HREF="mailto:<!--#echo var="SERVER_ADMIN" -->"
    +    SUBJECT="Error message [<!--#echo var="REDIRECT_STATUS" -->] <!--#echo var="title" --> for <!--#echo var="REQUEST_URI" -->">
    +   Please forward this error screen to <!--#echo var="SERVER_NAME" -->'s
    +   WebMaster</A>; it includes useful debugging information about
    +   the Request which caused the error.
    +   <pre><!--#printenv --></pre>
    +  </p>
    + <!--#else -->
    +  <!--#echo var="REDIRECT_ERROR_NOTES" -->
    + <!--#endif -->
    +
    + +

    HTML listing of the + discussed example

    + So, to summarize our example, here's the complete listing of + the 400.shtml.en document. You will notice that it + contains almost nothing but the error text (with conditional + additions). Starting with this example, you will find it easy + to add more error documents, or to translate the error + documents to different languages. +
    +
    +<!--#set var="title" value="Bad Request"
    +--><!--#include virtual="head" --><P>
    +   Your browser sent a request that this server could not understand:
    +   <BLOCKQUOTE>
    +     <STRONG><!--#echo var="REQUEST_URI" --></STRONG>
    +   </BLOCKQUOTE>
    +   The request could not be understood by the server due to malformed
    +   syntax. The client should not repeat the request without
    +   modifications.
    +   </P>
    +   <P>
    +   <!--#if expr="$HTTP_REFERER != ''" -->
    +    Please inform the owner of
    +    <A HREF="<!--#echo var="HTTP_REFERER" -->">the referring page</A> about 
    +    the malformed link.
    +   <!--#else -->
    +    Please check your request for typing errors and retry.
    +   <!--#endif -->
    +   </P>
    +<!--#include virtual="foot" -->
    +
    +
    + Here is the complete head.shtml file (the funny + line breaks avoid empty lines in the document after XSSI + processing). Note the configuration section at top. That's + where you configure the images and logos as well as the apache + documentation directory. Look how this file displays two + different logos depending on the content of the virtual host + name ($SERVER_NAME), and that an animated apache logo is shown + if the browser appears to support it (the latter requires + server configuration lines of the form
    + BrowserMatch "^Mozilla/[2-4]" anigif
    + for browser types which support animated GIFs). +
    +
    +<!--#if expr="$SERVER_NAME = /.*\.mycompany\.com$/" 
    +--><!--#set var="IMG_CorpLogo"
    +            value="http://$SERVER_NAME:$SERVER_PORT/errordocs/CorpLogo.gif" 
    +--><!--#set var="ALT_CorpLogo" value="Powered by Linux!" 
    +--><!--#else
    +--><!--#set var="IMG_CorpLogo"
    +            value="http://$SERVER_NAME:$SERVER_PORT/errordocs/PrivLogo.gif" 
    +--><!--#set var="ALT_CorpLogo" value="Powered by Linux!" 
    +--><!--#endif
    +--><!--#set var="IMG_BgImage" value="http://$SERVER_NAME:$SERVER_PORT/errordocs/BgImage.gif" 
    +--><!--#set var="DOC_Apache" value="http://$SERVER_NAME:$SERVER_PORT/Apache/" 
    +--><!--#if expr="$anigif" 
    +--><!--#set var="IMG_Apache" value="http://$SERVER_NAME:$SERVER_PORT/icons/apache_anim.gif" 
    +--><!--#else
    +--><!--#set var="IMG_Apache" value="http://$SERVER_NAME:$SERVER_PORT/icons/apache_pb.gif" 
    +--><!--#endif
    +--><!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
    +<HTML>
    + <HEAD>
    +  <TITLE>
    +   [<!--#echo var="REDIRECT_STATUS" -->] <!--#echo var="title" -->
    +  </TITLE>
    + </HEAD>
    + <BODY BGCOLOR="white" BACKGROUND="<!--#echo var="IMG_BgImage" -->"><UL>
    +  <H1 ALIGN="center">
    +   [<!--#echo var="REDIRECT_STATUS" -->] <!--#echo var="title" -->
    +   <IMG SRC="<!--#echo var="IMG_CorpLogo" -->"
    +        ALT="<!--#echo var="ALT_CorpLogo" -->" ALIGN=right>
    +  </H1>
    +  <HR><!-- ======================================================== -->
    +  <DIV>
    +
    +
    + and this is the foot.shtml.en file: +
    +
    +  </DIV>
    +  <HR>
    +  <DIV ALIGN="right"><SMALL><SUP>Local Server time:
    +      <!--#echo var="DATE_LOCAL" -->
    +  </SUP></SMALL></DIV>
    +  <DIV ALIGN="center">
    +    <A HREF="<!--#echo var="DOC_Apache" -->">
    +    <IMG SRC="<!--#echo var="IMG_Apache" -->" BORDER=0 ALIGN="bottom"
    +         ALT="Powered by <!--#echo var="SERVER_SOFTWARE" -->"></A><BR>
    +    <SMALL><SUP><!--#set var="var"
    +     value="Powered by $SERVER_SOFTWARE -- File last modified on $LAST_MODIFIED"
    +    --><!--#echo var="var" --></SUP></SMALL>
    +  </DIV>
    +  <ADDRESS>If the indicated error looks like a misconfiguration, please inform
    +   <A HREF="mailto:<!--#echo var="SERVER_ADMIN" -->"
    +      SUBJECT="Feedback about Error message [<!--#echo var="REDIRECT_STATUS" 
    +        -->] <!--#echo var="title" -->, req=<!--#echo var="REQUEST_URI" -->">
    +   <!--#echo var="SERVER_NAME" -->'s WebMaster</A>.
    +  </ADDRESS>
    + </UL></BODY>
    +</HTML>
    +
    +
    + +

    More welcome!

    + If you have tips to contribute, send mail to martin@apache.org + + + + diff --git a/htdocs/manual/misc/descriptors.html b/htdocs/manual/misc/descriptors.html new file mode 100644 index 00000000000..c1b098ae93a --- /dev/null +++ b/htdocs/manual/misc/descriptors.html @@ -0,0 +1,208 @@ + + + + + + + Descriptors and Apache + + + + + + +

    Descriptors and Apache

    + +

    A descriptor, also commonly called a file + handle is an object that a program uses to read or write + an open file, or open network socket, or a variety of other + devices. It is represented by an integer, and you may be + familiar with stdin, stdout, and + stderr which are descriptors 0, 1, and 2 + respectively. Apache needs a descriptor for each log file, plus + one for each network socket that it listens on, plus a handful + of others. Libraries that Apache uses may also require + descriptors. Normal programs don't open up many descriptors at + all, and so there are some latent problems that you may + experience should you start running Apache with many + descriptors (i.e., with many virtual hosts).

    + +

    The operating system enforces a limit on the number of + descriptors that a program can have open at a time. There are + typically three limits involved here. One is a kernel + limitation, depending on your operating system you will either + be able to tune the number of descriptors available to higher + numbers (this is frequently called FD_SETSIZE). Or you + may be stuck with a (relatively) low amount. The second limit + is called the hard resource limit, and it is sometimes + set by root in an obscure operating system file, but frequently + is the same as the kernel limit. The third limit is called the + soft resource limit. The soft limit is always less + than or equal to the hard limit. For example, the hard limit + may be 1024, but the soft limit only 64. Any user can raise + their soft limit up to the hard limit. Root can raise the hard + limit up to the system maximum limit. The soft limit is the + actual limit that is used when enforcing the maximum number of + files a process can have open.

    + +

    To summarize:

    + +
    +
    +  #open files  <=  soft limit  <=  hard limit  <=  kernel limit
    +
    +
    + +

    You control the hard and soft limits using the + limit (csh) or ulimit (sh) + directives. See the respective man pages for more information. + For example you can probably use ulimit -n + unlimited to raise your soft limit up to the hard limit. + You should include this command in a shell script which starts + your webserver.

    + +

    Unfortunately, it's not always this simple. As mentioned + above, you will probably run into some system limitations that + will need to be worked around somehow. Work was done in version + 1.2.1 to improve the situation somewhat. Here is a partial list + of systems and workarounds (assuming you are using 1.2.1 or + later):

    + +
    +
    BSDI 2.0
    + +
    Under BSDI 2.0 you can build Apache to support more + descriptors by adding -DFD_SETSIZE=nnn to + EXTRA_CFLAGS (where nnn is the number of + descriptors you wish to support, keep it less than the hard + limit). But it will run into trouble if more than + approximately 240 Listen directives are used. This may be + cured by rebuilding your kernel with a higher + FD_SETSIZE.
    + +
    FreeBSD 2.2, BSDI 2.1+
    + +
    Similar to the BSDI 2.0 case, you should define + FD_SETSIZE and rebuild. But the extra Listen + limitation doesn't exist.
    + +
    Linux
    + +
    By default Linux has a kernel maximum of 256 open + descriptors per process. There are several patches available + for the 2.0.x series which raise this to 1024 and beyond, and + you can find them in the "unofficial patches" section of the Linux Information HQ. + None of these patches are perfect, and an entirely different + approach is likely to be taken during the 2.1.x development. + Applying these patches will raise the FD_SETSIZE used to + compile all programs, and unless you rebuild all your + libraries you should avoid running any other program with a + soft descriptor limit above 256. As of this writing the + patches available for increasing the number of descriptors do + not take this into account. On a dedicated webserver you + probably won't run into trouble.
    + +
    Solaris through 2.5.1
    + +
    Solaris has a kernel hard limit of 1024 (may be lower in + earlier versions). But it has a limitation that files using + the stdio library cannot have a descriptor above 255. Apache + uses the stdio library for the ErrorLog directive. When you + have more than approximately 110 virtual hosts (with an error + log and an access log each) you will need to build Apache + with -DHIGH_SLACK_LINE=256 added to + EXTRA_CFLAGS. You will be limited to + approximately 240 error logs if you do this.
    + +
    AIX
    + +
    AIX version 3.2?? appears to have a hard limit of 128 + descriptors. End of story. Version 4.1.5 has a hard limit of + 2000. Version 4.3.3 and 5.1 say +
    +/*
    + * Select uses bit masks of file descriptors.
    + * These macros manipulate such bit fields.
    + * FD_SETSIZE may be defined by the user to the maximum valued file
    + * descriptor to be selected; the default here should be == OPEN_MAX
    + */
    +#ifndef FD_SETSIZE
    +#define FD_SETSIZE     32767    /* must be == OPEN_MAX in  */
    +#endif
    +
    + +
    SCO OpenServer
    + +
    Edit the /etc/conf/cf.d/stune file or use + /etc/conf/cf.d/configure choice 7 (User and + Group configuration) and modify the NOFILES + kernel parameter to a suitably higher value. SCO recommends a + number between 60 and 11000, the default is 110. Relink and + reboot, and the new number of descriptors will be + available.
    + +
    Compaq Tru64 UNIX/Digital UNIX/OSF
    + +
    +
      +
    1. Raise open_max_soft and + open_max_hard to 4096 in the proc subsystem. + Do a man on sysconfig, sysconfigdb, and + sysconfigtab.
    2. + +
    3. Raise max-vnodes to a large number which + is greater than the number of apache processes * 4096 + (Setting it to 250,000 should be good for most people). + Do a man on sysconfig, sysconfigdb, and + sysconfigtab.
    4. + +
    5. If you are using Tru64 5.0, 5.0A, or 5.1, define + NO_SLACK to work around a bug in the OS. + CFLAGS="-DNO_SLACK" ./configure
    6. +
    +
    + +
    Others
    + +
    If you have details on another operating system, please + submit it through our Bug Report + Page.
    +
    + +

    In addition to the problems described above there are + problems with many libraries that Apache uses. The most common + example is the bind DNS resolver library that is used by pretty + much every unix, which fails if it ends up with a descriptor + above 256. We suspect there are other libraries that similar + limitations. So the code as of 1.2.1 takes a defensive stance + and tries to save descriptors less than 16 for use while + processing each request. This is called the low slack + line.

    + +

    Note that this shouldn't waste descriptors. If you really + are pushing the limits and Apache can't get a descriptor above + 16 when it wants it, it will settle for one below 16.

    + +

    In extreme situations you may want to lower the low slack + line, but you shouldn't ever need to. For example, lowering it + can increase the limits 240 described above under Solaris and + BSDI 2.0. But you'll play a delicate balancing game with the + descriptors needed to serve a request. Should you want to play + this game, the compile time parameter is + LOW_SLACK_LINE and there's a tiny bit of + documentation in the header file httpd.h.

    + +

    Finally, if you suspect that all this slack stuff is causing + you problems, you can disable it. Add -DNO_SLACK + to EXTRA_CFLAGS and rebuild. But please report it + to our Bug + Report Page so that we can investigate. + +

    + + + diff --git a/htdocs/manual/misc/fin_wait_2.html b/htdocs/manual/misc/fin_wait_2.html new file mode 100644 index 00000000000..d2e6bdc28ce --- /dev/null +++ b/htdocs/manual/misc/fin_wait_2.html @@ -0,0 +1,388 @@ + + + + + + + Connections in FIN_WAIT_2 and Apache + + + + + + +

    Connections in the FIN_WAIT_2 state and + Apache

    + +
      +
    1. +

      What is the FIN_WAIT_2 state?

      + Starting with the Apache 1.2 betas, people are reporting + many more connections in the FIN_WAIT_2 state (as reported + by netstat) than they saw using older + versions. When the server closes a TCP connection, it sends + a packet with the FIN bit sent to the client, which then + responds with a packet with the ACK bit set. The client + then sends a packet with the FIN bit set to the server, + which responds with an ACK and the connection is closed. + The state that the connection is in during the period + between when the server gets the ACK from the client and + the server gets the FIN from the client is known as + FIN_WAIT_2. See the TCP RFC for + the technical details of the state transitions. + +

      The FIN_WAIT_2 state is somewhat unusual in that there + is no timeout defined in the standard for it. This means + that on many operating systems, a connection in the + FIN_WAIT_2 state will stay around until the system is + rebooted. If the system does not have a timeout and too + many FIN_WAIT_2 connections build up, it can fill up the + space allocated for storing information about the + connections and crash the kernel. The connections in + FIN_WAIT_2 do not tie up an httpd process.

      +
    2. + +
    3. +

      But why does it happen?

      + There are numerous reasons for it happening, some of them + may not yet be fully clear. What is known follows. + +

      Buggy clients and persistent connections

      + Several clients have a bug which pops up when dealing with + persistent connections (aka + keepalives). When the connection is idle and the server + closes the connection (based on the KeepAliveTimeout), + the client is programmed so that the client does not send + back a FIN and ACK to the server. This means that the + connection stays in the FIN_WAIT_2 state until one of the + following happens: + +
        +
      • The client opens a new connection to the same or a + different site, which causes it to fully close the older + connection on that socket.
      • + +
      • The user exits the client, which on some (most?) + clients causes the OS to fully shutdown the + connection.
      • + +
      • The FIN_WAIT_2 times out, on servers that have a + timeout for this state.
      • +
      + +

      If you are lucky, this means that the buggy client will + fully close the connection and release the resources on + your server. However, there are some cases where the socket + is never fully closed, such as a dialup client + disconnecting from their provider before closing the + client. In addition, a client might sit idle for days + without making another connection, and thus may hold its + end of the socket open for days even though it has no + further use for it. This is a bug in the browser or + in its operating system's TCP implementation.

      + +

      The clients on which this problem has been verified to + exist:

      + +
        +
      • Mozilla/3.01 (X11; I; FreeBSD 2.1.5-RELEASE + i386)
      • + +
      • Mozilla/2.02 (X11; I; FreeBSD 2.1.5-RELEASE + i386)
      • + +
      • Mozilla/3.01Gold (X11; I; SunOS 5.5 sun4m)
      • + +
      • MSIE 3.01 on the Macintosh
      • + +
      • MSIE 3.01 on Windows 95
      • +
      + +

      This does not appear to be a problem on:

      + +
        +
      • Mozilla/3.01 (Win95; I)
      • +
      + +

      It is expected that many other clients have the same + problem. What a client should do is + periodically check its open socket(s) to see if they have + been closed by the server, and close their side of the + connection if the server has closed. This check need only + occur once every few seconds, and may even be detected by a + OS signal on some systems (e.g., Win95 and NT + clients have this capability, but they seem to be ignoring + it).

      + +

      Apache cannot avoid these FIN_WAIT_2 + states unless it disables persistent connections for the + buggy clients, just like we recommend doing for Navigator + 2.x clients due to other bugs. However, non-persistent + connections increase the total number of connections needed + per client and slow retrieval of an image-laden web page. + Since non-persistent connections have their own resource + consumptions and a short waiting period after each closure, + a busy server may need persistence in order to best serve + its clients.

      + +

      As far as we know, the client-caused FIN_WAIT_2 problem + is present for all servers that support persistent + connections, including Apache 1.1.x and 1.2.

      + +

      A necessary bit of code introduced in 1.2

      + While the above bug is a problem, it is not the whole + problem. Some users have observed no FIN_WAIT_2 problems + with Apache 1.1.x, but with 1.2b enough connections build + up in the FIN_WAIT_2 state to crash their server. The most + likely source for additional FIN_WAIT_2 states is a + function called lingering_close() which was + added between 1.1 and 1.2. This function is necessary for + the proper handling of persistent connections and any + request which includes content in the message body + (e.g., PUTs and POSTs). What it does is read any + data sent by the client for a certain time after the server + closes the connection. The exact reasons for doing this are + somewhat complicated, but involve what happens if the + client is making a request at the same time the server + sends a response and closes the connection. Without + lingering, the client might be forced to reset its TCP + input buffer before it has a chance to read the server's + response, and thus understand why the connection has + closed. See the appendix for more + details. + +

      The code in lingering_close() appears to + cause problems for a number of factors, including the + change in traffic patterns that it causes. The code has + been thoroughly reviewed and we are not aware of any bugs + in it. It is possible that there is some problem in the BSD + TCP stack, aside from the lack of a timeout for the + FIN_WAIT_2 state, exposed by the + lingering_close code that causes the observed + problems.

      +
    4. + +
    5. + What can I do about it? There are several possible + workarounds to the problem, some of which work better than + others. + +

      Add a timeout for FIN_WAIT_2

      + The obvious workaround is to simply have a timeout for the + FIN_WAIT_2 state. This is not specified by the RFC, and + could be claimed to be a violation of the RFC, but it is + widely recognized as being necessary. The following systems + are known to have a timeout: + +
        +
      • FreeBSD + versions starting at 2.0 or possibly earlier.
      • + +
      • NetBSD version + 1.2(?)
      • + +
      • OpenBSD all + versions(?)
      • + +
      • BSD/OS 2.1, with + the + K210-027 patch installed.
      • + +
      • Solaris as of + around version 2.2. The timeout can be tuned by using + ndd to modify + tcp_fin_wait_2_flush_interval, but the + default should be appropriate for most servers and + improper tuning can have negative impacts.
      • + +
      • Linux 2.0.x and + earlier(?)
      • + +
      • HP-UX 10.x defaults + to terminating connections in the FIN_WAIT_2 state after + the normal keepalive timeouts. This does not refer to the + persistent connection or HTTP keepalive timeouts, but the + SO_LINGER socket option which is enabled by + Apache. This parameter can be adjusted by using + nettune to modify parameters such as + tcp_keepstart and tcp_keepstop. + In later revisions, there is an explicit timer for + connections in FIN_WAIT_2 that can be modified; contact + HP support for details.
      • + +
      • SGI IRIX can be + patched to support a timeout. For IRIX 5.3, 6.2, and 6.3, + use patches 1654, 1703 and 1778 respectively. If you have + trouble locating these patches, please contact your SGI + support channel for help.
      • + +
      • NCR's MP RAS Unix + 2.xx and 3.xx both have FIN_WAIT_2 timeouts. In 2.xx it + is non-tunable at 600 seconds, while in 3.xx it defaults + to 600 seconds and is calculated based on the tunable + "max keep alive probes" (default of 8) multiplied by the + "keep alive interval" (default 75 seconds).
      • + +
      • Sequent's ptx/TCP/IP + for DYNIX/ptx has had a FIN_WAIT_2 timeout since + around release 4.1 in mid-1994.
      • +
      + +

      The following systems are known to not have a + timeout:

      + +
        +
      • SunOS 4.x does not + and almost certainly never will have one because it as at + the very end of its development cycle for Sun. If you + have kernel source should be easy to patch.
      • +
      + +

      There is a + patch available for adding a timeout to the FIN_WAIT_2 + state; it was originally intended for BSD/OS, but should be + adaptable to most systems using BSD networking code. You + need kernel source code to be able to use it. + +

      Compile without using + lingering_close()

      + It is possible to compile Apache 1.2 without using the + lingering_close() function. This will result + in that section of code being similar to that which was in + 1.1. If you do this, be aware that it can cause problems + with PUTs, POSTs and persistent connections, especially if + the client uses pipelining. That said, it is no worse than + on 1.1, and we understand that keeping your server running + is quite important. + +

      To compile without the lingering_close() + function, add -DNO_LINGCLOSE to the end of the + EXTRA_CFLAGS line in your + Configuration file, rerun + Configure and rebuild the server.

      + +

      Use SO_LINGER as an alternative to + lingering_close()

      + On most systems, there is an option called + SO_LINGER that can be set with + setsockopt(2). It does something very similar + to lingering_close(), except that it is broken + on many systems so that it causes far more problems than + lingering_close. On some systems, it could + possibly work better so it may be worth a try if you have + no other alternatives. + +

      To try it, add -DUSE_SO_LINGER + -DNO_LINGCLOSE to the end of the + EXTRA_CFLAGS line in your + Configuration file, rerun + Configure and rebuild the server.

      + +

      NOTE: Attempting to use + SO_LINGER and lingering_close() + at the same time is very likely to do very bad things, so + don't.

      + +

      Increase the amount of memory used for storing + connection state

      + +
      +
      BSD based networking code:
      + +
      + BSD stores network data, such as connection states, in + something called an mbuf. When you get so many + connections that the kernel does not have enough mbufs + to put them all in, your kernel will likely crash. You + can reduce the effects of the problem by increasing the + number of mbufs that are available; this will not + prevent the problem, it will just make the server go + longer before crashing. + +

      The exact way to increase them may depend on your + OS; look for some reference to the number of "mbufs" or + "mbuf clusters". On many systems, this can be done by + adding the line NMBCLUSTERS="n", where + n is the number of mbuf clusters you want + to your kernel config file and rebuilding your + kernel.

      +
      +
      + +

      Disable KeepAlive

      + +

      If you are unable to do any of the above then you + should, as a last resort, disable KeepAlive. Edit your + httpd.conf and change "KeepAlive On" to "KeepAlive + Off".

      +
    6. + + +
    7. +

      Appendix

      + +

      Below is a message from Roy Fielding, one of the authors + of HTTP/1.1.

      + +

      Why the lingering close functionality is necessary with + HTTP

      + The need for a server to linger on a socket after a close + is noted a couple times in the HTTP specs, but not + explained. This explanation is based on discussions between + myself, Henrik Frystyk, Robert S. Thau, Dave Raggett, and + John C. Mallery in the hallways of MIT while I was at W3C. + +

      If a server closes the input side of the connection + while the client is sending data (or is planning to send + data), then the server's TCP stack will signal an RST + (reset) back to the client. Upon receipt of the RST, the + client will flush its own incoming TCP buffer back to the + un-ACKed packet indicated by the RST packet argument. If + the server has sent a message, usually an error response, + to the client just before the close, and the client + receives the RST packet before its application code has + read the error message from its incoming TCP buffer and + before the server has received the ACK sent by the client + upon receipt of that buffer, then the RST will flush the + error message before the client application has a chance to + see it. The result is that the client is left thinking that + the connection failed for no apparent reason.

      + +

      There are two conditions under which this is likely to + occur:

      + +
        +
      1. sending POST or PUT data without proper + authorization
      2. + +
      3. sending multiple requests before each response + (pipelining) and one of the middle requests resulting in + an error or other break-the-connection result.
      4. +
      + +

      The solution in all cases is to send the response, close + only the write half of the connection (what shutdown is + supposed to do), and continue reading on the socket until + it is either closed by the client (signifying it has + finally read the response) or a timeout occurs. That is + what the kernel is supposed to do if SO_LINGER is set. + Unfortunately, SO_LINGER has no effect on some systems; on + some other systems, it does not have its own timeout and + thus the TCP memory segments just pile-up until the next + reboot (planned or not).

      + +

      Please note that simply removing the linger code will + not solve the problem -- it only moves it to a different + and much harder one to detect.

      +
    8. +
    + + + + diff --git a/htdocs/manual/misc/footer.html b/htdocs/manual/misc/footer.html new file mode 100644 index 00000000000..70ddfccdcd0 --- /dev/null +++ b/htdocs/manual/misc/footer.html @@ -0,0 +1,5 @@ +
    + +

    Apache HTTP Server Version 1.3

    + Index + Home diff --git a/htdocs/manual/misc/header.html b/htdocs/manual/misc/header.html new file mode 100644 index 00000000000..09a28d8ca6c --- /dev/null +++ b/htdocs/manual/misc/header.html @@ -0,0 +1,5 @@ +
    + [APACHE DOCUMENTATION] + +

    Apache HTTP Server Version 1.3

    +
    diff --git a/htdocs/manual/misc/howto.html b/htdocs/manual/misc/howto.html new file mode 100644 index 00000000000..207c0cc9aa1 --- /dev/null +++ b/htdocs/manual/misc/howto.html @@ -0,0 +1,229 @@ + + + + + + + + + Apache HOWTO documentation + + + + + + +

    Apache HOWTO documentation

    + How to: + + +
    + +

    How to redirect an entire + server or directory to a single URL

    + +

    There are two chief ways to redirect all requests for an + entire server to a single location: one which requires the use + of mod_rewrite, and another which uses a CGI + script.

    + +

    First: if all you need to do is migrate a server from one + name to another, simply use the Redirect + directive, as supplied by mod_alias:

    + +
    +
    +  Redirect / http://www.apache.org/
    +
    +
    + +

    Since Redirect will forward along the complete + path, however, it may not be appropriate - for example, when + the directory structure has changed after the move, and you + simply want to direct people to the home page.

    + +

    The best option is to use the standard Apache module + mod_rewrite. If that module is compiled in, the + following lines

    + +
    +
    +RewriteEngine On
    +RewriteRule /.* http://www.apache.org/ [R]
    +
    +
    + will send an HTTP 302 Redirect back to the client, and no + matter what they gave in the original URL, they'll be sent to + "http://www.apache.org/". + +

    The second option is to set up a ScriptAlias + pointing to a CGI script which outputs a 301 + or 302 status and the location of the other server.

    + +

    By using a CGI script you can intercept + various requests and treat them specially, e.g., you + might want to intercept POST requests, so that + the client isn't redirected to a script on the other server + which expects POST information (a redirect will lose the POST + information.) You might also want to use a CGI script if you + don't want to compile mod_rewrite into your server.

    + +

    Here's how to redirect all requests to a script... In the + server configuration file,

    + +
    +
    +ScriptAlias / /usr/local/httpd/cgi-bin/redirect_script/
    +
    +
    + and here's a simple perl script to redirect requests: + +
    +
    +#!/usr/local/bin/perl
    +
    +print "Status: 302 Moved Temporarily\r\n" .
    +      "Location: http://www.some.where.else.com/\r\n" .
    +      "\r\n";
    +
    +
    +
    +
    + +

    How to reset your log + files

    + +

    Sooner or later, you'll want to reset your log files + (access_log and error_log) because they are too big, or full of + old information you don't need.

    + +

    access.log typically grows by 1Mb for each + 10,000 requests.

    + +

    Most people's first attempt at replacing the logfile is to + just move the logfile or remove the logfile. This doesn't + work.

    + +

    Apache will continue writing to the logfile at the same + offset as before the logfile moved. This results in a new + logfile being created which is just as big as the old one, but + it now contains thousands (or millions) of null characters.

    + +

    The correct procedure is to move the logfile, then signal + Apache to tell it to reopen the logfiles.

    + +

    Apache is signaled using the SIGHUP (-1) + signal. e.g.

    + +
    + mv access_log access_log.old
    + kill -1 `cat httpd.pid`
    +
    + +

    Note: httpd.pid is a file containing the + process id of the Apache + httpd daemon, Apache saves this in the same directory as the + log files.

    + +

    Many people use this method to replace (and backup) their + logfiles on a nightly or weekly basis.

    +
    + +

    How to stop or restrict + robots

    + +

    Ever wondered why so many clients are interested in a file + called robots.txt which you don't have, and never + did have?

    + +

    These clients are called robots (also known + as crawlers, spiders and other cute names) - special automated + clients which wander around the web looking for interesting + resources.

    + +

    Most robots are used to generate some kind of web + index which is then used by a search engine to + help locate information.

    + +

    robots.txt provides a means to request that + robots limit their activities at the site, or more often than + not, to leave the site alone.

    + +

    When the first robots were developed, they had a bad + reputation for sending hundreds/thousands of requests to each + site, often resulting in the site being overloaded. Things have + improved dramatically since then, thanks to + Guidelines for Robot Writers, but even so, some robots may + exhibit unfriendly behavior which the webmaster isn't willing + to tolerate, and will want to stop.

    + +

    Another reason some webmasters want to block access to + robots, is to stop them indexing dynamic information. Many + search engines will use the data collected from your pages for + months to come - not much use if you're serving stock quotes, + news, weather reports or anything else that will be stale by + the time people find it in a search engine.

    + +

    If you decide to exclude robots completely, or just limit + the areas in which they can roam, create a + robots.txt file; refer to the + robot information pages provided by Martijn Koster for the + syntax.

    +
    + +

    How to proxy SSL requests + through your non-SSL Apache server
    + (submitted by David Sedlock)

    + +

    SSL uses port 443 for requests for secure pages. If your + browser just sits there for a long time when you attempt to + access a secure page over your Apache proxy, then the proxy may + not be configured to handle SSL. You need to instruct Apache to + listen on port 443 in addition to any of the ports on which it + is already listening:

    +
    +    Listen 80
    +    Listen 443
    +
    + +

    Then set the security proxy in your browser to 443. That + might be it!

    + +

    If your proxy is sending requests to another proxy, then you + may have to set the directive ProxyRemote differently. Here are + my settings:

    +
    +    ProxyRemote http://nicklas:80/ http://proxy.mayn.franken.de:8080
    +    ProxyRemote http://nicklas:443/ http://proxy.mayn.franken.de:443
    +
    + +

    Requests on port 80 of my proxy nicklas are + forwarded to proxy.mayn.franken.de:8080, while + requests on port 443 are forwarded to + proxy.mayn.franken.de:443. If the remote proxy is + not set up to handle port 443, then the last directive can be + left out. SSL requests will only go over the first proxy.

    + +

    Note that your Apache does NOT have to be set up to serve + secure pages with SSL. Proxying SSL is a different thing from + using it.

    + + + + diff --git a/htdocs/manual/misc/index.html b/htdocs/manual/misc/index.html new file mode 100644 index 00000000000..7eb116e6612 --- /dev/null +++ b/htdocs/manual/misc/index.html @@ -0,0 +1,138 @@ + + + + + + + Apache Miscellaneous Documentation + + + + + + +

    Apache Miscellaneous Documentation

    + +

    Below is a list of additional documentation pages that apply + to the Apache web server development project.

    + +
    +
    API
    + +
    Description of Apache's Application Programming + Interface.
    + +
    FAQ
    + +
    Frequently-Asked Questions concerning the Apache project + and server.
    + +
    Reading Client Input in + Apache 1.2
    + +
    Describes differences between Apache 1.1 and 1.2 in how + modules read information from the client.
    + +
    Compatibility with + NCSA
    + +
    Notes about Apache's compatibility with the NCSA + server.
    + +
    How to use XSSI and + Negotiation for custom ErrorDocuments
    + +
    Describes a solution which uses XSSI and negotiation to + custom-tailor the Apache ErrorDocuments to taste, adding the + advantage of returning internationalized versions of the + error messages depending on the client's language + preferences.
    + +
    File Descriptor use in + Apache
    + +
    Describes how Apache uses file descriptors and talks + about various limits imposed on the number of descriptors + available by various operating systems.
    + +
    FIN_WAIT_2
    + +
    A description of the causes of Apache processes going + into the FIN_WAIT_2 state, and what you can do + about it.
    + +
    "How-To"
    + +
    Instructions about how to accomplish some + commonly-desired server functionality changes.
    + +
    HTTP Features list
    + +
    A tab-separate table of HTTP features implemented and + tested in Apache.
    + +
    Known Client + Problems
    + +
    A list of problems in HTTP clients which can be mitigated + by Apache.
    + +
    No PGP
    + +
    Why we took PEM and PGP support out of the base Apache + distribution.
    + +
    Performance Notes (BSD + 4.4)
    + +
    Some notes about ways to improve/optimize Apache + performance on BSD 4.4 systems.
    + +
    Performance Notes (Digital + UNIX)
    + +
    Extracts of USENET postings describing how to optimize + Apache performance on Digital UNIX systems.
    + +
    Performance Notes (HPUX)
    + +
    Email from an HP engineer on how to optimize HP-UX + 10.20.
    + +
    Performance Notes (General)
    + +
    Some generic notes about how to improve the performance + of your machine/OS.
    + +
    Performance Notes -- Apache + Tuning
    + +
    Notes about how to (run-time and compile-time) configure + Apache for highest performance. Notes explaining why Apache + does some things, and why it doesn't do other things (which + make it slower/faster).
    + +
    Security Tips
    + +
    Some "do"s - and "don't"s - for keeping your Apache web + site secure.
    + +
    Virtual Hosts (IP-based)
    + +
    Excerpts and notes about configuring and using Apache + IP-based virtual hosts.
    + +
    Windows Bug with Web + Keepalive
    + +
    A brief description of a known problem with Microsoft + Windows and web sites accessed using keepalive + connections.
    +
    + + + + diff --git a/htdocs/manual/misc/known_client_problems.html b/htdocs/manual/misc/known_client_problems.html new file mode 100644 index 00000000000..cb26578c9c4 --- /dev/null +++ b/htdocs/manual/misc/known_client_problems.html @@ -0,0 +1,346 @@ + + + + + + + Apache HTTP Server Project + + + + + + +

    Known Problems in Clients

    + +

    Over time the Apache Group has discovered or been notified + of problems with various clients which we have had to work + around, or explain. This document describes these problems and + the workarounds available. It's not arranged in any particular + order. Some familiarity with the standards is assumed, but not + necessary.

    + +

    For brevity, Navigator will refer to Netscape's + Navigator product (which in later versions was renamed + "Communicator" and various other names), and MSIE will + refer to Microsoft's Internet Explorer product. All trademarks + and copyrights belong to their respective companies. We welcome + input from the various client authors to correct + inconsistencies in this paper, or to provide us with exact + version numbers where things are broken/fixed.

    + +

    For reference, RFC1945 + defines HTTP/1.0, and RFC2068 + defines HTTP/1.1. Apache as of version 1.2 is an HTTP/1.1 + server (with an optional HTTP/1.0 proxy).

    + +

    Various of these workarounds are triggered by environment + variables. The admin typically controls which are set, and for + which clients, by using mod_browser. Unless + otherwise noted all of these workarounds exist in versions 1.2 + and later.

    + +

    Trailing CRLF on + POSTs

    + +

    This is a legacy issue. The CERN webserver required + POST data to have an extra CRLF + following it. Thus many clients send an extra CRLF + that is not included in the Content-Length of the + request. Apache works around this problem by eating any empty + lines which appear before a request.

    + +

    Broken + keepalive

    + +

    Various clients have had broken implementations of + keepalive (persistent connections). In particular the + Windows versions of Navigator 2.0 get very confused when the + server times out an idle connection. The workaround is present + in the default config files:

    + +
    + BrowserMatch Mozilla/2 nokeepalive +
    + Note that this matches some earlier versions of MSIE, which + began the practice of calling themselves Mozilla in + their user-agent strings just like Navigator. + +

    MSIE 4.0b2, which claims to support HTTP/1.1, does not + properly support keepalive when it is used on 301 or 302 + (redirect) responses. Unfortunately Apache's + nokeepalive code prior to 1.2.2 would not work + with HTTP/1.1 clients. You must apply + this patch to version 1.2.1. Then add this to your + config:

    + +
    + BrowserMatch "MSIE 4\.0b2;" nokeepalive +
    + +

    Incorrect interpretation of + HTTP/1.1 in response

    + +

    To quote from section 3.1 of RFC1945:

    + +
    + HTTP uses a "<MAJOR>.<MINOR>" numbering scheme to + indicate versions of the protocol. The protocol versioning + policy is intended to allow the sender to indicate the format + of a message and its capacity for understanding further HTTP + communication, rather than the features obtained via that + communication. +
    + Since Apache is an HTTP/1.1 server, it indicates so as part of + its response. Many client authors mistakenly treat this part of + the response as an indication of the protocol that the response + is in, and then refuse to accept the response. + +

    The first major indication of this problem was with AOL's + proxy servers. When Apache 1.2 went into beta it was the first + wide-spread HTTP/1.1 server. After some discussion, AOL fixed + their proxies. In anticipation of similar problems, the + force-response-1.0 environment variable was added + to Apache. When present Apache will indicate "HTTP/1.0" in + response to an HTTP/1.0 client, but will not in any other way + change the response.

    + +

    The pre-1.1 Java Development Kit (JDK) that is used in many + clients (including Navigator 3.x and MSIE 3.x) exhibits this + problem. As do some of the early pre-releases of the 1.1 JDK. + We think it is fixed in the 1.1 JDK release. In any event the + workaround:

    + +
    + BrowserMatch Java/1.0 force-response-1.0
    + BrowserMatch JDK/1.0 force-response-1.0
    +
    + +

    RealPlayer 4.0 from Progressive Networks also exhibits this + problem. However they have fixed it in version 4.01 of the + player, but version 4.01 uses the same User-Agent + as version 4.0. The workaround is still:

    + +
    + BrowserMatch "RealPlayer 4.0" force-response-1.0 +
    + +

    Requests use HTTP/1.1 + but responses must be in HTTP/1.0

    + +

    MSIE 4.0b2 has this problem. Its Java VM makes requests in + HTTP/1.1 format but the responses must be in HTTP/1.0 format + (in particular, it does not understand chunked + responses). The workaround is to fool Apache into believing the + request came in HTTP/1.0 format.

    + +
    + BrowserMatch "MSIE 4\.0b2;" downgrade-1.0 + force-response-1.0 +
    + This workaround is available in 1.2.2, and in a + patch against 1.2.1. + +

    Boundary problems with + header parsing

    + +

    All versions of Navigator from 2.0 through 4.0b2 (and + possibly later) have a problem if the trailing CRLF of the + response header starts at offset 256, 257 or 258 of the + response. A BrowserMatch for this would match on nearly every + hit, so the workaround is enabled automatically on all + responses. The workaround implemented detects when this + condition would occur in a response and adds extra padding to + the header to push the trailing CRLF past offset 258 of the + response.

    + +

    Multipart + responses and Quoted Boundary Strings

    + +

    On multipart responses some clients will not accept quotes + (") around the boundary string. The MIME standard recommends + that such quotes be used. But the clients were probably written + based on one of the examples in RFC2068, which does not include + quotes. Apache does not include quotes on its boundary strings + to workaround this problem.

    + +

    Byterange requests

    + +

    A byterange request is used when the client wishes to + retrieve a portion of an object, not necessarily the entire + object. There was a very old draft which included these + byteranges in the URL. Old clients such as Navigator 2.0b1 and + MSIE 3.0 for the MAC exhibit this behavior, and it will appear + in the servers' access logs as (failed) attempts to retrieve a + URL with a trailing ";xxx-yyy". Apache does not attempt to + implement this at all.

    + +

    A subsequent draft of this standard defines a header + Request-Range, and a response type + multipart/x-byteranges. The HTTP/1.1 standard + includes this draft with a few fixes, and it defines the header + Range and type + multipart/byteranges.

    + +

    Navigator (versions 2 and 3) sends both Range + and Request-Range headers (with the same value), + but does not accept a multipart/byteranges + response. The response must be + multipart/x-byteranges. As a workaround, if Apache + receives a Request-Range header it considers it + "higher priority" than a Range header and in + response uses multipart/x-byteranges.

    + +

    The Adobe Acrobat Reader plugin makes extensive use of + byteranges and prior to version 3.01 supports only the + multipart/x-byterange response. Unfortunately + there is no clue that it is the plugin making the request. If + the plugin is used with Navigator, the above workaround works + fine. But if the plugin is used with MSIE 3 (on Windows) the + workaround won't work because MSIE 3 doesn't give the + Range-Request clue that Navigator does. To + workaround this, Apache special cases "MSIE 3" in the + User-Agent and serves + multipart/x-byteranges. Note that the necessity + for this with MSIE 3 is actually due to the Acrobat plugin, not + due to the browser.

    + +

    Netscape Communicator appears to not issue the non-standard + Request-Range header. When an Acrobat plugin prior + to version 3.01 is used with it, it will not properly + understand byteranges. The user must upgrade their Acrobat + reader to 3.01.

    + +

    Set-Cookie header is + unmergeable

    + +

    The HTTP specifications say that it is legal to merge + headers with duplicate names into one (separated by commas). + Some browsers that support Cookies don't like merged headers + and prefer that each Set-Cookie header is sent + separately. When parsing the headers returned by a CGI, Apache + will explicitly avoid merging any Set-Cookie + headers.

    + +

    Expires headers and GIF89A + animations

    + +

    Navigator versions 2 through 4 will erroneously re-request + GIF89A animations on each loop of the animation if the first + response included an Expires header. This happens + regardless of how far in the future the expiry time is set. + There is no workaround supplied with Apache, however there are + hacks for + 1.2 and for + 1.3.

    + +

    POST without + Content-Length

    + +

    In certain situations Navigator 3.01 through 3.03 appear to + incorrectly issue a POST without the request body. There is no + known workaround. It has been fixed in Navigator 3.04, + Netscapes provides some information. + There's also + some information about the actual problem.

    + +

    JDK 1.2 betas lose + parts of responses.

    + +

    The http client in the JDK1.2beta2 and beta3 will throw away + the first part of the response body when both the headers and + the first part of the body are sent in the same network packet + AND keep-alive's are being used. If either condition is not met + then it works fine.

    + +

    See also Bug-ID's 4124329 and 4125538 at the java developer + connection.

    + +

    If you are seeing this bug yourself, you can add the + following BrowserMatch directive to work around it:

    + +
    + BrowserMatch "Java1\.2beta[23]" nokeepalive +
    + +

    We don't advocate this though since bending over backwards + for beta software is usually not a good idea; ideally it gets + fixed, new betas or a final release comes out, and no one uses + the broken old software anymore. In theory.

    + +

    Content-Type + change is not noticed after reload

    + +

    Navigator (all versions?) will cache the + content-type for an object "forever". Using reload + or shift-reload will not cause Navigator to notice a + content-type change. The only work-around is for + the user to flush their caches (memory and disk). By way of an + example, some folks may be using an old mime.types + file which does not map .htm to + text/html, in this case Apache will default to + sending text/plain. If the user requests the page + and it is served as text/plain. After the admin + fixes the server, the user will have to flush their caches + before the object will be shown with the correct + text/html type.

    + +

    MSIE Cookie + problem with expiry date in the year 2000

    + +

    MSIE versions 3.00 and 3.02 (without the Y2K patch) do not + handle cookie expiry dates in the year 2000 properly. Years + after 2000 and before 2000 work fine. This is fixed in IE4.01 + service pack 1, and in the Y2K patch for IE3.02. Users should + avoid using expiry dates in the year 2000.

    + +

    Lynx incorrectly asking for + transparent content negotiation

    + +

    The Lynx browser versions 2.7 and 2.8 send a "negotiate: + trans" header in their requests, which is an indication the + browser supports transparent content negotiation (TCN). However + the browser does not support TCN. As of version 1.3.4, Apache + supports TCN, and this causes problems with these versions of + Lynx. As a workaround future versions of Apache will ignore + this header when sent by the Lynx client.

    + +

    MSIE 4.0 mishandles Vary + response header

    + +

    MSIE 4.0 does not handle a Vary header properly. The Vary + header is generated by mod_rewrite in apache 1.3. The result is + an error from MSIE saying it cannot download the requested + file. There are more details in PR#4118.

    + +

    A workaround is to add the following to your server's + configuration files:

    +
    +    BrowserMatch "MSIE 4\.0" force-no-vary
    +
    + +

    (This workaround is only available with releases + after 1.3.6 of the Apache Web server.)

    + + + + diff --git a/htdocs/manual/misc/nopgp.html b/htdocs/manual/misc/nopgp.html new file mode 100644 index 00000000000..e2263c74ba8 --- /dev/null +++ b/htdocs/manual/misc/nopgp.html @@ -0,0 +1,89 @@ + + + + + + + Why We Took PEM Out of Apache + + + + + + +

    Why We Took PEM Out of Apache

    + On May 17th, 1995, we were asked by a representative of NCSA to + remove any copies of NCSA httpd prior to 1.4.1 from our web + site. They were mandated by the NSA to inform us that + redistribution of pre-1.4.1 code violated the same laws that + make distributing Phill Zimmerman's PGP package to other + countries illegal. There was no encryption in + NCSA's httpd, only hooks to publicly available libraries of PEM + code. By the NSA's rules, even hooks to this type of + application is illegal. + +

    Because Apache is based on NCSA code, and we had basically + not touched that part of the software, we were informed that + Apache was also illegal to distribute to foreign countries, and + advised (not mandated) by NCSA to remove it. So, we removed + both the copies of the NCSA httpd we had, and all versions of + Apache previous to 0.6.5.

    + +

    The Apache members are strong advocates of the right to + digital privacy, so the decision to submit to the NSA and + remove the code was not an easy one. Here are some elements in + our rationale:

    + +
      +
    • The PEM code in httpd was not widely used. No major site + relied upon its use, so its loss is not a blow to encryption + and security on the world wide web. There are other efforts + designed to give much more flexible security - SSL and SHTTP + - so this wasn't a function whose absence would really be + missed on a functional level.
    • + +
    • We didn't feel like being just a couple more martyrs in a + fight being fought very well by many other people. Rather + than have the machine that supports the project confiscated + or relocated to South Africa, etc., we think there + are more efficient methods to address the issue.
    • +
    + It kind of sickens us that we had to do it, but so be it. + +

    Patches that re-implement the PEM code may be available at a + foreign site soon. If it does show up, we'll point to it - that + can't be illegal!

    + +

    Finally, here is a compendium of pointers to sites related + to encryption and export law. We can't promise this list will + be up to date, so send us mail when you see a problem or want a + link added. Thanks.

    + + + Brian, brian@hyperreal.com + + + + diff --git a/htdocs/manual/misc/perf-bsd44.html b/htdocs/manual/misc/perf-bsd44.html new file mode 100644 index 00000000000..bcd4964bf8d --- /dev/null +++ b/htdocs/manual/misc/perf-bsd44.html @@ -0,0 +1,271 @@ + + + + + + + Running a High-Performance Web Server for BSD + + + + + + + + +

    Running a High-Performance Web Server for + BSD

    + +

    This document assumes that you have read the appropriate + overview documentation for + FreeBSD, + NetBSD, or + OpenBSD. + In addition, the FreeBSD + tuning + manual page contains lots of wisdom, especially regarding sysctl + options.

    + +

    Like other OS's, the listen queue is often the first + limit hit. The following are comments from "Aaron + Gifford <agifford@InfoWest.COM>" on how to fix this on + BSDI 1.x, 2.x, and FreeBSD 2.0 (and earlier):

    + +

    Edit the following two files:

    + +
    + /usr/include/sys/socket.h
    + /usr/src/sys/sys/socket.h
    +
    + In each file, look for the following: +
    +    /*
    +     * Maximum queue length specifiable by listen.
    +     */
    +    #define SOMAXCONN       5
    +
    + Just change the "5" to whatever appears to work. I bumped the + two machines I was having problems with up to 32 and haven't + noticed the problem since. + +

    After the edit, recompile the kernel and recompile the + Apache server then reboot.

    + +

    FreeBSD 2.1 seems to be perfectly happy, with SOMAXCONN set + to 32 already.

    + +

    Addendum for + very heavily loaded BSD servers
    +
    from Chuck Murcko <chuck@telebase.com>

    + +

    If you're running a really busy BSD Apache server, the + following are useful things to do if the system is acting + sluggish:

    + +
      +
    • Run vmstat to check memory usage, page/swap rates, + etc.
    • + +
    • Run netstat -m to check mbuf usage
    • + +
    • Run fstat to check file descriptor usage
    • +
    + These utilities give you an idea what you'll need to tune in + your kernel, and whether it'll help to buy more RAM. Here are + some BSD kernel config parameters (actually BSDI, but pertinent + to FreeBSD and other 4.4-lite derivatives) from a system + getting heavy usage. The tools mentioned above were used, and + the system memory was increased to 48 MB before these tuneups. + Other system parameters remained unchanged. +
    +maxusers        256
    +
    + Maxusers drives a lot of other kernel parameters: + +
      +
    • Maximum # of processes
    • + +
    • Maximum # of processes per user
    • + +
    • System wide open files limit
    • + +
    • Per-process open files limit
    • + +
    • Maximum # of mbuf clusters
    • + +
    • Proc/pgrp hash table size
    • +
    + The actual formulae for these derived parameters are in + /usr/src/sys/conf/param.c. These calculated parameters + can also be overridden (in part) by specifying your own values + in the kernel configuration file: +
    +# Network options. NMBCLUSTERS defines the number of mbuf clusters and
    +# defaults to 256. This machine is a server that handles lots of traffic,
    +# so we crank that value.
    +options         NMBCLUSTERS=4096        # mbuf clusters at 4096
    +
    +#
    +# Misc. options
    +#
    +options         CHILD_MAX=512           # maximum number of child processes
    +options         OPEN_MAX=512            # maximum fds (breaks RPC svcs)
    +
    + +

    In many cases, NMBCLUSTERS must be set much larger than + would appear necessary at first glance. The reason for this is + that if the browser disconnects in mid-transfer, the socket fd + associated with that particular connection ends up in the + TIME_WAIT state for several minutes, during which time its + mbufs are not yet freed. Another reason is that, on server + timeouts, some connections end up in FIN_WAIT_2 state forever, + because this state doesn't time out on the server, and the + browser never sent a final FIN. For more details see the FIN_WAIT_2 page.

    + +

    Some more info on mbuf clusters (from sys/mbuf.h):

    +
    +/*
    + * Mbufs are of a single size, MSIZE (machine/machparam.h), which
    + * includes overhead.  An mbuf may add a single "mbuf cluster" of size
    + * MCLBYTES (also in machine/machparam.h), which has no additional overhead
    + * and is used instead of the internal data area; this is done when
    + * at least MINCLSIZE of data must be stored.
    + */
    +
    + +

    CHILD_MAX and OPEN_MAX are set to allow up to 512 child + processes (different than the maximum value for processes per + user ID) and file descriptors. These values may change for your + particular configuration (a higher OPEN_MAX value if you've got + modules or CGI scripts opening lots of connections or files). + If you've got a lot of other activity besides httpd on the same + machine, you'll have to set NPROC higher still. In this + example, the NPROC value derived from maxusers proved + sufficient for our load.

    + +

    To increase the size of the listen() queue, you + need to adjust the value of SOMAXCONN. SOMAXCONN is not derived + from maxusers, so you'll always need to increase that yourself. + We use a value guaranteed to be larger than Apache's default + for the listen() of 128, currently. The actual value for + SOMAXCONN is set in sys/socket.h. The best way to + adjust this parameter is run-time, rather than changing it in + this header file and thus hardcoding a value in the kernel and + elsewhere. To do this, edit /etc/rc.local and add + the following line:

    +
    +    /usr/sbin/sysctl -w kern.somaxconn=256
    +
    + +

    We used 256 but you can tune it for your own + setup. In many cases, however, even the default value of + 128 (for later versions of FreeBSD) is OK.

    + +

    Caveats

    + +

    Be aware that your system may not boot with a kernel that is + configured to use more resources than you have available system + RAM. ALWAYS have a known bootable kernel + available when tuning your system this way, and use the system + tools beforehand to learn if you need to buy more memory before + tuning.

    + +

    RPC services will fail when the value of OPEN_MAX is larger + than 256. This is a function of the original implementations of + the RPC library, which used a byte value for holding file + descriptors. BSDI has partially addressed this limit in its 2.1 + release, but a real fix may well await the redesign of RPC + itself.

    + +

    Finally, there's the hard limit of child processes + configured in Apache.

    + +

    For versions of Apache later than 1.0.5 you'll need to + change the definition for HARD_SERVER_LIMIT in + httpd.h and recompile if you need to run more than the + default 150 instances of httpd.

    + +

    From conf/httpd.conf-dist:

    +
    +# Limit on total number of servers running, i.e., limit on the number
    +# of clients who can simultaneously connect --- if this limit is ever
    +# reached, clients will be LOCKED OUT, so it should NOT BE SET TOO LOW.
    +# It is intended mainly as a brake to keep a runaway server from taking
    +# Unix with it as it spirals down...
    +
    +MaxClients 150
    +
    + Know what you're doing if you bump this value up, and make sure + you've done your system monitoring, RAM expansion, and kernel + tuning beforehand. Then you're ready to service some serious + hits! + +

    Thanks to Tony Sanders and Chris Torek at + BSDI for their helpful suggestions and information.

    + +

    "M. Teterin" <mi@ALDAN.ziplink.net> writes:

    + +
    + It really does help if your kernel and frequently used + utilities are fully optimized. Rebuilding the FreeBSD kernel + on an AMD-133 (486-class CPU) web-server with
    + -m486 -fexpensive-optimizations -fomit-frame-pointer + -O2
    + helped reduce the number of "unable" errors, because the CPU + was often maxed out. +
    + +

    Accept filtering on + FreeBSD

    + +

    Versions of FreeBSD from August 2000 onwards include a + feature called "accept filters" which delay the return from + accept() until a condition has been met, e.g. an HTTP request + has arrived. This postpones the requirement for a child process + to handle the new connection which therefore increases the + number of connections that a given number of child processes + can handle. It also allows a child process to accomplish more + immediately after accept() returns (because the request is + already available to be read) so there is less context + switching.

    + +

    Accept filters provide the most benefit on servers that are + already so busy that they are configured with "KeepAlive + Off". HTTP KeepAlive (aka + persistent connections) avoids the cost of setting up a new + connection for every request, but connections that are being + kept alive use up one of the available child processes. Since + there is a limited number of child processes this can + significantly reduce the capacity of the server. The viewers of + a web site will still get a lot of the benefit of persistent + connections even with a very small + KeepAliveTimeout so you should try reducing it + before turning it off altogether.

    + +

    To enable accept filtering, you must either load the + appropriate accept filter module, e.g. with the command + kldload accf_http, or compile a kernel with + options ACCEPT_FILTER_HTTP. Apache will then + enable filtering when it is restarted.

    + +

    Accept filters are compiled in if the symbol + SO_ACCEPTFILTER is defined on the machine on which + Apache is built. Additionally there is a directive AcceptFilter to switch + the filters on or off. The default is on; except when apache is + compiled with -D AP_ACCEPTFILTER_ON.

    + +

    See the manual page + accf_http(9) + for more information.

    + +

    More welcome!

    + If you have tips to contribute, send mail to apache@apache.org + + + + diff --git a/htdocs/manual/misc/perf-dec.html b/htdocs/manual/misc/perf-dec.html new file mode 100644 index 00000000000..611bed68845 --- /dev/null +++ b/htdocs/manual/misc/perf-dec.html @@ -0,0 +1,287 @@ + + + + + + + Performance Tuning Tips for Digital Unix + + + + + + +

    Performance Tuning Tips for Digital + Unix

    + Below is a set of newsgroup posts made by an engineer from DEC + in response to queries about how to modify DEC's Digital Unix + OS for more heavily loaded web sites. Copied with permission. +
    + +

    Update

    + From: Jeffrey Mogul <mogul@pa.dec.com>
    + Date: Fri, 28 Jun 96 16:07:56 MDT
    + + +
      +
    1. The advice given in the README file regarding the + "tcbhashsize" variable is incorrect. The largest value this + should be set to is 1024. Setting it any higher will have the + perverse result of disabling the hashing mechanism.
    2. + +
    3. + Patch ID OSF350-146 has been superseded by + +
      + Patch ID OSF350-195 for V3.2C
      + Patch ID OSF360-350195 for V3.2D +
      + Patch IDs for V3.2E and V3.2F should be available soon. + There is no known reason why the Patch ID OSF360-350195 + won't work on these releases, but such use is not + officially supported by Digital. This patch kit will not be + needed for V3.2G when it is released. +
    4. +
    +
    +
    +From           mogul@pa.dec.com (Jeffrey Mogul)
    +Organization   DEC Western Research
    +Date           30 May 1996 00:50:25 GMT
    +Newsgroups     comp.unix.osf.osf1
    +Message-ID     <4oirch$bc8@usenet.pa.dec.com>
    +Subject        Re: Web Site Performance
    +References     1
    +
    +
    +
    +In article <skoogDs54BH.9pF@netcom.com> skoog@netcom.com (Jim Skoog) writes:
    +>Where are the performance bottlenecks for Alpha AXP running the
    +>Netscape Commerce Server 1.12 with high volume internet traffic?
    +>We are evaluating network performance for a variety of Alpha AXP
    +>runing DEC UNIX 3.2C, which run DEC's seal firewall and behind
    +>that Alpha 1000 and 2100 webservers.
    +
    +Our experience (running such Web servers as altavista.digital.com
    +and www.digital.com) is that there is one important kernel tuning
    +knob to adjust in order to get good performance on V3.2C.  You
    +need to patch the kernel global variable "somaxconn" (use dbx -k
    +to do this) from its default value of 8 to something much larger.
    +
    +How much larger?  Well, no larger than 32767 (decimal).  And
    +probably no less than about 2048, if you have a really high volume
    +(millions of hits per day), like AltaVista does.
    +
    +This change allows the system to maintain more than 8 TCP
    +connections in the SYN_RCVD state for the HTTP server.  (You
    +can use "netstat -An |grep SYN_RCVD" to see how many such
    +connections exist at any given instant).
    +
    +If you don't make this change, you might find that as the load gets
    +high, some connection attempts take a very long time.  And if a lot
    +of your clients disconnect from the Internet during the process of
    +TCP connection establishment (this happens a lot with dialup
    +users), these "embryonic" connections might tie up your somaxconn
    +quota of SYN_RCVD-state connections.  Until the kernel times out
    +these embryonic connections, no other connections will be accepted,
    +and it will appear as if the server has died.
    +
    +The default value for somaxconn in Digital UNIX V4.0 will be quite
    +a bit larger than it has been in previous versions (we inherited
    +this default from 4.3BSD).
    +
    +Digital UNIX V4.0 includes some other performance-related changes
    +that significantly improve its maximum HTTP connection rate.  However,
    +we've been using V3.2C systems to front-end for altavista.digital.com
    +with no obvious performance bottlenecks at the millions-of-hits-per-day
    +level.
    +
    +We have some Webstone performance results available at
    +        http://www.digital.com/info/alphaserver/news/webff.html
    +
    +[The document referenced above is no longer at that URL -- Ed.]
    +
    +I'm not sure if these were done using V4.0 or an earlier version
    +of Digital UNIX, although I suspect they were done using a test
    +version of V4.0.
    +
    +-Jeff
    +
    +----------------------------------------------------------------------------
    +
    +From           mogul@pa.dec.com (Jeffrey Mogul)
    +Organization   DEC Western Research
    +Date           31 May 1996 21:01:01 GMT
    +Newsgroups     comp.unix.osf.osf1
    +Message-ID     <4onmmd$mmd@usenet.pa.dec.com>
    +Subject        Digital UNIX V3.2C Internet tuning patch info
    +
    +----------------------------------------------------------------------------
    +
    +Something that probably few people are aware of is that Digital
    +has a patch kit available for Digital UNIX V3.2C that may improve
    +Internet performance, especially for busy web servers.
    +
    +This patch kit is one way to increase the value of somaxconn,
    +which I discussed in a message here a day or two ago.
    +
    +I've included in this message the revised README file for this
    +patch kit below.  Note that the original README file in the patch
    +kit itself may be an earlier version; I'm told that the version
    +below is the right one.
    +
    +Sorry, this patch kit is NOT available for other versions of Digital
    +UNIX.  Most (but not quite all) of these changes also made it into V4.0,
    +so the description of the various tuning parameters in this README
    +file might be useful to people running V4.0 systems.
    +
    +This patch kit does not appear to be available (yet?) from
    +        http://www.service.digital.com/html/patch_service.html
    +so I guess you'll have to call Digital's Customer Support to get it.
    +
    +-Jeff
    +
    +DESCRIPTION: Digital UNIX Network tuning patch
    +
    +             Patch ID: OSF350-146
    +
    +             SUPERSEDED PATCHES: OSF350-151, OSF350-158
    +
    +        This set of files improves the performance of the network
    +        subsystem on a system being used as a web server.  There are
    +        additional tunable parameters included here, to be used
    +        cautiously by an informed system administrator.
    +
    +TUNING
    +
    +        To tune the web server, the number of simultaneous socket
    +        connection requests are limited by:
    +
    +        somaxconn               Sets the maximum number of pending requests
    +                                allowed to wait on a listening socket.  The
    +                                default value in Digital UNIX V3.2 is 8.
    +                                This patch kit increases the default to 1024,
    +                                which matches the value in Digital UNIX V4.0.
    +
    +        sominconn               Sets the minimum number of pending connections
    +                                allowed on a listening socket.  When a user
    +                                process calls listen with a backlog less
    +                                than sominconn, the backlog will be set to
    +                                sominconn.  sominconn overrides somaxconn.
    +                                The default value is 1.
    +
    +        The effectiveness of tuning these parameters can be monitored by
    +        the sobacklog variables available in the kernel:
    +
    +        sobacklog_hiwat         Tracks the maximum pending requests to any
    +                                socket.  The initial value is 0.
    +
    +        sobacklog_drops         Tracks the number of drops exceeding the
    +                                socket set backlog limit.  The initial
    +                                value is 0.
    +
    +        somaxconn_drops         Tracks the number of drops exceeding the
    +                                somaxconn limit.  When sominconn is larger
    +                                than somaxconn, tracks the number of drops
    +                                exceeding sominconn.  The initial value is 0.
    +
    +        TCP timer parameters also affect performance. Tuning the following
    +        require some knowledge of the characteristics of the network.
    +
    +        tcp_msl                 Sets the tcp maximum segment lifetime.
    +                                This is the maximum lifetime in half
    +                                seconds that a packet can be in transit
    +                                on the network.  This value, when doubled,
    +                                is the length of time a connection remains
    +                                in the TIME_WAIT state after a incoming
    +                                close request is processed.  The unit is
    +                                specified in 1/2 seconds, the initial
    +                                value is 60.
    +
    +        tcp_rexmit_interval_min
    +                                Sets the minimum TCP retransmit interval.
    +                                For some WAN networks the default value may
    +                                be too short, causing unnecessary duplicate
    +                                packets to be sent.  The unit is specified
    +                                in 1/2 seconds, the initial value is 1.
    +
    +        tcp_keepinit            This is the amount of time a partially
    +                                established connection will sit on the listen
    +                                queue before timing out (e.g., if a client
    +                                sends a SYN but never answers our SYN/ACK).
    +                                Partially established connections tie up slots
    +                                on the listen queue.  If the queue starts to
    +                                fill with connections in SYN_RCVD state,
    +                                tcp_keepinit can be decreased to make those
    +                                partial connects time out sooner.  This should
    +                                be used with caution, since there might be
    +                                legitimate clients that are taking a while
    +                                to respond to SYN/ACK.  The unit is specified
    +                                in 1/2 seconds, the default value is 150
    +                                (ie. 75 seconds).
    +
    +        The hashlist size for the TCP inpcb lookup table is regulated by:
    +
    +        tcbhashsize             The number of hash buckets used for the
    +                                TCP connection table used in the kernel.
    +                                The initial value is 32.  For best results,
    +                                should be specified as a power of 2.  For
    +                                busy Web servers, set this to 2048 or more.
    +
    +        The hashlist size for the interface alias table is regulated by:
    +
    +        inifaddr_hsize          The number of hash buckets used for the
    +                                interface alias table used in the kernel.
    +                                The initial value is 32.  For best results,
    +                                should be specified as a power of 2.
    +
    +        ipport_userreserved     The maximum number of concurrent non-reserved,
    +                                dynamically allocated ports.  Default range
    +                                is 1025-5000.  The maximum value is 65535.
    +                                This limits the numer of times you can
    +                                simultaneously telnet or ftp out to connect
    +                                to other systems.
    +
    +        tcpnodelack             Don't delay acknowledging TCP data; this
    +                                can sometimes improve performance of locally
    +                                run CAD packages.  Default is value is 0,
    +                                the enabled value is 1.
    +
    +                           Digital UNIX version:
    +
    +                                  V3.2C
    +Feature                    V3.2C  patch  V4.0
    +=======                    =====  =====  ====
    +somaxconn                   X      X      X
    +sominconn                   -      X      X
    +sobacklog_hiwat             -      X      -
    +sobacklog_drops             -      X      -
    +somaxconn_drops             -      X      -
    +tcpnodelack                 X      X      X
    +tcp_keepidle                X      X      X
    +tcp_keepintvl               X      X      X
    +tcp_keepcnt                 -      X      X
    +tcp_keepinit                -      X      X
    +TCP keepalive per-socket    -      -      X
    +tcp_msl                     -      X      -
    +tcp_rexmit_interval_min     -      X      -
    +TCP inpcb hashing           -      X      X
    +tcbhashsize                 -      X      X
    +interface alias hashing     -      X      X
    +inifaddr_hsize              -      X      X
    +ipport_userreserved         -      X      -
    +sysconfig -q inet           -      -      X
    +sysconfig -q socket         -      -      X
    +
    +
    + + + + diff --git a/htdocs/manual/misc/perf-hp.html b/htdocs/manual/misc/perf-hp.html new file mode 100644 index 00000000000..55af9c21764 --- /dev/null +++ b/htdocs/manual/misc/perf-hp.html @@ -0,0 +1,97 @@ + + + + + + + Running a High-Performance Web Server on HPUX + + + + +   + + + +

    Running a High-Performance Web Server for + HPUX

    +
    +Date: Wed, 05 Nov 1997 16:59:34 -0800
    +From: Rick Jones <raj@cup.hp.com>
    +Reply-To: raj@cup.hp.com
    +Organization: Network Performance
    +Subject: HP-UX tuning tips
    +
    + Here are some tuning tips for HP-UX to add to the tuning page. + +

    For HP-UX 9.X: Upgrade to 10.20
    + For HP-UX 10.[00|01|10]: Upgrade to 10.20

    + +

    For HP-UX 10.20:

    + +

    Install the latest cumulative ARPA Transport Patch. This + will allow you to configure the size of the TCP connection + lookup hash table. The default is 256 buckets and must be set + to a power of two. This is accomplished with adb against the + *disc* image of the kernel. The variable name is tcp_hash_size. + Notice that it's critically important that you use "W" to write + a 32 bit quantity, not "w" to write a 16 bit value when + patching the disc image because the tcp_hash_size variable is a + 32 bit quantity.

    + +

    How to pick the value? Examine the output of ftp://ftp.cup.hp.com/dist/networking/tools/connhist + and see how many total TCP connections exist on the system. You + probably want that number divided by the hash table size to be + reasonably small, say less than 10. Folks can look at HP's + SPECweb96 disclosures for some common settings. These can be + found at http://www.specbench.org/. + If an HP-UX system was performing at 1000 SPECweb96 connections + per second, the TIME_WAIT time of 60 seconds would mean 60,000 + TCP "connections" being tracked.

    + +

    Folks can check their listen queue depths with ftp://ftp.cup.hp.com/dist/networking/misc/listenq.

    + +

    If folks are running Apache on a PA-8000 based system, they + should consider "chatr'ing" the Apache executable to have a + large page size. This would be "chatr +pi L <BINARY>." + The GID of the running executable must have MLOCK privileges. + Setprivgrp(1m) should be consulted for assigning MLOCK. The + change can be validated by running Glance and examining the + memory regions of the server(s) to make sure that they show a + non-trivial fraction of the text segment being locked.

    + +

    If folks are running Apache on MP systems, they might + consider writing a small program that uses mpctl() to bind + processes to processors. A simple pid % numcpu algorithm is + probably sufficient. This might even go into the source + code.

    + +

    If folks are concerned about the number of FIN_WAIT_2 + connections, they can use nettune to shrink the value of + tcp_keepstart. However, they should be careful there - + certainly do not make it less than oh two to four minutes. If + tcp_hash_size has been set well, it is probably OK to let the + FIN_WAIT_2's take longer to timeout (perhaps even the default + two hours) - they will not on average have a big impact on + performance.

    + +

    There are other things that could go into the code base, but + that might be left for another email. Feel free to drop me a + message if you or others are interested.

    + +

    sincerely,

    + +

    rick jones
    + http://www.cup.hp.com/netperf/NetperfPage.html + +

    + + + diff --git a/htdocs/manual/misc/perf-tuning.html b/htdocs/manual/misc/perf-tuning.html new file mode 100644 index 00000000000..482b924d9c9 --- /dev/null +++ b/htdocs/manual/misc/perf-tuning.html @@ -0,0 +1,1047 @@ + + + + + + + Apache Performance Notes + + + + + + +

    Apache Performance Notes

    + +

    Author: Dean Gaudet

    + + +
    + +

    Introduction

    + +

    Apache is a general webserver, which is designed to be correct + first, and fast second. Even so, its performance is quite satisfactory. + Most sites have less than 10Mbits of outgoing bandwidth, which Apache + can fill using only a low end Pentium-based webserver. In practice, + sites with more bandwidth require more than one machine to fill the + bandwidth due to other constraints (such as CGI or database transaction + overhead). For these reasons, the development focus has been mostly on + correctness and configurability.

    + +

    Unfortunately many folks overlook these facts and cite raw + performance numbers as if they are some indication of the quality of a + web server product. There is a bare minimum performance that is + acceptable, beyond that, extra speed only caters to a much smaller + segment of the market. But in order to avoid this hurdle to the + acceptance of Apache in some markets, effort was put into Apache 1.3 to + bring performance up to a point where the difference with other + high-end webservers is minimal.

    + +

    Finally there are the folks who just want to see how fast something + can go. The author falls into this category. The rest of this document + is dedicated to these folks who want to squeeze every last bit of + performance out of Apache's current model, and want to understand why + it does some things which slow it down.

    + +

    Note that this is tailored towards Apache 1.3 on Unix. Some of it + applies to Apache on NT. Apache on NT has not been tuned for + performance yet; in fact it probably performs very poorly because NT + performance requires a different programming model.

    +
    + +

    Hardware and Operating System + Issues

    + +

    The single biggest hardware issue affecting webserver performance is + RAM. A webserver should never ever have to swap, as swapping increases + the latency of each request beyond a point that users consider "fast + enough". This causes users to hit stop and reload, further increasing + the load. You can, and should, control the MaxClients + setting so that your server does not spawn so many children it starts + swapping. The procedure for doing this is simple: determine the size of + your average Apache process, by looking at your process list via a tool + such as top, and divide this into your total available + memory, leaving some room for other processes.

    + +

    Beyond that the rest is mundane: get a fast enough CPU, a fast + enough network card, and fast enough disks, where "fast enough" is + something that needs to be determined by experimentation.

    + +

    Operating system choice is largely a matter of local concerns. But a + general guideline is to always apply the latest vendor TCP/IP + patches.

    +
    + +

    Run-Time Configuration + Issues

    + +

    HostnameLookups and other DNS considerations

    + +

    Prior to Apache 1.3, HostnameLookups + defaulted to On. This adds latency to every request + because it requires a DNS lookup to complete before the request is + finished. In Apache 1.3 this setting defaults to Off. If + you need to have addresses in your log files resolved to hostnames, use + the logresolve program that + comes with Apache, or one of the numerous log reporting packages which + are available.

    + +

    It is recommended that you do this sort of postprocessing of your + log files on some machine other than the production web server machine, + in order that this activity not adversely affect server + performance.

    + +

    If you use any Allow from domain or + Deny from domain + directives (i.e., using a hostname, or a domain name, rather than an IP + address) then you will pay for a double reverse DNS lookup (a reverse, + followed by a forward to make sure that the reverse is not being + spoofed). For best performance, therefore, use IP addresses, rather + than names, when using these directives, if possible.

    + +

    Note that it's possible to scope the directives, such as within a + <Location /server-status> section. In this case the + DNS lookups are only performed on requests matching the criteria. + Here's an example which disables lookups except for .html and .cgi + files:

    + +
    +
    +HostnameLookups off
    +<Files ~ "\.(html|cgi)$">
    +    HostnameLookups on
    +</Files>
    +
    +
    + +

    But even still, if you just need DNS names in some CGIs you could + consider doing the gethostbyname call in the specific CGIs + that need it.

    + +

    FollowSymLinks and SymLinksIfOwnerMatch

    + +

    Wherever in your URL-space you do not have an Options + FollowSymLinks, or you do have an Options + SymLinksIfOwnerMatch Apache will have to issue extra system + calls to check up on symlinks. One extra call per filename component. + For example, if you had:

    + +
    +
    +DocumentRoot /www/htdocs
    +<Directory />
    +    Options SymLinksIfOwnerMatch
    +</Directory>
    +
    +
    + +

    and a request is made for the URI /index.html. Then + Apache will perform lstat(2) on /www, + /www/htdocs, and /www/htdocs/index.html. The + results of these lstats are never cached, so they will + occur on every single request. If you really desire the symlinks + security checking you can do something like this:

    + +
    +
    +DocumentRoot /www/htdocs
    +<Directory />
    +    Options FollowSymLinks
    +</Directory>
    +<Directory /www/htdocs>
    +    Options -FollowSymLinks +SymLinksIfOwnerMatch
    +</Directory>
    +
    +
    + +

    This at least avoids the extra checks for the + DocumentRoot path. Note that you'll need to add similar + sections if you have any Alias or RewriteRule + paths outside of your document root. For highest performance, and no + symlink protection, set FollowSymLinks everywhere, and + never set SymLinksIfOwnerMatch.

    + +

    AllowOverride

    + +

    Wherever in your URL-space you allow overrides (typically + .htaccess files) Apache will attempt to open + .htaccess for each filename component. For example,

    + +
    +
    +DocumentRoot /www/htdocs
    +<Directory />
    +    AllowOverride all
    +</Directory>
    +
    +
    + +

    and a request is made for the URI /index.html. Then + Apache will attempt to open /.htaccess, + /www/.htaccess, and /www/htdocs/.htaccess. + The solutions are similar to the previous case of Options + FollowSymLinks. For highest performance use AllowOverride + None everywhere in your filesystem.

    + +

    See also the .htaccess tutorial + for further discussion of this.

    + +

    Negotiation

    + +

    If at all possible, avoid content-negotiation if you're really + interested in every last ounce of performance. In practice the benefits + of negotiation outweigh the performance penalties. There's one case + where you can speed up the server. Instead of using a wildcard such + as:

    + +
    +
    +DirectoryIndex index
    +
    +
    + +

    Use a complete list of options:

    + +
    +
    +DirectoryIndex index.cgi index.pl index.shtml index.html
    +
    +
    + +

    where you list the most common choice first.

    + +

    If your site needs content negotiation, consider using + type-map files rather than the Options + MultiViews directive to accomplish the negotiation. See the Content Negotiation + documentation for a full discussion of the methods of negotiation, and + instructions for creating type-map files.

    + +

    Process Creation

    + +

    Prior to Apache 1.3 the MinSpareServers, + MaxSpareServers, + and StartServers + settings all had drastic effects on benchmark results. In particular, + Apache required a "ramp-up" period in order to reach a number of + children sufficient to serve the load being applied. After the initial + spawning of StartServers children, only one child per + second would be created to satisfy the MinSpareServers + setting. So a server being accessed by 100 simultaneous clients, using + the default StartServers of 5 would take on the order 95 + seconds to spawn enough children to handle the load. This works fine in + practice on real-life servers, because they aren't restarted + frequently. But results in poor performance on benchmarks, which might + only run for ten minutes.

    + +

    The one-per-second rule was implemented in an effort to avoid + swamping the machine with the startup of new children. If the machine + is busy spawning children it can't service requests. But it has such a + drastic effect on the perceived performance of Apache that it had to be + replaced. As of Apache 1.3, the code will relax the one-per-second + rule. It will spawn one, wait a second, then spawn two, wait a second, + then spawn four, and it will continue exponentially until it is + spawning 32 children per second. It will stop whenever it satisfies the + MinSpareServers setting.

    + +

    This appears to be responsive enough that it's almost unnecessary to + adjust the MinSpareServers, MaxSpareServers + and StartServers settings. When more than 4 children are + spawned per second, a message will be emitted to the + ErrorLog. If you see a lot of these errors then consider + tuning these settings. Use the mod_status output as a + guide.

    + +

    In particular, you may need to set MinSpareServers + higher if traffic on your site is extremely bursty - that is, if the + number of connections to your site fluctuates radically in short + periods of time. This may be the case, for example, if traffic to your + site is highly event-driven, such as sites for major sports events, or + other sites where users are encouraged to visit the site at a + particular time.

    + +

    Related to process creation is process death induced by the + MaxRequestsPerChild setting. By default this is 0, which + means that there is no limit to the number of requests handled per + child. If your configuration currently has this set to some very low + number, such as 30, you may want to bump this up significantly. If you + are running SunOS or an old version of Solaris, limit this to 10000 or + so because of memory leaks.

    + +

    When keep-alives are in use, children will be kept busy doing + nothing waiting for more requests on the already open connection. The + default KeepAliveTimeout of 15 seconds attempts to + minimize this effect. The tradeoff here is between network bandwidth + and server resources. In no event should you raise this above about 60 + seconds, as + most of the benefits are lost.

    + +

    Modules

    + +

    Since memory usage is such an important consideration in + performance, you should attempt to eliminate modules that you are not + actually using. If you have built the modules as DSOs, eliminating modules is a simple matter of + commenting out the associated AddModule and LoadModule directives for + that module. This allows you to experiment with removing modules, and + seeing if your site still functions in their absence.

    + +

    If, on the other hand, you have modules statically linked into your + Apache binary, you will need to recompile Apache in order to remove + unwanted modules.

    + +

    An associated question that arises here is, of course, what modules + you need, and which ones you don't. The answer here will, of course, + vary from one web site to another. However, the minimal list of + modules which you can get by with tends to include mod_mime, mod_dir, and mod_log_config. + mod_log_config is, of course, optional, as you can run a + web site without log files. This is, however, not recommended.

    + +

    mod_mmap_static

    + +

    Apache comes with a module, mod_mmap_static, which is not + enabled by default, which allows you to map files into RAM, and + serve them directly from memory rather than from the disc, which + should result in substantial performance improvement for + frequently-requests files. Note that when files are modified, you + will need to restart your server in order to serve the latest + version of the file, so this is not appropriate for files which + change frequently. See the documentation for this module for more + complete details.

    + +
    + +

    Compile-Time Configuration + Issues

    + +

    mod_status and ExtendedStatus On

    + +

    If you include mod_status and you also + set ExtendedStatus On when building and running Apache, + then on every request Apache will perform two calls to + gettimeofday(2) (or times(2) depending on + your operating system), and (pre-1.3) several extra calls to + time(2). This is all done so that the status report + contains timing indications. For highest performance, set + ExtendedStatus off (which is the default).

    + +

    mod_status should probably be configured to allow + access by only a few users, rather than to the general public, so this + will likely have very low impact on your overall performance.

    + +

    accept Serialization - multiple sockets

    + +

    This discusses a shortcoming in the Unix socket API. Suppose your + web server uses multiple Listen statements to listen on + either multiple ports or multiple addresses. In order to test each + socket to see if a connection is ready Apache uses + select(2). select(2) indicates that a socket + has zero or at least one connection waiting on it. + Apache's model includes multiple children, and all the idle ones test + for new connections at the same time. A naive implementation looks + something like this (these examples do not match the code, they're + contrived for pedagogical purposes):

    + +
    +
    +    for (;;) {
    +    for (;;) {
    +        fd_set accept_fds;
    +
    +        FD_ZERO (&accept_fds);
    +        for (i = first_socket; i <= last_socket; ++i) {
    +        FD_SET (i, &accept_fds);
    +        }
    +        rc = select (last_socket+1, &accept_fds, NULL, NULL, NULL);
    +        if (rc < 1) continue;
    +        new_connection = -1;
    +        for (i = first_socket; i <= last_socket; ++i) {
    +        if (FD_ISSET (i, &accept_fds)) {
    +            new_connection = accept (i, NULL, NULL);
    +            if (new_connection != -1) break;
    +        }
    +        }
    +        if (new_connection != -1) break;
    +    }
    +    process the new_connection;
    +    }
    +
    +
    + But this naive implementation has a serious starvation problem. Recall + that multiple children execute this loop at the same time, and so + multiple children will block at select when they are in + between requests. All those blocked children will awaken and return + from select when a single request appears on any socket + (the number of children which awaken varies depending on the operating + system and timing issues). They will all then fall down into the loop + and try to accept the connection. But only one will + succeed (assuming there's still only one connection ready), the rest + will be blocked in accept. This effectively locks + those children into serving requests from that one socket and no other + sockets, and they'll be stuck there until enough new requests appear on + that socket to wake them all up. This starvation problem was first + documented in PR#467. There are at + least two solutions. + +

    One solution is to make the sockets non-blocking. In this case the + accept won't block the children, and they will be allowed + to continue immediately. But this wastes CPU time. Suppose you have ten + idle children in select, and one connection arrives. Then + nine of those children will wake up, try to accept the + connection, fail, and loop back into select, accomplishing + nothing. Meanwhile none of those children are servicing requests that + occurred on other sockets until they get back up to the + select again. Overall this solution does not seem very + fruitful unless you have as many idle CPUs (in a multiprocessor box) as + you have idle children, not a very likely situation.

    + +

    Another solution, the one used by Apache, is to serialize entry into + the inner loop. The loop looks like this (differences highlighted):

    + +
    +
    +    for (;;) {
    +    accept_mutex_on ();
    +    for (;;) {
    +        fd_set accept_fds;
    +
    +        FD_ZERO (&accept_fds);
    +        for (i = first_socket; i <= last_socket; ++i) {
    +        FD_SET (i, &accept_fds);
    +        }
    +        rc = select (last_socket+1, &accept_fds, NULL, NULL, NULL);
    +        if (rc < 1) continue;
    +        new_connection = -1;
    +        for (i = first_socket; i <= last_socket; ++i) {
    +        if (FD_ISSET (i, &accept_fds)) {
    +            new_connection = accept (i, NULL, NULL);
    +            if (new_connection != -1) break;
    +        }
    +        }
    +        if (new_connection != -1) break;
    +    }
    +    accept_mutex_off ();
    +    process the new_connection;
    +    }
    +
    +
    + The functions + accept_mutex_on and accept_mutex_off + implement a mutual exclusion semaphore. Only one child can have the + mutex at any time. There are several choices for implementing these + mutexes. The choice is defined in src/conf.h (pre-1.3) or + src/include/ap_config.h (1.3 or later). Some architectures + do not have any locking choice made, on these architectures it is + unsafe to use multiple Listen directives. + +
    +
    HAVE_FLOCK_SERIALIZED_ACCEPT
    + +
    This method uses the flock(2) system call to lock a + lock file (located by the LockFile directive).
    + +
    HAVE_FCNTL_SERIALIZED_ACCEPT
    + +
    This method uses the fcntl(2) system call to lock a + lock file (located by the LockFile directive).
    + +
    HAVE_SYSVSEM_SERIALIZED_ACCEPT
    + +
    (1.3 or later) This method uses SysV-style semaphores to + implement the mutex. Unfortunately SysV-style semaphores have some + bad side-effects. One is that it's possible Apache will die without + cleaning up the semaphore (see the ipcs(8) man page). + The other is that the semaphore API allows for a denial of service + attack by any CGIs running under the same uid as the webserver + (i.e., all CGIs, unless you use something like suexec or + cgiwrapper). For these reasons this method is not used on any + architecture except IRIX (where the previous two are prohibitively + expensive on most IRIX boxes).
    + +
    HAVE_USLOCK_SERIALIZED_ACCEPT
    + +
    (1.3 or later) This method is only available on IRIX, and uses + usconfig(2) to create a mutex. While this method avoids + the hassles of SysV-style semaphores, it is not the default for IRIX. + This is because on single processor IRIX boxes (5.3 or 6.2) the + uslock code is two orders of magnitude slower than the SysV-semaphore + code. On multi-processor IRIX boxes the uslock code is an order of + magnitude faster than the SysV-semaphore code. Kind of a messed up + situation. So if you're using a multiprocessor IRIX box then you + should rebuild your webserver with + -DHAVE_USLOCK_SERIALIZED_ACCEPT on the + EXTRA_CFLAGS.
    + +
    HAVE_PTHREAD_SERIALIZED_ACCEPT
    + +
    (1.3 or later) This method uses POSIX mutexes and should work on + any architecture implementing the full POSIX threads specification, + however appears to only work on Solaris (2.5 or later), and even then + only in certain configurations. If you experiment with this you + should watch out for your server hanging and not responding. Static + content only servers may work just fine.
    +
    + +

    If your system has another method of serialization which isn't in + the above list then it may be worthwhile adding code for it (and + submitting a patch back to Apache). The above + HAVE_METHOD_SERIALIZED_ACCEPT defines specify which method + is available and works on the platform (you can have more than one); + USE_METHOD_SERIALIZED_ACCEPT is used to specify the + default method (see the AcceptMutex directive).

    + +

    Another solution that has been considered but never implemented is + to partially serialize the loop -- that is, let in a certain number of + processes. This would only be of interest on multiprocessor boxes where + it's possible multiple children could run simultaneously, and the + serialization actually doesn't take advantage of the full bandwidth. + This is a possible area of future investigation, but priority remains + low because highly parallel web servers are not the norm.

    + +

    Ideally you should run servers without multiple Listen + statements if you want the highest performance. But read on.

    + +

    accept Serialization - single socket

    + +

    The above is fine and dandy for multiple socket servers, but what + about single socket servers? In theory they shouldn't experience any of + these same problems because all children can just block in + accept(2) until a connection arrives, and no starvation + results. In practice this hides almost the same "spinning" behavior + discussed above in the non-blocking solution. The way that most TCP + stacks are implemented, the kernel actually wakes up all processes + blocked in accept when a single connection arrives. One of + those processes gets the connection and returns to user-space, the rest + spin in the kernel and go back to sleep when they discover there's no + connection for them. This spinning is hidden from the user-land code, + but it's there nonetheless. This can result in the same load-spiking + wasteful behavior that a non-blocking solution to the multiple sockets + case can.

    + +

    For this reason we have found that many architectures behave more + "nicely" if we serialize even the single socket case. So this is + actually the default in almost all cases. Crude experiments under Linux + (2.0.30 on a dual Pentium pro 166 w/128Mb RAM) have shown that the + serialization of the single socket case causes less than a 3% decrease + in requests per second over unserialized single-socket. But + unserialized single-socket showed an extra 100ms latency on each + request. This latency is probably a wash on long haul lines, and only + an issue on LANs. If you want to override the single socket + serialization you can define + SINGLE_LISTEN_UNSERIALIZED_ACCEPT and then single-socket + servers will not serialize at all.

    + +

    Lingering Close

    + +

    As discussed in + draft-ietf-http-connection-00.txt section 8, in order for an HTTP + server to reliably implement the protocol it needs to + shutdown each direction of the communication independently (recall that + a TCP connection is bi-directional, each half is independent of the + other). This fact is often overlooked by other servers, but is + correctly implemented in Apache as of 1.2.

    + +

    When this feature was added to Apache it caused a flurry of problems + on various versions of Unix because of a shortsightedness. The TCP + specification does not state that the FIN_WAIT_2 state has a timeout, + but it doesn't prohibit it. On systems without the timeout, Apache 1.2 + induces many sockets stuck forever in the FIN_WAIT_2 state. In many + cases this can be avoided by simply upgrading to the latest TCP/IP + patches supplied by the vendor. In cases where the vendor has never + released patches (i.e., SunOS4 -- although folks with a source + license can patch it themselves) we have decided to disable this + feature.

    + +

    There are two ways of accomplishing this. One is the socket option + SO_LINGER. But as fate would have it, this has never been + implemented properly in most TCP/IP stacks. Even on those stacks with a + proper implementation (i.e., Linux 2.0.31) this method proves + to be more expensive (cputime) than the next solution.

    + +

    For the most part, Apache implements this in a function called + lingering_close (in http_main.c). The + function looks roughly like this:

    + +
    +
    +    void lingering_close (int s)
    +    {
    +    char junk_buffer[2048];
    +
    +    /* shutdown the sending side */
    +    shutdown (s, 1);
    +
    +    signal (SIGALRM, lingering_death);
    +    alarm (30);
    +
    +    for (;;) {
    +        select (s for reading, 2 second timeout);
    +        if (error) break;
    +        if (s is ready for reading) {
    +        if (read (s, junk_buffer, sizeof (junk_buffer)) <= 0) {
    +            break;
    +        }
    +        /* just toss away whatever is read */
    +        }
    +    }
    +
    +    close (s);
    +    }
    +
    +
    + This naturally adds some expense at the end of a connection, but it is + required for a reliable implementation. As HTTP/1.1 becomes more + prevalent, and all connections are persistent, this expense will be + amortized over more requests. If you want to play with fire and disable + this feature you can define NO_LINGCLOSE, but this is not + recommended at all. In particular, as HTTP/1.1 pipelined persistent + connections come into use lingering_close is an absolute + necessity (and pipelined + connections are faster, so you want to support them). + +

    Scoreboard File

    + +

    Apache's parent and children communicate with each other through + something called the scoreboard. Ideally this should be implemented in + shared memory. For those operating systems that we either have access + to, or have been given detailed ports for, it typically is implemented + using shared memory. The rest default to using an on-disk file. The + on-disk file is not only slow, but it is unreliable (and less + featured). Peruse the src/main/conf.h file for your + architecture and look for either USE_MMAP_SCOREBOARD or + USE_SHMGET_SCOREBOARD. Defining one of those two (as well + as their companions HAVE_MMAP and HAVE_SHMGET + respectively) enables the supplied shared memory code. If your system + has another type of shared memory, edit the file + src/main/http_main.c and add the hooks necessary to use it + in Apache. (Send us back a patch too please.)

    + +

    Historical note: The Linux port of Apache didn't start to use shared + memory until version 1.2 of Apache. This oversight resulted in really + poor and unreliable behavior of earlier versions of Apache on + Linux.

    + +

    DYNAMIC_MODULE_LIMIT

    + +

    If you have no intention of using dynamically loaded modules (you + probably don't if you're reading this and tuning your server for every + last ounce of performance) then you should add + -DDYNAMIC_MODULE_LIMIT=0 when building your server. This + will save RAM that's allocated only for supporting dynamically loaded + modules.

    +
    + +

    Appendix: Detailed Analysis of a + Trace

    + Here is a system call trace of Apache 1.3 running on Linux. The + run-time configuration file is essentially the default plus: + +
    +
    +<Directory />
    +    AllowOverride none
    +    Options FollowSymLinks
    +</Directory>
    +
    +
    + The file being requested is a static 6K file of no particular content. + Traces of non-static requests or requests with content negotiation look + wildly different (and quite ugly in some cases). First the entire + trace, then we'll examine details. (This was generated by the + strace program, other similar programs include + truss, ktrace, and par.) + +
    +
    +accept(15, {sin_family=AF_INET, sin_port=htons(22283), sin_addr=inet_addr("127.0.0.1")}, [16]) = 3
    +flock(18, LOCK_UN)                      = 0
    +sigaction(SIGUSR1, {SIG_IGN}, {0x8059954, [], SA_INTERRUPT}) = 0
    +getsockname(3, {sin_family=AF_INET, sin_port=htons(8080), sin_addr=inet_addr("127.0.0.1")}, [16]) = 0
    +setsockopt(3, IPPROTO_TCP1, [1], 4)     = 0
    +read(3, "GET /6k HTTP/1.0\r\nUser-Agent: "..., 4096) = 60
    +sigaction(SIGUSR1, {SIG_IGN}, {SIG_IGN}) = 0
    +time(NULL)                              = 873959960
    +gettimeofday({873959960, 404935}, NULL) = 0
    +stat("/home/dgaudet/ap/apachen/htdocs/6k", {st_mode=S_IFREG|0644, st_size=6144, ...}) = 0
    +open("/home/dgaudet/ap/apachen/htdocs/6k", O_RDONLY) = 4
    +mmap(0, 6144, PROT_READ, MAP_PRIVATE, 4, 0) = 0x400ee000
    +writev(3, [{"HTTP/1.1 200 OK\r\nDate: Thu, 11"..., 245}, {"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 6144}], 2) = 6389
    +close(4)                                = 0
    +time(NULL)                              = 873959960
    +write(17, "127.0.0.1 - - [10/Sep/1997:23:39"..., 71) = 71
    +gettimeofday({873959960, 417742}, NULL) = 0
    +times({tms_utime=5, tms_stime=0, tms_cutime=0, tms_cstime=0}) = 446747
    +shutdown(3, 1 /* send */)               = 0
    +oldselect(4, [3], NULL, [3], {2, 0})    = 1 (in [3], left {2, 0})
    +read(3, "", 2048)                       = 0
    +close(3)                                = 0
    +sigaction(SIGUSR1, {0x8059954, [], SA_INTERRUPT}, {SIG_IGN}) = 0
    +munmap(0x400ee000, 6144)                = 0
    +flock(18, LOCK_EX)                      = 0
    +
    +
    + +

    Notice the accept serialization:

    + +
    +
    +flock(18, LOCK_UN)                      = 0
    +...
    +flock(18, LOCK_EX)                      = 0
    +
    +
    + These two calls can be removed by defining + SINGLE_LISTEN_UNSERIALIZED_ACCEPT as described earlier. + +

    Notice the SIGUSR1 manipulation:

    + +
    +
    +sigaction(SIGUSR1, {SIG_IGN}, {0x8059954, [], SA_INTERRUPT}) = 0
    +...
    +sigaction(SIGUSR1, {SIG_IGN}, {SIG_IGN}) = 0
    +...
    +sigaction(SIGUSR1, {0x8059954, [], SA_INTERRUPT}, {SIG_IGN}) = 0
    +
    +
    + This is caused by the implementation of graceful restarts. When the + parent receives a SIGUSR1 it sends a SIGUSR1 + to all of its children (and it also increments a "generation counter" + in shared memory). Any children that are idle (between connections) + will immediately die off when they receive the signal. Any children + that are in keep-alive connections, but are in between requests will + die off immediately. But any children that have a connection and are + still waiting for the first request will not die off immediately. + +

    To see why this is necessary, consider how a browser reacts to a + closed connection. If the connection was a keep-alive connection and + the request being serviced was not the first request then the browser + will quietly reissue the request on a new connection. It has to do this + because the server is always free to close a keep-alive connection in + between requests (i.e., due to a timeout or because of a + maximum number of requests). But, if the connection is closed before + the first response has been received the typical browser will display a + "document contains no data" dialogue (or a broken image icon). This is + done on the assumption that the server is broken in some way (or maybe + too overloaded to respond at all). So Apache tries to avoid ever + deliberately closing the connection before it has sent a single + response. This is the cause of those SIGUSR1 + manipulations.

    + +

    Note that it is theoretically possible to eliminate all three of + these calls. But in rough tests the gain proved to be almost + unnoticeable.

    + +

    In order to implement virtual hosts, Apache needs to know the local + socket address used to accept the connection:

    + +
    +
    +getsockname(3, {sin_family=AF_INET, sin_port=htons(8080), sin_addr=inet_addr("127.0.0.1")}, [16]) = 0
    +
    +
    + It is possible to eliminate this call in many situations (such as when + there are no virtual hosts, or when Listen directives are + used which do not have wildcard addresses). But no effort has yet been + made to do these optimizations. + +

    Apache turns off the Nagle algorithm:

    + +
    +
    +setsockopt(3, IPPROTO_TCP1, [1], 4)     = 0
    +
    +
    + because of problems described in a paper by + John Heidemann. + +

    Notice the two time calls:

    + +
    +
    +time(NULL)                              = 873959960
    +...
    +time(NULL)                              = 873959960
    +
    +
    + One of these occurs at the beginning of the request, and the other + occurs as a result of writing the log. At least one of these is + required to properly implement the HTTP protocol. The second occurs + because the Common Log Format dictates that the log record include a + timestamp of the end of the request. A custom logging module could + eliminate one of the calls. Or you can use a method which moves the + time into shared memory, see the patches section + below. + +

    As described earlier, ExtendedStatus On causes two + gettimeofday calls and a call to times:

    + +
    +
    +gettimeofday({873959960, 404935}, NULL) = 0
    +...
    +gettimeofday({873959960, 417742}, NULL) = 0
    +times({tms_utime=5, tms_stime=0, tms_cutime=0, tms_cstime=0}) = 446747
    +
    +
    + These can be removed by setting ExtendedStatus Off (which + is the default). + +

    It might seem odd to call stat:

    + +
    +
    +stat("/home/dgaudet/ap/apachen/htdocs/6k", {st_mode=S_IFREG|0644, st_size=6144, ...}) = 0
    +
    +
    + This is part of the algorithm which calculates the + PATH_INFO for use by CGIs. In fact if the request had been + for the URI /cgi-bin/printenv/foobar then there would be + two calls to stat. The first for + /home/dgaudet/ap/apachen/cgi-bin/printenv/foobar which + does not exist, and the second for + /home/dgaudet/ap/apachen/cgi-bin/printenv, which does + exist. Regardless, at least one stat call is necessary + when serving static files because the file size and modification times + are used to generate HTTP headers (such as Content-Length, + Last-Modified) and implement protocol features (such as + If-Modified-Since). A somewhat more clever server could + avoid the stat when serving non-static files, however + doing so in Apache is very difficult given the modular structure. + +

    All static files are served using mmap:

    + +
    +
    +mmap(0, 6144, PROT_READ, MAP_PRIVATE, 4, 0) = 0x400ee000
    +...
    +munmap(0x400ee000, 6144)                = 0
    +
    +
    + On some architectures it's slower to mmap small files than + it is to simply read them. The define + MMAP_THRESHOLD can be set to the minimum size required + before using mmap. By default it's set to 0 (except on + SunOS4 where experimentation has shown 8192 to be a better value). + Using a tool such as lmbench you can determine + the optimal setting for your environment. + +

    You may also wish to experiment with MMAP_SEGMENT_SIZE + (default 32768) which determines the maximum number of bytes that will + be written at a time from mmap()d files. Apache only resets the + client's Timeout in between write()s. So setting this + large may lock out low bandwidth clients unless you also increase the + Timeout.

    + +

    It may even be the case that mmap isn't used on your + architecture; if so then defining USE_MMAP_FILES and + HAVE_MMAP might work (if it works then report back to + us).

    + +

    Apache does its best to avoid copying bytes around in memory. The + first write of any request typically is turned into a + writev which combines both the headers and the first hunk + of data:

    + +
    +
    +writev(3, [{"HTTP/1.1 200 OK\r\nDate: Thu, 11"..., 245}, {"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 6144}], 2) = 6389
    +
    +
    + When doing HTTP/1.1 chunked encoding Apache will generate up to four + element writevs. The goal is to push the byte copying into + the kernel, where it typically has to happen anyhow (to assemble + network packets). On testing, various Unixes (BSDI 2.x, Solaris 2.5, + Linux 2.0.31+) properly combine the elements into network packets. + Pre-2.0.31 Linux will not combine, and will create a packet for each + element, so upgrading is a good idea. Defining NO_WRITEV + will disable this combining, but result in very poor chunked encoding + performance. + +

    The log write:

    + +
    +
    +write(17, "127.0.0.1 - - [10/Sep/1997:23:39"..., 71) = 71
    +
    +
    + can be deferred by defining BUFFERED_LOGS. In this case up + to PIPE_BUF bytes (a POSIX defined constant) of log + entries are buffered before writing. At no time does it split a log + entry across a PIPE_BUF boundary because those writes may + not be atomic. (i.e., entries from multiple children could + become mixed together). The code does its best to flush this buffer + when a child dies. + +

    The lingering close code causes four system calls:

    + +
    +
    +shutdown(3, 1 /* send */)               = 0
    +oldselect(4, [3], NULL, [3], {2, 0})    = 1 (in [3], left {2, 0})
    +read(3, "", 2048)                       = 0
    +close(3)                                = 0
    +
    +
    + which were described earlier. + +

    Let's apply some of these optimizations: + -DSINGLE_LISTEN_UNSERIALIZED_ACCEPT -DBUFFERED_LOGS and + ExtendedStatus Off. Here's the final trace:

    + +
    +
    +accept(15, {sin_family=AF_INET, sin_port=htons(22286), sin_addr=inet_addr("127.0.0.1")}, [16]) = 3
    +sigaction(SIGUSR1, {SIG_IGN}, {0x8058c98, [], SA_INTERRUPT}) = 0
    +getsockname(3, {sin_family=AF_INET, sin_port=htons(8080), sin_addr=inet_addr("127.0.0.1")}, [16]) = 0
    +setsockopt(3, IPPROTO_TCP1, [1], 4)     = 0
    +read(3, "GET /6k HTTP/1.0\r\nUser-Agent: "..., 4096) = 60
    +sigaction(SIGUSR1, {SIG_IGN}, {SIG_IGN}) = 0
    +time(NULL)                              = 873961916
    +stat("/home/dgaudet/ap/apachen/htdocs/6k", {st_mode=S_IFREG|0644, st_size=6144, ...}) = 0
    +open("/home/dgaudet/ap/apachen/htdocs/6k", O_RDONLY) = 4
    +mmap(0, 6144, PROT_READ, MAP_PRIVATE, 4, 0) = 0x400e3000
    +writev(3, [{"HTTP/1.1 200 OK\r\nDate: Thu, 11"..., 245}, {"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 6144}], 2) = 6389
    +close(4)                                = 0
    +time(NULL)                              = 873961916
    +shutdown(3, 1 /* send */)               = 0
    +oldselect(4, [3], NULL, [3], {2, 0})    = 1 (in [3], left {2, 0})
    +read(3, "", 2048)                       = 0
    +close(3)                                = 0
    +sigaction(SIGUSR1, {0x8058c98, [], SA_INTERRUPT}, {SIG_IGN}) = 0
    +munmap(0x400e3000, 6144)                = 0
    +
    +
    + That's 19 system calls, of which 4 remain relatively easy to remove, + but don't seem worth the effort. + +

    Appendix: Patches Available

    + There are several + performance patches available for 1.3. Although they may not apply + cleanly to the current version, it shouldn't be difficult for someone + with a little C knowledge to update them. In particular: + +
      +
    • A patch + to remove all time(2) system calls.
    • + +
    • A + patch to remove various system calls from + mod_include, these calls are used by few sites but + required for backwards compatibility.
    • + +
    • A patch + which integrates the above two plus a few other speedups at the cost + of removing some functionality.
    • +
    + +

    Appendix: The Pre-Forking + Model

    + +

    Apache (on Unix) is a pre-forking model server. The + parent process is responsible only for forking child + processes, it does not serve any requests or service any network + sockets. The child processes actually process connections, they serve + multiple connections (one at a time) before dying. The parent spawns + new or kills off old children in response to changes in the load on the + server (it does so by monitoring a scoreboard which the children keep + up to date).

    + +

    This model for servers offers a robustness that other models do not. + In particular, the parent code is very simple, and with a high degree + of confidence the parent will continue to do its job without error. The + children are complex, and when you add in third party code via modules, + you risk segmentation faults and other forms of corruption. Even should + such a thing happen, it only affects one connection and the server + continues serving requests. The parent quickly replaces the dead + child.

    + +

    Pre-forking is also very portable across dialects of Unix. + Historically this has been an important goal for Apache, and it + continues to remain so.

    + +

    The pre-forking model comes under criticism for various performance + aspects. Of particular concern are the overhead of forking a process, + the overhead of context switches between processes, and the memory + overhead of having multiple processes. Furthermore it does not offer as + many opportunities for data-caching between requests (such as a pool of + mmapped files). Various other models exist and extensive + analysis can be found in the papers of + the JAWS project. In practice all of these costs vary drastically + depending on the operating system.

    + +

    Apache's core code is already multithread aware, and Apache version + 1.3 is multithreaded on NT. There have been at least two other + experimental implementations of threaded Apache, one using the 1.3 code + base on DCE, and one using a custom user-level threads package and the + 1.0 code base; neither is publicly available. There is also an + experimental port of Apache 1.3 to Netscape's Portable + Run Time, which is available (but + you're encouraged to join the new-httpd mailing list + if you intend to use it). Part of our redesign for version 2.0 of + Apache includes abstractions of the server model so that we can + continue to support the pre-forking model, and also support various + threaded models. +

    + + + diff --git a/htdocs/manual/misc/perf.html b/htdocs/manual/misc/perf.html new file mode 100644 index 00000000000..fb61909f125 --- /dev/null +++ b/htdocs/manual/misc/perf.html @@ -0,0 +1,140 @@ + + + + + + + Hints on Running a High-Performance Web Server + + + + + + +

    Hints on Running a High-Performance Web + Server

    + Running Apache on a heavily loaded web server, one often + encounters problems related to the machine and OS + configuration. "Heavy" is relative, of course - but if you are + seeing more than a couple hits per second on a sustained basis + you should consult the pointers on this page. In general the + suggestions involve how to tune your kernel for the heavier TCP + load, hardware/software conflicts that arise, etc. + + +
    + +

    A/UX (Apple's UNIX)

    + If you are running Apache on A/UX, a page that gives some + helpful performance hints (concerning the listen() + queue and using virtual hosts) can be found here + +
    + +

    BSD-based (BSDI, FreeBSD, + etc)

    + Quick and detailed performance tuning + hints for BSD-derived systems. Accept filtering on FreeBSD. +
    + +

    Digital UNIX

    + + +
    + +

    SunOS 4.x

    + More information on tuning SOMAXCONN on SunOS can be found at + http://www.islandnet.com/~mark/somaxconn.html. + +
    + +

    SVR4

    + Some SVR4 versions waste three system calls on every + gettimeofday() call. Depending on the syntactic + form of the TZ environment variable, these systems + have several different algorithms to determine the local time + zone (presumably compatible with something). The + following example uses the central european time zone to + demonstrate this: + +
    +
    TZ=:MET
    + +
    + This form delegates the knowledge of the time zone + information to an external compiled zoneinfo file (à + la BSD).
    + Caveat: Each time the gettimeofday() + function is called, the external zone info is read in again + (at least on some SVR4 systems). That results in three + wasted system calls with every apache request served. +
    +     open("/usr/lib/locale/TZ/MET", O_RDONLY) = 3
    +     read(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 7944) = 778
    +     close(3)                                = 0
    +
    +
    + +
    + TZ=MET-1MDT,M3.5.0/02:00:00,M10.5.0/03:00:00
    + +
    This syntax form (à la SYSV) contains all the + knowledge about time zone beginning and ending times in its + external representation. It has to be parsed each time it is + evaluated, resulting in a slight computing overhead, but it + requires no system call. Though the table lookup à la + BSD is the more sophisticated technical solution, the bad + SVR4 implementation makes this the preferred syntax on + systems which otherwise access the external zone info file + repeatedly.
    +
    + You should use the truss utility on a + single-process apache server (started with the -X + debugging switch) to determine whether your system can profit + from the second form of the TZ environment + variable. If it does, you could integrate the setting of the + preferred TZ syntax into the httpd startup script, + which is usually simply a copy of (or symbolic link to) the + apachectl utility script, or into the system's + /etc/TIMEZONE script. +
    + +

    More welcome!

    + If you have tips to contribute, please submit them to + the Apache Bug + Database. + + + + + diff --git a/htdocs/manual/misc/rewriteguide.html b/htdocs/manual/misc/rewriteguide.html new file mode 100644 index 00000000000..82246145d29 --- /dev/null +++ b/htdocs/manual/misc/rewriteguide.html @@ -0,0 +1,2340 @@ + + + + + + + Apache 1.3 URL Rewriting Guide + + + + +
    + + +
    +

    Apache 1.3
    + URL Rewriting Guide
    +

    + +
    + Originally written by
    + Ralf S. Engelschall <rse@apache.org>
    + December 1997 +
    +
    + +

    This document supplements the mod_rewrite reference documentation. + It describes how one can use Apache's mod_rewrite to solve + typical URL-based problems with which webmasters are often + confronted. We give detailed descriptions on how to + solve each problem by configuring URL rewriting rulesets.

    + +

    Introduction to + mod_rewrite

    + The Apache module mod_rewrite is a killer one, i.e. it is a + really sophisticated module which provides a powerful way to + do URL manipulations. With it you can do nearly all types of + URL manipulations you ever dreamed about. The price you have + to pay is to accept complexity, because mod_rewrite's major + drawback is that it is not easy to understand and use for the + beginner. And even Apache experts sometimes discover new + aspects where mod_rewrite can help. + +

    In other words: With mod_rewrite you either shoot yourself + in the foot the first time and never use it again or love it + for the rest of your life because of its power. This paper + tries to give you a few initial success events to avoid the + first case by presenting already invented solutions to + you.

    + +

    Practical Solutions

    + Here come a lot of practical solutions I've either invented + myself or collected from other peoples solutions in the past. + Feel free to learn the black magic of URL rewriting from + these examples. + + + + + +
    ATTENTION: Depending on your server-configuration it + can be necessary to slightly change the examples for your + situation, e.g. adding the [PT] flag when additionally + using mod_alias and mod_userdir, etc. Or rewriting a + ruleset to fit in .htaccess context instead + of per-server context. Always try to understand what a + particular ruleset really does before you use it in order to + avoid problems.
    + +

    URL Layout

    + +

    Canonical URLs

    + +
    +
    Description:
    + +
    On some webservers there are more than one URL for a + resource. Usually there are canonical URLs (which should be + actually used and distributed) and those which are just + shortcuts, internal ones, etc. Independent which URL the + user supplied with the request he should finally see the + canonical one only.
    + +
    Solution:
    + +
    + We do an external HTTP redirect for all non-canonical + URLs to fix them in the location view of the Browser and + for all subsequent requests. In the example ruleset below + we replace /~user by the canonical + /u/user and fix a missing trailing slash for + /u/user. + + + + + +
    +
    +RewriteRule   ^/~([^/]+)/?(.*)    /u/$1/$2  [R]
    +RewriteRule   ^/([uge])/([^/]+)$  /$1/$2/   [R]
    +
    +
    +
    +
    + +

    Canonical Hostnames

    + +
    +
    Description:
    + +
    The goal of this rule is to force the use of a particular + hostname, in preference to other hostnames which may be used to + reach the same site. For example, if you wish to force the use + of www.example.com instead of + example.com, you might use a variant of the + following recipe.
    + +
    Solution:
    + +
    + + + + +
    +
    +# For sites running on a port other than 80
    +RewriteCond %{HTTP_HOST}   !^fully\.qualified\.domain\.name [NC]
    +RewriteCond %{HTTP_HOST}   !^$
    +RewriteCond %{SERVER_PORT} !^80$
    +RewriteRule ^/(.*)         http://fully.qualified.domain.name:%{SERVER_PORT}/$1 [L,R]
    +
    +# And for a site running on port 80
    +RewriteCond %{HTTP_HOST}   !^fully\.qualified\.domain\.name [NC]
    +RewriteCond %{HTTP_HOST}   !^$
    +RewriteRule ^/(.*)         http://fully.qualified.domain.name/$1 [L,R]
    +
    +
    +
    +
    + +

    Moved DocumentRoot

    + +
    +
    Description:
    + +
    Usually the DocumentRoot of the webserver directly + relates to the URL ``/''. But often this data + is not really of top-level priority, it is perhaps just one + entity of a lot of data pools. For instance at our Intranet + sites there are /e/www/ (the homepage for + WWW), /e/sww/ (the homepage for the Intranet) + etc. Now because the data of the DocumentRoot stays at + /e/www/ we had to make sure that all inlined + images and other stuff inside this data pool work for + subsequent requests.
    + +
    Solution:
    + +
    + We just redirect the URL / to + /e/www/. While is seems trivial it is + actually trivial with mod_rewrite, only. Because the + typical old mechanisms of URL Aliases (as + provides by mod_alias and friends) only used + prefix matching. With this you cannot do such a + redirection because the DocumentRoot is a prefix of all + URLs. With mod_rewrite it is really trivial: + + + + + +
    +
    +RewriteEngine on
    +RewriteRule   ^/$  /e/www/  [R]
    +
    +
    +
    +
    + +

    Trailing Slash Problem

    + +
    +
    Description:
    + +
    Every webmaster can sing a song about the problem of + the trailing slash on URLs referencing directories. If they + are missing, the server dumps an error, because if you say + /~quux/foo instead of /~quux/foo/ + then the server searches for a file named + foo. And because this file is a directory it + complains. Actually is tries to fix it themself in most of + the cases, but sometimes this mechanism need to be emulated + by you. For instance after you have done a lot of + complicated URL rewritings to CGI scripts etc.
    + +
    Solution:
    + +
    + The solution to this subtle problem is to let the server + add the trailing slash automatically. To do this + correctly we have to use an external redirect, so the + browser correctly requests subsequent images etc. If we + only did a internal rewrite, this would only work for the + directory page, but would go wrong when any images are + included into this page with relative URLs, because the + browser would request an in-lined object. For instance, a + request for image.gif in + /~quux/foo/index.html would become + /~quux/image.gif without the external + redirect! + +

    So, to do this trick we write:

    + + + + + +
    +
    +RewriteEngine  on
    +RewriteBase    /~quux/
    +RewriteRule    ^foo$  foo/  [R]
    +
    +
    + +

    The crazy and lazy can even do the following in the + top-level .htaccess file of their homedir. + But notice that this creates some processing + overhead.

    + + + + + +
    +
    +RewriteEngine  on
    +RewriteBase    /~quux/
    +RewriteCond    %{REQUEST_FILENAME}  -d
    +RewriteRule    ^(.+[^/])$           $1/  [R]
    +
    +
    +
    +
    + +

    Webcluster through Homogeneous URL Layout

    + +
    +
    Description:
    + +
    We want to create a homogenous and consistent URL + layout over all WWW servers on a Intranet webcluster, i.e. + all URLs (per definition server local and thus server + dependent!) become actually server independed! + What we want is to give the WWW namespace a consistent + server-independend layout: no URL should have to include + any physically correct target server. The cluster itself + should drive us automatically to the physical target + host.
    + +
    Solution:
    + +
    + First, the knowledge of the target servers come from + (distributed) external maps which contain information + where our users, groups and entities stay. The have the + form +
    +user1  server_of_user1
    +user2  server_of_user2
    +:      :
    +
    + +

    We put them into files map.xxx-to-host. + Second we need to instruct all servers to redirect URLs + of the forms

    +
    +/u/user/anypath
    +/g/group/anypath
    +/e/entity/anypath
    +
    + +

    to

    +
    +http://physical-host/u/user/anypath
    +http://physical-host/g/group/anypath
    +http://physical-host/e/entity/anypath
    +
    + +

    when the URL is not locally valid to a server. The + following ruleset does this for us by the help of the map + files (assuming that server0 is a default server which + will be used if a user has no entry in the map):

    + + + + + +
    +
    +RewriteEngine on
    +
    +RewriteMap      user-to-host   txt:/path/to/map.user-to-host
    +RewriteMap     group-to-host   txt:/path/to/map.group-to-host
    +RewriteMap    entity-to-host   txt:/path/to/map.entity-to-host
    +
    +RewriteRule   ^/u/([^/]+)/?(.*)   http://${user-to-host:$1|server0}/u/$1/$2
    +RewriteRule   ^/g/([^/]+)/?(.*)  http://${group-to-host:$1|server0}/g/$1/$2
    +RewriteRule   ^/e/([^/]+)/?(.*) http://${entity-to-host:$1|server0}/e/$1/$2
    +
    +RewriteRule   ^/([uge])/([^/]+)/?$          /$1/$2/.www/
    +RewriteRule   ^/([uge])/([^/]+)/([^.]+.+)   /$1/$2/.www/$3\
    +
    +
    +
    +
    + +

    Move Homedirs to Different Webserver

    + +
    +
    Description:
    + +
    A lot of webmaster aksed for a solution to the + following situation: They wanted to redirect just all + homedirs on a webserver to another webserver. They usually + need such things when establishing a newer webserver which + will replace the old one over time.
    + +
    Solution:
    + +
    + The solution is trivial with mod_rewrite. On the old + webserver we just redirect all + /~user/anypath URLs to + http://newserver/~user/anypath. + + + + + +
    +
    +RewriteEngine on
    +RewriteRule   ^/~(.+)  http://newserver/~$1  [R,L]
    +
    +
    +
    +
    + +

    Structured Homedirs

    + +
    +
    Description:
    + +
    Some sites with thousend of users usually use a + structured homedir layout, i.e. each homedir is in a + subdirectory which begins for instance with the first + character of the username. So, /~foo/anypath + is /home/f/foo/.www/anypath + while /~bar/anypath is + /home/b/bar/.www/anypath.
    + +
    Solution:
    + +
    + We use the following ruleset to expand the tilde URLs + into exactly the above layout. + + + + + +
    +
    +RewriteEngine on
    +RewriteRule   ^/~(([a-z])[a-z0-9]+)(.*)  /home/$2/$1/.www$3
    +
    +
    +
    +
    + +

    Filesystem Reorganisation

    + +
    +
    Description:
    + +
    + This really is a hardcore example: a killer application + which heavily uses per-directory + RewriteRules to get a smooth look and feel + on the Web while its data structure is never touched or + adjusted. Background: net.sw is + my archive of freely available Unix software packages, + which I started to collect in 1992. It is both my hobby + and job to to this, because while I'm studying computer + science I have also worked for many years as a system and + network administrator in my spare time. Every week I need + some sort of software so I created a deep hierarchy of + directories where I stored the packages: +
    +drwxrwxr-x   2 netsw  users    512 Aug  3 18:39 Audio/
    +drwxrwxr-x   2 netsw  users    512 Jul  9 14:37 Benchmark/
    +drwxrwxr-x  12 netsw  users    512 Jul  9 00:34 Crypto/
    +drwxrwxr-x   5 netsw  users    512 Jul  9 00:41 Database/
    +drwxrwxr-x   4 netsw  users    512 Jul 30 19:25 Dicts/
    +drwxrwxr-x  10 netsw  users    512 Jul  9 01:54 Graphic/
    +drwxrwxr-x   5 netsw  users    512 Jul  9 01:58 Hackers/
    +drwxrwxr-x   8 netsw  users    512 Jul  9 03:19 InfoSys/
    +drwxrwxr-x   3 netsw  users    512 Jul  9 03:21 Math/
    +drwxrwxr-x   3 netsw  users    512 Jul  9 03:24 Misc/
    +drwxrwxr-x   9 netsw  users    512 Aug  1 16:33 Network/
    +drwxrwxr-x   2 netsw  users    512 Jul  9 05:53 Office/
    +drwxrwxr-x   7 netsw  users    512 Jul  9 09:24 SoftEng/
    +drwxrwxr-x   7 netsw  users    512 Jul  9 12:17 System/
    +drwxrwxr-x  12 netsw  users    512 Aug  3 20:15 Typesetting/
    +drwxrwxr-x  10 netsw  users    512 Jul  9 14:08 X11/
    +
    + +

    In July 1996 I decided to make this archive public to + the world via a nice Web interface. "Nice" means that I + wanted to offer an interface where you can browse + directly through the archive hierarchy. And "nice" means + that I didn't wanted to change anything inside this + hierarchy - not even by putting some CGI scripts at the + top of it. Why? Because the above structure should be + later accessible via FTP as well, and I didn't want any + Web or CGI stuff to be there.

    +
    + +
    Solution:
    + +
    + The solution has two parts: The first is a set of CGI + scripts which create all the pages at all directory + levels on-the-fly. I put them under + /e/netsw/.www/ as follows: +
    +-rw-r--r--   1 netsw  users    1318 Aug  1 18:10 .wwwacl
    +drwxr-xr-x  18 netsw  users     512 Aug  5 15:51 DATA/
    +-rw-rw-rw-   1 netsw  users  372982 Aug  5 16:35 LOGFILE
    +-rw-r--r--   1 netsw  users     659 Aug  4 09:27 TODO
    +-rw-r--r--   1 netsw  users    5697 Aug  1 18:01 netsw-about.html
    +-rwxr-xr-x   1 netsw  users     579 Aug  2 10:33 netsw-access.pl
    +-rwxr-xr-x   1 netsw  users    1532 Aug  1 17:35 netsw-changes.cgi
    +-rwxr-xr-x   1 netsw  users    2866 Aug  5 14:49 netsw-home.cgi
    +drwxr-xr-x   2 netsw  users     512 Jul  8 23:47 netsw-img/
    +-rwxr-xr-x   1 netsw  users   24050 Aug  5 15:49 netsw-lsdir.cgi
    +-rwxr-xr-x   1 netsw  users    1589 Aug  3 18:43 netsw-search.cgi
    +-rwxr-xr-x   1 netsw  users    1885 Aug  1 17:41 netsw-tree.cgi
    +-rw-r--r--   1 netsw  users     234 Jul 30 16:35 netsw-unlimit.lst
    +
    + +

    The DATA/ subdirectory holds the above + directory structure, i.e. the real + net.sw stuff and gets + automatically updated via rdist from time to + time. The second part of the problem remains: how to link + these two structures together into one smooth-looking URL + tree? We want to hide the DATA/ directory + from the user while running the appropriate CGI scripts + for the various URLs. Here is the solution: first I put + the following into the per-directory configuration file + in the Document Root of the server to rewrite the + announced URL /net.sw/ to the internal path + /e/netsw:

    + + + + + +
    +
    +RewriteRule  ^net.sw$       net.sw/        [R]
    +RewriteRule  ^net.sw/(.*)$  e/netsw/$1
    +
    +
    + +

    The first rule is for requests which miss the trailing + slash! The second rule does the real thing. And then + comes the killer configuration which stays in the + per-directory config file + /e/netsw/.www/.wwwacl:

    + + + + + +
    +
    +Options       ExecCGI FollowSymLinks Includes MultiViews 
    +
    +RewriteEngine on
    +
    +#  we are reached via /net.sw/ prefix
    +RewriteBase   /net.sw/
    +
    +#  first we rewrite the root dir to 
    +#  the handling cgi script
    +RewriteRule   ^$                       netsw-home.cgi     [L]
    +RewriteRule   ^index\.html$            netsw-home.cgi     [L]
    +
    +#  strip out the subdirs when
    +#  the browser requests us from perdir pages
    +RewriteRule   ^.+/(netsw-[^/]+/.+)$    $1                 [L]
    +
    +#  and now break the rewriting for local files
    +RewriteRule   ^netsw-home\.cgi.*       -                  [L]
    +RewriteRule   ^netsw-changes\.cgi.*    -                  [L]
    +RewriteRule   ^netsw-search\.cgi.*     -                  [L]
    +RewriteRule   ^netsw-tree\.cgi$        -                  [L]
    +RewriteRule   ^netsw-about\.html$      -                  [L]
    +RewriteRule   ^netsw-img/.*$           -                  [L]
    +
    +#  anything else is a subdir which gets handled
    +#  by another cgi script
    +RewriteRule   !^netsw-lsdir\.cgi.*     -                  [C]
    +RewriteRule   (.*)                     netsw-lsdir.cgi/$1
    +
    +
    + +

    Some hints for interpretation:

    + +
      +
    1. Notice the L (last) flag and no substitution field + ('-') in the forth part
    2. + +
    3. Notice the ! (not) character and the C (chain) flag + at the first rule in the last part
    4. + +
    5. Notice the catch-all pattern in the last rule
    6. +
    +
    +
    + +

    NCSA imagemap to Apache mod_imap

    + +
    +
    Description:
    + +
    When switching from the NCSA webserver to the more + modern Apache webserver a lot of people want a smooth + transition. So they want pages which use their old NCSA + imagemap program to work under Apache with the + modern mod_imap. The problem is that there are + a lot of hyperlinks around which reference the + imagemap program via + /cgi-bin/imagemap/path/to/page.map. Under + Apache this has to read just + /path/to/page.map.
    + +
    Solution:
    + +
    + We use a global rule to remove the prefix on-the-fly for + all requests: + + + + + +
    +
    +RewriteEngine  on
    +RewriteRule    ^/cgi-bin/imagemap(.*)  $1  [PT]
    +
    +
    +
    +
    + +

    Search pages in more than one directory

    + +
    +
    Description:
    + +
    Sometimes it is neccessary to let the webserver search + for pages in more than one directory. Here MultiViews or + other techniques cannot help.
    + +
    Solution:
    + +
    + We program a explicit ruleset which searches for the + files in the directories. + + + + + +
    +
    +RewriteEngine on
    +
    +#   first try to find it in custom/...
    +#   ...and if found stop and be happy:
    +RewriteCond         /your/docroot/dir1/%{REQUEST_FILENAME}  -f
    +RewriteRule  ^(.+)  /your/docroot/dir1/$1  [L]
    +
    +#   second try to find it in pub/...
    +#   ...and if found stop and be happy:
    +RewriteCond         /your/docroot/dir2/%{REQUEST_FILENAME}  -f
    +RewriteRule  ^(.+)  /your/docroot/dir2/$1  [L]
    +
    +#   else go on for other Alias or ScriptAlias directives,
    +#   etc.
    +RewriteRule   ^(.+)  -  [PT]
    +
    +
    +
    +
    + +

    Set Environment Variables According To URL Parts

    + +
    +
    Description:
    + +
    Perhaps you want to keep status information between + requests and use the URL to encode it. But you don't want + to use a CGI wrapper for all pages just to strip out this + information.
    + +
    Solution:
    + +
    + We use a rewrite rule to strip out the status information + and remember it via an environment variable which can be + later dereferenced from within XSSI or CGI. This way a + URL /foo/S=java/bar/ gets translated to + /foo/bar/ and the environment variable named + STATUS is set to the value "java". + + + + + +
    +
    +RewriteEngine on
    +RewriteRule   ^(.*)/S=([^/]+)/(.*)    $1/$3 [E=STATUS:$2]
    +
    +
    +
    +
    + +

    Virtual User Hosts

    + +
    +
    Description:
    + +
    Assume that you want to provide + www.username.host.domain.com + for the homepage of username via just DNS A records to the + same machine and without any virtualhosts on this + machine.
    + +
    Solution:
    + +
    + For HTTP/1.0 requests there is no solution, but for + HTTP/1.1 requests which contain a Host: HTTP header we + can use the following ruleset to rewrite + http://www.username.host.com/anypath + internally to /home/username/anypath: + + + + + +
    +
    +RewriteEngine on
    +RewriteCond   %{HTTP_HOST}                 ^www\.[^.]+\.host\.com$
    +RewriteRule   ^(.+)                        %{HTTP_HOST}$1          [C]
    +RewriteRule   ^www\.([^.]+)\.host\.com(.*) /home/$1$2
    +
    +
    +
    +
    + +

    Redirect Homedirs For Foreigners

    + +
    +
    Description:
    + +
    We want to redirect homedir URLs to another webserver + www.somewhere.com when the requesting user + does not stay in the local domain + ourdomain.com. This is sometimes used in + virtual host contexts.
    + +
    Solution:
    + +
    + Just a rewrite condition: + + + + + +
    +
    +RewriteEngine on
    +RewriteCond   %{REMOTE_HOST}  !^.+\.ourdomain\.com$
    +RewriteRule   ^(/~.+)         http://www.somewhere.com/$1 [R,L]
    +
    +
    +
    +
    + +

    Redirect Failing URLs To Other Webserver

    + +
    +
    Description:
    + +
    A typical FAQ about URL rewriting is how to redirect + failing requests on webserver A to webserver B. Usually + this is done via ErrorDocument CGI-scripts in Perl, but + there is also a mod_rewrite solution. But notice that this + is less performant than using a ErrorDocument + CGI-script!
    + +
    Solution:
    + +
    + The first solution has the best performance but less + flexibility and is less error safe: + + + + + +
    +
    +RewriteEngine on
    +RewriteCond   /your/docroot/%{REQUEST_FILENAME} !-f
    +RewriteRule   ^(.+)                             http://webserverB.dom/$1
    +
    +
    + +

    The problem here is that this will only work for pages + inside the DocumentRoot. While you can add more + Conditions (for instance to also handle homedirs, etc.) + there is better variant:

    + + + + + +
    +
    +RewriteEngine on
    +RewriteCond   %{REQUEST_URI} !-U
    +RewriteRule   ^(.+)          http://webserverB.dom/$1
    +
    +
    + +

    This uses the URL look-ahead feature of mod_rewrite. + The result is that this will work for all types of URLs + and is a safe way. But it does a performance impact on + the webserver, because for every request there is one + more internal subrequest. So, if your webserver runs on a + powerful CPU, use this one. If it is a slow machine, use + the first approach or better a ErrorDocument + CGI-script.

    +
    +
    + +

    Extended Redirection

    + +
    +
    Description:
    + +
    Sometimes we need more control (concerning the + character escaping mechanism) of URLs on redirects. Usually + the Apache kernels URL escape function also escapes + anchors, i.e. URLs like "url#anchor". You cannot use this + directly on redirects with mod_rewrite because the + uri_escape() function of Apache would also escape the hash + character. How can we redirect to such a URL?
    + +
    Solution:
    + +
    + We have to use a kludge by the use of a NPH-CGI script + which does the redirect itself. Because here no escaping + is done (NPH=non-parseable headers). First we introduce a + new URL scheme xredirect: by the following + per-server config-line (should be one of the last rewrite + rules): + + + + + +
    +
    +RewriteRule ^xredirect:(.+) /path/to/nph-xredirect.cgi/$1 \
    +            [T=application/x-httpd-cgi,L]
    +
    +
    + +

    This forces all URLs prefixed with + xredirect: to be piped through the + nph-xredirect.cgi program. And this program + just looks like:

    + + + + + +
    +
    +#!/path/to/perl
    +##
    +##  nph-xredirect.cgi -- NPH/CGI script for extended redirects
    +##  Copyright (c) 1997 Ralf S. Engelschall, All Rights Reserved. 
    +##
    +
    +$| = 1;
    +$url = $ENV{'PATH_INFO'};
    +
    +print "HTTP/1.0 302 Moved Temporarily\n";
    +print "Server: $ENV{'SERVER_SOFTWARE'}\n";
    +print "Location: $url\n";
    +print "Content-type: text/html\n";
    +print "\n";
    +print "<html>\n";
    +print "<head>\n";
    +print "<title>302 Moved Temporarily (EXTENDED)</title>\n";
    +print "</head>\n";
    +print "<body>\n";
    +print "<h1>Moved Temporarily (EXTENDED)</h1>\n";
    +print "The document has moved <a HREF=\"$url\">here</a>.<p>\n";
    +print "</body>\n";
    +print "</html>\n";
    +
    +##EOF##
    +
    +
    + +

    This provides you with the functionality to do + redirects to all URL schemes, i.e. including the one + which are not directly accepted by mod_rewrite. For + instance you can now also redirect to + news:newsgroup via

    + + + + + +
    +
    +RewriteRule ^anyurl  xredirect:news:newsgroup
    +
    +
    + +

    Notice: You have not to put [R] or [R,L] to the above + rule because the xredirect: need to be + expanded later by our special "pipe through" rule + above.

    +
    +
    + +

    Archive Access Multiplexer

    + +
    +
    Description:
    + +
    Do you know the great CPAN (Comprehensive Perl Archive + Network) under http://www.perl.com/CPAN? + This does a redirect to one of several FTP servers around + the world which carry a CPAN mirror and is approximately + near the location of the requesting client. Actually this + can be called an FTP access multiplexing service. While + CPAN runs via CGI scripts, how can a similar approach + implemented via mod_rewrite?
    + +
    Solution:
    + +
    + First we notice that from version 3.0.0 mod_rewrite can + also use the "ftp:" scheme on redirects. And second, the + location approximation can be done by a rewritemap over + the top-level domain of the client. With a tricky chained + ruleset we can use this top-level domain as a key to our + multiplexing map. + + + + + +
    +
    +RewriteEngine on
    +RewriteMap    multiplex                txt:/path/to/map.cxan
    +RewriteRule   ^/CxAN/(.*)              %{REMOTE_HOST}::$1                 [C]
    +RewriteRule   ^.+\.([a-zA-Z]+)::(.*)$  ${multiplex:$1|ftp.default.dom}$2  [R,L]
    +
    +
    + + + + + +
    +
    +##
    +##  map.cxan -- Multiplexing Map for CxAN
    +##
    +
    +de        ftp://ftp.cxan.de/CxAN/
    +uk        ftp://ftp.cxan.uk/CxAN/
    +com       ftp://ftp.cxan.com/CxAN/
    + :
    +##EOF##
    +
    +
    +
    +
    + +

    Time-Dependend Rewriting

    + +
    +
    Description:
    + +
    When tricks like time-dependend content should happen a + lot of webmasters still use CGI scripts which do for + instance redirects to specialized pages. How can it be done + via mod_rewrite?
    + +
    Solution:
    + +
    + There are a lot of variables named TIME_xxx + for rewrite conditions. In conjunction with the special + lexicographic comparison patterns <STRING, >STRING + and =STRING we can do time-dependend redirects: + + + + + +
    +
    +RewriteEngine on
    +RewriteCond   %{TIME_HOUR}%{TIME_MIN} >0700
    +RewriteCond   %{TIME_HOUR}%{TIME_MIN} <1900
    +RewriteRule   ^foo\.html$             foo.day.html
    +RewriteRule   ^foo\.html$             foo.night.html
    +
    +
    + +

    This provides the content of foo.day.html + under the URL foo.html from 07:00-19:00 and + at the remaining time the contents of + foo.night.html. Just a nice feature for a + homepage...

    +
    +
    + +

    Backward Compatibility for YYYY to XXXX migration

    + +
    +
    Description:
    + +
    How can we make URLs backward compatible (still + existing virtually) after migrating document.YYYY to + document.XXXX, e.g. after translating a bunch of .html + files to .phtml?
    + +
    Solution:
    + +
    + We just rewrite the name to its basename and test for + existence of the new extension. If it exists, we take + that name, else we rewrite the URL to its original state. + + + + + + +
    +
    +#   backward compatibility ruleset for 
    +#   rewriting document.html to document.phtml
    +#   when and only when document.phtml exists
    +#   but no longer document.html
    +RewriteEngine on
    +RewriteBase   /~quux/
    +#   parse out basename, but remember the fact
    +RewriteRule   ^(.*)\.html$              $1      [C,E=WasHTML:yes]
    +#   rewrite to document.phtml if exists
    +RewriteCond   %{REQUEST_FILENAME}.phtml -f
    +RewriteRule   ^(.*)$ $1.phtml                   [S=1]
    +#   else reverse the previous basename cutout
    +RewriteCond   %{ENV:WasHTML}            ^yes$
    +RewriteRule   ^(.*)$ $1.html
    +
    +
    +
    +
    + +

    Content Handling

    + +

    From Old to New (intern)

    + +
    +
    Description:
    + +
    Assume we have recently renamed the page + foo.html to bar.html and now want + to provide the old URL for backward compatibility. Actually + we want that users of the old URL even not recognize that + the pages was renamed.
    + +
    Solution:
    + +
    + We rewrite the old URL to the new one internally via the + following rule: + + + + + +
    +
    +RewriteEngine  on
    +RewriteBase    /~quux/
    +RewriteRule    ^foo\.html$  bar.html
    +
    +
    +
    +
    + +

    From Old to New (extern)

    + +
    +
    Description:
    + +
    Assume again that we have recently renamed the page + foo.html to bar.html and now want + to provide the old URL for backward compatibility. But this + time we want that the users of the old URL get hinted to + the new one, i.e. their browsers Location field should + change, too.
    + +
    Solution:
    + +
    + We force a HTTP redirect to the new URL which leads to a + change of the browsers and thus the users view: + + + + + +
    +
    +RewriteEngine  on
    +RewriteBase    /~quux/
    +RewriteRule    ^foo\.html$  bar.html  [R]
    +
    +
    +
    +
    + +

    Browser Dependend Content

    + +
    +
    Description:
    + +
    At least for important top-level pages it is sometimes + necesarry to provide the optimum of browser dependend + content, i.e. one has to provide a maximum version for the + latest Netscape variants, a minimum version for the Lynx + browsers and a average feature version for all others.
    + +
    Solution:
    + +
    + We cannot use content negotiation because the browsers do + not provide their type in that form. Instead we have to + act on the HTTP header "User-Agent". The following condig + does the following: If the HTTP header "User-Agent" + begins with "Mozilla/3", the page foo.html + is rewritten to foo.NS.html and and the + rewriting stops. If the browser is "Lynx" or "Mozilla" of + version 1 or 2 the URL becomes foo.20.html. + All other browsers receive page foo.32.html. + This is done by the following ruleset: + + + + + +
    +
    +RewriteCond %{HTTP_USER_AGENT}  ^Mozilla/3.*
    +RewriteRule ^foo\.html$         foo.NS.html          [L]
    +
    +RewriteCond %{HTTP_USER_AGENT}  ^Lynx/.*         [OR]
    +RewriteCond %{HTTP_USER_AGENT}  ^Mozilla/[12].*
    +RewriteRule ^foo\.html$         foo.20.html          [L]
    +
    +RewriteRule ^foo\.html$         foo.32.html          [L]
    +
    +
    +
    +
    + +

    Dynamic Mirror

    + +
    +
    Description:
    + +
    Assume there are nice webpages on remote hosts we want + to bring into our namespace. For FTP servers we would use + the mirror program which actually maintains an + explicit up-to-date copy of the remote data on the local + machine. For a webserver we could use the program + webcopy which acts similar via HTTP. But both + techniques have one major drawback: The local copy is + always just as up-to-date as often we run the program. It + would be much better if the mirror is not a static one we + have to establish explicitly. Instead we want a dynamic + mirror with data which gets updated automatically when + there is need (updated data on the remote host).
    + +
    Solution:
    + +
    + To provide this feature we map the remote webpage or even + the complete remote webarea to our namespace by the use + of the Proxy Throughput feature (flag [P]): + + + + + +
    +
    +RewriteEngine  on
    +RewriteBase    /~quux/
    +RewriteRule    ^hotsheet/(.*)$  http://www.tstimpreso.com/hotsheet/$1  [P]
    +
    +
    + + + + + +
    +
    +RewriteEngine  on
    +RewriteBase    /~quux/
    +RewriteRule    ^usa-news\.html$   http://www.quux-corp.com/news/index.html  [P]
    +
    +
    +
    +
    + +

    Reverse Dynamic Mirror

    + +
    +
    Description:
    + +
    ...
    + +
    Solution:
    + +
    + + + + +
    +
    +RewriteEngine on
    +RewriteCond   /mirror/of/remotesite/$1           -U 
    +RewriteRule   ^http://www\.remotesite\.com/(.*)$ /mirror/of/remotesite/$1
    +
    +
    +
    +
    + +

    Retrieve Missing Data from Intranet

    + +
    +
    Description:
    + +
    This is a tricky way of virtually running a corporates + (external) Internet webserver + (www.quux-corp.dom), while actually keeping + and maintaining its data on a (internal) Intranet webserver + (www2.quux-corp.dom) which is protected by a + firewall. The trick is that on the external webserver we + retrieve the requested data on-the-fly from the internal + one.
    + +
    Solution:
    + +
    + First, we have to make sure that our firewall still + protects the internal webserver and that only the + external webserver is allowed to retrieve data from it. + For a packet-filtering firewall we could for instance + configure a firewall ruleset like the following: + + + + + +
    +
    +ALLOW Host www.quux-corp.dom Port >1024 --> Host www2.quux-corp.dom Port 80  
    +DENY  Host *                 Port *     --> Host www2.quux-corp.dom Port 80
    +
    +
    + +

    Just adjust it to your actual configuration syntax. + Now we can establish the mod_rewrite rules which request + the missing data in the background through the proxy + throughput feature:

    + + + + + +
    +
    +RewriteRule ^/~([^/]+)/?(.*)          /home/$1/.www/$2
    +RewriteCond %{REQUEST_FILENAME}       !-f
    +RewriteCond %{REQUEST_FILENAME}       !-d
    +RewriteRule ^/home/([^/]+)/.www/?(.*) http://www2.quux-corp.dom/~$1/pub/$2 [P]
    +
    +
    +
    +
    + +

    Load Balancing

    + +
    +
    Description:
    + +
    Suppose we want to load balance the traffic to + www.foo.com over www[0-5].foo.com + (a total of 6 servers). How can this be done?
    + +
    Solution:
    + +
    + There are a lot of possible solutions for this problem. + We will discuss first a commonly known DNS-based variant + and then the special one with mod_rewrite: + +
      +
    1. + DNS Round-Robin + +

      The simplest method for load-balancing is to use + the DNS round-robin feature of BIND. Here you just + configure www[0-9].foo.com as usual in + your DNS with A(address) records, e.g.

      + + + + + +
      +
      +www0   IN  A       1.2.3.1
      +www1   IN  A       1.2.3.2
      +www2   IN  A       1.2.3.3
      +www3   IN  A       1.2.3.4
      +www4   IN  A       1.2.3.5
      +www5   IN  A       1.2.3.6
      +
      +
      + +

      Then you additionally add the following entry:

      + + + + + +
      +
      +www    IN  CNAME   www0.foo.com.
      +       IN  CNAME   www1.foo.com.
      +       IN  CNAME   www2.foo.com.
      +       IN  CNAME   www3.foo.com.
      +       IN  CNAME   www4.foo.com.
      +       IN  CNAME   www5.foo.com.
      +       IN  CNAME   www6.foo.com.
      +
      +
      + +

      Notice that this seems wrong, but is actually an + intended feature of BIND and can be used in this way. + However, now when www.foo.com gets + resolved, BIND gives out www0-www6 - but + in a slightly permutated/rotated order every time. + This way the clients are spread over the various + servers. But notice that this not a perfect load + balancing scheme, because DNS resolve information + gets cached by the other nameservers on the net, so + once a client has resolved www.foo.com + to a particular wwwN.foo.com, all + subsequent requests also go to this particular name + wwwN.foo.com. But the final result is + ok, because the total sum of the requests are really + spread over the various webservers.

      +
    2. + +
    3. + DNS Load-Balancing + +

      A sophisticated DNS-based method for + load-balancing is to use the program + lbnamed which can be found at + http://www.stanford.edu/~schemers/docs/lbnamed/lbnamed.html. + It is a Perl 5 program in conjunction with auxilliary + tools which provides a real load-balancing for + DNS.

      +
    4. + +
    5. + Proxy Throughput Round-Robin + +

      In this variant we use mod_rewrite and its proxy + throughput feature. First we dedicate + www0.foo.com to be actually + www.foo.com by using a single

      + + + + + +
      +
      +www    IN  CNAME   www0.foo.com.
      +
      +
      + +

      entry in the DNS. Then we convert + www0.foo.com to a proxy-only server, + i.e. we configure this machine so all arriving URLs + are just pushed through the internal proxy to one of + the 5 other servers (www1-www5). To + accomplish this we first establish a ruleset which + contacts a load balancing script lb.pl + for all URLs.

      + + + + + +
      +
      +RewriteEngine on
      +RewriteMap    lb      prg:/path/to/lb.pl
      +RewriteRule   ^/(.+)$ ${lb:$1}           [P,L]
      +
      +
      + +

      Then we write lb.pl:

      + + + + + +
      +
      +#!/path/to/perl
      +##
      +##  lb.pl -- load balancing script
      +##
      +
      +$| = 1;
      +
      +$name   = "www";     # the hostname base
      +$first  = 1;         # the first server (not 0 here, because 0 is myself) 
      +$last   = 5;         # the last server in the round-robin
      +$domain = "foo.dom"; # the domainname
      +
      +$cnt = 0;
      +while (<STDIN>) {
      +    $cnt = (($cnt+1) % ($last+1-$first));
      +    $server = sprintf("%s%d.%s", $name, $cnt+$first, $domain);
      +    print "http://$server/$_";
      +}
      +
      +##EOF##
      +
      +
      + +

      A last notice: Why is this useful? Seems like + www0.foo.com still is overloaded? The + answer is yes, it is overloaded, but with plain proxy + throughput requests, only! All SSI, CGI, ePerl, etc. + processing is completely done on the other machines. + This is the essential point.

      +
    6. + +
    7. + Hardware/TCP Round-Robin + +

      There is a hardware solution available, too. Cisco + has a beast called LocalDirector which does a load + balancing at the TCP/IP level. Actually this is some + sort of a circuit level gateway in front of a + webcluster. If you have enough money and really need + a solution with high performance, use this one.

      +
    8. +
    +
    +
    + +

    New MIME-type, New Service

    + +
    +
    Description:
    + +
    + On the net there are a lot of nifty CGI programs. But + their usage is usually boring, so a lot of webmaster + don't use them. Even Apache's Action handler feature for + MIME-types is only appropriate when the CGI programs + don't need special URLs (actually PATH_INFO and + QUERY_STRINGS) as their input. First, let us configure a + new file type with extension .scgi (for + secure CGI) which will be processed by the popular + cgiwrap program. The problem here is that + for instance we use a Homogeneous URL Layout (see above) + a file inside the user homedirs has the URL + /u/user/foo/bar.scgi. But + cgiwrap needs the URL in the form + /~user/foo/bar.scgi/. The following rule + solves the problem: + + + + + +
    +
    +RewriteRule ^/[uge]/([^/]+)/\.www/(.+)\.scgi(.*) ...
    +... /internal/cgi/user/cgiwrap/~$1/$2.scgi$3  [NS,T=application/x-http-cgi]
    +
    +
    + +

    Or assume we have some more nifty programs: + wwwlog (which displays the + access.log for a URL subtree and + wwwidx (which runs Glimpse on a URL + subtree). We have to provide the URL area to these + programs so they know on which area they have to act on. + But usually this ugly, because they are all the times + still requested from that areas, i.e. typically we would + run the swwidx program from within + /u/user/foo/ via hyperlink to

    +
    +/internal/cgi/user/swwidx?i=/u/user/foo/
    +
    + +

    which is ugly. Because we have to hard-code + both the location of the area + and the location of the CGI inside the + hyperlink. When we have to reorganise or area, we spend a + lot of time changing the various hyperlinks.

    +
    + +
    Solution:
    + +
    + The solution here is to provide a special new URL format + which automatically leads to the proper CGI invocation. + We configure the following: + + + + + +
    +
    +RewriteRule   ^/([uge])/([^/]+)(/?.*)/\*  /internal/cgi/user/wwwidx?i=/$1/$2$3/
    +RewriteRule   ^/([uge])/([^/]+)(/?.*):log /internal/cgi/user/wwwlog?f=/$1/$2$3
    +
    +
    + +

    Now the hyperlink to search at + /u/user/foo/ reads only

    +
    +HREF="*"
    +
    + +

    which internally gets automatically transformed to

    +
    +/internal/cgi/user/wwwidx?i=/u/user/foo/
    +
    + +

    The same approach leads to an invocation for the + access log CGI program when the hyperlink + :log gets used.

    +
    +
    + +

    From Static to Dynamic

    + +
    +
    Description:
    + +
    How can we transform a static page + foo.html into a dynamic variant + foo.cgi in a seamless way, i.e. without notice + by the browser/user.
    + +
    Solution:
    + +
    + We just rewrite the URL to the CGI-script and force the + correct MIME-type so it gets really run as a CGI-script. + This way a request to /~quux/foo.html + internally leads to the invokation of + /~quux/foo.cgi. + + + + + +
    +
    +RewriteEngine  on
    +RewriteBase    /~quux/
    +RewriteRule    ^foo\.html$  foo.cgi  [T=application/x-httpd-cgi]
    +
    +
    +
    +
    + +

    On-the-fly Content-Regeneration

    + +
    +
    Description:
    + +
    Here comes a really esoteric feature: Dynamically + generated but statically served pages, i.e. pages should be + delivered as pure static pages (read from the filesystem + and just passed through), but they have to be generated + dynamically by the webserver if missing. This way you can + have CGI-generated pages which are statically served unless + one (or a cronjob) removes the static contents. Then the + contents gets refreshed.
    + +
    Solution:
    + +
    + This is done via the following ruleset: + + + + + +
    +
    +RewriteCond %{REQUEST_FILENAME}   !-s
    +RewriteRule ^page\.html$          page.cgi   [T=application/x-httpd-cgi,L]
    +
    +
    + +

    Here a request to page.html leads to a + internal run of a corresponding page.cgi if + page.html is still missing or has filesize + null. The trick here is that page.cgi is a + usual CGI script which (additionally to its STDOUT) + writes its output to the file page.html. + Once it was run, the server sends out the data of + page.html. When the webmaster wants to force + a refresh the contents, he just removes + page.html (usually done by a cronjob).

    +
    +
    + +

    Document With Autorefresh

    + +
    +
    Description:
    + +
    Wouldn't it be nice while creating a complex webpage if + the webbrowser would automatically refresh the page every + time we write a new version from within our editor? + Impossible?
    + +
    Solution:
    + +
    + No! We just combine the MIME multipart feature, the + webserver NPH feature and the URL manipulation power of + mod_rewrite. First, we establish a new URL feature: + Adding just :refresh to any URL causes this + to be refreshed every time it gets updated on the + filesystem. + + + + + +
    +
    +RewriteRule   ^(/[uge]/[^/]+/?.*):refresh  /internal/cgi/apache/nph-refresh?f=$1
    +
    +
    + +

    Now when we reference the URL

    +
    +/u/foo/bar/page.html:refresh
    +
    + +

    this leads to the internal invocation of the URL

    +
    +/internal/cgi/apache/nph-refresh?f=/u/foo/bar/page.html
    +
    + +

    The only missing part is the NPH-CGI script. Although + one would usually say "left as an exercise to the reader" + ;-) I will provide this, too.

    +
    +#!/sw/bin/perl
    +##
    +##  nph-refresh -- NPH/CGI script for auto refreshing pages
    +##  Copyright (c) 1997 Ralf S. Engelschall, All Rights Reserved. 
    +##
    +$| = 1;
    +
    +#   split the QUERY_STRING variable
    +@pairs = split(/&/, $ENV{'QUERY_STRING'});
    +foreach $pair (@pairs) {
    +    ($name, $value) = split(/=/, $pair);
    +    $name =~ tr/A-Z/a-z/;
    +    $name = 'QS_' . $name;
    +    $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
    +    eval "\$$name = \"$value\"";
    +}
    +$QS_s = 1 if ($QS_s eq '');
    +$QS_n = 3600 if ($QS_n eq '');
    +if ($QS_f eq '') {
    +    print "HTTP/1.0 200 OK\n";
    +    print "Content-type: text/html\n\n";
    +    print "&lt;b&gt;ERROR&lt;/b&gt;: No file given\n";
    +    exit(0);
    +}
    +if (! -f $QS_f) {
    +    print "HTTP/1.0 200 OK\n";
    +    print "Content-type: text/html\n\n";
    +    print "&lt;b&gt;ERROR&lt;/b&gt;: File $QS_f not found\n";
    +    exit(0);
    +}
    +
    +sub print_http_headers_multipart_begin {
    +    print "HTTP/1.0 200 OK\n";
    +    $bound = "ThisRandomString12345";
    +    print "Content-type: multipart/x-mixed-replace;boundary=$bound\n";
    +    &print_http_headers_multipart_next;
    +}
    +
    +sub print_http_headers_multipart_next {
    +    print "\n--$bound\n";
    +}
    +
    +sub print_http_headers_multipart_end {
    +    print "\n--$bound--\n";
    +}
    +
    +sub displayhtml {
    +    local($buffer) = @_;
    +    $len = length($buffer);
    +    print "Content-type: text/html\n";
    +    print "Content-length: $len\n\n";
    +    print $buffer;
    +}
    +
    +sub readfile {
    +    local($file) = @_;
    +    local(*FP, $size, $buffer, $bytes);
    +    ($x, $x, $x, $x, $x, $x, $x, $size) = stat($file);
    +    $size = sprintf("%d", $size);
    +    open(FP, "&lt;$file");
    +    $bytes = sysread(FP, $buffer, $size);
    +    close(FP);
    +    return $buffer;
    +}
    +
    +$buffer = &readfile($QS_f);
    +&print_http_headers_multipart_begin;
    +&displayhtml($buffer);
    +
    +sub mystat {
    +    local($file) = $_[0];
    +    local($time);
    +
    +    ($x, $x, $x, $x, $x, $x, $x, $x, $x, $mtime) = stat($file);
    +    return $mtime;
    +}
    +
    +$mtimeL = &mystat($QS_f);
    +$mtime = $mtime;
    +for ($n = 0; $n &lt; $QS_n; $n++) {
    +    while (1) {
    +        $mtime = &mystat($QS_f);
    +        if ($mtime ne $mtimeL) {
    +            $mtimeL = $mtime;
    +            sleep(2);
    +            $buffer = &readfile($QS_f);
    +            &print_http_headers_multipart_next;
    +            &displayhtml($buffer);
    +            sleep(5);
    +            $mtimeL = &mystat($QS_f);
    +            last;
    +        }
    +        sleep($QS_s);
    +    }
    +}
    +
    +&print_http_headers_multipart_end;
    +
    +exit(0);
    +
    +##EOF##
    +
    +
    +
    + +

    Mass Virtual Hosting

    + +
    +
    Description:
    + +
    The <VirtualHost> feature of Apache + is nice and works great when you just have a few dozens + virtual hosts. But when you are an ISP and have hundreds of + virtual hosts to provide this feature is not the best + choice.
    + +
    Solution:
    + +
    + To provide this feature we map the remote webpage or even + the complete remote webarea to our namespace by the use + of the Proxy Throughput feature (flag [P]): + + + + + +
    +
    +##
    +##  vhost.map 
    +## 
    +www.vhost1.dom:80  /path/to/docroot/vhost1
    +www.vhost2.dom:80  /path/to/docroot/vhost2
    +     :
    +www.vhostN.dom:80  /path/to/docroot/vhostN
    +
    +
    + + + + + +
    +
    +##
    +##  httpd.conf
    +##
    +    :
    +#   use the canonical hostname on redirects, etc.
    +UseCanonicalName on
    +
    +    :
    +#   add the virtual host in front of the CLF-format
    +CustomLog  /path/to/access_log  "%{VHOST}e %h %l %u %t \"%r\" %>s %b"
    +    :
    +
    +#   enable the rewriting engine in the main server
    +RewriteEngine on
    +
    +#   define two maps: one for fixing the URL and one which defines
    +#   the available virtual hosts with their corresponding
    +#   DocumentRoot.
    +RewriteMap    lowercase    int:tolower
    +RewriteMap    vhost        txt:/path/to/vhost.map
    +
    +#   Now do the actual virtual host mapping
    +#   via a huge and complicated single rule:
    +#
    +#   1. make sure we don't map for common locations
    +RewriteCond   %{REQUEST_URI}  !^/commonurl1/.*
    +RewriteCond   %{REQUEST_URI}  !^/commonurl2/.*
    +    :
    +RewriteCond   %{REQUEST_URI}  !^/commonurlN/.*
    +#
    +#   2. make sure we have a Host header, because
    +#      currently our approach only supports 
    +#      virtual hosting through this header
    +RewriteCond   %{HTTP_HOST}  !^$
    +#
    +#   3. lowercase the hostname
    +RewriteCond   ${lowercase:%{HTTP_HOST}|NONE}  ^(.+)$
    +#
    +#   4. lookup this hostname in vhost.map and
    +#      remember it only when it is a path 
    +#      (and not "NONE" from above)
    +RewriteCond   ${vhost:%1}  ^(/.*)$
    +#
    +#   5. finally we can map the URL to its docroot location 
    +#      and remember the virtual host for logging puposes
    +RewriteRule   ^/(.*)$   %1/$1  [E=VHOST:${lowercase:%{HTTP_HOST}}]
    +    : 
    +
    +
    +
    +
    + +

    Access Restriction

    + +

    Blocking of Robots

    + +
    +
    Description:
    + +
    How can we block a really annoying robot from + retrieving pages of a specific webarea? A + /robots.txt file containing entries of the + "Robot Exclusion Protocol" is typically not enough to get + rid of such a robot.
    + +
    Solution:
    + +
    + We use a ruleset which forbids the URLs of the webarea + /~quux/foo/arc/ (perhaps a very deep + directory indexed area where the robot traversal would + create big server load). We have to make sure that we + forbid access only to the particular robot, i.e. just + forbidding the host where the robot runs is not enough. + This would block users from this host, too. We accomplish + this by also matching the User-Agent HTTP header + information. + + + + + +
    +
    +RewriteCond %{HTTP_USER_AGENT}   ^NameOfBadRobot.*      
    +RewriteCond %{REMOTE_ADDR}       ^123\.45\.67\.[8-9]$
    +RewriteRule ^/~quux/foo/arc/.+   -   [F]
    +
    +
    +
    +
    + +

    Blocked Inline-Images

    + +
    +
    Description:
    + +
    Assume we have under http://www.quux-corp.de/~quux/ + some pages with inlined GIF graphics. These graphics are + nice, so others directly incorporate them via hyperlinks to + their pages. We don't like this practice because it adds + useless traffic to our server.
    + +
    Solution:
    + +
    + While we cannot 100% protect the images from inclusion, + we can at least restrict the cases where the browser + sends a HTTP Referer header. + + + + + +
    +
    +RewriteCond %{HTTP_REFERER} !^$                                  
    +RewriteCond %{HTTP_REFERER} !^http://www.quux-corp.de/~quux/.*$ [NC]
    +RewriteRule .*\.gif$        -                                    [F]
    +
    +
    + + + + + +
    +
    +RewriteCond %{HTTP_REFERER}         !^$                                  
    +RewriteCond %{HTTP_REFERER}         !.*/foo-with-gif\.html$
    +RewriteRule ^inlined-in-foo\.gif$   -                        [F]
    +
    +
    +
    +
    + +

    Host Deny

    + +
    +
    Description:
    + +
    How can we forbid a list of externally configured hosts + from using our server?
    + +
    Solution:
    + +
    + For Apache >= 1.3b6: + + + + + +
    +
    +RewriteEngine on
    +RewriteMap    hosts-deny  txt:/path/to/hosts.deny
    +RewriteCond   ${hosts-deny:%{REMOTE_HOST}|NOT-FOUND} !=NOT-FOUND [OR]
    +RewriteCond   ${hosts-deny:%{REMOTE_ADDR}|NOT-FOUND} !=NOT-FOUND
    +RewriteRule   ^/.*  -  [F]
    +
    +
    + +

    For Apache <= 1.3b6:

    + + + + + +
    +
    +RewriteEngine on
    +RewriteMap    hosts-deny  txt:/path/to/hosts.deny
    +RewriteRule   ^/(.*)$ ${hosts-deny:%{REMOTE_HOST}|NOT-FOUND}/$1
    +RewriteRule   !^NOT-FOUND/.* - [F]
    +RewriteRule   ^NOT-FOUND/(.*)$ ${hosts-deny:%{REMOTE_ADDR}|NOT-FOUND}/$1 
    +RewriteRule   !^NOT-FOUND/.* - [F]
    +RewriteRule   ^NOT-FOUND/(.*)$ /$1
    +
    +
    + + + + + +
    +
    +##
    +##  hosts.deny 
    +##
    +##  ATTENTION! This is a map, not a list, even when we treat it as such.
    +##             mod_rewrite parses it for key/value pairs, so at least a
    +##             dummy value "-" must be present for each entry.
    +##
    +
    +193.102.180.41 -
    +bsdti1.sdm.de  -
    +192.76.162.40  -
    +
    +
    +
    +
    + +

    URL-Restricted Proxy

    + +
    +
    Description:
    + +
    How can we restrict the proxy to allow access to a + configurable set of internet sites only? The site list is + extracted from a prepared bookmarks file.
    + +
    Solution:
    + +
    + We first have to make sure mod_rewrite is below(!) + mod_proxy in the Configuration file when + compiling the Apache webserver (or in the + AddModule list of httpd.conf in + the case of dynamically loaded modules), as it must get + called _before_ mod_proxy. + +

    For simplicity, we generate the site list as a + textfile map (but see the mod_rewrite + documentation for a conversion script to DBM format). + A typical Netscape bookmarks file can be converted to a + list of sites with a shell script like this:

    + + + + + +
    +
    +#!/bin/sh
    +cat ${1:-~/.netscape/bookmarks.html} |
    +tr -d '\015' | tr '[A-Z]' '[a-z]' | grep href=\" |
    +sed -e '/href="file:/d;' -e '/href="news:/d;' \
    +    -e 's|^.*href="[^:]*://\([^:/"]*\).*$|\1 OK|;' \
    +    -e '/href="/s|^.*href="\([^:/"]*\).*$|\1 OK|;' |
    +sort -u
    +
    +
    + +

    We redirect the resulting output into a text file + called goodsites.txt. It now looks similar + to this:

    + + + + + +
    +
    +www.apache.org OK
    +xml.apache.org OK
    +jakarta.apache.org OK
    +perl.apache.org OK
    +...
    +
    +
    + +

    We reference this site file within the configuration + for the VirtualHost which is responsible for + serving as a proxy (often not port 80, but 81, 8080 or + 8008).

    + + + + + +
    +
    +<VirtualHost *:8008>
    +  ...
    +  RewriteEngine   On
    +  # Either use the (plaintext) allow list from goodsites.txt
    +  RewriteMap      ProxyAllow   txt:/usr/local/apache/conf/goodsites.txt
    +  # Or, for faster access, convert it to a DBM database:
    +  #RewriteMap     ProxyAllow   dbm:/usr/local/apache/conf/goodsites
    +  # Match lowercased hostnames
    +  RewriteMap      lowercase    int:tolower
    +  # Here we go:
    +  # 1) first lowercase the site name and strip off a :port suffix
    +  RewriteCond  ${lowercase:%{HTTP_HOST}}    ^([^:]*).*$
    +  # 2) next look it up in the map file.
    +  #    "%1" refers to the previous regex.
    +  #    If the result is "OK", proxy access is granted.
    +  RewriteCond  ${ProxyAllow:%1|DENY}        !^OK$          [NC]
    +  # 3) Disallow proxy requests if the site was _not_ tagged "OK":
    +  RewriteRule  ^proxy:                      -              [F]
    +  ...
    +</VirtualHost>
    +
    +
    +
    +
    + +

    Proxy Deny

    + +
    +
    Description:
    + +
    How can we forbid a certain host or even a user of a + special host from using the Apache proxy?
    + +
    Solution:
    + +
    + We first have to make sure mod_rewrite is below(!) + mod_proxy in the Configuration file when + compiling the Apache webserver. This way it gets called + _before_ mod_proxy. Then we configure the + following for a host-dependend deny... + + + + + +
    +
    +RewriteCond %{REMOTE_HOST} ^badhost\.mydomain\.com$ 
    +RewriteRule !^http://[^/.]\.mydomain.com.*  - [F]
    +
    +
    + +

    ...and this one for a user@host-dependend deny:

    + + + + + +
    +
    +RewriteCond %{REMOTE_IDENT}@%{REMOTE_HOST}  ^badguy@badhost\.mydomain\.com$
    +RewriteRule !^http://[^/.]\.mydomain.com.*  - [F]
    +
    +
    +
    +
    + +

    Special Authentication Variant

    + +
    +
    Description:
    + +
    Sometimes a very special authentication is needed, for + instance a authentication which checks for a set of + explicitly configured users. Only these should receive + access and without explicit prompting (which would occur + when using the Basic Auth via mod_access).
    + +
    Solution:
    + +
    + We use a list of rewrite conditions to exclude all except + our friends: + + + + + +
    +
    +RewriteCond %{REMOTE_IDENT}@%{REMOTE_HOST} !^friend1@client1.quux-corp\.com$ 
    +RewriteCond %{REMOTE_IDENT}@%{REMOTE_HOST} !^friend2@client2.quux-corp\.com$ 
    +RewriteCond %{REMOTE_IDENT}@%{REMOTE_HOST} !^friend3@client3.quux-corp\.com$ 
    +RewriteRule ^/~quux/only-for-friends/      -                                 [F]
    +
    +
    +
    +
    + +

    Referer-based Deflector

    + +
    +
    Description:
    + +
    How can we program a flexible URL Deflector which acts + on the "Referer" HTTP header and can be configured with as + many referring pages as we like?
    + +
    Solution:
    + +
    + Use the following really tricky ruleset... + + + + + +
    +
    +RewriteMap  deflector txt:/path/to/deflector.map
    +
    +RewriteCond %{HTTP_REFERER} !=""
    +RewriteCond ${deflector:%{HTTP_REFERER}} ^-$
    +RewriteRule ^.* %{HTTP_REFERER} [R,L]
    +
    +RewriteCond %{HTTP_REFERER} !=""
    +RewriteCond ${deflector:%{HTTP_REFERER}|NOT-FOUND} !=NOT-FOUND
    +RewriteRule ^.* ${deflector:%{HTTP_REFERER}} [R,L]
    +
    +
    + +

    ... in conjunction with a corresponding rewrite + map:

    + + + + + +
    +
    +##
    +##  deflector.map
    +##
    +
    +http://www.badguys.com/bad/index.html    -
    +http://www.badguys.com/bad/index2.html   -
    +http://www.badguys.com/bad/index3.html   http://somewhere.com/
    +
    +
    + +

    This automatically redirects the request back to the + referring page (when "-" is used as the value in the map) + or to a specific URL (when an URL is specified in the map + as the second argument).

    +
    +
    + +

    Other

    + +

    External Rewriting Engine

    + +
    +
    Description:
    + +
    A FAQ: How can we solve the FOO/BAR/QUUX/etc. problem? + There seems no solution by the use of mod_rewrite...
    + +
    Solution:
    + +
    + Use an external rewrite map, i.e. a program which acts + like a rewrite map. It is run once on startup of Apache + receives the requested URLs on STDIN and has to put the + resulting (usually rewritten) URL on STDOUT (same + order!). + + + + + +
    +
    +RewriteEngine on
    +RewriteMap    quux-map       prg:/path/to/map.quux.pl
    +RewriteRule   ^/~quux/(.*)$  /~quux/${quux-map:$1}
    +
    +
    + + + + + +
    +
    +#!/path/to/perl
    +
    +#   disable buffered I/O which would lead 
    +#   to deadloops for the Apache server
    +$| = 1;
    +
    +#   read URLs one per line from stdin and
    +#   generate substitution URL on stdout
    +while (<>) {
    +    s|^foo/|bar/|;
    +    print $_;
    +}
    +
    +
    + +

    This is a demonstration-only example and just rewrites + all URLs /~quux/foo/... to + /~quux/bar/.... Actually you can program + whatever you like. But notice that while such maps can be + used also by an average user, only the + system administrator can define it.

    +
    +
    + +
    + + + diff --git a/htdocs/manual/misc/security_tips.html b/htdocs/manual/misc/security_tips.html new file mode 100644 index 00000000000..fb5d2849bce --- /dev/null +++ b/htdocs/manual/misc/security_tips.html @@ -0,0 +1,302 @@ + + + + + + + Apache HTTP Server: Security Tips + + + + + + +

    Security Tips for Server Configuration

    + + +
    + +

    Some hints and tips on security issues in setting up a web + server. Some of the suggestions will be general, others + specific to Apache.

    +
    + +

    Permissions on + ServerRoot Directories

    + +

    In typical operation, Apache is started by the root user, + and it switches to the user defined by the User + directive to serve hits. As is the case with any command that + root executes, you must take care that it is protected from + modification by non-root users. Not only must the files + themselves be writeable only by root, but also the + directories and parents of all directories. For example, if + you choose to place ServerRoot in + /usr/local/apache then it is suggested that you + create that directory as root, with commands like these:

    + +
    +
    +    mkdir /usr/local/apache
    +    cd /usr/local/apache
    +    mkdir bin conf logs
    +    chown 0 . bin conf logs
    +    chgrp 0 . bin conf logs
    +    chmod 755 . bin conf logs
    +
    +
    + It is assumed that /, /usr, and /usr/local are only modifiable + by root. When you install the httpd executable, you should + ensure that it is similarly protected: + +
    +
    +    cp httpd /usr/local/apache/bin
    +    chown 0 /usr/local/apache/bin/httpd
    +    chgrp 0 /usr/local/apache/bin/httpd
    +    chmod 511 /usr/local/apache/bin/httpd
    +
    +
    + +

    You can create an htdocs subdirectory which is modifiable by + other users -- since root never executes any files out of + there, and shouldn't be creating files in there.

    + +

    If you allow non-root users to modify any files that root + either executes or writes on then you open your system to root + compromises. For example, someone could replace the httpd + binary so that the next time you start it, it will execute some + arbitrary code. If the logs directory is writeable (by a + non-root user), someone could replace a log file with a symlink + to some other system file, and then root might overwrite that + file with arbitrary data. If the log files themselves are + writeable (by a non-root user), then someone may be able to + overwrite the log itself with bogus data.

    +
    + +

    Server Side Includes

    + +

    Server Side Includes (SSI) present a server administrator + with several potential security risks.

    + +

    The first risk is the increased load on the server. All + SSI-enabled files have to be parsed by Apache, whether or not + there are any SSI directives included within the files. While + this load increase is minor, in a shared server environment it + can become significant.

    + +

    SSI files also pose the same risks that are associated with + CGI scripts in general. Using the "exec cmd" element, + SSI-enabled files can execute any CGI script or program under + the permissions of the user and group Apache runs as, as + configured in httpd.conf. That should definitely give server + administrators pause.

    + +

    There are ways to enhance the security of SSI files while + still taking advantage of the benefits they provide.

    + +

    To isolate the damage a wayward SSI file can cause, a server + administrator can enable suexec as described in the CGI in General section.

    + +

    Enabling SSI for files with .html or .htm extensions can be + dangerous. This is especially true in a shared, or high + traffic, server environment. SSI-enabled files should have a + separate extension, such as the conventional .shtml. This helps + keep server load at a minimum and allows for easier management + of risk.

    + +

    Another solution is to disable the ability to run scripts + and programs from SSI pages. To do this, replace + Includes with IncludesNOEXEC in the + Options directive. Note + that users may still use <--#include virtual="..." --> to + execute CGI scripts if these scripts are in directories + designated by a ScriptAlias + directive.

    +
    + +

    Non Script Aliased + CGI

    + +

    Allowing users to execute CGI scripts in + any directory should only be considered if;

    + +
      +
    1. You trust your users not to write scripts which will + deliberately or accidentally expose your system to an + attack.
    2. + +
    3. You consider security at your site to be so feeble in + other areas, as to make one more potential hole + irrelevant.
    4. + +
    5. You have no users, and nobody ever visits your + server.
    6. +
    +
    + +

    Script Aliased + CGI

    + +

    Limiting CGI to special directories gives + the admin control over what goes into those directories. This + is inevitably more secure than non script aliased CGI, but + only if users with write access to the directories are + trusted or the admin is willing to test each new CGI + script/program for potential security holes.

    + +

    Most sites choose this option over the non script aliased + CGI approach.

    +
    + +

    CGI in General

    + +

    Always remember that you must trust the writers of the CGI + script/programs or your ability to spot potential security + holes in CGI, whether they were deliberate or accidental.

    + +

    All the CGI scripts will run as the same user, so they have + potential to conflict (accidentally or deliberately) with other + scripts e.g. User A hates User B, so he writes a + script to trash User B's CGI database. One program which can be + used to allow scripts to run as different users is suEXEC which is included with Apache + as of 1.2 and is called from special hooks in the Apache server + code. Another popular way of doing this is with CGIWrap.

    +
    + +

    Other sources of dynamic + content

    + +

    Embedded scripting options which run as part of the server itself, such +as mod_php, mod_perl, mod_tcl, and mod_python, run under the identity of +the server itself (see the User +directive), and therefore scripts executed by these engines +potentially can access anything the server user can. Some scripting +engines may provide restrictions, but it is better to be safe and assume +not.

    +
    + +

    Protecting + System Settings

    + +

    To run a really tight ship, you'll want to stop users from + setting up .htaccess files which can override + security features you've configured. Here's one way to do + it.

    + +

    In the server configuration file, put

    + +
    + <Directory />
    + AllowOverride None
    + </Directory>
    +
    +
    + +

    This prevents the use of .htaccess files in all + directories apart from those specifically enabled.

    +
    + +

    Protect Server Files by + Default

    + +

    One aspect of Apache which is occasionally misunderstood is + the feature of default access. That is, unless you take steps + to change it, if the server can find its way to a file through + normal URL mapping rules, it can serve it to clients.

    + +

    For instance, consider the following example:

    + +
      +
    1. # cd /; ln -s / public_html
    2. + +
    3. Accessing http://localhost/~root/
    4. +
    + +

    This would allow clients to walk through the entire + filesystem. To work around this, add the following block to + your server's configuration:

    +
    + <Directory />
    +     Order Deny,Allow
    +     Deny from all
    + </Directory>
    +
    + +

    This will forbid default access to filesystem locations. Add + appropriate <Directory> + blocks to allow access only in those areas you wish. For + example,

    +
    + <Directory /usr/users/*/public_html>
    +     Order Deny,Allow
    +     Allow from all
    + </Directory>
    + <Directory /usr/local/httpd>
    +     Order Deny,Allow
    +     Allow from all
    + </Directory>
    +
    + +

    Pay particular attention to the interactions of <Location> + and <Directory> + directives; for instance, even if <Directory + /> denies access, a <Location /> + directive might overturn it.

    + +

    Also be wary of playing games with the UserDir directive; + setting it to something like "./" would have the + same effect, for root, as the first example above. If you are + using Apache 1.3 or above, we strongly recommend that you + include the following line in your server configuration + files:

    + +
    +
    UserDir disabled root
    +
    +
    + +

    Please send any other useful security tips to The Apache + Group by filling out a problem report. If you are + confident you have found a security bug in the Apache source + code itself, please let us + know.

    + +

    + + + diff --git a/htdocs/manual/misc/tutorials.html b/htdocs/manual/misc/tutorials.html new file mode 100644 index 00000000000..f57e07f7181 --- /dev/null +++ b/htdocs/manual/misc/tutorials.html @@ -0,0 +1,168 @@ + + + + + + + Apache Tutorials + + + + + + +

    Apache Tutorials

    + +

    The following documents give you step-by-step instructions + on how to accomplish common tasks with the Apache http server. + Many of these documents are located at external sites and are + not the work of the Apache Software Foundation. Copyright to + documents on external sites is owned by the authors or their + assignees. Please consult the official Apache + Server documentation to verify what you read on external + sites.

    + +

    Installation & Getting Started

    + + + +

    Basic Configuration

    + + + +

    Security

    + + + +

    Logging

    + + + +

    CGI and SSI

    + + + +

    Other Features

    + + + +

    If you have a pointer to an accurate and well-written + tutorial not included here, please let us know by submitting it + to the Apache Bug + Database. +

    + + + diff --git a/htdocs/manual/misc/vif-info.html b/htdocs/manual/misc/vif-info.html new file mode 100644 index 00000000000..df683314856 --- /dev/null +++ b/htdocs/manual/misc/vif-info.html @@ -0,0 +1,398 @@ + + + + + + + Configuring Multiple IP Addresses + + + + + + +

    Configuring Multiple IP Addresses

    +
    +This material is originally from John Ioannidis (ji@polaris.ctr.columbia.edu)
    +I have condensed it some and applied some corrections for SunOS 4.1.x
    +courtesy of Chuck Smoko (csmoko@relay.nswc.navy.mil).
    +
    +Bob Baggerman  (bob@bizweb.com)
    +12 Jan 94
    +
    +=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    +John Ionnidis writes:
    +
    +This is a topic that comes up once in a while on comp.protocols.tcp-ip
    +and other newsgroups. The question is, how to get a machine with one
    +network interface to respond to more than one IP addresses.
    +
    +I have a solution than might suit you.  For my doctoral work (there's
    +a paper about it in this year's ('91) SIGCOMM, also available for
    +anonymous FTP from cs.columbia.edu:/pub/ji/sigcomm*.ps.Z), I've
    +developed what I call the "Virtual Interface" (VIF). To the networking
    +code, it looks like an interface. It gets ifattach()ed when you open
    +the /dev/vif* device, and then you can ifconfig it as you like. It
    +does not have an if_input procedure; it only has an if_output. Packets
    +that it receives (from higher-level protocols) which have its
    +IP address, it simply loops back (like any well-behaved if driver).
    +Packets that it receives that are destined for some other address, it
    +encapsulates in an encapsulation protocol I call IPIP (IP-within-IP,
    +protocol number IPPROTO_IPIP == 94), and sends it to another machine
    +that groks that encapsulation protocol. This feature you won't need,
    +but here's how to have multiple IP addresses on a machine with a
    +single real interface:
    +
    +Let's say your primary interface's IP address is 198.3.2.1, and you
    +also want it to respond to addresses 198.4.3.2 and 198.5.4.3 (note
    +that these are three distinct class C addresses in three distinct
    +class C nets). Here are the ifconfigs:
    +
    +  ifconfig le0 198.3.2.1 up -trailers   # config primary interface
    +
    +  ifconfig vif0 198.4.3.2 up            # config first virtual interface
    +  route delete net 198.4.3 198.4.3.2    # delete spurious route
    +  route add host 198.4.3.2 198.4.3.2 0  # add route for this i/f
    +
    +  ifconfig vif1 198.5.4.3 up            # config second virtual interface
    +  route delete net 198.5.4 198.5.4.3    # delete spurious route
    +  route add host 198.5.4.3 198.5.4.3 0  # add route for this i/f
    +
    +The route deletes are needed because the ifconfig creates a default
    +route to the interface's network, which can cause problems; all that's
    +needed is the (host) route to the interface's address.
    +
    +Now, get le0's ethernet address (say, 8:0:20:3:2:1), and add the
    +following static ARP entries:
    +
    +  arp -s 198.4.3.2 8:0:20:3:2:1 pub
    +  arp -s 198.5.4.3 8:0:20:3:2:1 pub
    +
    +This will cause any ARP requests for the VIF addresses to be replied
    +with your machine's ethernet address.
    +
    +Now, make sure your default route is to your segment's gateway,
    +through the real interface. Finally, make sure your routers and/or
    +hosts on the same segment as yours know that 198.4.3.2 and 198.5.4.3
    +are on that cable.
    +
    +Here's what you've accomplished.
    +
    +ARP requests for any of your host's addresses will be replied to with
    +the host's ethernet address (the real one, because that's what it is,
    +the virtual ones because of the public static arp entries). Packets
    +reaching your host with any of these addresses will be accepted by the
    +ip_input routine because they match the address of one of the host's
    +interfaces. Packets leaving your host can have any of its addresses
    +(real and virtual).
    +
    +The code for vif follows. To use it, put the stuff in netinet/if_vif.c
    +and netinet/if_vif.h, configure your kernel with the number of
    +virtual interfaces you want using a line like:
    +
    +pseudo-device   vif4            # Virtual IP interface
    +
    +in your configuration file, and the line
    +
    +netinet/if_vif.c        optional vif device-driver
    +
    +in the "files" file. Also, add the appropriate entries in conf.c, so
    +that you can access the if_attach() routine when you open the device:
    +
    +
    +-------------------------- conf.c------------------------------------------
    +
    +add this in the appropriate place in the headers of conf.c:
    +
    +--------------------
    +#include "vif.h"
    +#if NVIF > 0
    +int     vifopen(), vifclose(), vifread(), vifwrite(), vifselect(), vifioctl();
    +#else
    +#define vifopen         nodev
    +#define vifclose        nodev
    +#define vifread         nodev
    +#define vifwrite        nodev
    +#define vifselect       nodev
    +#define vifioctl        nodev
    +#endif
    +--------------------
    +
    +then, way down in the definition for cdevsw[]:
    +
    +--------------------
    +        vifopen,        vifclose,       vifread,        vifwrite,       /*14*/
    +        vifioctl,       nodev,          nodev,          0,
    +        0,      nodev,
    +--------------------
    +
    +Make sure you remember the correct major device number, 14 in this case!
    +
    +---------------------------------------------------------------------------
    +
    +Finally, here's the code. It has the tunneling pieces removed (you
    +need more code to use that anyway), and it comes from a Mach 2.6
    +kernel; it should compile on any Berkeley-derived unix with minor
    +changes (most likely only in the includes).
    +
    +---------------------netinet/if_vif.h--------------------------------------
    +typedef struct
    +{
    +        struct ifnet    vif_if;
    +        struct ifnet    *vif_sif;       /* slave interface */
    +        int             vif_flags;
    +} vif_softc_t;
    +
    +#define VIFMTU  (1024+512)
    +---------------------------------------------------------------------------
    +
    +and
    +
    +---------------------netinet/if_vif.c--------------------------------------
    +/*
    + * Virtual IP interface module.
    + */
    +
    +#include "param.h"
    +#include "../sys/systm.h"
    +#include "../sys/mbuf.h"
    +#include "../sys/socket.h"
    +#include "../sys/errno.h"
    +#include "../sys/ioctl.h"
    +
    +#include "../net/if.h"
    +#include "../net/netisr.h"
    +#include "../net/route.h"
    +
    +#ifdef  INET
    +#include "../netinet/in.h"
    +#include "../netinet/in_systm.h"
    +#include "../netinet/in_var.h"
    +#include "../netinet/ip.h"
    +#endif
    +
    +#include "in_pcb.h"
    +#include "vif.h"
    +
    +typedef struct
    +{
    +        struct ifnet    vif_if;
    +        struct ifnet    *vif_sif;       /* slave interface */
    +        int             vif_flags;
    +} vif_softc_t;
    +
    +#define VIFMTU  (1024+512)
    +
    +vif_softc_t vif_softc[NVIF];
    +
    +int vifs_inited = 0;
    +
    +
    +vifattach()
    +{
    +        register int i;
    +        register struct ifnet *ifp;
    +        int     vifoutput(), vififioctl();
    +
    +        for (i=0; i<NVIF; i++)
    +        {
    +                ifp = &vif_softc[i].vif_if;
    +                ifp->if_name = "vif";
    +                ifp->if_unit = i;
    +                ifp->if_mtu = VIFMTU;
    +                ifp->if_flags = IFF_LOOPBACK | IFF_NOARP;
    +                ifp->if_ioctl = vififioctl;
    +                ifp->if_output = vifoutput;
    +                if_attach(ifp);
    +        }
    +}
    +
    +vifopen(dev, flag)
    +int dev, flag;
    +{
    +        int unit;
    +
    +        if (!vifs_inited)
    +        {
    +                vifattach();
    +                vifs_inited = 1;
    +                printf("vif initialized\n");
    +        }
    +
    +        unit = minor(dev);
    +        if ((unit < 0) || (unit >= NVIF))
    +        {
    +                return ENXIO;
    +        }
    +
    +        return 0;
    +}
    +
    +vifclose(dev, flag)
    +int dev, flag;
    +{
    +        return 0;
    +}
    +
    +vifread()
    +{
    +        return ENXIO;
    +}
    +
    +vifwrite()
    +{
    +        return ENXIO;
    +}
    +
    +vifselect()
    +{
    +        return ENXIO;
    +}
    +
    +vifoutput(ifp, m0, dst)
    +        struct ifnet *ifp;
    +        register struct mbuf *m0;
    +        struct sockaddr *dst;
    +{
    +        int s;
    +        register struct ifqueue *ifq;
    +        struct mbuf *m;
    +        struct sockaddr_in *din;
    +
    +        if (dst->sa_family != AF_INET)
    +        {
    +                printf("%s%d: can't handle af%d\n",
    +                       ifp->if_name, ifp->if_unit,
    +                       dst->sa_family);
    +                m_freem(m0);
    +                return (EAFNOSUPPORT);
    +        }
    +
    +        din = (struct sockaddr_in *)dst;
    +
    +        if (din->sin_addr.s_addr == IA_SIN(ifp->if_addrlist)->sin_addr.s_addr)
    +        {
    +                /* printf("%s%d: looping\n", ifp->if_name, ifp->if_unit); */
    +
    +                /*
    +                 * Place interface pointer before the data
    +                 * for the receiving protocol.
    +                 */
    +                if (m0->m_off <= MMAXOFF &&
    +                    m0->m_off >= MMINOFF + sizeof(struct ifnet *)) {
    +                        m0->m_off -= sizeof(struct ifnet *);
    +                        m0->m_len += sizeof(struct ifnet *);
    +                } else {
    +                        MGET(m, M_DONTWAIT, MT_HEADER);
    +                        if (m == (struct mbuf *)0)
    +                          return (ENOBUFS);
    +                        m->m_off = MMINOFF;
    +                        m->m_len = sizeof(struct ifnet *);
    +                        m->m_next = m0;
    +                        m0 = m;
    +                }
    +                *(mtod(m0, struct ifnet **)) = ifp;
    +                s = splimp();
    +                ifp->if_opackets++;
    +                ifq = &ipintrq;
    +                if (IF_QFULL(ifq)) {
    +                        IF_DROP(ifq);
    +                        m_freem(m0);
    +                        splx(s);
    +                        return (ENOBUFS);
    +                }
    +                IF_ENQUEUE(ifq, m0);
    +                schednetisr(NETISR_IP);
    +                ifp->if_ipackets++;
    +                splx(s);
    +                return (0);
    +        }
    +
    +        return EHOSTUNREACH;
    +}
    +
    +/*
    + * Process an ioctl request.
    + */
    +/* ARGSUSED */
    +vififioctl(ifp, cmd, data)
    +        register struct ifnet *ifp;
    +        int cmd;
    +        caddr_t data;
    +{
    +        int error = 0;
    +
    +        switch (cmd) {
    +
    +        case SIOCSIFADDR:
    +                ifp->if_flags |= IFF_UP;
    +                /*
    +                 * Everything else is done at a higher level.
    +                 */
    +                break;
    +
    +        default:
    +                error = EINVAL;
    +        }
    +        return (error);
    +}
    +
    +vifioctl(dev, cmd, arg, mode)
    +dev_t dev;
    +int cmd;
    +caddr_t arg;
    +int mode;
    +{
    +        int unit;
    +
    +        unit = minor(dev);
    +        if ((unit < 0) || (unit >= NVIF))
    +          return ENXIO;
    +
    +        return EINVAL;
    +}
    +----------------------------------------------------------------------------
    +
    +To use it, compile your kernel, and reboot. Then create the vif
    +device:
    +
    +# mknod /dev/vif c 14 0
    +
    +(or whatever major number it ended up being), and echo something into
    +it:
    +
    +# echo > /dev/vif
    +
    +This will cause the device to be opened, which will if_attach the
    +interfaces. If you feel like playing with the code, you may want to
    +kmem_alloc() the vif_softc structure at open time, and use the minor
    +number of the device to tell it how many interfaces to create.
    +
    +Now you can go ahead and ifconfig etc.
    +
    +I'll be happy to answer minor questions, and hear about success and
    +failure stories, but I cannot help you if you don't already know how
    +to hack kernels.
    +
    +Good luck!
    +
    +/ji
    +
    +In-Real-Life: John "Heldenprogrammer" Ioannidis
    +E-Mail-To: ji@cs.columbia.edu
    +V-Mail-To: +1 212 854 8120
    +P-Mail-To: 450 Computer Science \n Columbia University \n New York, NY 10027
    +
    + +

    Note: there is also a commercial-product-turned-freeware + called "Col. Patch" which does this as a loadable kernel + module for SunOS 4.1.3_U1.

    + +

    +

    + + + diff --git a/htdocs/manual/misc/windoz_keepalive.html b/htdocs/manual/misc/windoz_keepalive.html new file mode 100644 index 00000000000..80a80f559f2 --- /dev/null +++ b/htdocs/manual/misc/windoz_keepalive.html @@ -0,0 +1,54 @@ + + + + + + + MS Windows Netscape 3.0b4 KeepAlive problem + solved + + + + + + +

    HTTP/1.1 KeepAlive problems with Netscape + 3.0

    +
    +Date: Mon, 1 Jul 1996 16:03:06 -0700 (PDT)
    +From: Alexei Kosut <akosut@organic.com>
    +To: Apache Group
    +Subject: Re: keepalive and windoze
    +
    +Good news and good news (of a sort)..
    +
    +I was able to snag a Windows 95 machine here at Organic, and tried out
    +some things:
    +
    +1) On Netscape 3.0b4, I was able to reproduce the bug, each and every
    +time. It's really simple: go to the Network Setup panel. Set it to
    +"Connect Every Time" and only let it have 1 connection at once (this may
    +not be necessary, but it's helpful). Then load an image that's
    +kept-alive. Then wait until the connection times out (this depends on the
    +server - 10-30 seconds, except for MIIS, which never times out, near as I
    +can tell). Then hit reload. It will hang. (actually, once it crashed).
    +
    +2) This happens with all forms of server. Apache 1.1, Netscape 2.0,
    +Spyglass 1.2, NCSA 1.5 (although, as stated, I couldn't test MIIS).
    +
    +3) Netscape 3.0b5 does, indeed, *not* have this bug. At least, I couldn't
    +get it to perform such. Yipee.
    +
    +So, we just put up a note on the web page. Make sure we say that all the
    +servers have the bug, it's a Windows bug, and Netscape Navigator 3.0b5
    +works around it. That way, no one can yell at us. Yes?
    +
    +-- Alexei Kosut <akosut@organic.com>            The Apache HTTP Server
    +   http://www.nueva.pvt.k12.ca.us/~akosut/      http://www.apache.org/
    +
    + + + + diff --git a/htdocs/manual/mod/core.html.en b/htdocs/manual/mod/core.html.en new file mode 100644 index 00000000000..1b3b897603a --- /dev/null +++ b/htdocs/manual/mod/core.html.en @@ -0,0 +1,4217 @@ + + + + + + + Apache Core Features + + + + + + +

    Apache Core Features

    + +

    These configuration parameters control the core Apache + features, and are always available.

    + +

    Directives

    + + +
    + +

    AcceptFilter + directive

    + + Syntax: AcceptFilter + on|off
    + Default: AcceptFilter + on
    + Context: server config
    + Status: core
    + Compatibility: AcceptFilter is + available in Apache 1.3.22 and later + +

    AcceptFilter controls a BSD specific filter + optimization. It is compiled in by default - and switched on by + default if your system supports it (setsocketopt() option + SO_ACCEPTFILTER). Currently only FreeBSD supports this.

    + +

    See the filter section on performance hints for more + information.

    + +

    The compile time flag AP_ACCEPTFILTER_OFF can + be used to change the default to 'off'. httpd -V + and httpd -L will show compile time defaults and + whether or not SO_ACCEPTFILTER was defined during the + compile.

    + +
    + +

    AcceptMutex + directive

    + + Syntax: AcceptMutex + uslock|pthread|sysvsem|fcntl|flock|os2sem|tpfcore|none|default
    + Default: AcceptMutex + default
    + Context: server config
    + Status: core
    + Compatibility: AcceptMutex is + available in Apache 1.3.21 and later. + +

    AcceptMutex controls which accept() mutex + method Apache will use. Not all methods are available on all + platforms, since the suite of methods is determined at + compile-time. For a list of which methods are available for + your particular build, the httpd -V command line + option will list them out.

    + +

    The compile time flags -D + HAVE_METHOD_SERIALIZED_ACCEPT can be used to add + different methods to your build, or one can edit the + include/ap_config.h file for your particular + platform.

    + +

    This directive has no effect on Microsoft Windows.

    + +

    See the performance tuning + guide for more information.

    + +
    + +

    AccessConfig + directive

    + + Syntax: AccessConfig + file-path|directory-path|wildcard-path
    + Default: AccessConfig + conf/access.conf
    + Context: server config, virtual + host
    + Status: core
    + Compatibility: The ability to + specify a directory, rather than a file name, is only available in + Apache 1.3.13 and later. This directive will be eliminated in version + 2.0. + +

    The server will read this file for more directives after + reading the ResourceConfig file. + File-path is relative to the ServerRoot. This feature can be disabled + using:

    + +
    + AccessConfig /dev/null +
    + Or, on Win32 servers, + +
    + AccessConfig nul +
    + Historically, this file only contained <Directory> sections; in fact it + can now contain any server directive allowed in the server + config context. However, since Apache version 1.3.4, + the default access.conf file which ships with + Apache contains only comments, and all directives are placed + in the main server configuration file, httpd.conf. + +

    If AccessConfig points to a directory, rather than a + file, Apache will read all files in that directory, and any + subdirectory, and parse those as configuration files. +

    +

    Alternatively you can use a wildcard to limit the scope; i.e + to only *.conf files. +

    +

    Note that by default any file in the specified + directory will be loaded as a configuration file. +

    +

    + So make sure that you don't have stray files in + this directory by mistake, such as temporary files created by your + editor, for example.

    + +

    See also: Include and ResourceConfig.

    +
    + +

    AccessFileName + directive

    + + Syntax: AccessFileName + filename [filename] ...
    + Default: AccessFileName + .htaccess
    + Context: server config, virtual + host
    + Status: core
    + Compatibility: AccessFileName + can accept more than one filename only in Apache 1.3 and later + +

    When returning a document to the client the server looks for + the first existing access control file from this list of names + in every directory of the path to the document, if access + control files are enabled for that directory. For example:

    + +
    + AccessFileName .acl +
    + before returning the document /usr/local/web/index.html, the + server will read /.acl, /usr/.acl, /usr/local/.acl and + /usr/local/web/.acl for directives, unless they have been + disabled with + +
    + <Directory />
    + AllowOverride None
    + </Directory>
    +
    + +

    See Also: AllowOverride and Configuration Files

    +
    + +

    AddDefaultCharset directive

    + Syntax: AddDefaultCharset + On|Off|charset
    + Context: all
    + Status: core
    + Default: + AddDefaultCharset Off
    + Compatibility: + AddDefaultCharset is only available in Apache 1.3.12 and later + +

    This directive specifies the name of the character set that + will be added to any response that does not have any parameter + on the content type in the HTTP headers. This will override any + character set specified in the body of the document via a + META tag. A setting of AddDefaultCharset + Off disables this functionality. AddDefaultCharset + On enables Apache's internal default charset of + iso-8859-1 as required by the directive. You can + also specify an alternate charset to be used.

    + +

    For example:

    + +
    + AddDefaultCharset utf-8 +
    + +

    Note: This will not have any effect on the + Content-Type and character set for default Apache-generated + status pages (such as '404 Not Found' or '301 Moved Permanently') + because those have an actual character set (that in which the + hard-coded page content is written) and don't need to have a default + applied.

    + +
    + +

    AddModule + directive

    + + Syntax: AddModule + module [module] ...
    + Context: server config
    + Status: core
    + Compatibility: AddModule is + only available in Apache 1.2 and later + +

    The server can have modules compiled in which are not + actively in use. This directive can be used to enable the use + of those modules. The server comes with a pre-loaded list of + active modules; this list can be cleared with the ClearModuleList directive.

    + +

    For example:

    + +
    + AddModule mod_include.c +
    + +

    The ordering of AddModule lines is important. + Modules are listed in reverse priority order --- the ones that come + later can override the behavior of those that come earlier. This + can have visible effects; for instance, if UserDir followed Alias, + you couldn't alias out a particular user's home directory. For + more information and a recommended ordering, see + src/Configuration.tmpl in the Apache source + distribution.

    + +

    See also: ClearModuleList and LoadModule

    +
    + +

    AllowOverride + directive

    + + Syntax: AllowOverride + All|None|directive-type [directive-type] + ...
    + Default: AllowOverride + All
    + Context: directory
    + Status: core + +

    When the server finds an .htaccess file (as specified by AccessFileName) it needs to know + which directives declared in that file can override earlier + access information.

    + +

    Note: AllowOverride is only + valid in <Directory> sections, not in <Location> or + <Files> sections, as implied by the Context + section above.

    + +

    When this directive is set to None, then + .htaccess files are completely ignored. In this case, the + server will not even attempt to read .htaccess files in the + filesystem.

    + +

    When this directive is set to All, then any + directive which has the .htaccess Context is allowed in + .htaccess files.

    + +

    The directive-type can be one of the following + groupings of directives.

    + +
    +
    AuthConfig
    + +
    + + Allow use of the authorization directives (AuthDBMGroupFile, + AuthDBMUserFile, + AuthGroupFile, AuthName, AuthDigestRealmSeed, AuthType, AuthUserFile, Require, etc.).
    + +
    FileInfo
    + +
    + Allow use of the directives controlling document types (AddEncoding, AddLanguage, AddType, DefaultType, ErrorDocument, LanguagePriority, + etc.).
    + +
    Indexes
    + +
    + Allow use of the directives controlling directory indexing + (AddDescription, + AddIcon, AddIconByEncoding, + AddIconByType, + DefaultIcon, DirectoryIndex, FancyIndexing, HeaderName, IndexIgnore, IndexOptions, ReadmeName, + etc.).
    + +
    Limit
    + +
    + Allow use of the directives controlling host access (Allow, + Deny + and Order).
    + +
    Options
    + +
    + Allow use of the directives controlling specific directory + features (Options and XBitHack).
    +
    + +

    Example:

    +
    AllowOverride AuthConfig Indexes
    + +

    See Also: AccessFileName and Configuration Files

    +
    + +

    AuthName + directive

    + + Syntax: AuthName + auth-domain
    + Context: directory, + .htaccess
    + Override: AuthConfig
    + Status: core + +

    This directive sets the name of the authorization realm for + a directory. This realm is given to the client so that the user + knows which username and password to send. + AuthName takes a single argument; if the realm + name contains spaces, it must be enclosed in quotation marks. + It must be accompanied by AuthType and + Require directives, and directives such + as AuthUserFile and AuthGroupFile to + work.

    + +

    For example:

    + +
    AuthName "Top Secret"
    + +

    The string provided for the AuthName is what will + appear in the password dialog provided by most browsers.

    + +

    See also: Authentication, Authorization, and + Access Control

    +
    + +

    AuthDigestRealmSeed + directive

    + + Syntax: AuthDigestRealmSeed + secret-real-string
    + Context: directory, + .htaccess
    + Override: AuthConfig
    + Status: core + +

    This directive sets a per realm secret nonce prefix + which is used to ensure that a captured username, password + and realm string during a Digest exchange cannot + be replayed at other places. +

    +

    It only applies to mod_digest.html, + the experimental mod_auth_digest.html + implements its own (more advanced and also time sensitive) replay protection. +

    + + It must be accompanied by AuthType of + type Digest, one or more + Require directives, and directives such + as AuthUserFile and AuthGroupFile to + work.

    + +

    See also: Authentication, Authorization, and + Access Control

    +
    + +

    AuthType + directive

    + + Syntax: AuthType + Basic|Digest
    + Context: directory, + .htaccess
    + Override: AuthConfig
    + Status: core + +

    This directive selects the type of user authentication for a + directory. Only Basic and Digest are + currently implemented. + + It must be accompanied by AuthName and + Require directives, and directives such + as AuthUserFile and AuthGroupFile to + work.

    + +

    When AuthDigest is used an AuthDigestRealmSeed + should also be set.

    + +

    See also: Authentication, Authorization, and + Access Control

    +
    + +

    BindAddress + directive

    + + Syntax: BindAddress + *|IP-address|domain-name
    + Default: BindAddress + *
    + Context: server config
    + Status: core
    + Compatibility: BindAddress is + deprecated and will be eliminated in Apache 2.0. + +

    A Unix® http server can either listen for connections to + every IP address of the server machine, or just one IP address + of the server machine. If the argument to this directive is *, + then the server will listen for connections on every IP + address. Otherwise, the server can listen to only a specific + IP-address or a fully-qualified Internet + domain-name.

    + +

    For example:

    + + BindAddress 192.168.15.48
    + +

    Only one BindAddress directive can be used.

    + +

    This directive is deprecated and will be eliminated in + Apache 2.0. Equivalent functionality and more control over the + address and ports Apache listens to is available using the + Listen + directive.

    + +

    BindAddress can be used as an alternative + method for supporting virtual hosts + using multiple independent servers, instead of using <VirtualHost> + sections.

    + +

    See Also: DNS + Issues
    + See Also: Setting + which addresses and ports Apache uses

    +
    + +

    BS2000Account + directive

    + + Syntax: BS2000Account + account
    + Default: none
    + Context: server config
    + Status: core
    + Compatibility: BS2000Account is + only available for BS2000 machines, as of Apache 1.3 and later. + + +

    The BS2000Account directive is available for + BS2000 hosts only. It must be used to define the account number + for the non-privileged apache server user (which was configured + using the User directive). This is required + by the BS2000 POSIX subsystem (to change the underlying BS2000 + task environment by performing a sub-LOGON) to prevent CGI + scripts from accessing resources of the privileged account + which started the server, usually SYSROOT.
    + Only one BS2000Account directive can be used.

    + +

    See Also: Apache + EBCDIC port

    +
    + +

    CGICommandArgs + directive

    + + Syntax: CGICommandArgs On|Off
    + Default: CGICommandArgs On
    + Context: directory, .htaccess
    + Override: Options
    + Status: core
    + Compatibility: Available in Apache + 1.3.24 and later. + +

    Way back when the internet was a safer, more naive place, it + was convenient for the server to take a query string that did not + contain an '=' sign and to parse and pass it to a CGI program as + command line args. For example, <IsIndex> + generated searches often work in this way. The default behavior + in Apache is to maintain this behavior for backwards + compatibility, although it is generally regarded as unsafe + practice today. Most CGI programs do not take command line + parameters, but among those that do, many are unaware of this + method of passing arguments and are therefore vulnerable to + malicious clients passing unsafe material in this way. Setting + CGICommandArgs Off is recommended to protect such + scripts with little loss in functionality.

    + +
    + +

    ClearModuleList directive

    + + Syntax: ClearModuleList
    + Context: server config
    + Status: core
    + Compatibility: ClearModuleList + is only available in Apache 1.2 and later + +

    The server comes with a built-in list of active modules. + This directive clears the list. It is assumed that the list + will then be re-populated using the AddModule directive.

    + +

    See also: AddModule and LoadModule

    + +
    + +

    ContentDigest + directive

    + + Syntax: ContentDigest + on|off
    + Default: ContentDigest + off
    + Context: server config, virtual + host, directory, .htaccess
    + Override: Options
    + Status: experimental
    + Compatibility: ContentDigest is + only available in Apache 1.1 and later + +

    This directive enables the generation of + Content-MD5 headers as defined in RFC1864 + respectively RFC2068.

    + +

    MD5 is an algorithm for computing a "message digest" + (sometimes called "fingerprint") of arbitrary-length data, with + a high degree of confidence that any alterations in the data + will be reflected in alterations in the message digest.

    + +

    The Content-MD5 header provides an end-to-end + message integrity check (MIC) of the entity-body. A proxy or + client may check this header for detecting accidental + modification of the entity-body in transit. Example header:

    +
    +   Content-MD5: AuLb7Dp1rqtRtxz2m9kRpA==
    +
    + +

    Note that this can cause performance problems on your server + since the message digest is computed on every request (the + values are not cached).

    + +

    Content-MD5 is only sent for documents served + by the core, and not by any module. For example, SSI documents, + output from CGI scripts, and byte range responses do not have + this header.

    +
    + +

    CoreDumpDirectory directive

    + + Syntax: CoreDumpDirectory + directory-path
    + Default: the same location as + ServerRoot
    + Context: server config
    + Status: core + +

    This controls the directory to which Apache attempts to + switch before dumping core. The default is in the ServerRoot directory, however since this + should not be writable by the user the server runs as, core + dumps won't normally get written. If you want a core dump for + debugging, you can use this directive to place it in a + different location.

    + +

    For example:

    + +
    + CoreDumpDirectory /tmp +
    + +
    + +

    DefaultType + directive

    + + Syntax: DefaultType + MIME-type
    + Default: DefaultType + text/plain
    + Context: server config, virtual + host, directory, .htaccess
    + Override: FileInfo
    + Status: core + +

    There will be times when the server is asked to provide a + document whose type cannot be determined by its MIME types + mappings.

    + +

    The server must inform the client of the content-type of the + document, so in the event of an unknown type it uses the + DefaultType. For example:

    + +
    + DefaultType image/gif +
    + would be appropriate for a directory which contained many gif + images with filenames missing the .gif extension. + +

    See also: AddType and TypesConfig.

    + +
    + +

    <Directory> + directive

    + + Syntax: <Directory + directory-path|proxy:url-path> + ... </Directory>
    + Context: server config, virtual + host
    + Status: Core. + +

    <Directory> and </Directory> are used to enclose + a group of directives which will apply only to the named + directory and sub-directories of that directory. Any directive + which is allowed in a directory context may be used. + Directory-path is either the full path to a directory, + or a wild-card string. In a wild-card string, `?' matches any + single character, and `*' matches any sequences of characters. + As of Apache 1.3, you may also use `[ ]' character ranges like + in the shell. Also as of Apache 1.3 none of the wildcards match + a `/' character, which more closely mimics the behavior of + Unix shells. Example:

    +
    +   <Directory /usr/local/httpd/htdocs>
    +   Options Indexes FollowSymLinks
    +   </Directory>
    +
    + +

    Apache 1.2 and above: Extended regular + expressions can also be used, with the addition of the + ~ character. For example:

    +
    +   <Directory ~ "^/www/.*/[0-9]{3}">
    +
    + would match directories in /www/ that consisted of three + numbers. + +

    If multiple (non-regular expression) directory sections + match the directory (or its parents) containing a document, + then the directives are applied in the order of shortest match + first, interspersed with the directives from the .htaccess files. For example, + with

    + +
    + <Directory />
    + AllowOverride None
    + </Directory>
    +
    + <Directory /home/*>
    + AllowOverride FileInfo
    + </Directory>
    +
    + for access to the document /home/web/dir/doc.html + the steps are: + +
      +
    • Apply directive AllowOverride None + (disabling .htaccess files).
    • + +
    • Apply directive AllowOverride FileInfo (for + directory /home/web).
    • + +
    • Apply any FileInfo directives in + /home/web/.htaccess
    • +
    + +

    Regular expression directory sections are handled slightly + differently by Apache 1.2 and 1.3. In Apache 1.2 they are + interspersed with the normal directory sections and applied in + the order they appear in the configuration file. They are + applied only once, and apply when the shortest match possible + occurs. In Apache 1.3 regular expressions are not considered + until after all of the normal sections have been applied. Then + all of the regular expressions are tested in the order they + appeared in the configuration file. For example, with

    + +
    + <Directory ~ abc$>
    + ... directives here ...
    + </Directory>
    +
    +
    + Suppose that the filename being accessed is + /home/abc/public_html/abc/index.html. The server + considers each of /, /home, + /home/abc, /home/abc/public_html, and + /home/abc/public_html/abc in that order. In Apache + 1.2, when /home/abc is considered, the regular + expression will match and be applied. In Apache 1.3 the regular + expression isn't considered at all at that point in the tree. + It won't be considered until after all normal + <Directory>s and .htaccess files have been + applied. Then the regular expression will match on + /home/abc/public_html/abc and be applied. + +

    Note that the default Apache access for + <Directory /> is Allow from All. This means + that Apache will serve any file mapped from an URL. It is + recommended that you change this with a block such + as

    +
    + <Directory />
    +     Order Deny,Allow
    +     Deny from All
    + </Directory>
    +
    + +

    and then override this for directories you + want accessible. See the Security Tips page for + more details.

    + <Directory> directives cannot nest, and cannot appear in + a <Limit> or <LimitExcept> section. + +

    If you have mod_proxy enabled, you + can use the proxy: syntax to apply configuration + directives to proxied content. The syntax for this is to specify the + proxied URLs to which you wish to apply the configuration, or to + specify * to apply to all proxied content:

    + +

    To apply to all proxied content:

    + +
    +   <Directory proxy:*>
    +     ... directives here ...
    +   </Directory>
    +   
    + +

    To apply to just a subset of proxied content:

    + +
    +   <Directory proxy:http://www.example.com/>
    +     ... directives here ...
    +   </Directory>
    +   
    + +

    See also: How + Directory, Location and Files sections work for an + explanation of how these different sections are combined when a + request is received

    +

    See also: DirectoryMatch

    +
    + +

    <DirectoryMatch>

    + Syntax: <DirectoryMatch + regex> ... </DirectoryMatch>
    + Context: server config, virtual + host
    + Status: Core.
    + Compatibility: Available in + Apache 1.3 and later + +

    <DirectoryMatch> and </DirectoryMatch> are used + to enclose a group of directives which will apply only to the + named directory and sub-directories of that directory, the same + as <Directory>. However, it + takes as an argument a regular expression. For example:

    +
    +   <DirectoryMatch "^/www/.*/[0-9]{3}">
    +
    + +

    would match directories in /www/ that consisted of three + numbers.

    + +

    See Also: <Directory> for a description of + how regular expressions are mixed in with normal + <Directory>s.
    + See also: How + Directory, Location and Files sections work for an + explanation of how these different sections are combined when a + request is received

    +
    + +

    DocumentRoot + directive

    + + Syntax: DocumentRoot + directory-path
    + Default: DocumentRoot + /usr/local/apache/htdocs
    + Context: server config, virtual + host
    + Status: core + +

    This directive sets the directory from which httpd will + serve files. Unless matched by a directive like Alias, the + server appends the path from the requested URL to the document + root to make the path to the document. Example:

    + +
    + DocumentRoot /usr/web +
    + then an access to + http://www.my.host.com/index.html refers to + /usr/web/index.html. + +

    There appears to be a bug in mod_dir which causes problems + when the DocumentRoot has a trailing slash (i.e., + "DocumentRoot /usr/web/") so please avoid that.

    +
    + +

    EBCDICConvert

    + + Syntax: EBCDICConvert + On|Off[=direction] extension + [extension] ...
    + Context: server config, virtual + host, directory, .htaccess
    + Status: core
    + Override: FileInfo
    + Compatibility: The configurable + EBCDIC conversion is only available in Apache 1.3.19 and later, + and on EBCDIC based platforms. + +

    The EBCDICConvert directive maps the given filename + extensions to the specified conversion setting (On + or Off). File extensions may be specified with or + without a leading dot.

    + +

    If the optional format On=direction (or + Off=direction) is used, where + direction is one of In, Out or + InOut, then the directive only applies to the + specified transfer direction (In: uploaded content + in a PUT or POST request, Out: returned content in + a GET or POST request, and InOut: conversion in + both directions).
    + Otherwise, InOut (conversion in both directions) + is implied.

    + +

    Conversion configuration based on file extension is tested + prior to configuration based on MIME type, to allow for generic + MIME based rules to be overridden by a more specific file + extension (several file extensions may exist for the same MIME + type).

    + +

    Example:
    + With a configuration like the following, the normal + *.html files contain HTML text in EBCDIC encoding, + while *.ahtml files contain HTML text in ASCII + encoding:

    +
    +    # *.html and *.ahtml contain HTML text:
    +    AddType  text/html  .html .ahtml
    +
    +    # *.ahtml is not converted (contains ASCII text already):
    +    EBCDICConvert       Off .ahtml
    +
    +    # All other text/html files presumably contain EBCDIC text:
    +    EBCDICConvertByType On  text/html
    +
    +
    +
    + + +

    See also: EBCDICConvertByType and Overview of the EBCDIC Conversion + Functions

    +
    + +

    EBCDICConvertByType

    + + Syntax: EBCDICConvertByType + On|Off[=direction] mimetype + [mimetype] ...
    + Context: server config, virtual + host, directory, .htaccess
    + Status: core
    + Override: FileInfo
    + Compatibility: The configurable + EBCDIC conversion is only available in Apache 1.3.19 and later, + and on EBCDIC based platforms. + +

    The EBCDICConvertByType directive maps the given MIME type + (optionally containing wildcards) to the specified conversion + setting (On or Off).

    + +

    If the optional format On=direction (or + Off=direction) is used, where + direction is one of In, Out or + InOut, then the directive only applies to the + specified transfer direction (In: uploaded content + in a PUT or POST request, Out: returned content in + a GET or POST request, and InOut: conversion in + both directions).
    + Otherwise, InOut (conversion in both directions) + is implied.

    + +

    Example:
    + A useful standard configuration should at least contain the + following defaults:

    +
    +    # All text documents are stored as EBCDIC files:
    +    EBCDICConvertByType On  text/* message/* multipart/*
    +    EBCDICConvertByType On  application/x-www-form-urlencoded \
    +                model/vrml application/postscript
    +    # All other files are assumed to be binary:
    +    EBCDICConvertByType Off */*
    +
    + If you serve ASCII documents only, for example from an NFS + mounted unix server, use: +
    +    # All documents are ASCII already:
    +    EBCDICConvertByType Off */*
    +
    + +

    See also: EBCDICConvert and Overview of the EBCDIC Conversion + Functions

    +
    + +

    EBCDICKludge

    + + Syntax: EBCDICKludge + On|Off
    + Default: EBCDICKludge + Off
    + Context: server config, virtual + host, directory, .htaccess
    + Status: core
    + Override: FileInfo
    + Compatibility: EBCDICKludge is + only available in Apache 1.3.19 and later, and on EBCDIC based + platforms. It is deprecated and will be withdrawn in a future + version.
    + + +

    The EBCDICKludge is provided for the backward compatible + behavior with apache versions 1.3.0 through 1.3.18. In these + versions, all files with MIME types starting with "text/", + "message/" or "multipart/" or with type + "application/x-www-form-urlencoded" would be converted by + default, all other documents were returned unconverted. Only if + a MIME type "text/x-ascii-subtype" + was configured for a certain document, the document was assumed + to be in ASCII format already, and was not converted again. + Instead, the "x-ascii-" was removed from + the type, resulting in the MIME type + "text/subtype" being returned for the + document.

    + +

    If the EBCDICKludge directive is set to On, and + if none of the file extensions configured with the EBCDICConvert directive matches in + the current context, then the server tests for a MIME type of + the format + type/x-ascii-subtype. If the + document has such a type, then the + "x-ascii-" substring is removed and the + conversion set to Off. This allows for overriding + the implicit assumption that all text files are stored in + EBCDIC format, for example when serving documents from an NFS + mounted directory with ASCII documents.
    + By using the EBCDICKludge, there is no way to force one of the + other MIME types (e.g., model/vrml) to be treated as + an EBCDIC text file. Use of the EBCDICConvertByType directive + mentioned above is the preferred way to configure such a + conversion. (Before Apache version 1.3.19, there was no way at + all to force these binary documents to be treated as EBCDIC + text files.)

    + +

    See also: EBCDICConvert, EBCDICConvertByType and Overview of the EBCDIC Conversion + Functions

    +
    + +

    + EnableExceptionHook directive

    + + Syntax: EnableExceptionHook + on|off
    + Default: EnableExceptionHook + off
    + Context: server config
    + Status: core
    + Compatibility: EnableExceptionHook + is available in Apache 1.3.30 and later + +

    EnableExceptionHook controls whether or not an + exception hook implemented by a module will be called after a + child process crash. The exception hook allows modules to log + diagnostic information that may help determine the cause of the + crash.

    +
    + +

    ErrorDocument + directive

    + + Syntax: ErrorDocument + error-code document
    + Context: server config, virtual + host, directory, .htaccess
    + Status: core
    + Override: FileInfo
    + Compatibility: The directory + and .htaccess contexts are only available in Apache 1.1 and + later. + +

    In the event of a problem or error, Apache can be configured + to do one of four things,

    + +
      +
    1. output a simple hardcoded error message
    2. + +
    3. output a customized message
    4. + +
    5. redirect to a local URL-path to handle the + problem/error
    6. + +
    7. redirect to an external URL to handle the + problem/error
    8. +
    + +

    The first option is the default, while options 2-4 are + configured using the ErrorDocument directive, + which is followed by the HTTP response code and a message or + URL.

    + +

    Messages in this context begin with a single + double-quote character ("), which does not form + part of the message itself. Apache will sometimes offer + additional information regarding the problem/error.

    + +

    URLs can begin with a slash (/) for local URLs, or be a full + URL which the client can resolve. Examples:

    + +
    + ErrorDocument 500 + http://foo.example.com/cgi-bin/tester
    + ErrorDocument 404 /cgi-bin/bad_urls.pl
    + ErrorDocument 401 /subscription_info.html
    + ErrorDocument 403 "Sorry can't allow you access today
    +
    + +

    Note that when you specify an ErrorDocument + that points to a remote URL (ie. anything with a method such as + "http" in front of it), Apache will send a redirect to the + client to tell it where to find the document, even if the + document ends up being on the same server. This has several + implications, the most important being that the client will not + receive the original error status code, but instead will + receive a redirect status code. This in turn can confuse web + robots and other clients which try to determine if a URL is + valid using the status code. In addition, if you use a remote + URL in an ErrorDocument 401, the client will not + know to prompt the user for a password since it will not + receive the 401 status code. Therefore, if you use an + "ErrorDocument 401" directive then it must refer to a local + document.

    + +

    Microsoft Internet Explorer (MSIE) will by default ignore + server-generated error messages when they are "too small" and substitute + its own "friendly" error messages. The size threshold varies depending on + the type of error, but in general, if you make your error document + greater than 512 bytes, then MSIE will show the server-generated + error rather than masking it. More information is available in + Microsoft Knowledgebase article Q294807.

    + +

    See Also: documentation of + customizable responses. See the HTTP + specification for a complete list of the status codes and their + meanings.

    +
    + +

    ErrorLog + directive

    + + Syntax: ErrorLog + file-path|syslog[:facility]
    + Default: ErrorLog + logs/error_log (Unix)
    + Default: ErrorLog + logs/error.log (Windows and OS/2)
    + Context: server config, virtual + host
    + Status: core + +

    The error log directive sets the name of the file to which + the server will log any errors it encounters. If the + file-path does not begin with a slash (/) then it is + assumed to be relative to the ServerRoot. If the file-path + begins with a pipe (|) then it is assumed to be a command to + spawn to handle the error log.

    + +

    Examples

    + +

    ErrorLog logs/vhost1.error

    + + or + +

    ErrorLog |/usr/local/bin/errorlog.pl

    + +

    Apache 1.3 and above: Using + syslog instead of a filename enables logging via + syslogd(8) if the system supports it. The default is to use + syslog facility local7, but you can override this + by using the syslog:facility syntax where + facility can be one of the names usually documented in + syslog(1).

    + +

    For example:

    + +

    ErrorLog syslog

    + + or + +

    ErrorLog syslog:user

    + +

    SECURITY: See the security tips + document for details on why your security could be compromised + if the directory where logfiles are stored is writable by + anyone other than the user that starts the server.

    + +

    See also: LogLevel + and Apache Log Files

    +
    + +

    FileETag directive

    + Syntax: FileETag + component ...
    + Context: server config, virtual + host, directory, .htaccess
    + Override: FileInfo
    + Status: core
    + Compatibility: only available + in Apache 1.3.23 versions and later. + +

    + The FileETag directive configures the file attributes that are + used to create the ETag (entity tag) response header field + when the document is based on a file. + (The ETag value is used in cache management to save network + bandwidth.) In Apache 1.3.22 and earlier, the ETag value was + always formed from the file's inode, size, and last-modified + time (mtime). The FileETag directive allows you to choose + which of these -- if any -- should be used. The recognized + keywords are: +

    +
    +
    INode
    +
    The file's i-node number will be included in the calculation
    +
    MTime
    +
    The date and time the file was last modified will be included
    +
    Size
    +
    The number of bytes in the file will be included
    +
    All
    +
    All available fields will be used (equivalent to + 'FileETag INode MTime Size')
    +
    None
    +
    If a document is file-based, no ETag field will be included in the + response
    +
    +

    + The INode, MTime, and Size keywords may be prefixed with either '+' + or '-', which allow changes to be made to the default setting + inherited from a broader scope. Any keyword appearing without + such a prefix immediately and completely cancels the inherited + setting. +

    +

    + If a directory's configuration includes + 'FileETag INode MTime Size', and a + subdirectory's includes 'FileETag -INode', + the setting for that subdirectory (which will be inherited by + any sub-subdirectories that don't override it) will be equivalent to + 'FileETag MTime Size'. +

    +
    + +

    <Files> directive

    + Syntax: <Files + filename> ... </Files>
    + Context: server config, virtual + host, .htaccess
    + Status: core
    + Compatibility: only available + in Apache 1.2 and above. + +

    The <Files> directive provides for access control by + filename. It is comparable to the <Directory> directive and <Location> directives. It should be + matched with a </Files> directive. The directives given + within this section will be applied to any object with a + basename (last component of filename) matching the specified + filename. <Files> sections are processed in + the order they appear in the configuration file, after the + <Directory> sections and .htaccess files are + read, but before <Location> sections. Note that + <Files> can be nested inside <Directory> sections + to restrict the portion of the filesystem they apply to.

    + +

    The filename argument should include a filename, or + a wild-card string, where `?' matches any single character, and + `*' matches any sequences of characters. Extended regular + expressions can also be used, with the addition of the + ~ character. For example:

    +
    +   <Files ~ "\.(gif|jpe?g|png)$">
    +
    + would match most common Internet graphics formats. In Apache + 1.3 and later, <FilesMatch> is + preferred, however. + +

    Note that unlike <Directory> and <Location> sections, + <Files> sections can be used inside + .htaccess files. This allows users to control access to their + own files, at a file-by-file level. + For example, to password protect a single file within a + particular directory, you might add the following to your + .htaccess file:

    + +
    +    <Files admin.cgi>
    +    Require group admin
    +    </Files>
    + +

    Remember that directives apply to subdirectories as well, so this + will also protect files called admin.cgi in + subdirectories, unless specifically overridden.

    + +

    (See Require for details on using the + Require directive)

    + +

    See also: How + Directory, Location and Files sections work for an + explanation of how these different sections are combined when a + request is received

    +
    + +

    <FilesMatch>

    + Syntax: <FilesMatch + regex> ... </FilesMatch>
    + Context: server config, virtual + host, .htaccess
    + Status: core
    + Compatibility: only available + in Apache 1.3 and above. + +

    The <FilesMatch> directive provides for access control + by filename, just as the <Files> + directive does. However, it accepts a regular expression. For + example:

    +
    +   <FilesMatch "\.(gif|jpe?g|png)$">
    +
    + +

    would match most common Internet graphics formats.

    + See also: How + Directory, Location and Files sections work for an + explanation of how these different sections are combined when a + request is received +
    + +

    Group directive

    + + Syntax: Group + unix-group
    + Default: Group + #-1
    + Context: server config, virtual + host
    + Status: core + +

    The Group directive sets the group under which the server + will answer requests. In order to use this directive, the + stand-alone server must be run initially as root. + Unix-group is one of:

    + +
    +
    A group name
    + +
    Refers to the given group by name.
    + +
    # followed by a group number.
    + +
    Refers to a group by its number.
    +
    +

    It is recommended that you set up a new group specifically for + running the server. Some admins use user nobody, + but this is not always possible or desirable.

    + +

    Example:

    + + Group www-group + +

    Note: if you start the server as a non-root user, it will + fail to change to the specified group, and will instead + continue to run as the group of the original user.

    + +

    Special note: Use of this directive in <VirtualHost> + requires a properly configured suEXEC + wrapper. When used inside a <VirtualHost> in this + manner, only the group that CGIs are run as is affected. + Non-CGI requests are still processed as the group specified in + the main Group directive.

    + +

    SECURITY: See User for a discussion of + the security considerations.

    +
    + +

    HostnameLookups directive

    + + Syntax: HostnameLookups + on|off|double
    + Default: HostnameLookups + off
    + Context: server config, virtual + host, directory
    + Status: core
    + Compatibility: + double available only in Apache 1.3 and + above.
    + Compatibility: Default was + on prior to Apache 1.3. + +

    This directive enables DNS lookups so that host names can be + logged (and passed to CGIs/SSIs in REMOTE_HOST). + The value double refers to doing double-reverse + DNS. That is, after a reverse lookup is performed, a forward + lookup is then performed on that result. At least one of the ip + addresses in the forward lookup must match the original + address. (In "tcpwrappers" terminology this is called + PARANOID.)

    + +

    Regardless of the setting, when mod_access is used for controlling + access by hostname, a double reverse lookup will be performed. + This is necessary for security. Note that the result of this + double-reverse isn't generally available unless you set + HostnameLookups double. For example, if only + HostnameLookups on and a request is made to an + object that is protected by hostname restrictions, regardless + of whether the double-reverse fails or not, CGIs will still be + passed the single-reverse result in + REMOTE_HOST.

    + +

    The default for this directive was previously + on in versions of Apache prior to 1.3. It was + changed to off in order to save the network + traffic for those sites that don't truly need the reverse + lookups done. It is also better for the end users because they + don't have to suffer the extra latency that a lookup entails. + Heavily loaded sites should leave this directive + off, since DNS lookups can take considerable + amounts of time. The utility logresolve, provided in + the /support directory, can be used to look up host + names from logged IP addresses offline.

    +
    + +

    IdentityCheck + directive

    + + Syntax: IdentityCheck + on|off
    + Default: IdentityCheck + off
    + Context: server config, virtual + host, directory
    + Status: core + +

    This directive enables RFC1413-compliant logging of the + remote user name for each connection, where the client machine + runs identd or something similar. This information is logged in + the access log.

    + +

    The information should not be trusted in any way except for + rudimentary usage tracking.

    + +

    Note that this can cause serious latency problems accessing + your server since every request requires one of these lookups + to be performed. When firewalls are involved each lookup might + possibly fail and add 30 seconds of latency to each hit. So in + general this is not very useful on public servers accessible + from the Internet.

    +
    + +

    <IfDefine> + directive

    + Syntax: <IfDefine + [!]parameter-name> ... + </IfDefine>
    + Default: None
    + Context: all
    + Status: Core
    + Compatibility: <IfDefine> + is only available in 1.3.1 and later. + +

    The <IfDefine test>...</IfDefine> + section is used to mark directives that are conditional. The + directives within an IfDefine section are only processed if the + test is true. If test is false, everything + between the start and end markers is ignored.

    + +

    The test in the <IfDefine> section directive + can be one of two forms:

    + +
      +
    • parameter-name
    • + +
    • !parameter-name
    • +
    + +

    In the former case, the directives between the start and end + markers are only processed if the parameter named + parameter-name is defined. The second format reverses + the test, and only processes the directives if + parameter-name is not defined.

    + +

    The parameter-name argument is a define as given on + the httpd command line via + -Dparameter-, at the time the server was + started.

    + +

    <IfDefine> sections are nest-able, which can be used + to implement simple multiple-parameter tests. Example:

    +
    +  $ httpd -DReverseProxy ...
    +
    +  # httpd.conf
    +  <IfDefine ReverseProxy>
    +  LoadModule rewrite_module libexec/mod_rewrite.so
    +  LoadModule proxy_module   libexec/libproxy.so
    +  </IfDefine>
    +
    +
    + +

    <IfModule> + directive

    + Syntax: <IfModule + [!]module-name> ... + </IfModule>
    + Default: None
    + Context: all
    + Status: Core
    + Compatibility: IfModule is only + available in 1.2 and later. + +

    The <IfModule test>...</IfModule> + section is used to mark directives that are conditional. The + directives within an IfModule section are only processed if the + test is true. If test is false, everything + between the start and end markers is ignored.

    + +

    The test in the <IfModule> section directive + can be one of two forms:

    + +
      +
    • module name
    • + +
    • !module name
    • +
    + +

    In the former case, the directives between the start and end + markers are only processed if the module named module + name is included in Apache -- either compiled in or + dynamically loaded using LoadModule. The second format + reverses the test, and only processes the directives if module + name is not included.

    + +

    The module name argument is the file name of the + module, at the time it was compiled. + For example, mod_rewrite.c.

    + +

    <IfModule> sections are nest-able, which can be used + to implement simple multiple-module tests.

    +
    + +

    Include directive

    + Syntax: Include + file-path|directory-path|wildcard-path
    + Context: server config
    + Status: Core
    + Compatibility: Include is only + available in Apache 1.3 and later. Wildcards were introduced in + version 1.3.27. + +

    This directive allows inclusion of other configuration files + from within the server configuration files.

    + +

    The file path specified may be a fully qualified path (i.e. + starting with a slash), or may be relative to the + ServerRoot directory.

    + +

    New in Apache 1.3.13 is the feature that if + Include points to a directory, rather than a file, + Apache will read all files in that directory, and any + subdirectory, and parse those as configuration files.

    +

    By using a wildcard this can be further limited to, say, + just the '*.conf' files. +

    +

    Examples:

    +
    + Include /usr/local/apache/conf/ssl.conf
    + Include /usr/local/apache/conf/vhosts/ +
    +
    + +

    Or, providing paths relative to your ServerRoot + directory:

    + +
    + Include conf/ssl.conf
    + Include conf/vhosts/ +
    +
    + +

    Make sure that an included directory does not contain any stray + files, such as editor temporary files, for example, as Apache will + attempt to read them in and use the contents as configuration + directives, which may cause the server to fail on start up. + Running apachectl configtest will give you a list of + the files that are being processed during the configuration + check:

    + +
    +root@host# apachectl configtest
    + Processing config directory: /usr/local/apache/conf/vhosts
    + Processing config file: /usr/local/apache/conf/vhosts/vhost1
    + Processing config file: /usr/local/apache/conf/vhosts/vhost2
    +Syntax OK
    +
    + +

    This will help in verifying that you are getting only the files + that you intended as part of your configuration.

    + +

    See also: apachectl

    + +
    + +

    KeepAlive + directive

    + Syntax: (Apache 1.1) KeepAlive + max-requests
    + Default: (Apache 1.1) KeepAlive + 5
    + Syntax: (Apache 1.2) KeepAlive on|off
    + Default: (Apache 1.2) KeepAlive + On
    + Context: server config
    + Status: Core
    + Compatibility: KeepAlive is + only available in Apache 1.1 and later. + +

    The Keep-Alive extension to HTTP/1.0 and the persistent + connection feature of HTTP/1.1 provide long-lived HTTP sessions + which allow multiple requests to be sent over the same TCP + connection. In some cases this has been shown to result in an + almost 50% speedup in latency times for HTML documents with + many images. To enable Keep-Alive connections in Apache 1.2 and + later, set KeepAlive On.

    + +

    For HTTP/1.0 clients, Keep-Alive connections will only be + used if they are specifically requested by a client. In + addition, a Keep-Alive connection with an HTTP/1.0 client can + only be used when the length of the content is known in + advance. This implies that dynamic content such as CGI output, + SSI pages, and server-generated directory listings will + generally not use Keep-Alive connections to HTTP/1.0 clients. + For HTTP/1.1 clients, persistent connections are the default + unless otherwise specified. If the client requests it, chunked + encoding will be used in order to send content of unknown + length over persistent connections.

    + +

    Apache 1.1 only: Set max-requests + to the maximum number of requests you want Apache to entertain + per connection. A limit is imposed to prevent a client from + hogging your server resources. Set this to 0 to + disable support. In Apache 1.2 and 1.3, this is controlled + through the MaxKeepAliveRequests directive instead.

    + +

    See also MaxKeepAliveRequests.

    +
    + +

    KeepAliveTimeout directive

    + Syntax: KeepAliveTimeout + seconds
    + Default: KeepAliveTimeout + 15
    + Context: server config
    + Status: Core
    + Compatibility: KeepAliveTimeout + is only available in Apache 1.1 and later. + +

    The number of seconds Apache will wait for a subsequent + request before closing the connection. Once a request has been + received, the timeout value specified by the Timeout directive applies.

    + +

    Setting KeepAliveTimeout to a high value may + cause performance problems in heavily loaded servers. The + higher the timeout, the more server processes will be kept + occupied waiting on connections with idle clients.

    +
    + +

    <Limit> directive

    + + Syntax: <Limit + method [method] ... > ... + </Limit>
    + Context: any
    + Status: core + +

    Access controls are normally effective for + all access methods, and this is the usual + desired behavior. In the general case, access control + directives should not be placed within a + <limit> section.

    + +

    The purpose of the <Limit> directive is to restrict + the effect of the access controls to the nominated HTTP + methods. For all other methods, the access restrictions that + are enclosed in the <Limit> bracket will have no + effect. The following example applies the access + control only to the methods POST, PUT, and DELETE, leaving all + other methods unprotected:

    + +
    + <Limit POST PUT DELETE>
    + Require valid-user
    + </Limit>
    +
    +

    The method names listed can be one or more of: GET, POST, PUT, + DELETE, CONNECT, OPTIONS, PATCH, PROPFIND, PROPPATCH, + MKCOL, COPY, MOVE, LOCK, and UNLOCK. The method name is + case-sensitive. If GET is used it will also restrict + HEAD requests. The TRACE method cannot be limited.

    + +

    Warning: A <LimitExcept> section should + always be used in preference to a <Limit> section when restricting access, + since a <LimitExcept> section + provides protection against arbitrary methods.

    + +
    + +

    <LimitExcept> + directive

    + + Syntax: <LimitExcept + method [method] ... > ... + </LimitExcept>
    + Context: any
    + Status: core
    + Compatibility: Available in + Apache 1.3.5 and later + +

    <LimitExcept> and </LimitExcept> are used to + enclose a group of access control directives which will then + apply to any HTTP access method not listed in + the arguments; i.e., it is the opposite of a <Limit> section and can be used to + control both standard and nonstandard/unrecognized methods. See + the documentation for <Limit> for + more details.

    + +

    For example:

    + +
    +    <LimitExcept POST GET>
    +    Require valid-user
    +    </LimitExcept>
    +    
    + +
    + +

    LimitInternalRecursion directive

    + + Syntax: LimitInternalRecursion + number [number]
    + Default: LimitInternalRecursion + 20
    + Context: server config, virtual host
    + Status: core
    + Compatibility: LimitInternalRecursion + is only available in Apache 1.3.28 and later. + +

    An internal redirect happens, for example, when using the Action directive, which internally + redirects the original request to a CGI script. A subrequest is Apache's + mechanism to find out what would happen for some URI if it were requested. + For example, mod_dir uses subrequests to look + for the files listed in the DirectoryIndex + directive.

    + +

    LimitInternalRecursion prevents the server + from crashing when entering an infinite loop of internal redirects or + subrequests. Such loops are usually caused by misconfigurations.

    + +

    The directive stores two different limits, which are evaluated on + per-request basis. The first number is the maximum number of + internal redirects, that may follow each other. The second number + determines, how deep subrequests may be nested. If you specify only one + number, it will be assigned to both limits. A value of + 0 means "unlimited".

    + +

    Example

    +
    +    LimitInternalRecursion 5
    +    
    + +
    + +

    LimitRequestBody directive

    + + Syntax: LimitRequestBody + bytes
    + Default: LimitRequestBody + 0
    + Context: server config, virtual + host, directory, .htaccess
    + Status: core
    + Compatibility: LimitRequestBody + is only available in Apache 1.3.2 and later. + +

    This directive specifies the number of bytes from 0 + (meaning unlimited) to 2147483647 (2GB) that are allowed in a + request body.

    + +

    The LimitRequestBody directive allows the user to set a + limit on the allowed size of an HTTP request message body + within the context in which the directive is given (server, + per-directory, per-file or per-location). If the client request + exceeds that limit, the server will return an error response + instead of servicing the request. The size of a normal request + message body will vary greatly depending on the nature of the + resource and the methods allowed on that resource. CGI scripts + typically use the message body for passing form information to + the server. Implementations of the PUT method will require a + value at least as large as any representation that the server + wishes to accept for that resource.

    + +

    This directive gives the server administrator greater + control over abnormal client request behavior, which may be + useful for avoiding some forms of denial-of-service + attacks.

    + +

    If, for example, you are permitting file upload to a particular + location, and wich to limit the size of the uploaded file to 100K, + you might use the following directive:

    + +
    LimitRequestBody 102400
    + +
    + +

    LimitRequestFields directive

    + + Syntax: LimitRequestFields + number
    + Default: + LimitRequestFields 100
    + Context: server config
    + Status: core
    + Compatibility: + LimitRequestFields is only available in Apache 1.3.2 and later. + + +

    Number is an integer from 0 (meaning unlimited) to + 32767. The default value is defined by the compile-time + constant DEFAULT_LIMIT_REQUEST_FIELDS (100 as + distributed).

    + +

    The LimitRequestFields directive allows the server + administrator to modify the limit on the number of request + header fields allowed in an HTTP request. A server needs this + value to be larger than the number of fields that a normal + client request might include. The number of request header + fields used by a client rarely exceeds 20, but this may vary + among different client implementations, often depending upon + the extent to which a user has configured their browser to + support detailed content negotiation. Optional HTTP extensions + are often expressed using request header fields.

    + +

    This directive gives the server administrator greater + control over abnormal client request behavior, which may be + useful for avoiding some forms of denial-of-service attacks. + The value should be increased if normal clients see an error + response from the server that indicates too many fields were + sent in the request.

    + +

    For example:

    + +
    LimitRequestFields 50
    + +
    + +

    LimitRequestFieldsize + directive

    + + Syntax: LimitRequestFieldsize + bytes
    + Default: + LimitRequestFieldsize 8190
    + Context: server config
    + Status: core
    + Compatibility: + LimitRequestFieldsize is only available in Apache 1.3.2 and + later. + +

    This directive specifies the number of bytes from 0 + to the value of the compile-time constant + DEFAULT_LIMIT_REQUEST_FIELDSIZE (8190 as + distributed) that will be allowed in an HTTP request + header.

    + +

    The LimitRequestFieldsize directive allows the server + administrator to reduce the limit on the allowed size of an + HTTP request header field below the normal input buffer size + compiled with the server. A server needs this value to be large + enough to hold any one header field from a normal client + request. The size of a normal request header field will vary + greatly among different client implementations, often depending + upon the extent to which a user has configured their browser to + support detailed content negotiation.

    + +

    This directive gives the server administrator greater + control over abnormal client request behavior, which may be + useful for avoiding some forms of denial-of-service attacks.

    + +

    For example:

    + +
    LimitRequestFieldSize 16380
    + +

    Under normal conditions, the value should not be changed from + the default.

    +
    + +

    LimitRequestLine directive

    + + Syntax: LimitRequestLine + bytes
    + Default: LimitRequestLine + 8190
    + Context: server config
    + Status: core
    + Compatibility: LimitRequestLine + is only available in Apache 1.3.2 and later. + +

    This directive sets the number of bytes from 0 to + the value of the compile-time constant + DEFAULT_LIMIT_REQUEST_LINE (8190 as distributed) + that will be allowed on the HTTP request-line.

    + +

    The LimitRequestLine directive allows the server + administrator to reduce the limit on the allowed size of a + client's HTTP request-line below the normal input buffer size + compiled with the server. Since the request-line consists of + the HTTP method, URI, and protocol version, the + LimitRequestLine directive places a restriction on the length + of a request-URI allowed for a request on the server. A server + needs this value to be large enough to hold any of its resource + names, including any information that might be passed in the + query part of a GET request.

    + +

    This directive gives the server administrator greater + control over abnormal client request behavior, which may be + useful for avoiding some forms of denial-of-service attacks.

    + +

    For example:

    + +
    LimitRequestLine 16380
    + +

    Under normal conditions, the value should not be changed from + the default.

    +
    + +

    Listen directive

    + Syntax: Listen + [IP-address:]port
    + Context: server config
    + Status: core
    + Compatibility: Listen is only + available in Apache 1.1 and later. + +

    The Listen directive instructs Apache to listen to more than + one IP address or port; by default it responds to requests on + all IP interfaces, but only on the port given by the Port directive.

    + Listen can be used instead of BindAddress and Port. It + tells the server to accept incoming requests on the specified + port or address-and-port combination. If the first format is + used, with a port number only, the server listens to the given + port on all interfaces, instead of the port given by the + Port directive. If an IP address is given as well as a + port, the server will listen on the given port and interface. + +

    Note that you may still require a Port directive so + that URLs that Apache generates that point to your server still + work.

    + +

    Multiple Listen directives may be used to specify a number + of addresses and ports to listen to. The server will respond to + requests from any of the listed addresses and ports.

    + +

    For example, to make the server accept connections on both + port 80 and port 8000, use:

    +
    +   Listen 80
    +   Listen 8000
    +
    + To make the server accept connections on two specified + interfaces and port numbers, use +
    +   Listen 192.170.2.1:80
    +   Listen 192.170.2.5:8000
    +
    + +

    See Also: DNS + Issues
    + See Also: Setting + which addresses and ports Apache uses
    + See Also: Known + Bugs

    +
    + +

    ListenBacklog + directive

    + Syntax: ListenBacklog + backlog
    + Default: ListenBacklog + 511
    + Context: server config
    + Status: Core
    + Compatibility: ListenBacklog is + only available in Apache versions after 1.2.0. + +

    The maximum length of the queue of pending connections. + Generally no tuning is needed or desired, however on some + systems it is desirable to increase this when under a TCP SYN + flood attack. See the backlog parameter to the + listen(2) system call.

    + +

    This will often be limited to a smaller number by the + operating system. This varies from OS to OS. Also note that + many OSes do not use exactly what is specified as the backlog, + but use a number based on (but normally larger than) what is + set.

    +
    + +

    <Location> + directive

    + Syntax: <Location + URL-path|URL> ... </Location>
    + Context: server config, virtual + host
    + Status: core
    + Compatibility: Location is only + available in Apache 1.1 and later. + +

    The <Location> directive provides for access control + by URL. It is similar to the <Directory> directive, and starts a + subsection which is terminated with a </Location> + directive. <Location> sections are processed + in the order they appear in the configuration file, after the + <Directory> sections and .htaccess files are + read, and after the <Files> sections.

    + +

    Note that URLs do not have to line up with the filesystem at + all, it should be emphasized that <Location> operates + completely outside the filesystem.

    + +

    For all origin (non-proxy) requests, the URL to be matched + is of the form /path/, and you should not include + any http://servername prefix. For proxy requests, + the URL to be matched is of the form + scheme://servername/path, and you must include the + prefix.

    + +

    The URL may use wildcards In a wild-card string, `?' matches + any single character, and `*' matches any sequences of + characters.

    + +

    Apache 1.2 and above: Extended regular + expressions can also be used, with the addition of the + ~ character. For example:

    +
    +   <Location ~ "/(extra|special)/data">
    +
    + +

    would match URLs that contained the substring "/extra/data" + or "/special/data". In Apache 1.3 and above, a new directive <LocationMatch> exists which + behaves identical to the regex version of + <Location>.

    + +

    The Location functionality is especially useful + when combined with the SetHandler + directive. For example, to enable status requests, but allow + them only from browsers at foo.com, you might use:

    +
    +    <Location /status>
    +    SetHandler server-status
    +    Order Deny,Allow
    +    Deny from all
    +    Allow from .foo.com
    +    </Location>
    +
    + +

    Apache 1.3 and above note about / (slash): + The slash character has special meaning depending on where in a + URL it appears. People may be used to its behavior in the + filesystem where multiple adjacent slashes are frequently + collapsed to a single slash (i.e., + /home///foo is the same as + /home/foo). In URL-space this is not necessarily + true. The <LocationMatch> directive and the + regex version of <Location> require you to + explicitly specify multiple slashes if that is your intention. + For example, <LocationMatch ^/abc> would + match the request URL /abc but not the request URL + //abc. The (non-regex) + <Location> directive behaves similarly when + used for proxy requests. But when (non-regex) + <Location> is used for non-proxy requests it + will implicitly match multiple slashes with a single slash. For + example, if you specify <Location /abc/def> + and the request is to /abc//def then it will + match.

    + +

    See also: How + Directory, Location and Files sections work for an + explanation of how these different sections are combined when a + request is received

    +
    + +

    <LocationMatch>

    + Syntax: <LocationMatch + regex> ... </LocationMatch>
    + Context: server config, virtual + host
    + Status: core
    + Compatibility: LocationMatch is + only available in Apache 1.3 and later. + +

    The <LocationMatch> directive provides for access + control by URL, in an identical manner to <Location>. However, it takes a + regular expression as an argument instead of a simple string. + For example:

    +
    +   <LocationMatch "/(extra|special)/data">
    +
    + +

    would match URLs that contained the substring "/extra/data" + or "/special/data".

    + See also: How + Directory, Location and Files sections work for an + explanation of how these different sections are combined when a + request is received +
    + +

    LockFile + directive

    + Syntax: LockFile + file-path
    + Default: LockFile + logs/accept.lock
    + Context: server config
    + Status: core + +

    The LockFile directive sets the path to the lockfile used + when Apache is compiled with either USE_FCNTL_SERIALIZED_ACCEPT + or USE_FLOCK_SERIALIZED_ACCEPT. This directive should normally + be left at its default value. The main reason for changing it + is if the logs directory is NFS mounted, since + the lockfile must be stored on a local disk. + The PID of the main server process is automatically appended to + the filename.

    + +

    SECURITY: It is best to avoid putting this + file in a world writable directory such as + /var/tmp because someone could create a denial of + service attack and prevent the server from starting by creating + a lockfile with the same name as the one the server will try to + create.

    +
    + +

    LogLevel + directive

    + Syntax: LogLevel + level
    + Default: LogLevel + warn
    + Context: server config, virtual + host
    + Status: core
    + Compatibility: LogLevel is only + available in 1.3 or later. + +

    LogLevel adjusts the verbosity of the messages recorded in + the error logs (see ErrorLog + directive). The following levels are available, in + order of decreasing significance:

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Level Description Example
    emerg Emergencies - system is unusable."Child cannot open lock file. Exiting"
    alert Action must be taken immediately."getpwuid: couldn't determine user name from uid"
    crit Critical Conditions."socket: Failed to get a socket, exiting child"
    error Error conditions."Premature end of script headers"
    warn Warning conditions."child process 1234 did not exit, sending another + SIGHUP"
    notice Normal but significant condition."httpd: caught SIGBUS, attempting to dump core in + ..."
    info Informational."Server seems busy, (you may need to increase + StartServers, or Min/MaxSpareServers)..."
    debug Debug-level messages"Opening config file ..."
    + +

    When a particular level is specified, messages from all + other levels of higher significance will be reported as well. + E.g., when LogLevel info is specified, + then messages with log levels of notice and + warn will also be posted.

    + +

    Using a level of at least crit is + recommended.

    + +

    For example:

    + +
    LogLevel notice
    + +

    NOTE: When logging to a regular file messages + of the level notice cannot be suppressed and thus are + always logged. However, this doesn't apply when logging is done + using syslog.

    + +
    + +

    MaxClients + directive

    + + Syntax: MaxClients + number
    + Default: MaxClients + 256
    + Context: server config
    + Status: core + +

    The MaxClients directive sets the limit on the number of + simultaneous requests that can be supported; not more than this + number of child server processes will be created. To configure + more than 256 clients, you must edit the HARD_SERVER_LIMIT + entry in httpd.h and recompile.

    + +

    Any connection attempts over the MaxClients limit will + normally be queued, up to a number based on the ListenBacklog directive. Once a child + process is freed at the end of a different request, the + connection will then be serviced.

    +
    + +

    MaxKeepAliveRequests + directive

    + Syntax: MaxKeepAliveRequests + number
    + Default: + MaxKeepAliveRequests 100
    + Context: server config
    + Status: core
    + Compatibility: Only available + in Apache 1.2 and later. + +

    The MaxKeepAliveRequests directive limits the number of + requests allowed per connection when KeepAlive is on. If it is set to + "0", unlimited requests will be allowed. We + recommend that this setting be kept to a high value for maximum + server performance. In Apache 1.1, this is controlled through + an option to the KeepAlive directive.

    + +

    For example

    + +
    MaxKeepAliveRequests 500
    + +
    + +

    MaxRequestsPerChild + directive

    + + Syntax: MaxRequestsPerChild + number
    + Default: + MaxRequestsPerChild 0
    + Context: server config
    + Status: core + +

    The MaxRequestsPerChild directive sets the limit on the + number of requests that an individual child server process will + handle. After MaxRequestsPerChild requests, the child process + will die. If MaxRequestsPerChild is 0, then the process will + never expire.

    + +

    Setting MaxRequestsPerChild to a non-zero limit has two + beneficial effects:

    + +
      +
    • it limits the amount of memory that process can consume + by (accidental) memory leakage;
    • + +
    • by giving processes a finite lifetime, it helps reduce + the number of processes when the server load reduces.
    • +
    + +

    However, on Win32, It is recommended that this be set to 0. + If it is set to a non-zero value, when the request count is + reached, the child process exits, and is respawned, at which + time it re-reads the configuration files. This can lead to + unexpected behavior if you have modified a configuration file, + but are not expecting the changes to be applied yet. See also + ThreadsPerChild.

    + +

    NOTE: For KeepAlive requests, only + the first request is counted towards this limit. In effect, it + changes the behavior to limit the number of + connections per child.

    +
    + +

    MaxSpareServers directive

    + + Syntax: MaxSpareServers + number
    + Default: MaxSpareServers + 10
    + Context: server config
    + Status: core + +

    The MaxSpareServers directive sets the desired maximum + number of idle child server processes. An idle process + is one which is not handling a request. If there are more than + MaxSpareServers idle, then the parent process will kill off the + excess processes.

    + +

    Tuning of this parameter should only be necessary on very + busy sites. Setting this parameter to a large number is almost + always a bad idea.

    + +

    Note that this is the maximum number of spare servers, + not the maximum total number of client requests that can be handled + at one time. If you wish to limit that number, see the MaxClients directive.

    + +

    This directive has no effect when used with the Apache Web + server on a Microsoft Windows platform.

    + +

    See also MinSpareServers, + StartServers, and MaxClients.

    +
    + +

    MinSpareServers directive

    + + Syntax: MinSpareServers + number
    + Default: MinSpareServers + 5
    + Context: server config
    + Status: core + +

    The MinSpareServers directive sets the desired minimum + number of idle child server processes. An idle process + is one which is not handling a request. If there are fewer than + MinSpareServers idle, then the parent process creates new + children at a maximum rate of 1 per second.

    + +

    Tuning of this parameter should only be necessary on very + busy sites. Setting this parameter to a large number is almost + always a bad idea.

    + +

    Note that setting this directive to some value m ensures + that you will always have at least n + m httpd + processes running when you have n active client requests.

    + +

    This directive has no effect on Microsoft Windows.

    + +

    See also MaxSpareServers, + StartServers, and MaxClients.

    +
    + +

    NameVirtualHost directive

    + + Syntax: NameVirtualHost + addr[:port]
    + Context: server config
    + Status: core
    + Compatibility: NameVirtualHost + is only available in Apache 1.3 and later + +

    The NameVirtualHost directive is a required directive if you + want to configure name-based virtual + hosts.

    + +

    Although addr can be hostname it is recommended + that you always use an IP address or wildcard, + e.g.

    + +
    + NameVirtualHost 111.22.33.44 +
    + With the NameVirtualHost directive you specify the IP address + on which the server will receive requests for the name-based + virtual hosts. This will usually be the address to which your + name-based virtual host names resolve. In cases where a + firewall or other proxy receives the requests and forwards them + on a different IP address to the server, you must specify the + IP address of the physical interface on the machine which will + be servicing the requests. If you have multiple name-based + hosts on multiple addresses, repeat the directive for each + address. + +

    Note: the "main server" and any _default_ servers will + never be served for a request to a + NameVirtualHost IP Address (unless for some reason you specify + NameVirtualHost but then don't define any VirtualHosts for that + address).

    + +

    Optionally you can specify a port number on which the + name-based virtual hosts should be used, e.g.

    + +
    + NameVirtualHost 111.22.33.44:8080 +
    + In Apache 1.3.13 and greater you can specify a * + for the addr. This creates a wildcard NameVirtualHost + which will match connections to any address that isn't + configured with a more specific NameVirtualHost directive or <VirtualHost> section. This is + useful if you want only name-based virtual hosts and you don't + want to hard-code the server's IP address into the + configuration file. + +

    See also: Apache + Virtual Host documentation

    +
    + +

    Options directive

    + + Syntax: Options + [+|-]option [[+|-]option] ...
    + Context: server config, virtual + host, directory, .htaccess
    + Override: Options
    + Status: core + +

    The Options directive controls which server features are + available in a particular directory.

    + +

    option can be set to None, in which + case none of the extra features are enabled, or one or more of + the following:

    + +
    +
    All
    + +
    All options except for MultiViews. This is the default + setting.
    + +
    ExecCGI
    + +
    + Execution of CGI scripts is permitted.
    + +
    FollowSymLinks
    + +
    + + The server will follow symbolic links in this + directory.
    + Note: even though the server follows the + symlink it does not change the pathname used to + match against <Directory> sections.
    + Note: this option gets ignored if set + inside a <Location> section.
    + +
    Includes
    + +
    + Server-side includes are permitted.
    + +
    IncludesNOEXEC
    + +
    + + Server-side includes are permitted, but the #exec command and + #exec CGI are disabled. It is still possible to #include + virtual CGI scripts from ScriptAliase'd directories.
    + +
    Indexes
    + +
    + If a URL which maps to a directory is requested, and the + there is no DirectoryIndex (e.g., index.html) in + that directory, then the server will return a formatted + listing of the directory.
    + +
    MultiViews
    + +
    + Content negotiated + MultiViews are allowed.
    + +
    SymLinksIfOwnerMatch
    + +
    + + The server will only follow symbolic links for which the + target file or directory is owned by the same user id as the + link.
    + Note: this option gets ignored if set + inside a <Location> section.
    +
    + Normally, if multiple Options could apply to a + directory, then the most specific one is taken complete; the + options are not merged. However if all the options on + the Options directive are preceded by a + or - + symbol, the options are merged. Any options preceded by a + are + added to the options currently in force, and any options + preceded by a - are removed from the options currently in + force. + +

    For example, without any + and - symbols:

    + +
    + <Directory /web/docs>
    + Options Indexes FollowSymLinks
    + </Directory>
    + <Directory /web/docs/spec>
    + Options Includes
    + </Directory>
    +
    + then only Includes will be set for the + /web/docs/spec directory. However if the second + Options directive uses the + and - symbols: + +
    + <Directory /web/docs>
    + Options Indexes FollowSymLinks
    + </Directory>
    + <Directory /web/docs/spec>
    + Options +Includes -Indexes
    + </Directory>
    +
    + then the options FollowSymLinks and + Includes are set for the /web/docs/spec directory. + + +

    Note: Using -IncludesNOEXEC or + -Includes disables server-side includes completely + regardless of the previous setting.

    + +

    The default in the absence of any other settings is + All.

    +
    + +

    PidFile directive

    + + Syntax: PidFile + file-path
    + Default: PidFile + logs/httpd.pid
    + Context: server config
    + Status: core + +

    The PidFile directive sets the file to which the server + records the process id of the daemon. If the filename does not + begin with a slash (/) then it is assumed to be relative to the + ServerRoot. The PidFile is only used + in standalone mode.

    + +

    It is often useful to be able to send the server a signal, + so that it closes and then reopens its ErrorLog and TransferLog, and re-reads its + configuration files. This is done by sending a SIGHUP (kill -1) + signal to the process id listed in the PidFile.

    + +

    The PidFile is subject to the same warnings about log file + placement and security.

    +
    + +

    Port directive

    + + Syntax: Port + number
    + Default: Port + 80
    + Context: server config
    + Status: core + +

    Number is a number from 0 to 65535; some port + numbers (especially below 1024) are reserved for particular + protocols. See /etc/services for a list of some + defined ports; the standard port for the http protocol is + 80.

    + +

    The Port directive has two behaviors, the first of which is + necessary for NCSA backwards compatibility (and which is + confusing in the context of Apache).

    + +
      +
    • In the absence of any Listen or BindAddress directives specifying a + port number, a Port directive given in the "main server" + (i.e., outside any <VirtualHost> section) sets the + network port on which the server listens. If there are any + Listen or BindAddress directives specifying + :number then Port has no effect on what address + the server listens at.
    • + +
    • The Port directive sets the SERVER_PORT + environment variable (for CGI and + SSI), and is used when the + server must generate a URL that refers to itself (for example + when creating an external redirect to itself). This behavior + is modified by UseCanonicalName.
    • +
    + The primary behavior of Port should be considered to be + similar to that of the ServerName + directive. The ServerName and Port together specify what you + consider to be the canonical address of the server. + (See also UseCanonicalName.) + +

    Port 80 is one of Unix's special ports. All ports numbered + below 1024 are reserved for system use, i.e., regular + (non-root) users cannot make use of them; instead they can only + use higher port numbers. To use port 80, you must start the + server from the root account. After binding to the port and + before accepting requests, Apache will change to a low + privileged user as set by the User + directive.

    + +

    If you cannot use port 80, choose any other unused port. + Non-root users will have to choose a port number higher than + 1023, such as 8000.

    + +

    SECURITY: if you do start the server as root, be sure not to + set User to root. If you run the server as + root whilst handling connections, your site may be open to a + major security attack.

    +
    + +

    ProtocolReqCheck + directive

    + + Syntax: ProtocolReqCheck + on|off
    + Default: ProtocolReqCheck + on
    + Context: server config +
    + Status: core
    + Compatibility: + ProtocolReqCheck is only available in Apache 1.3.27 and later. + +

    This directive enables strict checking of the Protocol field + in the Request line. Versions of Apache prior to 1.3.26 would + silently accept bogus Protocols (such as HTTP-1.1) + and assume HTTP/1.0. Instead, now the Protocol field + must be valid. If the pre-1.3.26 behavior is desired or required, + it can be enabled via setting ProtocolReqCheck off. +

    + +
    + +

    Require directive

    + + Syntax: Require + entity-name [entity-name] ...
    + Context: directory, + .htaccess
    + Override: AuthConfig
    + Status: core + +

    This directive selects which authenticated users can access + a resource. The allowed syntaxes are:

    + +
      +
    • + Require user userid [userid] ... + +

      Only the named users can access the resource.

      +
    • + +
    • + Require group group-name [group-name] ... + + +

      Only users in the named groups can access the + resource.

      +
    • + +
    • + Require valid-user + +

      All valid users can access the resource.

      +
    • +
    • file-owner +

      Only the user, whose name matches the system's name for + the file owner, can access the resource.
      + [Available after Apache 1.3.20]

      +
    • +
    • file-group +

      Only the members of the group, whose name matches the + system's name of the file owner group, can access the + resource.
      [Available after Apache 1.3.20]

      +
    • +
    + +

    Require must be accompanied by AuthName and AuthType directives, and directives such + as AuthUserFile and AuthGroupFile (to define + users and groups) in order to work correctly. Example:

    + +
    + AuthType Basic
    + AuthName "Restricted Directory"
    + AuthUserFile /web/users
    + AuthGroupFile /web/groups
    + Require group admin
    +
    +
    + Access controls which are applied in this way are effective for + all methods. This is what is normally + desired. If you wish to apply access controls only to + specific methods, while leaving other methods unprotected, then + place the Require statement into a <Limit> section + +

    See also Satisfy and mod_access.

    +
    + +

    ResourceConfig + directive

    + + Syntax: ResourceConfig + file-path|directory-path|wildcard-path
    + Default: ResourceConfig + conf/srm.conf
    + Context: server config, virtual + host
    + Status: core
    + Compatibility: The ability to + specify a directory, rather than a file name, is only available in + Apache 1.3.13 and later. + +

    The server will read this file for more directives after + reading the httpd.conf file. File-path is relative to + the ServerRoot. This feature can be + disabled using:

    + +
    + ResourceConfig /dev/null +
    + Or, on Win32 servers, + +
    + ResourceConfig nul +
    +

    Historically, this file contained most directives except for + server configuration directives and <Directory> sections; in fact it + can now contain any server directive allowed in the server + config context. However, since Apache version 1.3.4, the + default srm.conf file which ships with Apache contains + only comments, and all directives are placed in the main server + configuration file, httpd.conf.

    + +

    If ResourceConfig points to a directory, rather than + a file, Apache will read all files in that directory, and any + subdirectory, and parse those as configuration files. +

    +

    Alternatively you can use a wildcard to limit the scope; i.e + to only *.conf files. +

    +

    Note that by default any file in the specified + directory will be loaded as a configuration file. +

    +

    So make sure that you don't have stray files in + this directory by mistake, such as temporary files created by your + editor, for example.

    + +

    See also AccessConfig.

    +
    + +

    RLimitCPU directive

    + + Syntax: RLimitCPU + number|max [number|max]
    + Default: Unset; uses + operating system defaults
    + Context: server config, virtual + host
    + Status: core
    + Compatibility: RLimitCPU is + only available in Apache 1.2 and later + +

    Takes 1 or 2 parameters. The first parameter sets the soft + resource limit for all processes and the second parameter sets + the maximum resource limit. Either parameter can be a number, + or max to indicate to the server that the limit + should be set to the maximum allowed by the operating system + configuration. Raising the maximum resource limit requires that + the server is running as root, or in the initial startup + phase.

    + +

    This applies to processes forked off from Apache children + servicing requests, not the Apache children themselves. This + includes CGI scripts and SSI exec commands, but not any + processes forked off from the Apache parent such as piped + logs.

    + +

    CPU resource limits are expressed in seconds per + process.

    + +

    See also RLimitMEM or RLimitNPROC.

    +
    + +

    RLimitMEM + directive

    + + Syntax: RLimitMEM + number|max [number|max]
    + Default: Unset; uses + operating system defaults
    + Context: server config, virtual + host
    + Status: core
    + Compatibility: RLimitMEM is + only available in Apache 1.2 and later + +

    Takes 1 or 2 parameters. The first parameter sets the soft + resource limit for all processes and the second parameter sets + the maximum resource limit. Either parameter can be a number, + or max to indicate to the server that the limit + should be set to the maximum allowed by the operating system + configuration. Raising the maximum resource limit requires that + the server is running as root, or in the initial startup + phase.

    + +

    This applies to processes forked off from Apache children + servicing requests, not the Apache children themselves. This + includes CGI scripts and SSI exec commands, but not any + processes forked off from the Apache parent such as piped + logs.

    + +

    Memory resource limits are expressed in bytes per + process.

    + +

    See also RLimitCPU or RLimitNPROC.

    +
    + +

    RLimitNPROC + directive

    + + Syntax: RLimitNPROC + number|max [number|max]
    + Default: Unset; uses + operating system defaults
    + Context: server config, virtual + host
    + Status: core
    + Compatibility: RLimitNPROC is + only available in Apache 1.2 and later + +

    Takes 1 or 2 parameters. The first parameter sets the soft + resource limit for all processes and the second parameter sets + the maximum resource limit. Either parameter can be a number, + or max to indicate to the server that the limit + should be set to the maximum allowed by the operating system + configuration. Raising the maximum resource limit requires that + the server is running as root, or in the initial startup + phase.

    + +

    This applies to processes forked off from Apache children + servicing requests, not the Apache children themselves. This + includes CGI scripts and SSI exec commands, but not any + processes forked off from the Apache parent such as piped + logs.

    + +

    Process limits control the number of processes per user.

    + +

    Note: If CGI processes are not running + under userids other than the web server userid, this directive + will limit the number of processes that the server itself can + create. Evidence of this situation will be indicated by + cannot fork messages in the + error_log.

    + +

    See also RLimitMEM or RLimitCPU.

    +
    + +

    Satisfy directive

    + + Syntax: Satisfy any|all
    + Default: Satisfy all
    + Context: directory, + .htaccess
    + Status: core
    + Compatibility: Satisfy is only + available in Apache 1.2 and later + +

    Access policy if both Allow and + Require used. The parameter can be either + 'all' or 'any'. This directive is only useful + if access to a particular area is being restricted by both + username/password and client host address. In this + case the default behavior ("all") is to require that the client + passes the address access restriction and enters a + valid username and password. With the "any" option the client + will be granted access if they either pass the host restriction + or enter a valid username and password. This can be used to + password restrict an area, but to let clients from particular + addresses in without prompting for a password.

    + +

    See also Require and Allow.

    +
    + +

    ScoreBoardFile + directive

    + + Syntax: ScoreBoardFile + file-path
    + Default: ScoreBoardFile + logs/apache_status
    + Context: server config
    + Status: core + +

    The ScoreBoardFile directive is required on some + architectures to place a file that the server will use to + communicate between its children and the parent. The easiest + way to find out if your architecture requires a scoreboard file + is to run Apache and see if it creates the file named by the + directive. If your architecture requires it then you must + ensure that this file is not used at the same time by more than + one invocation of Apache.

    + +

    If you have to use a ScoreBoardFile then you may see + improved speed by placing it on a RAM disk. But be careful that + you heed the same warnings about log file placement and security.

    + +

    Apache 1.2 and above:

    + +

    Linux 1.x users might be able to add -DHAVE_SHMGET + -DUSE_SHMGET_SCOREBOARD to the EXTRA_CFLAGS + in your Configuration. This might work with some + 1.x installations, but won't work with all of them. (Prior to + 1.3b4, HAVE_SHMGET would have sufficed.)

    + +

    SVR4 users should consider adding -DHAVE_SHMGET + -DUSE_SHMGET_SCOREBOARD to the EXTRA_CFLAGS + in your Configuration. This is believed to work, + but we were unable to test it in time for 1.2 release. (Prior + to 1.3b4, HAVE_SHMGET would have sufficed.)

    + +

    See Also: Stopping and Restarting Apache

    +
    + +

    ScriptInterpreterSource + directive

    + + Syntax: ScriptInterpreterSource + registry|script
    + Default: + ScriptInterpreterSource script
    + Context: directory, + .htaccess
    + Status: core (Windows only) + +

    This directive is used to control how Apache 1.3.5 and later + finds the interpreter used to run CGI scripts. The default + technique is to use the interpreter pointed to by the #! line + in the script. Setting ScriptInterpreterSource registry will + cause the Windows Registry to be searched using the script file + extension (e.g., .pl) as a search key.

    +
    + +

    SendBufferSize + directive

    + + Syntax: SendBufferSize + bytes
    + Context: server config
    + Status: core + +

    The server will set the TCP buffer size to the number of + bytes specified. Very useful to increase past standard OS + defaults on high speed high latency (i.e., 100ms or + so, such as transcontinental fast pipes)

    +
    + +

    ServerAdmin + directive

    + + Syntax: ServerAdmin + email-address
    + Context: server config, virtual + host
    + Status: core + +

    The ServerAdmin sets the e-mail address that the server + includes in any error messages it returns to the client.

    + +

    It may be worth setting up a dedicated address for this, + e.g.

    + +
    + ServerAdmin www-admin@foo.bar.com +
    + as users do not always mention that they are talking about the + server! +
    + +

    ServerAlias + directive

    + Syntax: ServerAlias + hostname [hostname] ...
    + Context: virtual host
    + Status: core
    + Compatibility: ServerAlias is + only available in Apache 1.1 and later. + +

    The ServerAlias directive sets the alternate names for a + host, for use with name-based virtual + hosts.

    + +

    Example:

    + +
    +    <VirtualHost *>
    +    ServerName server.domain.com
    +    ServerAlias server server2.domain.com server2
    +    ...
    +    </VirtualHost>
    +    
    + +

    See also: Apache + Virtual Host documentation

    +
    + +

    ServerName + directive

    + + Syntax: ServerName + fully-qualified-domain-name
    + Context: server config, virtual + host
    + Status: core + +

    The ServerName directive sets the hostname of the server; + this is used when creating redirection URLs. If it is not + specified, then the server attempts to deduce it from its own + IP address; however this may not work reliably, or may not + return the preferred hostname. For example:

    + +
    + ServerName www.example.com +
    + would be used if the canonical (main) name of the actual + machine were simple.example.com. + +

    If you are using name-based virtual hosts, + the ServerName inside a <VirtualHost> + section specifies what hostname must appear in the request's + Host: header to match this virtual host.

    + +

    See Also:
    + DNS Issues
    + Apache virtual host + documentation
    + UseCanonicalName
    + NameVirtualHost
    + ServerAlias
    +

    +
    + +

    ServerPath + directive

    + Syntax: ServerPath + directory-path
    + Context: virtual host
    + Status: core
    + Compatibility: ServerPath is + only available in Apache 1.1 and later. + +

    The ServerPath directive sets the legacy URL pathname for a + host, for use with name-based virtual + hosts.

    + +

    See also: Apache + Virtual Host documentation

    +
    + +

    ServerRoot + directive

    + + Syntax: ServerRoot + directory-path
    + Default: ServerRoot + /usr/local/apache
    + Context: server config
    + Status: core + +

    The ServerRoot directive sets the directory in which the + server lives. Typically it will contain the subdirectories + conf/ and logs/. Relative paths for + other configuration files are taken as relative to this + directory.

    + +

    See also the -d + option to httpd.

    + +

    See also the + security tips for information on how to properly set + permissions on the ServerRoot.

    +
    + +

    ServerSignature directive

    + + Syntax: ServerSignature + On|Off|EMail
    + Default: ServerSignature + Off
    + Context: server config, virtual + host, directory, .htaccess
    + Status: core
    + Compatibility: ServerSignature + is only available in Apache 1.3 and later. + +

    The ServerSignature directive allows the configuration of a + trailing footer line under server-generated documents (error + messages, mod_proxy ftp directory listings, mod_info output, + ...). The reason why you would want to enable such a footer + line is that in a chain of proxies, the user often has no + possibility to tell which of the chained servers actually + produced a returned error message.
    + The Off setting, which is the default, suppresses + the error line (and is therefore compatible with the behavior + of Apache-1.2 and below). The On setting simply + adds a line with the server version number and ServerName of the serving virtual host, + and the EMail setting additionally creates a + "mailto:" reference to the ServerAdmin of the referenced + document.

    +
    + +

    ServerTokens + directive

    + + Syntax: ServerTokens + Minimal|ProductOnly|OS|Full
    + Default: ServerTokens + Full
    + Context: server config
    + Status: core
    + Compatibility: ServerTokens is + only available in Apache 1.3 and later; the + ProductOnly keyword is only available in versions + later than 1.3.12 + +

    This directive controls whether Server response + header field which is sent back to clients includes a + description of the generic OS-type of the server as well as + information about compiled-in modules.

    + +
    +
    ServerTokens Prod[uctOnly]
    + +
    Server sends (e.g.): Server: + Apache
    + +
    ServerTokens Min[imal]
    + +
    Server sends (e.g.): Server: + Apache/1.3.0
    + +
    ServerTokens OS
    + +
    Server sends (e.g.): Server: Apache/1.3.0 + (Unix)
    + +
    ServerTokens Full (or not specified)
    + +
    Server sends (e.g.): Server: Apache/1.3.0 + (Unix) PHP/3.0 MyMod/1.2
    +
    + +

    This setting applies to the entire server, and cannot be + enabled or disabled on a virtualhost-by-virtualhost basis.

    +
    + +

    ServerType + directive

    + + Syntax: ServerType + type
    + Default: ServerType + standalone
    + Context: server config
    + Status: core + +

    The ServerType directive sets how the server is executed by + the system. Type is one of

    + +
    +
    inetd
    + +
    The server will be run from the system process inetd; the + command to start the server is added to + /etc/inetd.conf
    + +
    standalone
    + +
    The server will run as a daemon process; the command to + start the server is added to the system startup scripts. + (/etc/rc.local or + /etc/rc3.d/....)
    +
    + Inetd is the lesser used of the two options. For each http + connection received, a new copy of the server is started from + scratch; after the connection is complete, this program exits. + There is a high price to pay per connection, but for security + reasons, some admins prefer this option. Inetd mode is no longer recommended and does not + always work properly. Avoid it if at all possible. + +

    Standalone is the most common setting for ServerType since + it is far more efficient. The server is started once, and + services all subsequent connections. If you intend running + Apache to serve a busy site, standalone will probably be your + only option.

    +
    + +

    ShmemUIDisUser + directive

    + + Syntax: ShmemUIDisUser + on|off
    + Default: ShmemUIDisUser + off
    + Context: server config
    + Status: core
    + Compatibility: + ShmemUIDisUser directive is only available in Apache 1.3.27 and later. + +

    The ShmemUIDisUser directive controls whether Apache will change + the uid and gid ownership of System V shared memory + based scoreboards to the server settings of User and + Group. Releases of Apache up to 1.3.26 would do + this by default. Since the child processes are already attached to the + shared memory segment, this is not required for normal usage of Apache and + so to prevent possible abuse, Apache will no longer do that. The old + behavior may be required for special cases, however, which can be implemented + by setting this directive to on.

    + +

    This directive has no effect on non-System V based scoreboards, such as + mmap. +

    + +
    + +

    StartServers + directive

    + + Syntax: StartServers + number
    + Default: StartServers + 5
    + Context: server config
    + Status: core + +

    The StartServers directive sets the number of child server + processes created on startup. As the number of processes is + dynamically controlled depending on the load, there is usually + little reason to adjust this parameter.

    + +

    When running under Microsoft Windows, this directive has no + effect. There is always one child which handles all requests. + Within the child requests are handled by separate threads. The + ThreadsPerChild directive + controls the maximum number of child threads handling requests, + which will have a similar effect to the setting of + StartServers on Unix.

    + +

    See also MinSpareServers and + MaxSpareServers.

    +
    + +

    ThreadsPerChild

    + Syntax: ThreadsPerChild + number
    + Default: ThreadsPerChild + 50
    + Context: server config
    + Status: core (Windows, + NetWare)
    + Compatibility: Available only with Apache 1.3 + and later with Windows + +

    This directive tells the server how many threads it should + use. This is the maximum number of connections the server can + handle at once; be sure and set this number high enough for + your site if you get a lot of hits.

    + +

    This directive has no effect on Unix systems. Unix users + should look at StartServers and MaxRequestsPerChild.

    +
    + +

    ThreadStackSize

    + Syntax: ThreadStackSize + number
    + Default: ThreadStackSize + 65536
    + Context: server config
    + Status: core (NetWare)
    + Compatibility: Available only with Apache 1.3 + and later with NetWare + +

    This directive tells the server what stack size to use for + each of the running threads. If you ever get a stack overflow + you will need to bump this number to a higher setting.

    + +

    This directive has no effect on other systems.

    +
    + +

    TimeOut directive

    + + Syntax: TimeOut + number
    + Default: TimeOut + 300
    + Context: server config
    + Status: core + +

    The TimeOut directive currently defines the amount of time + Apache will wait for three things:

    + +
      +
    1. The total amount of time it takes to receive a GET + request.
    2. + +
    3. The amount of time between receipt of TCP packets on a + POST or PUT request.
    4. + +
    5. The amount of time between ACKs on transmissions of TCP + packets in responses.
    6. +
    + We plan on making these separately configurable at some point + down the road. The timer used to default to 1200 before 1.2, + but has been lowered to 300 which is still far more than + necessary in most situations. It is not set any lower by + default because there may still be odd places in the code where + the timer is not reset when a packet is sent. +
    + +

    UseCanonicalName directive

    + + Syntax: UseCanonicalName + on|off|dns
    + Default: UseCanonicalName + on
    + Context: server config, virtual + host, directory
    + Override: Options
    + Compatibility: UseCanonicalName + is only available in Apache 1.3 and later + +

    In many situations Apache has to construct a + self-referential URL. That is, a URL which refers back + to the same server. With UseCanonicalName on (and + in all versions prior to 1.3) Apache will use the ServerName and Port + directives to construct the canonical name for the server. This + name is used in all self-referential URLs, and for the values + of SERVER_NAME and SERVER_PORT in + CGIs.

    + +

    For example, if ServerName is set to + www.example.com and Port is set to + 9090, then the canonical name of the server is + www.example.com:9090. In the event that + Port has its default value of 80, the + :80 is omitted from the canonical name.

    + +

    With UseCanonicalName off Apache will form + self-referential URLs using the hostname and port supplied by + the client if any are supplied (otherwise it will use the + canonical name, as defined above). These values are the same + that are used to implement name based virtual hosts, + and are available with the same clients. The CGI variables + SERVER_NAME and SERVER_PORT will be + constructed from the client supplied values as well.

    + +

    An example where this may be useful is on an intranet server + where you have users connecting to the machine using short + names such as www. You'll notice that if the users + type a shortname, and a URL which is a directory, such as + http://www/splat, without the trailing + slash then Apache will redirect them to + http://www.domain.com/splat/. If you have + authentication enabled, this will cause the user to have to + authenticate twice (once for www and once again + for www.domain.com -- see the FAQ on this subject for + more information). But if UseCanonicalName + is set off, then Apache will redirect to + http://www/splat/.

    + +

    There is a third option, UseCanonicalName DNS, + which is intended for use with mass IP-based virtual hosting to + support ancient clients that do not provide a + Host: header. With this option Apache does a + reverse DNS lookup on the server IP address that the client + connected to in order to work out self-referential URLs.

    + +

    Warning: if CGIs make assumptions about the + values of SERVER_NAME they may be broken by this + option. The client is essentially free to give whatever value + they want as a hostname. But if the CGI is only using + SERVER_NAME to construct self-referential URLs + then it should be just fine.

    + +

    See also: ServerName, Port

    +
    + +

    User directive

    + + Syntax: User + unix-userid
    + Default: User + #-1
    + Context: server config, virtual + host
    + Status: core + +

    The User directive sets the userid as which the server will + answer requests. In order to use this directive, the standalone + server must be run initially as root. Unix-userid is + one of:

    + +
    +
    A username
    + +
    Refers to the given user by name.
    + +
    # followed by a user number.
    + +
    Refers to a user by their number.
    +
    + The user should have no privileges which result in it being + able to access files which are not intended to be visible to + the outside world, and similarly, the user should not be able + to execute code which is not meant for httpd requests. It is + recommended that you set up a new user and group specifically + for running the server. Some admins use user + nobody, but this is not always possible or + desirable. For example mod_proxy's cache, when enabled, must be + accessible to this user (see the CacheRoot + directive). + +

    Notes: If you start the server as a non-root user, it will + fail to change to the lesser privileged user, and will instead + continue to run as that original user. If you do start the + server as root, then it is normal for the parent process to + remain running as root.

    + +

    Special note: Use of this directive in <VirtualHost> + requires a properly configured suEXEC + wrapper. When used inside a <VirtualHost> in this + manner, only the user that CGIs are run as is affected. Non-CGI + requests are still processed with the user specified in the + main User directive.

    + +

    SECURITY: Don't set User (or Group) to + root unless you know exactly what you are doing, + and what the dangers are.

    +
    + +

    <VirtualHost> + directive

    + + Syntax: <VirtualHost + addr[:port] [addr[:port]] + ...> ... </VirtualHost>
    + Context: server config
    + Status: Core.
    + Compatibility: Non-IP + address-based Virtual Hosting only available in Apache 1.1 and + later.
    + Compatibility: Multiple address + support only available in Apache 1.2 and later. + +

    <VirtualHost> and </VirtualHost> are used to + enclose a group of directives which will apply only to a + particular virtual host. Any directive which is allowed in a + virtual host context may be used. When the server receives a + request for a document on a particular virtual host, it uses + the configuration directives enclosed in the + <VirtualHost> section. Addr can be

    + +
      +
    • The IP address of the virtual host
    • + +
    • A fully qualified domain name for the IP address of the + virtual host.
    • +
    + Example: + +
    + <VirtualHost 10.1.2.3>
    + ServerAdmin webmaster@host.foo.com
    + DocumentRoot /www/docs/host.foo.com
    + ServerName host.foo.com
    + ErrorLog logs/host.foo.com-error_log
    + TransferLog logs/host.foo.com-access_log
    + </VirtualHost>
    +
    + Each VirtualHost must correspond to a different IP address, + different port number or a different host name for the server, + in the former case the server machine must be configured to + accept IP packets for multiple addresses. (If the machine does + not have multiple network interfaces, then this can be + accomplished with the ifconfig alias command (if + your OS supports it), or with kernel patches like VIF (for SunOS(TM) 4.1.x)). + +

    You can specify more than one IP address. This is useful if + a machine responds to the same name on two different + interfaces. For example, if you have a VirtualHost that is + available to hosts on an internal (intranet) as well as + external (internet) network. Example:

    + +
    + <VirtualHost 192.168.1.2 204.255.176.199>
    + DocumentRoot /www/docs/host.foo.com
    + ServerName host.foo.com
    + ServerAlias host
    + </VirtualHost>
    +
    + The special name _default_ can be specified in + which case this virtual host will match any IP address that is + not explicitly listed in another virtual host. In the absence + of any _default_ virtual host the "main" server config, + consisting of all those definitions outside any VirtualHost + section, is used when no match occurs. + +

    You can specify a :port to change the port that + is matched. If unspecified then it defaults to the same port as + the most recent Port statement + of the main server. You may also specify :* to + match all ports on that address. (This is recommended when used + with _default_.)

    + +

    SECURITY: See the security tips document + for details on why your security could be compromised if the + directory where logfiles are stored is writable by anyone other + than the user that starts the server.

    + +

    NOTE: The use of <VirtualHost> does + not affect what addresses Apache listens on. + You may need to ensure that Apache is listening on the correct + addresses using either BindAddress + or Listen.

    + +

    See also: Apache + Virtual Host documentation
    + See also: Warnings about DNS and + Apache
    + See also: Setting + which addresses and ports Apache uses
    + See also: How + Directory, Location and Files sections work for an + explanation of how these different sections are combined when a + request is received

    + + + + diff --git a/htdocs/manual/mod/core.html.fr b/htdocs/manual/mod/core.html.fr new file mode 100644 index 00000000000..a36426231a3 --- /dev/null +++ b/htdocs/manual/mod/core.html.fr @@ -0,0 +1,4105 @@ + + + + + + + + + Noyau d'Apache + + + + + + +

    Noyau d'Apache

    + +

    Ces paramètres de configuration contrôlent les + fonctionnalités premières d'Apache, et sont + toujours disponibles.

    + +

    Directives

    + + + +

    Directive + AcceptFilter

    + + Syntaxe + : AcceptFilter on|off
    + Défaut : + AccceptFilter on
    + Contexte : server config
    + Statut + : core + +

    AcceptFilter contrôle une optimisation + spécifique à BSD. Elle est compilée par + défaut et activée par défaut si votre + système l'implémente (option SO_ACCCEPTFILTER de + setsocketopt()). A l'heure actuelle, seul FreeBSD + l'implémente.

    + +

    Se référer à la section concernant les + filtres dans la documentation + sur la performance pour de plus amples informations.

    + +

    L'option de compilation AP_ACCEPTFILTER_OFF + peut être utilisée pour changer le défaut + à 'off'. httpd -V et httpd -L + affichent dorénavant les valeurs par défauts au + moment de la compilation, et si oui ou non SO_ACCEPTFILTER a + été défini pour cette compilation.

    +
    + + +

    Directive + AccessConfig

    + + Syntaxe + : AccessConfig + nomfichier|nomrépertoire
    + Défaut : + AccessConfig conf/access.conf
    + Context: configuration serveur, + hôtes virtuels
    + Statut + : noyau + +

    Le serveur lit dans ce fichier des directives + supplémentaires après avoir ouvert le fichier ResourceConfig. nomfichier + est exprimé relativement à ServerRoot. Cette fonctionnalité + peut être désactivée en écrivant + :

    + +
    + AccessConfig /dev/null +
    + ou sur les serverus Win32 + +
    + AccessConfig nul +
    + +

    Historiquement, ce fichier ne contenait que des sections <Directory>; en fait, il pourra + maintenant contenir toute directive "serveur" autorisée + dans le contexte de la configuration serveur.

    + +

    Une nouveauté de la version d'Apache 1.3.13 est la + possibilité qu'AccessConfig + représente un répertoire plutot qu'un fichier. + Apache lira tous les fichiers de ce répertoire ainsi que + tous les sous-répertoires et analysera tous ces fichiers + de configuration.

    + +

    Voir également ResourceConfig.

    +
    + +

    Directive + AccessFileName

    + + Syntaxe + : AccessFileName nomfichier + [nomfichier] ...
    + Défaut : + AccessFileName .htaccess
    + Context: configuration serveur, + hôte virtuel
    + Statut + : noyau
    + Compatibilité : + AccessFileName ne peut accepter plusieurs noms de fichiers + qu'à partir de la version 1.3 d'Apache + +

    Lorsqu'il retourne un document au client, le serveur cherche + le premier fichier de contrôle d'accès existant + dans cette liste dans chacun des répertoires inscrit + dans le chemin d'accès menant au document, pour + déterminer si l'accès est autorisé dan + chacun de ces répertoires. Par exemple:

    + +
    + AccessFileName .acl +
    + +

    Avant de servir le document + /usr/local/web/index.html, le serveur lira les + fichiers /.acl, /usr/.acl, + /usr/local/.acl et + /usr/local/web/.acl à la recherche de + directives, sauf si celles-ci ont été + désactivées par l'écriture

    + +
    + <Directory /> AllowOverride None + </Directory> +
    + +

    Voir également : AllowOverride

    +
    + +

    Directive AddDefaultCharset

    + Syntaxe + : AddDefaultCharset On|Off|charset
    + Contexte : tous
    + Statut + : noyau
    + Défaut : + AddDefaultCharset Off
    + Compatibilité : + AddDefaultCharset n'est disponible qu'à partir de la + version 1.3.12 + +

    Cette directive spécifie le nom de la table de + caractères qui sera ajouté à toutes les + réponses qui n'ont aucun paramètre sur le type de + contenu dans l'en-tête HTTP. Elle remplace la table de + caractère spécifié dans le corps du + document par l'utilisation du marqueur META. La + mise de AddDefaultCharset Off désactive + cette fonctionnalité. AddDefaultCharset On + active la table de caractère iso-8859-1 par + défaut d'Apache. Vous pouvez également + définir une autre table de caractères à + employer. Par exemple AddDefaultCharset utf-8.

    +
    + +

    Directive + AddModule

    + + Syntaxe + : AddModule module [module] + ...
    + Contexte : configuration + serveur
    + Statut + : noyau
    + Compatibilité : + AddModule n'est disponible qu'à partir de la + version 1.2 d'Apache + +

    Le serveur peut intégrer des modules compilés + qui ne sont pas mis en service. Cette directive peut être + utilisée pour activer ou désactiver ces modules. + Le serveur est installé avec une liste + pré-configurée de modules actifs cette liste peut + être effacée par la directive ClearModuleList.

    +
    + +

    Directive + AllowOverride

    + + Syntaxe + : AllowOverride All|None|type de + directive [type de directive] ...
    + Défaut : + AllowOverride All All
    + Contexte : + répertoire
    + Statut + : noyau + +

    Lorsque le serveur trouve un fichier .htaccess (comme + spécifié par AccessFileName) il doit savoir + quelles directives declarées dans ce fichier peuvent + outrepasser les droits fixés par des directives + précédentes.

    + +

    Si la directive est définie à + None, les fichier .htaccess sont ignorés. + Dans ce cas, le serveur n'essaie même pas de lire les + fichiers .htaccess.

    + +

    Si la directive est définie à All + toutes les directives possibles dans le contexte .htacces sont + autorisées dans les fichiers .htaccess.

    + +

    Les types de directives peuvent être parmi + ces groupes de directives :

    + +
    +
    AuthConfig
    + +
    + + Autorise l'usage de la directive Authorization (AuthDBMGroupFile, + AuthDBMUserFile, + AuthGroupFile, AuthName, AuthType, AuthUserFile, Require, etc.).
    + +
    FileInfo
    + +
    + Autorise l'usage de directives contrôlant + l'accès aux types de documents (AddEncoding, AddLanguage, AddType, DefaultType, ErrorDocument, LanguagePriority, + etc.).
    + +
    Indexes
    + +
    + Autorise l'usage de directives contrôlant l'indexation + des répertoires (AddDescription, + AddIcon, AddIconByEncoding, + AddIconByType, + DefaultIcon, DirectoryIndex, FancyIndexing, HeaderName, IndexIgnore, IndexOptions, ReadmeName, + etc.).
    + +
    Limit
    + +
    + Autorise l'usage de directives contrôlant les + accès de certains hôtes (allow, deny et + order).
    + +
    Options
    + +
    + Autorise l'usage de directives contrôlant certaines + fonctionnalités spécifiques des + répertoires (Options et XBitHack).
    +
    + +

    Voir également : AccessFileName

    +
    + +

    Directive + AuthName

    + + Syntaxe + : AuthName domaine-autorisé
    + Contexte : répertoire, + .htaccess
    + Surcharge : AuthConfig
    + Statut + : noyau + +

    Cette directive indique le nom du schéma + d'autorisation pour un répertoire. Ce schéma sera + donné au client de sorte que l'utilisateur sache quel + nom et quel mot de passe envoyer. AuthName prend + un seul argument. Si le schéma d'autorisation contient + des espaces, il doit être entouré de guillemets. + Pour fonctionner correctement, elle devra être + accompagnée des directives AuthType et require, et de directives telles que AuthUserFile et AuthGroupFile.

    +
    + +

    Directive + AuthType

    + + Syntaxe + : AuthType type
    + Contexte : répertoire, + .htaccess
    + Surcharge : AuthConfig
    + Statut + : noyau + +

    Cette directive selectionne le type d'authentification pour + un répertoire. Seul les types Basic et + Digest sont actuellement + implémentés. + + Pour fonctionner correctement, elle devra être + accompagnée des directives AuthName et require, et de directives telles que AuthUserFile et AuthGroupFile.

    +
    + +

    Directive + BindAddress

    + + Syntaxe + : BindAddress *|addresse IP|nom de + domaine
    + Défaut : + BindAddress *
    + Contexte : configuration + serveur
    + Statut + : noyau + +

    Un serveur http sous Unix® peut soit écouter + toutes les adresses IP de la machine sur lequel il est + exécuté, ou uniquement une de ces adresses. Si + l'argument de cette directive est *, le serveur traitera les + connections sur toutes les adresses IP. Sinon, le serveur peut + écouter à partir d'une adresse IP + spécifique ou d'un nom de domaine Internet.

    + +

    Une et une seule directive BindAddress peut + être utilisée. Pour contrôler plus finement + quels ports et adresses Apache écoute, utilisez la + directive Listen au lieu de + BindAddress.

    + +

    BindAddress peut être utilisée comme + alternative à l'implantation d'hôtes virtuels utilisant des + serveurs multiples indépendants, soit au lieu d'utiliser + les sections <VirtualHost>.

    + +

    Voir aussi: Apache et DNS
    + Voir aussi: Configurer + les ports et adresses utilisés par Apache

    +
    + +

    BS2000Account + directive

    + + Syntaxe + : BS2000Account account
    + Défaut : + none
    + Contexte : configuration + serveur
    + Statut + : noyau
    + Compatibilité : + BS2000Account n'est valable que pour les machines BS2000, + à partir de la version 1.3 d'Apache. + +

    La directive BS2000Account n'est disponible que + pour les machines BS2000. Elle doit être employée + pour définir le numéro de compte pour + l'utilisateur non privilégié (qui est + défini par la directive User ). Ceci + est requis par le sous système POSIX du BS2000 afin de + changer l'environnement d'exécution sosu jacent du BS200 + en effectuant une sous connexion, et éviter ainsi que + des scripts CGI puissent accéder à des ressources + accessible à l'utilisateur privilégié + utilisé pour lancer le serveur, + généralement SYSROOT.
    + Seulement une directive BS2000Account peut + être utilisée.

    + +

    Voir également: Portage EBCDIC d'Apache

    +
    + +

    Directive + ClearModuleList

    + + Syntaxe + : ClearModuleList
    + Contexte : configuration + serveur
    + Statut + : noyau
    + Compatibilité : + ClearModuleList n'est disponible qu'à partir de + la version 1.2 d'Apache + +

    Le serveur dispose à l'installation d'une liste + pré-configurée de modules actifs. Cette directive + efface cette liste. Il est supposé que cette liste sera + reconstruite à partir de directives AddModule.

    +
    + +

    Directive + ContentDigest

    + + Syntaxe + : ContentDigest on|off
    + Défaut : + ContentDigest off
    + Contexte : configuration + serveur, hôtes virtuels, répertoire, + .htaccess
    + Surcharge : Options
    + Statut + : expérimental + +

    Compatibilité : + ContentDigest n'est disponible qu'à partir de la version + 1.1 d'Apache

    + +

    Cette directive active la génération + d'en-têtes Content-MD5 conformes aux RFC1864 + et RFC2068.

    + +

    MD5 est un algorithme permettant d'extraire un + "résumé" à partir d'un bloc de + données de longueur arbitraire, avec un degré de + confiance suffisant dans la mesure ou une moindre + altération dans les données sera + reflétée par un changement dans le + "résumé".

    + +

    L'en-tête Content-MD5 procure un test de + l'intégrité de message de bout en bout (MIC) sur + le corps d'entité. Un proxy ou client pourra tester cet + en-tête pour détecter des modifications + accidentelles du corps d'entité en cours de transfert. + Exemple d'en-tête:

    +
    +  Content-MD5: AuLb7Dp1rqtRtxz2m9kRpA==
    + 
    +
    + +

    Notez que ceci peut réduire les performances de votre + serveur dans la mesure où le "résumé" est + calculé à chaque requête (il ne peut + être mis en cache).

    + +

    Content-MD5 n'est émis que pour des + documents servis par le noyau, et à l'exception de tout + module. Par exemple, les documents SSI, la sortie de scripts + CGI, et des réponses en flux d'octet binaire ne pourront + utiliser cet en-tête.

    +
    + +

    Directive CoreDumpDirectory

    + + Syntaxe + : CoreDumpDirectory + nomrépertoire
    + Défaut : même + répertoire que ServerRoot
    + Contexte : configuration + serveur
    + Statut + : noyau + +

    Elle définit le répertoire auquel Apache tente + d'accéder avant d'enregistrer un "noyau dump". Par + défaut, il s'agit du répertoire ServerRoot, cependant, si ce + répertoire n'est pas accessible en écriture par + l'utilisateur sous lequel tourne le serveur, le "noyau dump" ne + pourra être généré. Si vous + souhaitez dans ce cas obtenir un "noyau dump" pour des + nécessités de débogage, vous pouvez + utiliser cette directive pour spécifier un autre + répertoire dans lequel vous avez toute autorisation pour + écrire.

    +
    + +

    Directive + DefaultType

    + + Syntaxe + : DefaultType mime-type
    + Défaut : + DefaultType text/html
    + Contexte : configuration + serveur, hôtes virtuels, répertoire, + .htaccess
    + Surcharge : FileInfo
    + Statut + : noyau + +

    Il peut arriver qu'une requête demande au serveur un + document dont le type ne peut être + déterminé par les tables de MIME.

    + +

    Le serveur doit informer le client du type de contenu + (Content-type) du document. Dans le cas d'un type inconnu, il + utilisera le DefaultType. Par exemple :

    + +
    + DefaultType image/gif +
    + +

    sera approprié dans un répertoire contenant + une majorité d'images gif dont certaines ne + présentent pas explicitement l'extension .gif.

    +
    + +

    Directive + <Directory>

    + + Syntaxe + : <Directory nomrépertoire> + ... </Directory>
    + Contexte : configuration + serveur, hôtes virtuels
    + Statut + : noyau + +

    <Directory> et </Directory> + sont utilisés pour "encapsuler" un groupe de directives + applicables uniquement au réprtoire indiqué ainsi + qu'à ses sous-répertoires. Toute directive + autorisée dans un contexte de répertoire peut + apparaître entre ces deux balises. + nomrépertoire est soit le chemin + entièrement qualifié du répertoire, ou un + motif. Dans un motif, '?' remplace un caractère unique + quelconque, et '*' remplace toute séquence de + zéro ou plus caractères quelconques. Sur Apache + 1.3, vous pouvez aussi utiliser les plages de caractères + '[]' comme dans un shell UNIX. De plus aucun des + métacaractères ne peut remplacer un '/', ce qui + correspond plus intimement à la réaction des + shells UNIX. Exemple:

    +
    +   <Directory /usr/local/httpd/htdocs>
    +   Options Indexes FollowSymLinks
    +   </Directory>
    +
    + +

    A partir d'Apache 1.2 : peuvent être + utilisées les "expressions régulières", + lesquelles devront être précédées du + caractère ~. Par exemple :

    +
    +  <Directory ~"^/www/.*/[0-9]{3}">
    +
    + correspondrait à des répertoires dans /www/ dont + le nom serait constitué de trois digits. + +

    Si plusieurs sections de répertoires pointent sur le + répertoire d'un document (ou l'un de ses pères) + sans qu'il s'agisse d'une expression régulière, + alors les directives sont appliquées selon la loi de "la + plus courte qualification d'abord", combinées aux + directives des fichiers .htaccess. Par exemple, avec + l'écriture

    + +
    + <Directory /> AllowOverride None + </Directory> <Directory /home/*> AllowOverride + FileInfo </Directory> +
    + +

    pour le contrôle d'accès au document + /home/web/dir/doc.html les étapes + d'évaluation sont les suivantes :

    + +
      +
    • Applique la directive AllowOverride None + (désactivant les fichiers + .htaccess).
    • + +
    • Appliquela directive AllowOverride FileInfo + (pour le répertoire /home/web).
    • + +
    • Applique toutes les directives FileInfo de + /home/web/.htaccess
    • +
    + +

    Les sections exprimant des répertoires sous forme + d'expressions régulières sont gérés + légèrement différemment par Apache 1.2 et + 1.3. Sous Apache 1.2, elles sont combinées aux sections + "normales" et s'appliquent dans l'ordre où elles + apparaissent dans le fichier de configuration. Elles ne + s'appliquent qu'une fois, seulement pour celles qui font partie + de la section "à plus courte correspondance". Sous + Apache 1.3 les sections basées sur des expressions + régulières ne sont pas évaluées + tant que toutes les sections "normales" n'ont pas + été considérées. A ce moment, les + sections "régulières" sont traitées dans + l'ordre où elles apparaissent dans le fichier de + configuration. Par exemple, avec l'écriture

    + +
    + <Directory ~ abc$> ... directives ici ... + </Directory> +
    + +

    Supposez que le nom de fichier demandé soit + /home/abc/public_html/abc/index.html. Le serveur + considère chacune des sections /, + /home, /home/abc, + /home/abc/public_html, et + /home/abc/public_html/abc dans cet ordre. Sous + Apache 1.2, lorsque /home/abc est pris en compte, + l'expression régulière correspondra et ses termes + seront appliqués. Sous Apache 1.3 l'expression + régulière n'est pas considérée du + tout à ce point de l'arbre. Elle ne le sera pas tant que + toutes les sections "normales" <Directory>s et + celles des fichiers .htaccess n'ont pas + été appliquées. A ce moment seulement + l'expression régulière reconnaîtra + /home/abc/public_html/abc et les directives seront + appliquées.

    + +

    Notez que l'accès par défaut d'Apache + pour les sections <Directory> est Allow + from All. Ceci veut dire que par défaut, Apache + desservira tout fichier indiqué par une URL. Nous + recommandons de modifier ceci à l'aide d'un bloc tel + que

    +
    +  <Directory />
    +     Order Deny,Allow
    +     Deny from All
    +</Directory>
    +
    + +

    puis désactiver sélectivement la + protection pour les répertoires devant rester + accessibles. Voir la page Trucs sur la + sécurité pour plus de + détails.

    + +

    Les sections de répertoires apparaissent + habituellement dans le fichier access.conf, mais peuvent + être présentes dans n'importe quel fichier de + configuration. Les directives <Directory> ne peuvent + être imbriquées, et ne peuvent petre incluses dans + des sections <Limit> ou <LimitExcept>.

    + +

    Voir aussi : Comment fonctionnent les sections + concernant les répertoires, chemins et fichiers pour + une explication plus précise concernant la + manière dont ces sections sont combinées + lorsqu'une requête est traitée.

    +
    + +

    Directive + <DirectoryMatch>

    + Syntaxe + : <DirectoryMatch regex> ... + </DirectoryMatch>
    + Contexte : configuration + serveur, hôtes virtuels
    + Statut + : Core
    + Compatibilité : + Disponible à partir de la version 1.3 d'Apache + +

    <DirectoryMatch> et + </DirectoryMatch> sont utilisés pour + encapsuler un groupe de directives s'appliquant uniquement aux + répertoires nommés et ses + sous-répertoires, de manière identique à + la directive <Directory>. + Cependant, elle n'accepte comme argument qu'une expression + régulière. Par exemple :

    + +
    + <DirectoryMatch "^/www/.*/[0-9]{3}"> +
    + +

    correspondrait aux répertoires de /www/ dont le nom + consiste en trois chiffres.

    + +

    Voir aussi : <Directory> pour une description de + la manière dont les définitions par expression + régulière sont combinées aux sections + <Directory> "normales".
    + Voir aussi : Comment fonctionnent les sections + concernant les répertoires, chemins et fichiers pour + une explication plus précise concernant la + manière dont ces sections sont combinées + lorsqu'une requête est traitée

    +
    + +

    Directive + DocumentRoot

    + + Syntaxe + : DocumentRoot directory-filename
    + Défaut : + DocumentRoot /usr/local/apache/htdocs
    + Contexte : configuration + serveur, hôtes virtuels
    + Statut + : noyau + +

    Cette directive définit le répertoire racine + à partir duquel httpd va distribuer les fichiers. Sauf + si le répertoire est pointé par une directive + telle que Alias, le serveur ajoute le chemin relatif + mentionnée dans l'URL présentée à + cette racine pour établir le chemin complet jusqu'au + document. Exemple :

    + +
    + DocumentRoot /usr/web +
    + +

    Un accès à + http://www.my.host.com/index.html se + réferre au document + /usr/web/index.html.

    + +

    Un bogue existe pour cette directive mod_dir, laquelle + fonctionne mal lorsque DocumentRoot est donnée avec un + '/' final (c-à-d. "DocumentRoot /usr/web/"). Il vaut + mieux éviter cette écriture.

    +
    + +

    EBCDICConvert

    + + Syntaxe + : EBCDICConvert On|Off[=direction] + extension [extension] ...
    + Contexte : configuration + serveur, hôte virtuel, répertoire, .htaccess
    + Statut + : noyau
    + Surcharge : FileInfo
    + Compatibilité : la + conversion EBCDIC est disponible à partir de la version + 1.3.19 d'Apache sur les plate-formes basées sur EBCDIC. + +

    La directive EBCDICConvert associe une extension de fichier + à une possible conversion (On ou + Off). Les extensions de fichiers peuvent commencer + ou non par un point.

    + +

    Si le format optionnel On=direction (or + Off=direction) est employé, + où direction est choisi parmi In, + Out ou InOut, alors la directive ne + s'applique seulement que dans une direction de transfert + donnée (In : contenu reçu par une + requête PUT ou POST , Out : contenu + renvoyé à une requete GET ou POST, et + InOut : conversion dans les deux + directions).
    + Sinon, InOut (conversion dans les deux + directions) est défini.

    + +

    La configuration de conversion basé sur un type de + fichier est testé avant la configuration basé sur + les types MIME, afin de permettre aux règles + génériques MIME d'être surchargées + par une extension spécifique (pplusieurs extensions de + fichier peuvent exister pour le même type MIME).

    + +

    Exemple:
    + Avec la configuration suivante, les fichiers + *.html contiennent du texte HTML au format EBCDIC, + tandis que les fichiers *.ahtml contiennent du + texte HTML au format ASCII :

    +
    +    # *.html et *.ahtml contiennet du texte HTML :
    +    AddType  text/html  .html .ahtml
    +
    +    # *.ahtml n'est pas converti (il contient déjà du texte ASCII)
    +    EBCDICConvert       Off .ahtml
    +
    +    # Les autres fichiers text/html contiennent du texte EBCDIC:
    +    EBCDICConvertByType On  text/html
    +
    +
    +
    + + +

    Voir également: EBCDICConvertByType et Aperçu des fonctions de + conversion EBCDIC

    +
    + +

    EBCDICConvertByType

    + + Syntaxe + : EBCDICConvertByType On|Off[=direction] + mimetype [mimetype] ...
    + Contexte : configuration + serveur, hôte virtuel, répertoire, .htaccess
    + Statut + : noyau
    + Surcharge : FileInfo
    + Compatibilité : la + conversion EBCDIC est disponible à partir de la version + 1.3.19 d'Apache sur les plate-formes basées sur EBCDIC. + +

    La directive EBCDICConvertByType associe un type MIME + (pouvant contenir une *) à une éventuelle + conversion (On ou Off).

    + +

    Si le format optionnel On=direction (or + Off=direction) est employé, + où direction est choisi parmi In, + Out ou InOut, alors la directive ne + s'applique seulement que dans une direction de transfert + donnée (In : contenu reçu par une + requête PUT ou POST , Out : contenu + renvoyé à une requete GET ou POST, et + InOut : conversion dans les deux + directions).
    + Sinon, InOut (conversion dans les deux + directions) est défini.

    + +

    Par exemple:
    + Une configuration standard pratique devrait au moins contenir + ces directives :

    +
    +    # All text documents are stored as EBCDIC files:
    +    # Tous les document textes sont stockés au format EBCDIC
    +    EBCDICConvertByType On  text/* message/* multipart/*
    +    EBCDICConvertByType On  application/x-www-form-urlencoded \
    +          model/vrml application/postscript
    +    # Les autres fichiers sont traités comme binaires.
    +    EBCDICConvertByType Off */*
    +
    + Si vous servez seulement que des documents ASCII, par exemple + provenant d'un montage NFS d'un serveur Unix, utilisez : +
    +    # Tous les documents sont déjà en ASCII:
    +    EBCDICConvertByType Off */*
    +
    + +

    Voir également: EBCDICConvert et Aperçu des fonctions de + conversion EBCDIC

    +
    + +

    EBCDICKludge

    + + Syntaxe + : EBCDICKludge On|Off
    + Default: EBCDICKludge + Off
    + Contexte : configuration + serveur, hôte virtuel, répertoire, .htaccess
    + Statut + : noyau
    + Surcharge : FileInfo
    + Compatibilité : + EBCDICKludge est disponible à partir de la version + 1.3.19 d'Apache sur les plate-formes basées sur EBCDIC. + Il est désuet et sera abandonné dans les versions + ultérieures.
    + + +

    The EBCDICKludge est proposée par + compatibilité avec les versions d'Apache 1.3.0 à + 1.3.18. Dans ces versions, tous les fichiers dont le type MIME + commence par "text/", "message/" ou "multipart/" ou dont le + type est "application/x-www-form-urlencoded" sont convertis par + défaut, les autres documents sont retournés sans + conversion. Un document est présumé être au + format ASCII iuniquement si il est du type + "text/x-ascii-sous-type", et ne sera + donc pas converti. A la place, le préfixe + "x-ascii-" était supprimé du + type, obtenant ainsi le type MIME + "text/sous-type" comme type du document + retourné.

    + +

    Si la directive EBCDICKludge est mise à + On, et si aucune des extensions de fichiers ne + correspondent aux directives EBCDICConvert définis dans le + contexte , alors le serveur teste avec le type MIME de format + type/x-ascii-sous-type. Si le + document a un tel type alors la chaîne + "x-ascii-" est supprimée et la + conversion est mise à Off. Cela permet de + surcharger l'assertion implicite que tous les fichiers sont + stockés au format EBCDIC, par exemple si Apache sert des + fichiers provenant d'un montage NFS d'un répertoire + contenant des documents ASCII.
    + En utilisant EBCDICKludge, Il n'y a aucun moyen de forcer un + des autres types MIME (par exemple model/vrml) d'être + traité au format EBCDIC. L'utilisation de la directive + EBCDICConvertByType est + préférable pour définir une telle + conversion. Avant Apache 1.3.19, il n'y avait aucun moyen de + forcer ces document binaires d'être traités comme + des fichiers textes EBCDIC

    + +

    Voir également : EBCDICConvert, EBCDICConvertByType and Aperçu des fonctions de + conversion EBCDIC

    +
    + +

    Directive + ErrorDocument

    + + Syntaxe + : ErrorDocument code d'erreur + document
    + Contexte : configuration + serveur, hôtes virtuels, répertoire, + .htaccess
    + Statut + : noyau
    + Surcharge : FileInfo
    + Compatibilité : Les + contextes répertoire et .htaccess ne sont utilisables + qu'à partir de la version 1.1 d'Apache. + +

    Dans l'éventualité d'un problème ou + d'une erreur, Apache peut exécuter l'une des quatre + actions suivantes :

    + +
      +
    1. sortie d'un message d'erreur simple standard
    2. + +
    3. sortie d'un message personnalisé
    4. + +
    5. redirection vers une URL locale pour traiter le + problème (ou l'erreur)
    6. + +
    7. redirection vers une URL externe pour traiter le + problème (ou l'erreur)
    8. +
    + +

    La première option est celle par défaut, les + options 2 à 4 seront obtenues en utilisant la directive + ErrorDocument, suivi du code HTTP d'erreur et du + message textuel d'erreur, ou une URL.

    + +

    Messages dans ce contexte, commence par un + guillemet simple ("), qui ne fait pas partie du + message lui-même. Apache ajoutera souvent des + informations complémentaires explicitant le + problème (ou l'erreur).

    + +

    L'URL peut débuter par un slash (/) pour des URL + locales, ou être complètement qualifiées. + Exemples:

    + +
    + ErrorDocument 500 + http://foo.example.com/cgi-bin/tester
    + ErrorDocument 404 /cgi-bin/bad_urls.pl
    + ErrorDocument 401 /subscription_info.html
    + ErrorDocument 403 "Sorry can't allow you access today
    +
    + +

    Notez que lorsque vous spécifiez un + ErrorDocument qui pointe vers une URL externe (c'est + -à-dire toute adresse commençant par quelque + chose du style "http:") Apache émettra une requête + de redirection au client pour lui indiquer où trouver le + document. Ceci peut perturber les robots et d'autres clients + qui essaient de déterminer si une URL est valide en + testant le code retour de la requête. De plus, si vous + utilisez l'écriture ErrorDocument 401 le + client ne saura pas qu'il doit demander un mot de passe + puisqu'il ne recevra pas le code retour 401. Par + conséquent, il est impératif d'utiliser une URL + locale pour une directive "ErrorDocument 401". Ceci est induit + par la nature des schémas d'authentification de base + d'HTTP.

    + +

    Voir aussi: documentation sur les + réponses personnalisées.

    +
    + +

    Directive + ErrorLog

    + + Syntaxe + : ErrorLog nomfichier
    + Défaut : ErrorLog + logs/error_log (Unix)
    + Défaut : ErrorLog + logs/error.log (Windows et OS/2)
    + Contexte : configuration + serveur, hôtes virtuels
    + Statut + : noyau + +

    Cette directive définit le nom du fichier dans lequel + le serveur marque la trace des erreurs rencontrées. Si + le nom de fichier ne commence pas par un slash (/), alors la + partie "chemin d'accès" est considérée + relativement à ServerRoot. + Exemple:

    + +
    + ErrorLog /dev/null +
    + +

    Cette expression a pour effet de désactiver la trace + d'erreurs.

    + Si le fichier commence par une barre verticale (|), il est + censé être une commande à exécuter + pour ttraiter le message d'erreur.
    +
    + + +

    Apache 1.3 et ultérieur: en + utilisant syslog à la place d'un fichier + permet d'employer syslogd(8) si le système l'accepte. Le + défau est d'utiliser la fonction syslog + local7, mais vous pouvez remplacer ceci en + utilisant la syntaxe syslog:service + où service peut être un des noms + documenté dans syslog(1).

    + +

    Sécurité : Voir la page note sur la + securité pour plus d'information concernant une + possibilité de brêche de sécurité si + le répertoire d'accueil des fichiers de trace peut + être écrit par tout autre utilisateur que le + propriétaire du processus serveur.

    +
    + +

    Directive <Files>

    + Syntaxe + : <Files nomfichier> ... + </Files>
    + Contexte : configuration + serveur, hôtes virtuels, .htaccess
    + Statut + : noyau
    + Compatibilité : + Disponible à partir de la version 1.2 d'Apache. + +

    La directive <Files> permet une gestion de + contrôle d'accès fichier par fichier. Elle est + comparable aux directives <Directory> et <Location>. Elle doit s'apparier + à une directive </Files>. Les directives + applicables au fichier indiqué sont encapsulées + entre ces deux balises. Les sections <Files> + sont traitées dans l'ordre où elles apparaissent + dans le fichier de configuration, une fois traitées les + sections <Directory> et les fichiers .htaccess, + mais avant les sections <Location>.

    + +

    L'argument filename peut inclure un nom de fichier, + où un motif, dans lequel '?' correspond à tout + caractère unique quelconque, et '*' correspond à + une séquence de zéro à un nombre + quelconque de caractères. Les "expressions + régulières" peuvent aussi être + utilisées, pourvu qu'elles soient + précédées du caractère + ~. Par exemple :

    +
    + <Files ~"\.(gif|jpe?g|png)$">
    +
    + +

    correspondrait à la majorité des fichiers + graphiques utilisés sur Internet. A partir de la version + 1.3 d'Apache, l'usage de la directive <FilesMatch> est cependant + préférable.

    + +

    Notez que, contrairement aux sections <Directory> et <Location>, les sections + <Files> peuvent apparaître dans des + fichiers .htaccess. Ceci permet aux utilisateurs + de contrôler l'accès à leurs propres + fichiers, sur un mode individuel. Lorsqu'elles sont + utilisées dans un fichier .htaccess, si + nomfichier ne commence pas par un slash (/), le + répertoire courant contenant ledit fichier + .htaccess y sera préfixé + automatiquement.

    + +

    Voir aussi : Comment fonctionnent les sections + concernant les répertoires, chemins et fichiers pour + une explication plus précise concernant la + manière dont ces sections sont combinées + lorsqu'une requête est traitée

    +
    + +

    Directive + <FilesMatch>

    + Syntaxe + : <FilesMatch regex> ... + </Files>
    + Contexte : configuration + serveur, hôtes virtuels, .htaccess
    + Statut + : noyau
    + Compatibilité : + Disponible à partir de la version 1.3 d'Apache. + +

    La directive <FilesMatch> permet un + contrôle d'accès fichier par fichier, tout comme + la directive <Files>. Cependant, + elle n'accepte qu'un argument sous forme d'expression + régulière. Par exemple :

    + +
    + <FilesMatch "\.(gif|jpe?g|png)$"> +
    + +

    qui correspondrait à la plupart des fichiers + graphiques utilisés sur Internet.

    + +

    Voir aussi : Comment fonctionnent les sections + concernant les répertoires, chemins et fichiers pour + une explication plus précise concernant la + manière dont ces sections sont combinées + lorsqu'une requête est traitée

    +
    + +

    Directive Group

    + + Syntaxe + : Group groupeUnix
    + Défaut : Group + #-1
    + Contexte : configuration + serveur, hôte virtuel
    + Statut + : noyau + +

    La directive Group définit le groupe dont + les requêtes seront traitées par le serveur. Pour + utiliser cette directive, le serveur stand-alone doit tout + d'abord être exécuté par l'utilisateur + "root". groupeUnix est à choisir parmi :

    + +
    +
    un nom de groupe
    + +
    se réfère à un groupe unix par son + nom.
    + +
    # suivi d'unnuméro de groupe.
    + +
    se réfère à un groupe par son + indice.
    +
    + +

    Il est recommendé de créer un nouveau groupe + d'utilisateurs pour les utilisateurs exécutant le + serveur. Certains administrateurs assignent le serveur à + l'utilisateur nobody, mais ceci n'est pas toujours + possible ou souhaîtable.

    + +

    Note : si vous démarrez le serveur + sous un compte utilisateur autre que "root", la commutation sur + un autre groupe échouera, et le groupe utilisé + restera le groupe initial de l'utilisateur.

    + +

    Note spéciale : L'utilisation de + cette directive dans un contexte <VirtualHost> + nécessite un suEXEC wrapper + correctement configuré. De cette manière et dans + ce contexte, seul le groupe dans lequel sont + exécutés les CGI sont affectés. Toute + requête autre que CGI sont toujours lancées dans + le groupe défini par la directive Group principale.

    + +

    Sécurité : Voir Utilisateur pour une discussion plus + détaillée sur les aspects utilisateurs.

    +
    + +

    Directive + HostNameLookups

    + + Syntaxe + : HostNameLookups on | off | double
    + Défaut : + HostNameLookups off
    + Contexte : configuration + serveur, hôte virtuel, répertoire, .htaccess
    + Statut + : noyau
    + Compatibilité : + double n'est disponible qu'à partir de la + version 1.3 d'Apache.
    + Compatibilité : La + valeur par défaut était on pour + toute version antérieure à la version 1.3 + d'Apache. + +

    Cette directive autorise la résolution DNS pour la + trace d'accès (et pour les passer aux CGI/SSI en + REMOTE_HOST). La valeur double + signifie une résolution DNS inverse double. + C'est-à-dire, après qu'une résolution + inverse soit effectuée, une résolution est + ensuite effectuée à partir du résultat + obtenu. Au moins une des adresses IP obtenues par la + deuxième résolution doit correspondre à + l'adresse originale. (Dans le langage des "fous de tcp" ceci + s'appelle PARANOID.)

    + +

    Indépendamment du mode choisi, lorsque mod_access est utilisé pour + faire du contrôle d'accès par nom d'hôte, + une résolution inverse double sera effectuée. + Ceci est indispensable pour des raisons de + sécurité. Notez que le résultat de cette + résolution inverse double n'est en général + pas accessible sauf si l'option HostnameLookups + double est activée. Par exemple, si l'option est + simplement HostnameLookups on et une requête + est reçue vers un objet soumis à des restrictions + quant aux noms d'hôtes, et quelque soit le + résultat de la réslution inverse double, les CGI + recevront le résultat de la résolution inverse + dans la variable d'environnement REMOTE_HOST.

    + +

    Par défaut, l'état choisi était + on dans les versions d'apache antérieures + à la version 1.3. Elle est aujourd'hui à + off afin de diminuer le trafic pour les sites qui + n'ont pas un besoin absolu de la résolution inverse. + C'est aussi un avantage pour les utilisateurs finaux qui + n'auront pas à attendre la fin du processus de + résolution avant d'être servis. Des sites + chargés devraient plutôt laisser cette opyion + à off, dans la mesure où une + recherche DNS peut consommer un temps non négligeable. + L'utilitaire logresolve, fourni dans le + répertoire /support, peut être + utilisé pour résoudre des noms d'hôtes + à partir des adresses IP tracées en mode + "offline".

    +
    + +

    Directive + IdentityCheck

    + + Syntaxe + : IdentityCheck booléen
    + Défaut : + IdentityCheck off
    + Contexte : configuration + serveur, hôte virtuel, répertoire, .htaccess
    + Statut + : noyau + +

    Cette directive autorise une trace conforme à la + RFC1413 du nom d'utilisateur pour chaque connexion, lorsque la + machine cliente exécute identd ou un procesus similaire. + Cette information est tracée dans le fichier + access log. booléen vaut soit + on ou off.

    + +

    Cette information n'est absolument pas certifiée et + ne peut être considérée que pour une + analyse sommaire.

    + +

    Notez que ce fontionnement peut rallonger notablement les + délais d'accès à votre serveur dans la + mesure où chaque requête nécessite + l'exécution d'une résolution. Lorsque des + "firewalls" sont présents chaque résolution peut + éventuellement échouer et ajouter ainsi 30 + secondes d'attente pour chaque accès. En conclusion, + cette option n'est en général pas opportune pour + des serveurs Internet ouverts au public.

    +
    + +

    <IfDefine> + directive

    + Syntaxe + : <IfDefine + [!]nom-paramètre> ... + </IfDefine>
    + Défaut : aucun
    + Contexte : tous
    + Statut + : noyau
    + Compatibilité : + <IfDefine> est disponible à partir de la version + 1.3.1 + +

    La section <IfDefine + test>...</IfDefine> est employée pour + délimiter des directives conditionnelles. Les directives + à l'intérieur d'un section IfDefine ne sont + prises en compte que si test est vraie. Si + test est faux, tout ce qui se trouve entre le marqueur + de début et celui de fin est ignoré.

    + +

    Le test de la section <IfDefine> peut exister + sous deux formes :

    + +
      +
    • nom-paramètre
    • + +
    • !nom-paramètre
    • +
    + +

    Dans le premier cas, les directives entre les marqueurs de + début et de fin ne sont traité que si le + paramètre nommé nom-paramètre est + défini. Dans le deuxième cas, les directives + entre les marqueurs de début et de fin ne sont + traité que si le paramètre nommé + nom-paramètre n'est pas + défini.

    + +

    L'argument nom-paramètre est une + définition qui peut être donnée en ligne de + commande d'httpd en utilisant l'option + -Dnom-paramètre, au lancement du + serveur.

    + +

    Les sections <IfDefine> peuvent s'imbriquer, ce qui + permet de réaliser des test sur plusieurs + paramètres. Par exemple :

    +
    +  $ httpd -DReverseProxy ...
    +
    +  # httpd.conf
    +  <IfDefine ReverseProxy>
    +  LoadModule rewrite_module libexec/mod_rewrite.so
    +  LoadModule proxy_module   libexec/libproxy.so
    +  </IfDefine>
    +
    +
    + +

    Directive + <IfModule>

    + Syntaxe : <IfModule [!]nomModule> + ... </IfModule>
    + Défaut : aucun
    + Contexte : tous
    + Statut : noyau
    + Compatibilité : IfModule + n'est disponible qu'à partir de la version 1.2 d'Apache. + + +

    La section <IfModule + test>...</IfModule> permet de rendre + conditionnelles un groupe de directives. Les directives + à l'intérieur d'une section IfModule ne sont + considérées que si le test est + vérifié. Si test vaut faux, toute + directive inclue entre la balise de début et celle de + fin sont ignorées.

    + +

    Le test d'une section <IfModule> + peut prendre l'une des formes suivantes :

    + +
      +
    • nomModule
    • + +
    • !nomModule
    • +
    + +

    Dans le premier cas, les directives entre les deux balises + de début et de fin ne sont traitées que si le + module indiqué par nomModule est compilé + dans votre version d'Apache. La seconde forme inverse le sens + du test, et ne traite les directives que si le module + nomModule n'est pas compilé.

    + +

    L'argument nomModule spécifie un nom de + module par son nom de fichier source, tel qu'appelé par + la compilation. Par exemple, mod_rewrite.c.

    + +

    Les sections <IfModule> peuvent être + imbriquées, ce qui peut être utile pour + implémenter simplement des tests multi-modules.

    +
    + +

    Directive Include

    + Syntaxe : Include nomfichier
    + Contexte : configuration + serveur
    + Statut + : noyau
    + Compatibilité : Include + n'est disponible qu'à partir de la version 1.3 d'Apache. + + +

    Cette directive permet l'inclusion d'autres fichiers de + configuration à partir d'autres fichiers de + configuration serveur.

    + +

    A partir de la version Apache 1.3.13, si + Include pointe vers un répertoire plutot + qu'un fichier, Apche lira tous fichiers de ce + répertoire, ou des sous-répertoires, et traitera + chacun de ces fichiers de configuration.

    +
    + +

    Directive + KeepAlive

    + Syntaxe : (Apache 1.1) KeepAlive + requêtesMax
    + Défaut : (Apache 1.1) KeepAlive + 5
    + Syntaxe : (Apache 1.2) KeepAlive + on/off
    + Défaut : (Apache 1.2) KeepAlive + On
    + Contexte : configuration + serveur
    + Statut + : noyau
    + Compatibilité : + KeepAlive est disponible à partir de la version 1.1 + d'Apache. + +

    L'extension Keep-Alive d'HTTP/1.0 et les connexions + persistantes d'HTTP/1.1 fournissent des sessions durables HTTP + , qui autorisent plusieurs requêtes à être + envoyées sur la même connexion. Dans certains cas, + il a été constaté une réduction de + 50% du temps de latence ppour des documents HTML contenant de + nombreuses images. Pour activer les connexions persistantes + (keep-alive) à partir d'Apache 1.2 il faut + définir la directive KeepAlive On.

    + +

    Pour les clients HTTP/1.1, Les connexions persistantes ne + sont employées que si elles sont spécifiquement + demandées par un client. De plus, une connexion + persistantes ne peut être employées que si la + taille du contenu est connu à l'avance. Ceci implique + que les contenus dynamiques, tels que les scripts CGI, les + pages SSI, et les listes de répertoires + générés par le serveur n'utilisent pas de + connexions persistentes pour les clients HTTP/1.0. Pour les + clients HTTP/1.1, les connexions sont persistantes par + défaut à moins d'être + spécifiée. Si le client le demande, l'encodage + par tranches est utilisé afin d'envoyer des contenus de + tailles inconnus au travers de connxions persistantes.

    + +

    Sous Apache 1.1: Mettre + requêtesMax au nombre maximum de requêtes + qu'Apache peut traiter par connexion persistante. Une + limitation est imposée pour éviter qu'un client + ne vienne asphyxier votre serveur en ressources. Mettre un + 0 pour désactiver ce support. A partir de + la version 1.2, ceci est contrôlé par la directive + MaxKeepAliveRequests

    + Voir aussi la directive MaxKeepAliveRequests.
    +
    + +
    + +

    Directive + KeepAliveTimeout

    + Syntaxe + : KeepAliveTimeout secondes
    + Défaut : + KeepAliveTimeout 15
    + Contexte : configuration + serveur
    + Statut + : noyau
    + Compatibilité : + KeepAliveTimeout est disponible à partir de la + version 1.1 d'Apache. + +

    Le nombre de secondes pendant lesquelles Apache attendra une + requête postérieure avant de rompre une connexion. + Dès qu'une requête est reçue, la valeur de + la temporisation spécifiée par la directive Timeout s'applique.

    + +

    Mettre KeepAliveTimeout à une grande + valeur peut créer des problèmes de performance + pour des serveurs chargés. Le plus grand est ce + délai, le plus les processus du serveur seront + occupés en attente de connexions avec des clients + inactifs.

    +
    + +

    Directive <Limit>

    + + Syntaxe + : <Limit méthode méthode + ... > ... </Limit>
    + Contexte : tous
    + Statut + : noyau + +

    Les contrôles d'accès sont normalement actives + pour toutes les méthodes + d'accès, et ceci est le comportement normal. En + général, les directives de contrôle + d'accès ne doivent être placées à + l'intérieur d'une section + <limit>.

    + +

    Le but de la directive <Limit> est de restreindre la + portée des contrôles d'accès à + certaines méthodes HTTP. Pour toutes les autres + méthodes, les restrictions d'accès qui sont + situées à l'intérieur de <Limit> + sont sans effets. L'exemple suivant applique + le contrôle d'accès uniquement aux méthodes + POST, PUT, and DELETE, laissant les autres méthodes non + protégées :

    + +
    + <Limit POST PUT DELETE>
    + Require valid-user
    + </Limit>
    +
    + Les noms de méthodes peuvent être choisis parmi + GET, POST, PUT, DELETE, CONNECT, OPTIONS, TRACE, PATCH, + PROPFIND, PROPPATCH, MKCOL, COPY, MOVE, LOCK, et UNLOCK. + Le nom de la méthode est sensible à la + casse. Si GET est employé, il restreindra + également les requêtes HEAD. +
    + +

    Directive + <LimitExcept>

    + + Syntaxe + : <LimitExcept méthode + [méthode] ... > ... + </LimitExcept>
    + Contexte : tous
    + Statut + : noyau
    + Compatibilité : + disponible à partir de la version 1.3.5 d'Apache. + +

    <LimitExcept> et </LimitExcept> sont + employés pour entourer un groupe de directives de + contrôle d'accès qui s'appliqueront pour n'importe + quelle méthode d'accès ne se trouvant + pas en arguments Cette directive est + l'oppsée de <Limit> et peut + être employée pour contrôler les + méthodes non reconnues ou non standard. Voir la + documentation de <Limit> pour plus + de détails.

    +
    + +

    Directive + LimitRequestBody

    + + Syntaxe + : LimitRequestBody octets
    + Défaut : + LimitRequestBody 0
    + Contexte : configuration + serveur, hôte virtuel, répertoire .htaccess
    + Statut + : noyau
    + Compatibilité : + LimitRequestBody est disponible à partir de la version + 1.3.2. + +

    Cette directive détermine la taille maximale en + octets que peut avoir le corps d'une requête. Elle peut + aller de 0 (illimité) à 2147483647 (2GB). La + valeur par défaut est déterminée à + la compilation par la constante + DEFAULT_LIMIT_REQUEST_BODY (0 dans les + distributions).

    + +

    La directive LimitRequestBody directive permet à + l'utilisateur de fixer une limite à la taille du corps + d'une requête à l'intérieur du contexte + où cette directive est située (serveur, par + répertoire, par fichier). Si le client effezctue une + requête excédant cette limite, le serveur + retournera un message d'erreur au lieu de traiter la + requête. La taille d'une requête normale peut + beaucoup varier en fonction de la nature de la ressource + demandée et des méthodes d'accès permise + sur cette ressource. Typiquement les scripts CGI utilise le + corps du message pour passer des informations au serveur. Des + implémentation de la méthode PUT nécessite + une valeur au moins aussi grande que le serveur souhaite + recevoir pour cette ressource.

    + +

    Cette directive donne à l'administrateur un plus + grand contrôle par rapport à des requêtes + anormales de clients, et peut être utile pour + éviter certaines formes d'attaques par déni de + service.

    +
    + +

    Directive LimitRequestFields

    + + Syntaxe + : LimitRequestFields number
    + Défaut : + LimitRequestFields 100
    + Contexte : configuration + serveur
    + Statut + : noyau
    + Compatibilité : + LimitRequestFields est disponible à partir de la version + 1.3.2. + +

    Number est un entier allant de 0 (signifiant sans + limite) à 32767. La valeur par défaut est + définie à la compilation par la constante + DEFAULT_LIMIT_REQUEST_FIELDS (100 dans la + distribution).

    + +

    La directive LimitRequestFields permet à + l'administrateur du serveur de modifier le nombre maximum de + champs autorisé à l'intérieur de + l'en-tête d'une requête HTTP. Un serveur doit avoir + cette valeur supérieure au nombre de champs qu'un client + normal peut inclure. Le nombre de champs utilisé par un + client excède rarement 20, mais ceci peut varier en + fonction de l'implémentation des clients, le plus + souvent il dépend du niveau auquel le client a + configuré son butineur pour accepter une + négociation de contenu très fine. Les extensions + HTTP optionnelles sont exprimées en utilisant des champs + dans l'en-tête de requête.

    + +

    Cette directive permet à l'administrateur un meilleur + contrôle par rapport à des requêtes + anormales, ce qui peut être utile pour éviter + certaines attaques par déni de service. Cette valeur + doit être augmentée si certains clients obtiennent + un message d'erreur à leurs requêtes indiquant que + trop de champs sont envoyés dans la requête.

    +
    + +

    Directive + LimitRequestFieldsize

    + + Syntaxe + : LimitRequestFieldsize octets
    + Défaut : + LimitRequestFieldsize 8190
    + Contexte : configuration + serveur
    + Statut + : noyau
    + Compatibilité : + LimitRequestFieldsize est disponible à partir de la + version 1.3.2. + +

    Cette directive indique la taille maximale de + l'en-tête d'une requête HTTP et peut aller de 0 + octets à la valeur définit à la + compilation par la constante + DEFAULT_LIMIT_REQUEST_FIELDSIZE (8190 dans la + distribution standard).

    + +

    La directive LimitRequestFieldsize permet à + l'administrateur de limiter la taille autorisée pour le + champ d'en-tête HTTP d'une requête à une + valeur inférieure à celle définie à + la compilation. Un serveur doit avoir cette valeur suffisamment + grande pour pouvoir traiter les requêtes de clients + normaux. La taille d'une requête noramle peut beaucoup + varier en fonction de l'implémentation du client, le + plus souvent il dépend du niveau auquel le client a + configuré son butineur pour accepter une + négociation de contenu très fine.

    + +

    Cette directive permet l'administrateur d'avoir un meilleur + contrôle sur des requêtes ayant un comportement + anormale, ce qui peut être utile afin d'éviter + certaines formes d'attaques par déni de service. Dans + des conditions normales, cette valeur doit rester celle par + défaut.

    +
    + +

    Directive + LimitRequestLine

    + + Syntaxe + : LimitRequestLine octets
    + Défaut : + LimitRequestLine 8190
    + Contexte : configuration + serveur
    + Statut + : noyau
    + Compatibilité : + LimitRequestLine est disponible à partir de la version + 1.3.2. + +

    Cette directive indique la taille maximale d'une + requête HTTP et peut aller de 0 octets à + la valeur définit à la compilation par la + constante DEFAULT_LIMIT_REQUEST_LINE (8190 dans la + distribution standard).

    + +

    La directive LimitRequestLine permet à + l'administrateur de réduire la limite fixée pour + une requête HTTP en dessous de la valeur fixée + à la compilation. Comme une requête est + composée de la méthode HTTP, d'une URI et de la + version du protocole utilisé, la directive + LimitRequestLine place une restriction sur la taille maximale + que peut avoir une URI dansune requête. Un serveur doit + avoir cette valeur suffisamment grande pour pouvoir traiter + n'importe quelle de ses ressources, en prenant en compte les + informations qui pourrait être passées dans une + requête GET.

    + +

    Cette directive permet l'administrateur d'avoir un meilleur + contrôle sur des requêtes ayant un comportement + anormale, ce qui peut être utile afin d'éviter + certaines formes d'attaques par déni de service. Dans + des conditions normales, cette valeur doit rester celle par + défaut.

    +
    + +

    Directive Listen

    + Syntaxe + : Listen + [adresseIp:]numéroPort
    + Contexte : configuration + serveur
    + Statut + : noyau
    + Compatibilité : Listen + est disponible à partir de la version 1.1 d'Apache. + +

    La directive Listen enjoint Apache à + écouter plus d'une adresse IP ou port; par défaut + Apache répond aux requêtes reçues sur + toutes les interfaces IP, mais seulement celles arrivant sur le + port donné par la directive Port.

    + Listen peut être utilisée à la + place de BindAddress et + Port. Elle indique au serveur d'accepter des + requêtes entrantes sur le port spécifié ou + sur une combinaison adresse-port. Si le premier format est + utilisé (avec seule mention d'un numéro de port), + le serveur "écoutera" tous les ports + spécifiés sur chacune des interfaces IP qu'il + connaît, plutôt que sur le port donné par la + directive Port. Si une adresse IP adresse IP est + précisée en complément, le serveur + restreindra son écoute à la combinaison + adresse-port précisée.
    +
    + + +

    Notez que vous avez toujours besoin de la directive + Port qui permettent à Apache de + générer les URL de retour vers votre serveur.

    + +

    Plusieurs directives Listen peuvent être + utilisées pour spécifier un ensemble d'adresses + et de ports à écouter. Le serveur répondra + aux requêtes reçues sur n'importe laquelle des + combinaisons adresse-port ainsi spécifiée.

    + +

    Par exemple, pour autoriser le serveur à accepter des + connexions sur les ports 80 et 8000, écrire :

    + +
    +
    +Listen 80
    +Listen 8000
    +
    +
    +
    + +

    Pour autoriser un serveur à accepter des connexions + sur deux "sockets" qualifiés, écrire :

    +
    +Listen 192.170.2.1:80
    +Listen 192.170.2.5:8000
    +
    + +

    Voir aussi: Apache et DNS
    + Voir aussi: Configurer + les ports et adresses utilisée par Apache
    + Voir aussi : Bogues + connus

    +
    + +

    Directive + ListenBacklog

    + Syntaxe + : ListenBacklog backlog
    + Défaut : + ListenBacklog 511
    + Contexte : configuration + serveur
    + Statut + : noyau
    + Compatibilité : + ListenBacklog n'est disponible qu'à partir de + la version 1.2.0 d'Apache. + +

    La longueur maximale de la file d'attente des connexions en + attente. En général, aucun ajustement n'est + nécessaire, cependant, il est souhaitable sur certains + systèmes d'augmenter cette longueur de file pour + répondre à des attaques TCP SYN. Voir les + paramètres backlog dans l'appel système + listen(2).

    + +

    Cette directive est limitée à un petit nombre + par le système d'exploitation. Elle peut varier d'un + système à un autre. Il faut également + noter que pour la plupart des systèmes, la valeur + réellement utilisée n'est pas celle + spécifiée par la directive, mais un nombre + basé sur cette valeur (généralement plus + grande).

    +
    + +

    Directive + <Location>

    + Syntaxe + : <Location URL> ... + </Location>
    + Contexte : configuration + serveur, hôtes virtuels
    + Statut + : noyau
    + Compatibilité : + Location est disponible à partir des versions + 1.1 d'Apache. + +

    La directive <Location> permet d'instaurer un + contrôle d'accès sur une base URL. Elle est + comparable à la directive <Directory>, et doit s'apparier + à une directive </Location>. Les + directives s'appliquant à l'URL précisée + seront à inclure entre ces deux balises. Les sections + <Location> sont traitées dans l'ordre + où elles apparaissent dans le fichier de configuration, + une fois les sections <Directory> et les + fichiers .htaccess traités.

    + +

    Il faut noter que les URL n'ont pas du tout à suivre + la même organisation que le système de fichiers, + et il faut souligner que la directive <Location> + opère de manière totalement indépendante + du système de fichiers.

    + +

    Le préfixe d'URL devra, sauf pour des + requêtes à un proxy, être de la forme + /chemin/, et ne devra pas inclure de mention + http://nomserveur. Elle ne protège pas + nécessairement un répertoire (cela peut + être un fichier individuel, ou un ensemble de fichiers), + et peut inclure des métacaractères. Dans un motif + (avec des métacaractères), '?' remplace un + caractère quelconque, et '*' remplace toute chaîne + quelconque de 0 ou plus caractères. POur les + requêtes à un proxy, l'URL doitt être de la + forme scheme://nomserveur/serveur, et vous devez + inclure le préfixe.

    + +

    Apache 1.2 et plus : Des expression + régulières peuvent être utilisées, + à condition de les faire précéder du + caractère ~. Par exemple :

    + +
    + <Location ~ "/(extra|special)/data"> +
    + +

    correspondrait à des URL contenant la + sous-chaîne "/extra/data" ou "/special/data". Cependant, + sous Apache 1.3, l'utilisation de la directive <LocationMatch> est + conseillée.

    + +

    La fonctionnalité Location est + particulièrement pratique lorsque combinée + à la directive SetHandler. Par exemple, + pour permettre des requêtes sur les rapports + d'état, mais ne les autoriser que pour des agents + requérant à partir du domaine foo.com, vous + pourriez écrire :

    + +
    +
    +<Location /status>
    +SetHandler server-status
    +order deny,allow
    +deny from all
    +allow from .foo.com
    +</Location>
    +
    +
    +
    + +

    Note sur / (barre oblique) pour les version + supérieures à 1.3: La caractère + barre oblique à une signification particulière en + fonction de l'endroit où il se situe. Des personnes sont + habitués au comportement dans certains systèmes + de fichiers où de multiples caractères obliques + sont remplacés par un caractère unique (par + exemple /home///foo est identique à + /home/foo). Dans le monde des URL ceci n'est pas + obligatoirement vrai. La directive + <LocationMatch> et la version avec + expression régulière de + <Location> demande de spécifier + plusieurs caractères obliques si ceci est votre + intention. Par exemple, <LocationMatch + ^/abc> fonctionnera avec l'URL /abc mais + pas avec l'URL //abc. La directive (sans + expression régulière) + <Location> se comporte de manière + similaire quand elle est employée pour des + requêtes proxy. Mais si la directive (sans expression + régulière) <Location> est + utilisée pour des requêtes sans proxy, il + associera implicitement plusieurs obliques à un seul. + Par exemple, si vous spécifiez <Location + /abc/def> et que la requête est + /abc//def celle ci correspondra.

    + +

    Voir aussi: Comment fonctionnent les sections + concernant les répertoires, chemins et fichiers pour + une explication plus précise concernant la + manière dont ces sections sont combinées + lorsqu'une requête est traitée.

    +
    + +

    Directive + <LocationMatch>

    + Syntaxe + : <LocationMatch regex> ... + </LocationMatch>
    + Contexte : configuration + serveur, hôte virtuel
    + Statut + : noyau
    + Compatibilité : Location + est disponible à partir de la version 1.3 d'Apache. + +

    La directive <LocationMatch> permet + l'établissement d'un contrôle d'accès sur + une base URL, d'une façon identique à la + directive <Location>. Cependant, + elle n'accepte qu'une expression régulière comme + argument. Par exemple :

    + +
    + <LocationMatch "/(extra|special)/data"> +
    + représente des URL contenant l'une des + sous-chaînes "/extra/data" ou "/special/data".
    +
    + Voir aussi : Comment fonctionnent les sections + concernant les répertoires, chemins et fichiers pour + une explication plus précise concernant la + manière dont ces sections sont combinées + lorsqu'une requête est traitée. +
    + +

    Directive + LockFile

    + Syntaxe + : LockFile nomfichier
    + Défaut : LockFile + logs/accept.lock
    + Contexte : configuration + serveur
    + Statut + : noyau + +

    La directive LockFile indique le chemin + d'accès du fichier de verrouillage utilisé + lorsqu'Apache est compilé en mode + USE_FCNTL_SERIALIZED_ACCEPT ou + USE_FLOCK_SERIALIZED_ACCEPT. Ce paramètre + sera laissé généralement dans son + état par défaut. La raison principale qui + conduirait à modifier ce paramètre serait le fait + que le répertoire des traces (logs) soit + monté sous NFS, le fichier de verrouillage devant de + préférence être situé sur un disque + local à la machine serveur pour autant que possible. Le + PID du processus serveur principal est automatiquement + rajouté au nom de fichier.

    + +

    SECURITE : il vaut mieux éviter de + metttre ce fichier dans un répertoire inscriptible par + tout le monde tel que /var/tmp cas quelqu'un + pourrait créer une attaque par déni de service et + empécher le serveur de redémarrer en + créant un fichier de verrouillage de même nom que + celui que veut créer le serveur.

    +
    + +

    Directive + LogLevel

    + Syntaxe + : LogLevel niveau
    + Défaut : LogLevel + error
    + Contexte : configuration + serveur, hôtes virtuels
    + Statut + : noyau
    + Compatibilité : LogLevel + est disponible à partir de la version 1.3. + +

    LogLevel ajuste le niveau de verbosité des messages + inscrits dans les traces d'erreur (voir la directive ErrorLog). Les niveaux possibles sont par + ordre de gravité décroissante :

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Niveau Description
    + Exemple
    emerg Urgences - le système est inutilisable.
    + "Child cannot open lock file. Exiting"
    alert Une action doit être prise + immédiatement.
    + "getpwuid: couldn't determine user name from uid"
    crit Conditions critiques.
    + "socket: Failed to get a socket, exiting child"
    error Cas d'erreur.
    + "Premature end of script headers"
    warn Avertissements.
    + "child process 1234 did not exit, sending another + SIGHUP"
    notice Normal mais condition significative.
    + "httpd: caught SIGBUS, attempting to dump core in + ..."
    info Pour information.
    + "Server seems busy, (you may need to increase + StartServers, or Min/MaxSpareServers)..."
    debug Messages de déboguage
    + "Opening config file ..."
    + +

    Quand un niveau est spécifié, les messages des + niveaux de plus haute gravité seront également + rapportés. Par exemple, quand la directive + LogLevel info est définie, les messages de + niveau notice et warn seront aussi + notifiés.

    + +

    L'utilisation d'un niveau de gravité d'au moins + crit est recommandé.

    +
    + +

    Directive + MaxClients

    + + Syntaxe + : MaxClients nombre
    + Défaut : + MaxClients 256
    + Contexte : configuration + serveur
    + Statut + : noyau + +

    La directive MaxClients indique le nombre limite de + requêtes simultanées pouvant être + acceptées par le serveur ; il représente le + nombre maximum de processus serveur fils qui peuvent tourner + à un instant donné. Pour configurer plus de 256 + clients, vous devez modifier la constante HARD_SERVER_LIMIT du + fichier source d'Apache httpd.h et recompiler Apache.

    + +

    Les tentatives de connexions au delà de MaxClients + sont normalement mises en attente, jusqu'à une limite + fixée par la directive ListenBacklog. Une fois qu'un + processus fils est libre à la fin d'une requête + différente, la connexion en attente est + traitée.

    +
    + +

    Directive + MaxKeepAliveRequests

    + Syntaxe + : MaxKeepAliveRequests nombre
    + Défaut : + MaxKeepAliveRequests 100
    + Contexte : configuration + serveur
    + Statut + : noyau
    + Compatibilité : + Uniquement à partir de la version 1.2 d'Apache. + +

    La directive MaxKeepAliveRequests limite le nombre + de requêtes permises pour une connexion unique lorsque la + directive KeepAlive est + activée. Si nombre vaut "0", + chaque connexion peut admettre un nombre illimité de + requêtes. Nous recommendons que ce paramètre soit + réglé sur une valeur relativement haute pour + obtenir des performances optimales du serveur. Dans la version + 1.1 d'Apache, ceci est contrôlé par la directive + Keepalive

    +
    + +

    Directive + MaxRequestsPerChild

    + + Syntaxe + : MaxRequestsPerChild nombre
    + Défaut : + MaxRequestsPerChild 0
    + Contexte : configuration + serveur
    + Statut + : noyau + +

    La directive MaxRequestsPerChild indique le nombre + limite de requêtes qu'un processus serveur fils peut + traîter. Après MaxRequestsPerChild + requêtes, ce processus fils meurt. Si ce paramètre + est fixé à 0, alors les processus fils ne meurent + jamais.

    + +

    Le fait de mettre MaxRequestsPerChild à une + valeur non nulle a deux conséquences + bénéfiques :

    + +
      +
    • cela limite le volume de mémoire qu'un processus + peut consommer (accidentellement) et évite une + saturation mémoire ;
    • + +
    • en donnant à un processus un temps de vie fini, le + nombre total de processus impliqués dans le serveur + décroit lorsque la charge du serveur retombe.
    • +
    + +

    Cependant sur les systèmes Win32, il est + recommandé de mettre cette valeur à 0. Si celle + ci est à une valeur non nulle, quand le nombre de + requêtes est atteint, le processus fils quitte, et est + relancé en relisant les fichiers de configuration. Ceci + peut conduire à un comportement imprévisible si + vous avez modifié un fichier de configuration, mais ne + souhaitez pas que ces changements soient pris en compte. Voir + également ThreadsPerChild.

    + +

    NOTE: pour les requêtes + KeepAlive requests, seule la première + requête est comptée. En réalité, il + change le comportement afin de limiter le nombre de + connexions par fils.

    +
    + +

    Directive + MaxSpareServers

    + + Syntaxe + : MaxSpareServers nombre
    + Défaut : + MaxSpareServers 10
    + Contexte : configuration + serveur
    + Statut + : noyau + +

    La directive MaxSpareServers indique le nombre + maximal de processus fils en attente. Un processus en + attente est un processus qui existe, mais qui ne traite pas de + requête. S'il existe plus de MaxSpareServers de + ces processus, alors le père viendra tuer les processus + en supplémentaires.

    + +

    L'activation de cette fonctionnalité ne devrait + être nécessaire que sur les site vraiment + très chargés. Régler ce paramètre + sur une grande valeur est de toutes façon toujours une + mauvaise idée.

    + +

    Cette directive n'a aucun effet quand elle est + employée sur les plates-formes WIndows.

    + +

    Voir aussi MinSpareServers et + StartServers.

    +
    + +

    Directive + MinSpareServers

    + + Syntaxe + : MinSpareServers nombre
    + Défaut : + MinSpareServers 5
    + Contexte : configuration + serveur
    + Statut + : noyau + +

    La directive MinSpareServers indique le nombre + minimum de processus fils en attente qu'un serveur + pourra conserver. S'il existe moins de MinSpareServers + processus serveurs fils en attente, le processus père + recréera des processus fils au rythme de 1 par + seconde.

    + +

    L'activation de cette fonctionnalité ne devrait + être nécessaire que sur des sites très + chargés. Régler ce paramètre sur une + grande valeur est de toutes façons toujours une mauvaise + idée.

    + +

    Cette directive n'a aucun effet quand elle est + employée sur les plates-formes WIndows.

    + +

    Voir aussi MaxSpareServers et + StartServers.

    +
    + +

    Directive + NameVirtualHost

    + + Syntaxe + : NameVirtualHost + addr[:port]
    + Contexte : configuration + serveur
    + Statut + : noyau
    + Compatibilité : + NameVirtualHost n'est disponible qu'à partir de + la version 1.3 d'Apache. + +

    La directive NameVirtualHost est nécessaire + si vous souhaitez configurer des + hôtes virtuels nommés.

    + +

    Bien que addr puisse être exprimée + comme un nom d'hôte, il est recommandé d'utiliser + une adresse IP, exemple :

    + +
    + NameVirtualHost 111.22.33.44 +
    + +

    Avec cette directive NameVirtualHost, l'adresse + nommée par le nom de votre hôte virtuel se + résout. Si vous exploitez plusieurs hôtes + nommés sur des adresses multiples, répétez + cette directive autant de fois que nécessaire (pour + chaque adresse).

    + +

    Note: le "serveur principal" et tous les serveurs "par + défaut" ne seront jamais servis pour + une requête vers une adresse IP NameVirtualHost (à + moins que pour une raison donnée vous définissiez + NameVirtualHost mais qu'aucun VirtualHosts ne soit + défini pour cette adresse).

    + +

    En option, vous pouvez préciser un numéro de + port sur lequel l'hôte virtuel nommé sera atteint, + par exemple :

    + +
    + NameVirtualHost 111.22.33.44:8080 +
    + A partir de la version 1.3.13, vous pouvez donner comme adresse + * Ceci crée un NameVirtualHost qui + correspond à toutes les connexions venant de toutes les + adresses IP qui ne sont pas configurés avec une autre + directive NameVirtualHost ou un section <VirtualHost>. Cette option est + pratique si vous n'utilisez que des hôtes virtuels + nommés et que vous ne souhaitez pas coder en dur + l'adresse IP de votre machine dans le fichier de + configuration.
    +
    + Voir aussi : Hôtes + virtuels sur Apache +
    + +

    Directive Options

    + + Syntaxe + : Options [+|-]option [+|-]option + ...
    + Contexte : configuration + serveur, hôte virtuel, répertoire, .htaccess
    + Surcharge: Options
    + Statut + : noyau + +

    La directive Options contrôle quelles + fonctions du serveur sont disponibles dans un répertoire + particulier.

    + +

    option peut valoir None, auquel cas + aucune fonction supplémentaire n'est disponible, ou une + ou plus des possibilités suivantes :

    + +
    +
    All
    + +
    toutes options sauf MultiViews.
    + +
    ExecCGI
    + +
    + L'exécution des scripts CGI est autorisée.
    + +
    FollowSymLinks
    + +
    + + Le serveur est autorisé à suivre les liens + symboliques dans ce répertoire. + +

    Note: même si le serveur suit le + lien symbolique, il ne doit pas changer le + chemin d'accès afin de ne pas entrer en + contradiction avec les sections + <Directory>.

    +
    + +
    Includes
    + +
    + Les inclusions par Server-Side-Include sont permises.
    + +
    IncludesNOEXEC
    + +
    + + Les SSI sont autorisés, mais pas la commande #exec ni + #include des scripts CGI.
    + +
    Indexes
    + +
    + Si une URL requise pointe sur un répertoire, et aucun + fichier défini par DirectoryIndex (ex. + index.html) n'existe dans ce répertoire, alors le + serveur retourne une liste formatée du contenu du + répertoire.
    + +
    MultiViews
    + +
    + Un contenu + négocié en MultiViews est + permis.
    + +
    SymLinksIfOwnerMatch
    + +
    + + Le serveur ne suivra les liens symboliques uniquement si le + fichier visé ou le répertoire visé + appartiennent au même utilisateur que le lien + lui-même.
    +
    + +

    Normalement, si plusieurs options Options + peuvent être appliquées à un + répertoire, alors la plus restrictive est + appliquée ; les options ne sont pas combinées. + Cependant, si all les options dans la directive + Options sontprécédées d'un + symbole + ou -, alors les options sont alors combinées + entre elles. Toute option précédée d'un + + est ajoutée aux options en cours, toute option + précédée d'un - est + désactivée.

    + +

    Par exemple, sans symboles + ni - :

    + +
    +
    +<Directory /web/docs>
    +Options Indexes FollowSymLinks
    +</Directory>
    +<Directory /web/docs/spec>
    +Options Includes
    +</Directory>
    +
    +
    +
    + +

    seul Includes sera activé pour le + répertoire /web/docs/spec. Cependant, si la + seconde directive d'Options utilise les symboles + + et - :

    + +
    +
    +<Directory /web/docs>
    +Options Indexes FollowSymLinks
    +</Directory>
    +<Directory /web/docs/spec> 
    +Options +Includes -Indexes
    +</Directory>
    +
    +
    +
    + +

    alors les options FollowSymLinks et + Includes sont validées pour le + répertoire /web/docs/spec.

    +
    + +

    Directive PidFile

    + + Syntaxe + : PidFile filename
    + Défaut : PidFile + logs/httpd.pid
    + Contexte : configuration + serveur
    + Statut + : noyau + +

    La directive PidFile définit le fichier dans + lequel le serveur enregistre l'identificateur de processus du + démon. Si le nom de fichier ne commence pas par un slash + (/) alors le fichier est défini relativement au ServerRoot. Le fichier PidFile + n'est utilisé que dans le mode standalone.

    + +

    Il est souvent utile de pouvoir envoyer un signal au + serveur, pour qu'il referme et réouvre ses fichiers ErrorLog et TransferLog, et + relise ses fichiers de configuration. Ceci peut être fait + en envoyant un signal SIGHUP (kill -1) au processus + identifié par l'identificateur de processus + marqué dans PidFile.

    + +

    Le fichier PidFile est concerné par les + mêmes problèmes d'emplacement et de securité que les + fichiers de trace.

    +
    + +

    Directive Port

    + + Syntaxe + : Port numéro
    + Défaut : Port + 80
    + Contexte : configuration + serveur
    + Statut + : noyau + +

    numéro est un nombre compris entre 0 et + 65535; certains numéros de ports (surtout en dessous de + 1024) sont réservés pour des protocoles + spécifiques. Une liste des ports + prédéfinis est consultable dans la RFC 1340 + "Assigned Numbers" /etc/services; le port standard + assigné au protocole http est le port 80.

    + +

    La directive Port a deux comportements, le premier + est nécessaire pour assurer la compatibilité NCSA + (et qui peut préter à confusion dans le contexte + d'Apache).

    + +
      +
    • En absence de toute directive Listen ou BindAddress spécifiant un + numéro de port, la directive Port + définit le port réseau que le serveur + écoute. S'il existe une directive Listen ou + BindAddress spécifiant un + :numéro alors la directive Port n'a aucun + effet quant au socket que le serveur écoute.
    • + +
    • La directive Port définit la variable + d'environnement SERVER_PORT (pour les CGI et les SSI), laquelle est + utilisée lorsque le serveur génère une + URL qui point sur lui-même (par exemple lorsqu'il + indique une indirection externe vers lui-même).
    • +
    + +

    Dans aucun cas une définition du Port ne + définit à quel port un VirtualHost répond, la directive + VirtualHost elle-même se chargeant de cette + définition.

    + +

    Le comportement premier de la directive Port doit + être considéré comme similaire à + celui de la directive ServerName. + ServerName et Port spécifient + conjointement ce que vous considérez être + l'adresse canonique du serveur.

    + +

    Le Port 80 est l'un des ports prédéfinis + d'Unix. Tous les ports numérotés en dessous de + 1024 sont réservés à un usage + système, c-à-d. que des utilisateurs non + privilégiés (non-root) ne peuvent les utiliser ; + ces derniers peuvent par contre utiliser des ports de plus haut + rang. Pour utiliser le port 80, le serveur doit être + exécuté sous root. Après + avoir lié le port (bind) et avant d'accepter des + requêtes, Apache changera son utilisateur associé + tel que défini par la directive User.

    + +

    Si vous ne pouvez utiliser le port 80, choisissez tout autre + port libre. Les utilisateurs non-root devront choisir un + numéro de port supérieur à 1023, 8000 par + exemple.

    + +

    Sécurité : si vous + démarrez le serveur sous root, assurez vous + que la directive User ne mentionne pas + root. Si vous traitez des requêtes en + disposant toujours de super privilèges, vous ouvrez + votre système à des attaques majeures.

    +
    + +

    Directive require

    + + Syntaxe + : require nomEntite Entite + Entite...
    + Contexte : répertoire, + .htaccess
    + Surcharge: AuthConfig
    + Statut + : noyau + +

    Cette directive choisi quels utilisateurs autorisés + peuvent accéder à un répertoire. Les + syntaxes valides sont :

    + +
      +
    • + require user utilisateur utilisateur ... + +

      Seuls les utilisateurs nommés peuvent + accéder au répertoire.

      +
    • + +
    • + require group nomGroupe nomGroupe ... + +

      Seuls les utilisateurs des groupes cités peuvent + accéder au répertoire.

      +
    • + +
    • + require valid-user + +

      Tout utilisateur reconnu peut accéder au + répertoire (par opposition aux non + utilisateurs).

      +
    • +
    + +

    Si require apparaît dans une section <Limit>, alors les restrictions ne sont + appliquées qu'aux méthodes http + mentionnées. Autrement, toutes les méthodes http + sont restreintes. Exemple :

    + +
    +
    +AuthType Basic
    +AuthName unDomaine
    +AuthUserFile /web/users
    +AuthGroupFile /web/groups
    +<Limit GET POST>
    +require group admin
    +</Limit>
    +
    +
    +
    + +

    Pour fonctionner correctement, la directive Require doit + être accompagné de directives AuthName et AuthType, et de directives de type AuthUserFile et AuthGroupFile (servant + à définir les utilisateurs et les groupes).

    +
    + +

    Directive + ResourceConfig

    + + Syntaxe + : ResourceConfig nomfichier
    + Défaut : + ResourceConfig conf/srm.conf
    + Contexte : configuration + serveur, hôte virtuel
    + Statut + : noyau + +

    Le serveur lit dans ce fichier des directives + supplémentaires, après avoir lu le fichier + httpd.conf. nomfichier est + considéré relativement à ServerRoot. Cette fonctionnalité + peut être désactivée par l'écriture + :

    + +
    + ResourceConfig /dev/null +
    + ou sur les serveurs Win32 + +
    + ResourceConfig nul +
    + +

    Historiquement, ce fichier contenait essentiellement les + directives autres que celles servant à la configuration + du serveur ou les sections <Directory> ; en fait, il peut + contenir maintenant toute directive admise dans le contexte + configuration serveur.

    + +

    A partir de la version 1.3.13, si la directive + ResourceConfig pointe sur un répertoire + plutot qu'un fichier, Apache lira tous les fichiers de ce + répertoire ou de ses sous-répertoires et les + traitera comme fichiers de configuration.

    + +

    Voir aussi AccessConfig.

    +
    + +

    Directive RLimitCPU

    + + Syntaxe + : RLimitCPU # ou 'max' [# ou + 'max']
    + Défaut : Non + précisé; utilise le défaut du + système d'exploitation
    + Contexte : configuration + serveur, hôte virtuel
    + Statut + : noyau
    + Compatibilité : + RLimitCPU n'est disponible qu'à partir de la version 1.2 + d'Apache + +

    Accepte 1 ou 2 parametères. Le premier + paramètre indique la limite logicielle pour tous les + processus et le second paramètre la limite + supérieure en termes de ressources. Chacun des + paramètres peut être exprimé par un nombre, + ou max pour indiquer au serveur que la limite est + celle imposée par le système d'exploitation. La + limite supérieure en ressource ne peut être + atteinte que si le serveur tourne sous root, ou + éventuellement pendant la phase de démarrage.

    + +

    Ceci est valide pour les processus lancés par les + processus fils d'Apache pour le traitement des requêtes + et non pour les processus fils d'Apache eux-mêmes. Cela + inclut les scripts CGI, les commandes exec SSI, mais pas les + processus lancés par le processu Apache père tels + que les traces.

    + +

    La limite de ressources CPU est exprimée en secondes + par processus.

    + +

    Voir aussi RLimitMEM ou RLimitNPROC.

    +
    + +

    Directive + RLimitMEM

    + + Syntaxe + : RLimitMEM # ou 'max' [# ou + 'max']
    + Défaut : Non + précisé ; utilise le défaut du + système d'exploitation
    + Contexte : configuration + serveur, hôte virtuel
    + Statut + : noyau
    + Compatibilité : + RLimitMEM is only available in Apache 1.2 and later + +

    Accepte 1 ou 2 paramètres. Le premier + paramètre fixe la limite logicielle en ressources + mémoire pour tous les processus tandis que le second + paramètre fixe la limite absolue de ressources + mémoire. Chaque paramètre peut être un + nombre, ou max pour indiquer au serveur que la limite + est fixée par le système d'exploitation. La + limite supérieure en ressource ne peut être + atteinte que si le serveur tourne sous root, ou + éventuellement pendant la phase de démarrage.

    + +

    Ceci est valide pour les processus lancés par les + processus fils d'Apache pour le traitement des requêtes + et non pour les processus fils d'Apache eux-mêmes. Cela + inclut les scripts CGI, les commandes exec SSI, mais pas les + processus lancés par le processu Apache père tels + que les traces.

    + +

    Les ressources mémoire sont exprimées en + octets par processus.

    + +

    Voir aussi RLimitCPU ou RLimitNPROC.

    +
    + +

    Directive + RLimitNPROC

    + + Syntaxe + : RLimitNPROC # ou 'max' [# ou + 'max']
    + Défaut : Unset; uses + operating system defaults
    + Contexte : configuration + serveur, hôte virtuel
    + Statut + : noyau
    + Compatibilité : + RLimitNPROC n'est disponible qu'à partir de la version + 1.2 d'Apache + +

    Accepte 1 ou 2 paramètres. Le premier + paramètre fixe la limite logicielle en ressources pour + tous les processus tandis que le second paramètre fixe + la limite absolue de ressources mémoire. Chaque + paramètre peut être un nombre, ou max + pour indiquer au serveur que la limite est fixée par le + système d'exploitation. La limite supérieure en + ressource ne peut être atteinte que si le serveur tourne + sous root, ou éventuellement pendant la phase de + démarrage.

    + +

    Ceci est valide pour les processus lancés par les + processus fils d'Apache pour le traitement des requêtes + et non pour les processus fils d'Apache eux-mêmes. Cela + inclut les scripts CGI, les commandes exec SSI, mais pas les + processus lancés par le processu Apache père tels + que les traces.

    + +

    Cette limite contrôle le nombre de processus maximum + par utilisateur.

    + +

    Note : Si les processus CGI ne + tournent pas sous un autre utilisateur que l'utilisateur + du serveur, cette directive limitera aussi le nombre de + processus que le serveur lui-même peut créer. + Cette situation sera indiquée de façon + évidente par des messages d'erreur cannot + fork dans le fichier error_log.

    + +

    Voir aussi RLimitMEM ou RLimitCPU.

    +
    + +

    Directive Satisfy

    + + Syntaxe + : Satisfy 'any' ou 'all'
    + Défaut : Satisfy + all
    + Contexte : répertoire, + .htaccess
    + Statut + : noyau
    + Compatibilité : + Satisfy n'est disponible qu'à partir de la + version 1.2 d'Apache + +

    Politique d'accès si à la fois 'allow' et + 'require' sont utilisés. Le paramètre peut valoir + soit 'all' soit 'any'. Cette directive n'est + utile que si l'accès à une zone + particulière est à la fois restreinte par un + username/password et et par l'adresse d'hôte + client. Dans ce cas le comportement par défaut ("all") + impose au client de passer la restriction d'adresse et + d'entrer un identificateur d'utilisateur et un mot de passe + valides. Avec l'option "any", le client sera servi si son + adresse d'hôte est conforme ou s'il rentre des + paramètres d'identification corrects. Ceci peut + être utilisé pour restreindre un zone par un mot + de passe, tout en laissant quelques client bien + identifiés entrer dans le domaine sans avoir à se + soumettre à la procédure d'identification.

    + +

    Voir aussi Require et Allow.

    +
    + +

    Directive + ScoreBoardFile

    + + Syntaxe + : ScoreBoardFile nomfichier
    + Défaut : + ScoreBoardFile logs/apache_status
    + Contexte : configuration + serveur
    + Statut + : noyau + +

    La directive ScoreBoardFile est nécessaire + sur certaines architectures pour créer un fichier + servant à la communication entre des processus + pères et des processus fils. La meilleure façon + de savoir si votre système nécessite un tel + fichier est d'exécuter Apache et de voir s'il + crée le fichier mentionné dans la directive. Si + votre système nécessite l'emploi de ce fichier, + alors vous devez vous assurer que celui-ci ne peut être + utilisé que par une et une seule invocation + d'Apache.

    + +

    Si vous devez utiliser un ScoreBoardFile, vous + pourrez optimiser votre temps d'exécution en le + plaçant sur un disque virtuel en RAM. Cependant, + rappelez-vous que les mêmes recommandations sont à + prendre en compte pour la position de ce fichier que pour la + position des fichiers de trace quant à la securité.

    + +

    A partir d'Apache 1.2 :

    + +

    Les utilisateurs de Linux 1.x doivent pouvoir ajouter + -DHAVE_SHMGET aux EXTRA_CFLAGS dans + leur fichier de Configuration. Ceci devrait + fonctionner sur certaines installations en 1.x, mais pas + forcément sur toutes.

    + +

    Les utilisateurs de SVR4 devront considérer + l'opportunité d'ajouter -DHAVE_SHMGET aux + EXTRA_CFLAGS dans leur fichier de + Configuration. Il semble que cela fonctionne, mais + nous n'avons pu le tester pour la version 1.2. (avant la + version 1.3b4, HAVE_SHMGET devait suffire.)

    +
    +
    + + +

    Voir aussi : Arrêter et redémarrer + Apache

    +
    + +

    ScriptInterpreterSource + directive

    + + Syntaxe + : ScriptInterpreterSource registry|script
    + Défaut : + ScriptInterpreterSource script
    + Contexte : répertoire, + .htaccess
    + Statut + : noyau (seulement sur Windows) + +

    Cette directive sert, à partir de la version 1.3.5 + d'Apache, à déterminer où trouver + l'interpréteur employé pour exécuter les + scripts CGI. La technique par défaut est de prendre + l'interpréteur pointé par les caractères + #! dans le script. En fixant ScriptInterpreterSource à + registry, La table de registration de Windows sera + employée pour chercher l'interpréteur, en prenant + l'extension du fichier comme clé (par exemple .pl).

    +
    + +

    Directive + SendBufferSize

    + + Syntaxe + : SendBufferSize octets
    + Contexte : configuration + serveur
    + Statut + : noyau + +

    Le serveur règle la taille du tampon interne de TCP + au nombre d'octets spécifié. Très utile + pour augmenter les tailles par défaut dans le cas + d'utilisation de liaisons haute vitesse (ex. des liaisons + transcontinantales rapides).

    +
    + +

    Directive + ServerAdmin

    + + Syntaxe + : ServerAdmin adresseEMail
    + Contexte : configuration + serveur, hôte virtuel
    + Statut + : noyau + +

    La directive ServerAdmin définit l'adresse + e-mail que le serveur inclut dans tout message d'erreur + retourné au client.

    + +

    Il peut être utile de dédier une adresse + réservée à cet usage, par exemple :

    + +
    + ServerAdmin www-admin@foo.bar.com +
    + +

    car les utilisateur ne rappellent pas toujours dans leur + message ce à propos de quoi ils interviennent!

    +
    + +

    Directive + ServerAlias

    + Syntaxe + : ServerAlias hôte1 hôte2 + ...
    + Contexte : hôte + virtuel
    + Statut + : noyau
    + Compatibilité : + ServerAlias est disponible à partir de la + version 1.1 d'Apache + +

    La directive ServerAlias défini un nom + secondaire pour un hôte, utilisable dans le contexte d'hôte virtuels + nommés.

    + +

    Voir aussi : Hôtes virtuels sur + Apache

    +
    + +

    Directive + ServerName

    + + Syntaxe + : ServerName nom de domaine entièrement + qualifié
    + Contexte : configuration + serveur, hôte virtuel
    + Statut + : noyau + +

    La directive ServerName définit le nom + d'hôte du serveur ; celui-ci n'est utilisé que + pour créer des URL de redirection. S'il n'est pas + défini, alors le serveur tentera de le résoudre + à partir de sa propre adresse IP ; cependant, cette + résolution n'est pas d'une fiabilité absolue, ou + peut résulter en un nom autre que le nom + "souhaité". Par exemple :

    + +
    + ServerName www.wibble.com +
    + +

    peut être défini lorsque le nom canonique + (principal) de la machine actuelle est + monster.wibble.com.

    + +

    Si vous utilisez des hôtes virtuels + nommés, la directive ServerName + à l'intérieur d'une section <VirtualHost> impose + que quel nom d'hôte doit apparaître dans + l'en-tête Host: d'une requête pour + être associé à cet hôte virtuel.

    + +

    Voir aussi : Apache et DNS documentation sur les hôtes virtuels + Apache
    + UseCanonicalName
    + NameVirtualHost
    + ServerAlias
    +

    +
    + +

    Directive + ServerPath

    + Syntaxe + : ServerPath chemin
    + Contexte : hôte + virtuel
    + Statut + : noyau
    + Compatibilité : + ServerPath est disponible à partir de la + version 1.1 d'Apache. + +

    La directive ServerPath définit le chemin + d'accès servant de base pour les URL ciblant un hôte virtuel + nommé.

    + +

    Voir aussi : Hôtes virtuels sur + Apache

    +
    + +

    Directive + ServerRoot

    + + Syntaxe + : ServerRoot nomrépertoire
    + Défaut : + ServerRoot /usr/local/apache
    + Contexte : configuration + serveur
    + Statut + : noyau + +

    La directive ServerRoot définit le + répertoire dans lequel se situe le serveur. Typiquement, + ce répertoire contiendra les sous-répertoires + conf/ et logs/. Les chemins + d'accès relatifs pour d'autres fichiers de configuration + seront considérés relativement à ce + répertoire.
    + Voir aussi les -d + options de httpd.

    + +

    Voir aussi les trucs de + sécurité pour plus d'informations sur comment + correctment définir les droits d'accès à + ServerRoot.

    +
    + +

    Directive + ServerSignature

    + + Syntaxe + : ServerSignature On|Off|EMail
    + Défaut : + ServerSignature Off
    + Contexte : configuration + serveur, hôte virtuel, répertoire, .htaccess
    + Statut + : noyau
    + Compatibilité : + ServerSignature est disponible à partir de la version + 1.3. + +

    La directive ServerSignature permet la configuration d'une + ligne de bas de page pour les documents + générés par le serveur (messages d'erreur, + liste des répertoire ftp, affichage de mod_info, ...) + L'utilité de l'emploi d'une telle ligne apparaît + dans la cas d'enchaînement de proxy, où + l'utilisateuir souvent n'a aucune possibilité de + déterminer quel élément de la chaîne + de proxies a produit un message d'erreur.
    + La valeur par défaut Off supprime la ligne + d'erreur (et est compatible avec le comportement d'Apache 1.2 + et précédents). La valeur On ajoute + une ligne contenant la version du serveur, la valeur de ServerName de l'hôte virtuel et la + valeur EMail ajoute une référence + "mailto:" vers l'adresse ServerAdmin + du document demandé.

    +
    + +

    Directive + ServerTokens

    + + Syntaxe + : ServerTokens Minimal|ProductOnly|OS|Full
    + Défaut : + ServerTokens Full
    + Contexte : configuration + serveur
    + Statut + : noyau
    + Compatibilité : + ServerTokens est disponible à partir de la version 1.3 + d'Apache. Le mot clé ProductOnly est + disponible à pertir de la version 1.3.12 + +

    Cette directive contrôle si le champ + Server de l'en-tête de réponse qui + est renvoyé aux clients inclut une description du type + de système de du serveur ainsi que des informations sur + les odules compilés.

    + +
    +
    ServerTokens Prod[uctOnly]
    + +
    Le serveur renvoie par exemple : Server: + Apache
    + +
    ServerTokens Min[imal]
    + +
    Le serveur renvoie par exemple : Server: + Apache/1.3.0
    + +
    ServerTokens OS
    + +
    Le serveur renvoie par exemple : Server: + Apache/1.3.0 (Unix)
    + +
    ServerTokens Full (ou non + spécifié)
    + +
    Le serveur renvoie par exemple : Server: + Apache/1.3.0 (Unix) PHP/3.0 MyMod/1.2
    +
    + +

    Cette directive s'applique à la globalité du + serveur et ne paut pas être activé ou + désactivé sur la base d'hôtes virtuels.

    +
    + +

    Directive + ServerType

    + + Syntaxe + : ServerType type
    + Défaut : + ServerType standalone
    + Contexte : configuration + serveur
    + Statut + : noyau + +

    La directive ServerType définit comment le + serveur est exécuté par le système + d'exploitation. Type peut prendre l'une des valeurs + suivantes :

    + +
    +
    inetd
    + +
    Le serveur sera exécuté à partir du + processus system inetd ; la commande nécessaire au + démarrage du serveur devra être ajoutée + au fichier /etc/inetd.conf
    + +
    standalone
    + +
    Le serveur est lancé en tant que démon ; la + commande de démarrage du serveur sera ajoutée + aux scripts de démarrage du système + d'exploitation. (/etc/rc.local ou + /etc/rc3.d/....)
    +
    + +

    Inetd est l'option la moins utilisée des deux. Pour + chaque connexion http demandée, une nouvelle instance du + serveur est créée ; une fois la connexion + établie, ce programme tourne. Ceci implique un + coût important en ressources pour chaque connexion, mais + certains administrateurs préfèrent parfois ce + mode pour des raisons de sécurité.

    + +

    Standalone est l'option la plus fréquente pour la + directive ServerType dans la mesure où ce + dernier est de loin plus performant. Le serveur n'est + démarré qu'une fois, et dessert toutes les + connexions ultérieures. Si vous utilisez Apache sur un + site très chargé, le mode standalone sera + certainement le seul choix possible.

    +
    + +

    Directive + StartServers

    + + Syntaxe + : StartServers nombre
    + Défaut : + StartServers 5
    + Contexte : configuration + serveur
    + Statut + : noyau + +

    La directive StartServers définit le nombre + de processus fils créés dès le + démarrage du serveur. Le nombre de ces processus + étant contrôlé dynamiquement en fonction de + la charge, il y a en général peu + d'intérêt à modifier la valeur par + défaut de ce paramètre.

    + +

    Lorsque le serveur est exécuté sous Microsoft + Windows, cette directive n'a aucun effet. Comme la version + Windows d'Apache est écrite en multithread, un seul + processus gère l'intégralité des + requêtes. La directive ThreadsPerChild contrôle le + nombre maximal de threads traitant les requêtes, ce qui a + un effet similaire à la directive Unix + StartServers

    + +

    Voir aussi MinSpareServers et + MaxSpareServers.

    +
    + +

    Directive + ThreadsPerChild

    + Syntaxe + : ThreadsPerChild nombre
    + Défaut : + ThreadsPerChild 50
    + Contexte : configuration + serveur
    + Statut + : noyau (Windows)
    + Compatibilité : + Disponible seulement à partir de la version 1.3 pour + Windows d'Apache + +

    Cette directive indique au serveur combien de threads il + doit lancer. Cela est équivalent au nombre maximum de + connexions que le serveur peut traiter simultanément ; + soyez sûr de vous et réglez le nombre suffisament + haut si votre site est très fréquenté.

    + +

    Cette directive n'a aucun effet sur les systèmes + Unix. Les utilisateurs Unix regarderont les directives StartServers et MaxRequestsPerChild.

    +
    + +

    Directive + ThreadStackSize

    + Syntaxe + : ThreadStackSize nombre
    + Défaut : + ThreadStackSize 65536
    + Contexte : configuration + serveur
    + Statut + : noyau (NetWare)
    + Compatibilité : disponible à + partir de la version d'Apache 1.3 sur Netware. + +

    Cette directive indique la taille de la pile à + utiliser pour les threads. Si vous rencontrer un + problème de débordement de pile, vous devez + augmenter cette valeur.

    + +

    Cette directive n'a aucun effet sur les autres + systèmes.

    +
    + +

    Directive TimeOut

    + + Syntaxe + : TimeOut nombre
    + Défaut : TimeOut + 300
    + Contexte : configuration + serveur
    + Statut + : noyau + +

    La directive TimeOut définit la + temporisation courante pendant laquelle Apache attendra l'une + de ces trois choses :

    + +
      +
    1. Le temps total de réception d'une requête + GET.
    2. + +
    3. Le temps entre la réception de paquets TCP lors + d'une requête POST ou PUT.
    4. + +
    5. Le temps entre deux acquittements lors de la transmission + de paquets TCP de réponse.
    6. +
    + +

    Nous prévoyons dans le futur de permettre une + configuration individuelle de chacune de ces temporisations. La + valeur par défaut était de 1200 avant la version + 1.2, mais a été abaissée à 300 + depuis, ce qui est déjà largement plus que + nécessaire dans la plupart des situations. Il n'est + cependant pas réglé plus bas car il peut exister + (encore) des portions de code un peu "floues" par lesquelles le + temporisateur n'est pas remis à zéro lors de la + transmission d'un paquet.

    +
    + +

    UseCanonicalName directive

    + + Syntaxe + : UseCanonicalName on|off|dns
    + Défaut : + UseCanonicalName on
    + Contexte : configuration + serveur, hôte virtuel, répertoire
    + Surcharge : Options
    + Compatibilité : + UseCanonicalName est disponible à partir de la verion + 1.3 + +

    Dans beaucoup de situations, Apache doit construire des URL + s'autoréférençant, autremnet dit, + des URL référençant le même serveur. + Avec la directive UseCanonicalName on (dans les + versions d'Apache inférieures à 1.3) Apache + utilise les valeurs des directives ServerName et Port + pour construire un nom canonique du serveur. Ce nom est + utilisé pour toutes les URL autoréférentes + et pour les valeurs de SERVER_NAME et + SERVER_PORT pour les scripts CGI.

    + +

    Avec UseCanonicalName off, Apache formera les + URLS autoréférentes en utilisant le nom + d'hôte le numéro de port fourni par le client si + ceux ci sont fournis (sinon il utilisera le nom canonique). Ces + valeurs sont les mêmes qui sont employées pour + implémenter les hôtes virtuels + basés sur des noms, et sont disponibles pour les + mêmes clients. Les variable CGI SERVER_NAME + et SERVER_PORT seront aussi construites à + partir des valeurs fournies par les clients.

    + +

    Un exemple où cette directive est utile est le cas + d'un serveur intranet où des utilisateurs se connectent + à la machine en utilisant des noms courts tels que + www. Vous noterez que si l'utilisateur tape un nom + court et que l'URL est un répertoire tel que + http://www/splat, sans le caractère + oblique / final , Apache redirigera la requête vers + http://www.domain.com/splat/. Si vous avez une + authentification active, lu'tilisateur devra s'authentifier + deux fois, (une première fois pour www et + une deuxième fois pour An example where this may be + useful is on an intranet server where you have users connecting + to the machine using short names such as . You'll notice that + if the users type a www.domain.com). Mais si la + directive UseCanonicalName est à off, + Apache redirigera vers http://www/splat/.

    + +

    Il existe une troisième option, + UseCanonicalName DNS, qui est prévu pour + être employé avec de nombreux hôtes virtuels + basés sur les adresses IP afin de supporter les clients + qui ne fournissent pas d'en-tête Host:. Avec + cette option Apache effectue une résolution DNS inverse + sur l'adresse IP du serveur sur lequel le client se connecte + afin de travailler avec pour les URL + autoréférentes.

    + +

    Attention : si les scripts CGI font des + suppositions sur les valeurs de SERVER_NAME il + peuvent ne plus fonctionner avec cette option. Mais le script + CGI utilise uniquement SERVER_NAME pour construire + des URL autoréférentes, il ne evrait y avoir + aucun problèmes.

    + +

    Voir également : ServerName, Port

    +
    + +

    Directive User

    + + Syntaxe + : User utilisateurUnix
    + Défaut : User + #-1
    + Contexte : configuration + serveur, hôte virtuel
    + Statut + : noyau + +

    La directive User définit l'utilisateur + associé au serveur. Pour utiliser cette directive, un + serveur standalone devra être lancé sous + root. utilisateurUnix est l'un parmi + :

    + +
    +
    un nom d'utilisateur
    + +
    se réfère à un utilisateur + déclaré du système.
    + +
    # suivi d'un numéro d'utilisateur.
    + +
    se réfère à l'utilisateur + déclaré du système portant ce + numéro.
    +
    + +

    L'utilisateur peut n'avoir aucun privilège ce qui lui + permet néanmoins de pouvoir avoir accès à + des fichiers qui ne sont pas sensés être visibles + du "reste du monde", mais pas d'exécuter du code qui ne + serait pas explicitement exécutable par l'utilisateur + associé à httpd. Il est d'ailleurs + recommandé de créer un utilisateur et un groupe + specialement pour exécuter le serveur. Certains + administrateurs utilisent souvent l'utilisateur + nobody, mais ceci n'est pas toujours possible ou + souhaitable. Par exemple, le cache de mod_proxy quancd celui + est activé , doit être accessible à cette + utilisateur (voir la directive CacheRoot + ).

    + +

    Note : si vous démarrez le serveur + sous un utilisateur non-root, la tentative pour passer sous un + utilisateur de moindre privilège échouera, et le + serveur continuera à sexécuter sous l'utilisateur + d'origine. Si vous démarrez le serveur sous + root, alors il sera normal que le processus + père continue à s'exécuter sous + root.

    + +

    Note spécifique : L'utilisation de + cette directive dans une section <VirtualHost> + nécessite un wrapper suEXEC + correctement configuré. Lorsqu'elle est utilisée + de cette façon dans une section + <VirtualHost>, seul l'utilisateur associé + à l'exécution des scripts CGI est affecté. + Les requêtes non-CGI seront toujours traitées sous + l'utilisateur défini dans la directive User de la + section principale.

    + +

    Sécurité : Ne + définissez pas l'utilisateur (ni le groupe) comme root sauf si vous + savez exactement ce que vous faites, et si vous êtes + totalement conscients des risques qui sont encourus.

    +
    + +

    Directive + <VirtualHost>

    + + Syntaxe + : <VirtualHost adresse[:port] + ...> ... </VirtualHost>
    + Contexte : configuration + serveur
    + Statut + : Core
    + Compatibilité : la + "virtualisation" d'hôtes non basés sur l'adressage + IP n'est disponible qu'à partir de la version 1.1 + d'Apache
    + Compatibilité : le + support d'adresses multiples n'est disponible qu'à + partir de la version 1.2 d'Apache + +

    Les directives <VirtualHost> et </VirtualHost> + sont utilisées pour "encapsuler" un groupe de directives + qui s'appliquent à un hôte virtuel particulier. + Toute directive autorisée dans un contexte "hôte + virtuel" peut être présente. Lorsque le serveur + reçoit une requête demandant un document + spécifique sur un hôte virtuel spécifique, + il utilise les directives de configuration explicitées + dans la section <VirtualHost> correspondante. + Adresse peut être :

    + +
      +
    • l'adresse IP de l'hôte virtuel
    • + +
    • un nom de domaine entièrement qualifié pour + l'adresse IP de cet hôte virtuel.
    • +
    + +

    Exemple :

    + +
    +
    +<VirtualHost 10.1.2.3> 
    +ServerAdmin webmaster@host.foo.com
    +DocumentRoot /www/docs/host.foo.com 
    +ServerName host.foo.com
    +ErrorLog logs/host.foo.com-error_log
    +TransferLog logs/host.foo.com-access_log
    +</VirtualHost>
    +
    +
    +
    + +

    Chaque hôte virtuel doit être associé + à une adresse IP, à un numéro de port ou + à un nom d'hôte différents que celui + attribué au serveur, dans le dernier cas la machine du + serveur doit être configurée pour accepter des + paquets IP sur plusieurs adresses. (Si la machine ne dispose + pas de plusieurs interfaces réseau physiques, ceci peut + être obtenu par la commande ifconfig alias + (si votre OS l'accepte), ou par des patchs du kernel du type VIF (pour SunOS(TM) + 4.1.x)).

    + +

    Vous pouvez spécifier plus d'une adresse IP. Ceci + peut être utile si une machine répond au + même nom venant de deux différentes interfaces. + Par exemple, si vous avez un hôte virtuel qui est + accessible des hôtes à partir d'un réseau + interne (intranet) et externe (internet). Exemple :

    + +
    + <VirtualHost 192.168.1.2 204.255.176.199>
    + DocumentRoot /www/docs/host.foo.com
    + ServerName host.foo.com
    + ServerAlias host
    + </VirtualHost>
    +
    + +

    Le nom prédéfini _default_ peut + être attribué auquel cas cet hôte virtuel + lira toutes les adresses IP qui ne sont pas explicitement + listées dans les autres hôtes virtuels + définis. En l'absence d'un hôte virtuel _default_, + la configuration serveur "principale", à savoir toutes + les définitions en dehors des sections VirtualHost, + seront utilisées si aucun hôte virtuel ne + reconnaît l'adresse.

    + +

    Vous pouvez spécifier une commande :port + pour changer le port reconnu par l'hôte virtuel. Si aucun + port n'est mentionné, alors le port reconnu est par + défaut celui mentionné dans la dernière + directive de Port de la + section principale qui précède. Vous pouvez + également spécifier :* pour + reconnaître tous les ports à cette adresse. (Ceci + est conseillé lorsque l'hôte virtuel est le + _default_.)

    + +

    Sécurité: Voir les conseils de + sécurité pour plus de détails sur les + risques encourus si le répertoire contenant les fichiers + de trace peut être écrit par un autre utilisateur + que celui sous lequel est exécuté le serveur.

    + +

    Note: L'utilisation de la directive + <VirtualHost> n' affecte + pas les adresses qu'écoute Apache. Vous + devez vous assurer que les adresses définies pour les + hôtes virtuels font aussi partie de l'ensemble des + adresses écoutées par Apache et définies + par des directives BindAddress ou Listen.

    + +

    Voir aussi : Hôtes virtuels sur + Apache
    + Avertissement concernant DNS et + Apache
    + Configurer les ports et adresses + utilisés par Apache

    + +

    Voir aussi : Comment fonctionnent les sections + concernant les répertoires, chemins et fichiers pour + une explication plus précise concernant la + manière dont ces sections sont combinées + lorsqu'une requête est traitée. + +

    + + + diff --git a/htdocs/manual/mod/core.html.html b/htdocs/manual/mod/core.html.html new file mode 100644 index 00000000000..4f4cd5ed2da --- /dev/null +++ b/htdocs/manual/mod/core.html.html @@ -0,0 +1,4 @@ + + + diff --git a/htdocs/manual/mod/core.html.ja.jis b/htdocs/manual/mod/core.html.ja.jis new file mode 100644 index 00000000000..5d9aeadf7d9 --- /dev/null +++ b/htdocs/manual/mod/core.html.ja.jis @@ -0,0 +1,4193 @@ + + + + + + Apache Core Features + + + + + + +

    Apache $B%3%"5!G=(B

    + +

    $B0J2<$N%G%#%l%/%F%#%V$O(B Apache + $B$N%3%"5!G=$r%3%s%H%m!<%k$9$k$b$N$G!">o$KMxMQ2DG=$G$9!#(B

    + +

    $B%G%#%l%/%F%#%V(B

    + + +
    + +

    AcceptFilter + $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: AcceptFilter + on|off
    + $B%G%U%)%k%H(B: AcceptFilter + on
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k(B
    + $B%9%F!<%?%9(B: core
    + $B8_49@-(B: AcceptFilter $B$O(B + Apache 1.3.22 $B0J9_$GMxMQ2DG=$G$9!#(B + +

    AcceptFilter $B$O!"(BBSD + $B$KFCM-$N%U%#%k%?$N:GE,2=$r%3%s%H%m!<%k$7$^$9!#(B + $B$3$N5!G=$O%G%U%)%k%H$GAH$_9~$^$l$^$9!#(B + $B$=$7$F!"%7%9%F%`$,$3$N5!G=$r%5%]!<%H(B + (setsocketopt() $B$G(B SO_ACCEPTFILTER $B%*%W%7%g%s$,MxMQ$G$-$k(B) + $B$7$F$$$l$P!"%G%U%)%k%H$GM-8z$H$J$j$^$9!#(B + $B8=:_$N$H$3$m!"(BFreeBSD $B$K$*$$$F$N$_%5%]!<%H$5$l$F$$$^$9!#(B

    + +

    $B>\$7$$>pJs$rF@$k$K$O!"(B$B@-G=$N%R%s%H(B$B$N%U%#%k%?%;%/%7%g%s$r(B + $B8+$F$/$@$5$$!#(B

    + +

    $B$J$*!"%3%s%Q%$%k;~$K(B AP_ACCEPTFILTER_OFF + $B%U%i%0$rMxMQ$9$l$P%G%U%)%k%H$rL58z$K$9$k$3$H$,2DG=$G$9!#(B + httpd -V $B$H(B httpd -L + $B$rMxMQ$9$k$3$H$K$h$C$F!"%3%s%Q%$%k;~$N%G%U%)%k%H$H(B SO_ACCEPTFILTER + $B$,M-8z$K$J$C$F$$$k$+$I$&$+$r;2>H$9$k$3$H$,$G$-$^$9!#(B

    + +
    + +

    AcceptMutex + $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: AcceptMutex + uslock|pthread|sysvsem|fcntl|flock|os2sem|tpfcore|none|default
    + $B%G%U%)%k%H(B: AcceptMutex + default
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k(B
    + $B%9%F!<%?%9(B: core
    + $B8_49@-(B: AcceptMutex $B$O(B + Apache 1.3.21 $B0J9_$GMxMQ2DG=$G$9!#(B + +

    AcceptMutex $B$O!"(Baccept() $B$K$*$$$F$I$NJ}K!$N(B + mutex $B$rMxMQ$9$k$N$+$r;XDj$7$^$9!#$J$*!"MxMQ$G$-$k(B mutex + $B$O%3%s%Q%$%k;~$K7hDj$5$l!"(B + $B%W%i%C%H%U%)!<%`$K$h$C$F$O$9$Y$F$NJ}K!$OMxMQ$G$-$J$$$3$H$,$"$j$^$9!#(B + $BMxMQ$G$-$k(B mutex $B$O!"%3%^%s%I%i%$%s%*%W%7%g%s$G(B + httpd -V $B$r;XDj$9$k$H0lMw$,I=<($5$l$^$9!#(B

    + +

    $B%3%s%Q%$%k;~$N%U%i%0$H$7$F(B + -D HAVE_METHOD_SERIALIZED_ACCEPT + $B$r;XDj$9$k$3$H$K$h$C$F!"0[$J$kJ}K!$rDI2C$9$k$3$H$b$G$-!"(B + $BFCDj$N%W%i%C%H%U%)!<%`8~$1$K(B include/ap_config.h + $B$rJT=8$9$k$3$H$b2DG=$G$9!#(B

    + +

    $B$3$N%G%#%l%/%F%#%V$O(B Microsoft Windows + $B$KBP$7$F;XDj$7$F$b8z2L$O$"$j$^$;$s(B

    + +

    $B>\$7$$>pJs$K$D$$$F$O(B$B%Q%U%)!<%^%s%9%A%e!<%s%K%s%0(B$B$r(B + $B;2>H$7$F$/$@$5$$!#(B

    + +
    + +

    AccessConfig + $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: AccessConfig + file-path|directory-path|wildcard-path
    + $B%G%U%)%k%H(B: AccessConfig + conf/access.conf
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k!"%P!<%A%c%k%[%9%H(B
    + $B%9%F!<%?%9(B: core
    + $B8_49@-(B:Apache 1.3.13 + $B0J9_$G$N$_!"%U%!%$%kL>$NBe$o$j$K%G%#%l%/%H%j%Q%9$r;XDj$G$-$^$9!#(B + $B$3$N%G%#%l%/%F%#%V$O%P!<%8%g%s(B 2.0 $B0J9_$K$OB8:_$7$^$;$s!#(B + +

    ResourceConfig $B%U%!%$%k$rFI$_9~$s$@8e!"(B + $B$=$l$K2C$($FB?$/$N%G%#%l%/%F%#%V$r$3$3$G5-$7$?%U%!%$%k$+$iFI$_9~$_$^$9!#(B + File-path $B$O!"(BServerRoot + $B$G5-$7$?%Q%9$+$i$N!"AjBP%Q%9$G$9!#(B
    + $B$J$*!"$3$N5!G=$rL58z$K$9$k$K$O + +

    + AccessConfig /dev/null +
    + Win32 $B$N>l9g(B + +
    + AccessConfig nul +
    + + $B0JA0$O!"$3$N%U%!%$%k$K$O(B <Directory> + $B%;%/%7%g%s$N$_$,=q$+$l$F$$$^$7$?!#(B + $B8=:_$G$O%5!<%P@_Dj%U%!%$%k$K5-=R$G$-$k$3$H$9$Y$F$,5-=R2DG=$K$J$C$F$$$^$9!#(B + $B$?$@!"(BApache $B$N%P!<%8%g%s(B 1.3.4 $B0J9_$G$O!"(B + Apache $B$H6&$KG[I[$5$l$F$$$k%G%U%)%k%H$N(B access.conf + $B%U%!%$%k$K$O%3%a%s%H$7$+=q$+$l$F$*$i$:!"(B + $B$9$Y$F$N%G%#%l%/%F%#%V$,httpd.conf $B$K5-=R$5$l$F$$$^$9!#(B + +

    + $B$b$7!"$3$N(B AccessConfig + $B%G%#%l%/%F%#%V$K!"%U%!%$%k$G$O$J$/%G%#%l%/%H%j$,;XDj$5$l$l$P!"(B + Apache $B$O$=$N%G%#%l%/%H%jFb$N$9$Y$F$N%U%!%$%k$rFI$_9~$_!"(B + $B$=$l$i$r@_Dj%U%!%$%k$H$7$F=hM}$7$^$9!#(B

    +

    $BBe$o$j$K!"%o%$%k%I%+!<%I$r;H$C$FHO0O$r9J$k$3$H$b$G$-$^$9!#(B + $B$9$J$o$A!"(B*.conf $B%U%!%$%k$N$_!"$H$$$C$?$h$&$K!#(B

    +

    $B%G%U%)%k%H$G$O;XDj$5$l$?%G%#%l%/%H%j$N!V(B$B$I$N$h$&$J(B$B!W(B + $B%U%!%$%k$G$b@_Dj%U%!%$%k$H$7$FFI$_9~$^$l$^$9!#(B

    +

    $B$G$9$+$i8m$C$F(B ($BNc$($P%(%G%#%?$G%F%s%]%i%j%U%!%$%k$r:n@.$9$kEy(B) + $B%U%!%$%k$rCV$+$J$$$h$&$KCm0U$7$F$/$@$5$$!#(B

    + +

    $B;2>H(B: Include,ResourceConfig.

    +
    + +

    AccessFileName + $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: AccessFileName + filename [filename] ...
    + $B%G%U%)%k%H(B: AccessFileName + .htaccess
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k!"%P!<%A%c%k%[%9%H(B
    + $B%9%F!<%?%9(B: core
    + $B8_49@-(B: AccessFileName $B$O(B Apache 1.3 + $B0J9_$K$*$$$F$N$_J#?t$N%U%!%$%kL>$r;XDj$G$-$^$9!#(B + +

    $B%I%-%e%a%s%H$r%/%i%$%"%s%H$KJV$9$H$-!"%5!<%P$O%G%#%l%/%H%j$K(B + $BBP$7$F%"%/%;%9@_Dj%U%!%$%k$,M-8z$K$J$C$F$$$l$P!"$=$N%I%-%e%a%s%H$X$N(B + $B%Q%9>e$K$"$k$9$Y$F$N%G%#%l%/%H%j$+$i$3$3$G;XDj$5$l$?L>A0$N0lMw$NCf$G(B + $B:G=i$K8+$D$+$C$?%U%!%$%k$r!"$=$l$>$l%"%/%;%9@)8f%U%!%$%k$H$7$FFI$_9~$_$^$9!#(B + $BNc$($P(B:

    + +
    + AccessFileName .acl +
    + $B$N$h$&$K;XDj$5$l$F$$$k$H!"(B /usr/local/web/index.html + $B$rJV$9>l9g!"0J2<$N$h$&$K$7$FL58z$K$5$l$F$$$J$$8B$j!"(B + $B%I%-%e%a%s%H$rJV$9A0$K(B /.acl, /usr/.acl, /usr/local/.acl, + /usr/local/web/.acl $B$+$i%G%#%l%/%F%#%V$rFI$_9~$_$^$9!#(B + +
    + <Directory />
    + AllowOverride None
    + </Directory>
    +
    + +

    $B;2>H(B: AllowOverride $B5Z$S(B $B@_Dj%U%!%$%k(B

    +
    + +

    AddDefaultCharset $B%G%#%l%/%F%#%V(B

    + $B9=J8(B: AddDefaultCharset + On|Off|charset
    + $B%3%s%F%-%9%H(B: $B$9$Y$F(B
    + $B%9%F!<%?%9(B: core
    + $B%G%U%)%k%H(B: + AddDefaultCharset Off
    + $B8_49@-(B: + AddDefaultCharset $B$O(B Apache 1.3.12 $B0J9_$GMxMQ2DG=$G$9!#(B + +

    $B$3$N%G%#%l%/%F%#%V$O!"(BHTTP $B%X%C%@$K%3%s%F%s%H%?%$%W%Q%i%a!<%?$r(B + $B;}$?$J$$%l%9%]%s%9$KDI2C$5$l$kJ8;z%;%C%H$NL>A0$r;XDj$7$^$9!#(B + $B$3$l$O!"%I%-%e%a%s%HFb$N(B META + $B%?%0$G;XDj$5$l$?$I$N$h$&$JJ8;z%;%C%H$bL58z$K$7$^$9!#(B + AddDefaultCharset Off + $B$H$$$&@_Dj$K$h$j!"$3$N5!G=$OL58z$K$J$j$^$9!#(B + AddDefaultCharset On $B$K$9$l$P!"%G%#%l%/%F%#%V$NMW5aDL$j(B + Apache $BFbIt$N%G%U%)%k%HJ8;z%;%C%H(B iso-8859-1 + $B$K@_Dj$7$^$9!#$^$?!"B>$N(B charset $B$b;XDj$G$-$^$9!#(B

    + +

    $BNc(B:

    + +
    + AddDefaultCharset utf-8 +
    + +

    $BCm0U(B: $B$3$l$O%G%U%)%k%H$G(B Apache + $B$,@8@.$9$k%9%F!<%?%9%Z!<%8(B ('404 Not Found' $B$d(B + '301 Moved Permanently' $B$J$I(B) $B$K$O1F6A(B$B$7$^$;$s(B$B!#(B + $B$=$l$i$O!"(B($B%Z!<%8$NFbMF$,%O!<%I%3!<%I$5$l$F=q$+$l$F$$$k(B) $B + $BJ8;z%;%C%H$,$"$k$?$a!"%G%U%)%k%H$,E,MQ$5$l$kI,MW$O$J$$$+$i$G$9!#(B

    + +
    + +

    AddModule + $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: AddModule + module [module] ...
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k(B
    + $B%9%F!<%?%9(B: core
    + $B8_49@-(B: AddModule $B$O(B Apache 1.2 + $B0J9_$GMxMQ2DG=$G$9!#(B + +

    Apache + $B$G$O!";HMQ$7$J$$%3%s%Q%$%k:Q$_$N%b%8%e!<%k$r;}$D$3$H$,$G$-$^$9!#(B + $B$3$N%G%#%l%/%F%#%V$O!"$=$l$i$N%b%8%e!<%k$r;HMQ$9$k$h$&$K$G$-$^$9!#(B + $B5/F08e!"$"$i$+$8$a;HMQ%b%8%e!<%k$N%j%9%H$r:n@.$7$F$$$^$9$,!"(B + ClearModuleList + $B%G%#%l%/%F%#%V$K$h$j$=$N%j%9%H$NCf?H$r>C$9$3$H$,$G$-$^$9!#(B

    + +

    $BNc(B:

    + +
    + AddModule mod_include.c +
    + +

    AddModule $B$N=gHV$O=EMW$G$9!#%b%8%e!<%k$OM%@hEY$N(B + $B5U=g$K=q$-$^$9!=8e$K=q$+$l$F$$$k$b$N$OA0$NJ}$K=q$+$l$F$$$k$b$N$N(B + $B?6$kIq$$$r>e=q$-$9$k$3$H$,$G$-$^$9!#$3$l$O!"L\$K8+$($k1F6A$,$"$j$^$9!#(B + $BNc$($P!"(BUserDir $B$,(B Alias $B$N8e$K$"$l$P!"%f!<%6$N%[!<%`%G%#%l%/%H%j$N(B + $B%(%$%j%"%9$r:n$k$3$H$O$G$-$^$;$s!#$h$j>\$7$$>pJs$H!"?d>)$5$l$F$$$k(B + $B=gHV$K$D$$$F$O(B Apache $B%=!<%9G[I[Cf$N(B src/Configuration.tmpl + $B$r;2>H$7$F$/$@$5$$!#(B

    + +

    $B;2>H(B: ClearModuleList $B$H(B LoadModule

    +
    + +

    AllowOverride + $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: AllowOverride + All|None|directive-type [directive-type] + ...
    + $B%G%U%)%k%H(B: AllowOverride + All
    + $B%3%s%F%-%9%H(B: $B%G%#%l%/%H%j(B
    + $B%9%F!<%?%9(B: core + +

    $B%5!<%P$,(B (AccessFileName $B$K$h$C$F;XDj$5$l$?(B) + .htaccess $B%U%!%$%k$r8+$D$1$?;~!"$=$N%U%!%$%k$NCf$G(B + $B@k8@$5$l$?$I$N%G%#%l%/%F%#%V$,$h$jA0$KDj5A$5$l$?%"%/%;%9>pJs$r(B + $B>e=q$-$G$-$k$+$rCN$kI,MW$,$"$j$^$9!#(B

    + +

    Note: AllowOverride is only + valid in <Directory> sections, not in <Location> or + <Files> sections, as implied by the Context + section above.

    + +

    $B$3$N%G%#%l%/%F%#%V$r(B None $B$K@_Dj$9$k$H!"(B.htaccess + $B%U%!%$%k$O40A4$KL5;k$5$l$^$9!#(B + $B$3$N>l9g!"%5!<%P$O%U%!%$%k%7%9%F%`$N(B .htaccess + $B%U%!%$%k$rFI$`$3$H$r;n$_$5$($7$^$;$s!#(B

    + +

    $B$3$N%G%#%l%/%F%#%V$,(B All $B$K@_Dj$5$l$F$$$k$H$-$K$O!"(B + .htaccess $B$H$$$&(B $B%3%s%F%-%9%H(B + $B$r;}$D$9$Y$F$N%G%#%l%/%F%#%V$,MxMQ$G$-$^$9!#(B

    + +

    directive-type + $B$K$O!"0J2<$N%G%#%l%/%F%#%V72$N%-!<%o!<%I$N$I$l$+$r;XDj$7$^$9!#(B

    + +
    +
    AuthConfig
    + +
    + + $BG'>Z$K4X$9$k%G%#%l%/%F%#%V$N;HMQ$r5v2D$9$k(B (AuthDBMGroupFile, + AuthDBMUserFile, + AuthGroupFile, AuthName, AuthDigestRealmSeed, AuthType, AuthUserFile, Require $B$J$I(B)$B!#(B
    + +
    FileInfo
    + +
    + $B%I%-%e%a%s%H%?%$%W$r@)8f$9$k$?$a$N%G%#%l%/%F%#%V$N;HMQ$r5v2D$9$k(B (AddEncoding, AddLanguage, AddType, DefaultType, ErrorDocument, LanguagePriority + $B$J$I(B)$B!#(B
    + +
    Indexes
    + +
    + $B%G%#%l%/%H%j%$%s%G%C%/%9$r@)8f$9$k$?$a$N%G%#%l%/%F%#%V$N;HMQ$r5v2D$9$k(B + (AddDescription, + AddIcon, AddIconByEncoding, + AddIconByType, + DefaultIcon, DirectoryIndex, FancyIndexing, HeaderName, IndexIgnore, IndexOptions, ReadmeName + $B$J$I(B)$B!#(B
    + +
    Limit
    + +
    + $B%[%9%H$X$N%"%/%;%9@)8f$r9T$&$?$a$N%G%#%l%/%F%#%V$N;HMQ$r5v2D$9$k(B (Allow, + Deny + and Order).
    + +
    Options
    + +
    + $BFCDj$N%G%#%l%/%H%j$K$*$1$k5!G=$r;XDj$9$k$?$a$N%G%#%l%/%F%#%V$N;HMQ$r5v2D$9$k(B + (Options $B$H(B XBitHack).
    +
    + +

    $BNc(B:

    +
    AllowOverride AuthConfig Indexes
    + +

    $B;2>H(B: AccessFileName $B5Z$S(B $B@_Dj%U%!%$%k$N5-=R(B

    +
    + +

    AuthName + $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: AuthName + auth-domain
    + $B%3%s%F%-%9%H(B: $B%G%#%l%/%H%j!"(B + .htaccess
    + $B>e=q$-(B: AuthConfig
    + $B%9%F!<%?%9(B: core + +

    $B$3$N%G%#%l%/%F%#%V$O%G%#%l%/%H%j$KBP$9$kG'2DNN0h(B ($BLuCm(B: realm) + $B$NL>A0$r;XDj$7$^$9!#(B + $BG'2DNN0h$O!"MxMQ$H%Q%9%o!<%I$rAw?.$9$l$P$h$$$N$+$r(B + $B%/%i%$%"%s%H$K65$($k$?$a$KMxMQ$7$^$9!#(B + AuthName $B$O0l$D$N0z?t$rl9g$K$O!"0zMQId$G0O$^$J$1$l$P$J$j$^$;$s!#(B + $B$3$N%G%#%l%/%F%#%V$O(B + AuthType $B%G%#%l%/%F%#%V$d(B + Require $B%G%#%l%/%F%#%V5Z$S!"(B + AuthUserFile $B$d(B AuthGroupFile + $B$J$I$N%G%#%l%/%F%#%V$H0l=o$KMxMQ$9$kI,MW$,$"$j$^$9!#(B

    + +

    $BNc(B:

    + +
    AuthName "$BHkL)$N%Q%9%o!<%I(B"
    + +

    $B$3$3$G(B AuthName $B$K;XDj$7$?J8;zNs$,!"(B + $BBgItJ,$N%V%i%&%6$N%Q%9%o!<%I%@%$%"%m%0$KI=<($5$l$^$9!#(B

    + +

    $BLuCm(B: + $B0z?t$KM?$($kJ8;zNs$O1Q?t;z$d%O%$%U%s$J$I$N5-9f$N$_$rMxMQ$9$k$Y$-$G$9$,!"(B2 + $B%P%$%HJ8;z$r;XDj$7$?>l9g$G$b!"(B + Apache $B$ODL>o$NJ8;zNsF1MM$K%/%i%$%"%s%H$XAw=P$7$^$9!#(B + ($B$?$@%5%]!<%H$,I=L@$5$l$F$$$k$o$1$G$O$"$j$^$;$s(B)

    + +

    $B;2>H(B: $BG'>Z!">5G'!"%"%/%;%9@)8f(B

    +
    + +

    AuthDigestRealmSeed + directive

    + + $B9=J8(B: AuthDigestRealmSeed + secret-real-string
    + $B%3%s%F%-%9%H(B: $B%G%#%l%/%H%j!"(B + .htaccess
    + $B>e=q$-(B: AuthConfig
    + $B%9%F!<%?%9(B: $B%3%"(B + +

    $B$3$N%G%#%l%/%F%#%V$OG'2DNN0h$4$H$NHkL)$N0lEY$-$j$N@\F,<-$r(B + $B@_Dj$7$^$9!#$3$l$O(B Digest + $B8r49$N4V$K!"%Q%9%o!<%I!"G'2DNN0hL>J8;zNs$r!"(B + $BB>$N>l=j$G:FMxMQ$G$-$J$$MM$K$7$^$9!#(B

    +

    $B$3$l$O(B mod_digest.html $B$K$7$+E,MQ$5$l$^$;$s!#(B + $Bmod_auth_digest.html + $B$O@lMQ$N:FMxMQBP:v(B ($B$h$j?J$s$@!";~4V$b9MN8$7$?$b$N(B) $B$r + +

    $BF0:n$9$k$?$a$K$O(B AuthType $B$K(B Digest $B$N%?%$%W!"(B + Require $B%G%#%l%/%F%#%V$H(B + AuthUserFile $B$d(B AuthGroupFile + $B%G%#%l%/%F%#%V$,@_Dj$5$l$F$$$k$3$H$,I,MW$G$9!#(B

    + +

    $B;2>H(B: $BG'>Z!">5G'!"%"%/%;%9@)8f(B

    +
    + +

    AuthType + $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: AuthType + Basic|Digest
    + $B%3%s%F%-%9%H(B: $B%G%#%l%/%H%j!"(B + .htaccess
    + $B>e=q$-(B: AuthConfig
    + $B%9%F!<%?%9(B: core + +

    $B$3$N%G%#%l%/%F%#%V$OBP>]%G%#%l%/%H%j$GMxMQ$9$k%f!<%6!Z$NBasic $BDigest $B$7$+AuthType $B%G%#%l%/%F%#%V$d(B + Require $B%G%#%l%/%F%#%V5Z$S!"(B + AuthUserFile $B$d(B AuthGroupFile + $B$J$I$N%G%#%l%/%F%#%V$H0l=o$KMxMQ$9$kI,MW$,$"$j$^$9!#(B

    + +

    AuthDigest $B$,;H$o$l$k$H(B AuthDigestRealmSeed $B$b%;%C%H$5$l$^$9!#(B

    +

    $B;2>H(B: $BG'>Z!">5G'!"%"%/%;%9@)8f(B

    +
    + +

    BindAddress + $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: BindAddress + *|IP-address|domain-name
    + $B%G%U%)%k%H(B: BindAddress + *
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k(B
    + $B%9%F!<%?%9(B: core
    + $B8_49@-(B: BindAddress $B$O(B + $BHs?d>)$G(B Apache 2.0 $B$G$O:o=|$5$l$^$9!#(B + +

    Unix® $B$K$*$$$F(B HTTP $B%5!<%P$O!"%5!<%P$N$9$Y$F$N(B IP + $B%"%I%l%9$r(B listen $B$9$k$3$H$,$G$-!"0l$D$N(B IP $B%"%I%l%9$@$1$r(B + listen $B$9$k$3$H$b$G$-$^$9!#$3$N%G%#%l%/%F%#%V$K(B * + $B$r;XDj$9$k$H!"%5!<%P$O$9$Y$F$N(B IP $B%"%I%l%9>e$G(B listen + $B$r9T$$$^$9!#$=$l0J30$N>l9g$O!"FCDj$N(B IP-address $B$+(B + domain-name $B$N$_$G(B listen $B$7$^$9!#(B

    + +

    $BNc(B:

    + + BindAddress 192.168.15.48
    + +

    $B$J$*!"(BBindAddress + $B%G%#%l%/%F%#%V$O0l$D$7$+MxMQ$G$-$^$;$s!#(B

    + +

    $B$3$N%G%#%l%/%F%#%V$O(B Apache 2.0 $B$K$*$$$F$OHs?d>)$G!"Listen + $B%G%#%l%/%F%#%V$rMxMQ$G$-$^$9!#(B

    +

    BindAddress $B$O!"(B<VirtualHost> + $B%;%/%7%g%s$r;H$&Be$o$j$K!"J#?t$N%5!<%P$r5/F0$7$F(B$B%P!<%A%c%k%[%9%H(B$B$r%5%]!<%H$9$k(B + $B$?$a$KMxMQ$9$k$3$H$,$G$-$^$9!#(B

    + +

    $B;2>H(B: + DNS $B$K4X$9$kLdBj(B
    + $B;2>H(B: Apache + $B$,MxMQ$9$k%"%I%l%9$H%]!<%H$N@_Dj(B

    +
    + +

    BS2000Account + $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: BS2000Account + account
    + $B%G%U%)%k%H(B: none
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k(B
    + $B%9%F!<%?%9(B: core
    + $B8_49@-(B: BS2000Account $B$O(B BS2000 + $B%^%7%s$G$+$D(B Apache 1.3.22 $B0J9_$G$N$_MxMQ2DG=$G$9!#(B + +

    BS2000Account $B%G%#%l%/%F%#%V$O!"(BBS2000 + $B%[%9%H$G$N$_M-8z$G$"$j!"(B(User + $B%G%#%l%/%F%#%V$rMxMQ$7$F(B) Apache + $B$ro(B SYSROOT + $B$G$"$k!"%5!<%P$r5/F0$7$?4IM}BS2000Account + $B%G%#%l%/%F%#%V$O(B 1 $B2s$@$1MxMQ$G$-$^$9!#(B

    + +

    $B;2>H(B: Apache $B$N(B + EBCDIC $B$X$N0\?"HG(B

    +
    + +

    CGICommandArgs + directive

    + + $B9=J8(B: CGICommandArgs On|Off
    + $B%G%U%)%k%H(B: CGICommandArgs On
    + $B%3%s%F%-%9%H(B: $B%G%#%l%/%H%j!"(B.htaccess
    + $B>e=q$-(B: Options
    + $B%9%F!<%?%9(B: core
    + $B8_49@-(B: Apache + 1.3.24 $B0J9_$G;HMQ2DG=!#(B + +

    $B@N!9!"%$%s%?!<%M%C%H$,$h$j0BA4$G=c?h$@$C$?$H$-$K$O!"(B + $B%5!<%P$,(B '=' $BJ8;z$r4^$^$J$$%/%(%j!<IsIndex> $B$K$h$j@8@.$5$l$?8!:w$O$h$/(B + $B$=$N$h$&$KF0:n$7$F$$$^$7$?!#$3$N$h$&$JF0:n$O:#F|$G$O0lHL$K(B + $B0BA4$G$J$$$H8+$J$5$l$F$$$^$9$,!"(BApache $B$N%G%U%)%k%H$NF0:n$O(B + $B8eJ}8_49@-$N$?$a$K$3$N?6$kIq$$$r0];}$7$F$$$^$9!#$?$$$F$$$N(B CGI + $B%W%m%0%i%`$O%3%^%s%I%i%$%s$N0z?t$rCGICommandArgs Off $B$H@_Dj$9$k$3$H$,?d>)$5$l$F$$$^$9!#(B +

    + +
    + +

    ClearModuleList $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: ClearModuleList
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k(B
    + $B%9%F!<%?%9(B: core
    + $B8_49@-(B: ClearModuleList + $B$O(B Apache 1.2 $B0J9_$GMxMQ2DG=$G$9!#(B + +

    $B%5!<%P$O$"$i$+$8$aM-8z$J%b%8%e!<%k$N0lMw$r;}$C$F$$$^$9!#(B + $B$3$N%G%#%l%/%F%#%V$O$=$N0lMw$r%/%j%"$7$^$9!#8e$G(B + AddModule $B%G%#%l%/%F%#%V$r;H$C$F(B + $B%b%8%e!<%k$r0lMw$K:F$S2C$($k$3$H$,4|BT$5$l$F$$$^$9!#(B

    + +

    $B;2>H(B: AddModule $B$H(B LoadModule

    + +
    + +

    ContentDigest + $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: ContentDigest + on|off
    + $B%G%U%)%k%H(B: ContentDigest + off
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k!"(B + $B%P!<%A%c%k%[%9%H!"%G%#%l%/%H%j!"(B.htaccess
    + $B>e=q$-(B: Options
    + $B%9%F!<%?%9(B: experimental
    + $B8_49@-(B: ContentDigest $B$O(B Apache 1.1 + $B0J9_$GMxMQ2DG=$G$9!#(B + +

    $B$3$N%G%#%l%/%F%#%V$O!"(BRFC1864 $B5Z$S(B RFC2068 $B$K$*$$$FDj5A$5$l$F$$$k(B + Content-MD5 $B%X%C%@$N@8@.$rM-8z$K$7$^$9!#(B

    + +

    MD5 $B$O!"G$0UD9$N%G!<%?$N!V%a%C%;!<%8%@%$%8%'%9%H!W(B($B!V;XLf!W(B + $B$HI=8=$5$l$k$3$H$b$"$k(B) $B$r7W;;$9$k%"%k%4%j%:%`$G!"(B + $B%G!<%?$NJQ99$,$"$C$?>l9g$K$OHs>o$K9b$$?.MjEY$G(B + $B%a%C%;!<%8%@%$%8%'%9%H$KJQ99$,H?1G$5$l$^$9!#(B

    + +

    Content-MD5 $B%X%C%@$O!"%(%s%I%D!<%(%s%I$G(B + $B%(%s%F%#%F%#%\%G%#!<$K4^$^$l$k%a%C%;!<%8$N40A4@-%A%'%C%/(B + (Message Integrity Check - MIC) $B$rDs6!$7$^$9!#(B + $B$3$N%X%C%@$rD4$Y$k$3$H$G!"%W%m%-%7$d%/%i%$%"%s%H$O!"(B + $BESCf7PO)$K$*$1$k%(%s%F%#%F%#%\%G%#$NM=4|$;$LJQ99$J$I$r(B + $B8!=P$9$k$3$H$,$G$-$^$9!#%X%C%@$NNc(B:

    +
    +   Content-MD5: AuLb7Dp1rqtRtxz2m9kRpA==
    +
    + +

    $B%j%/%(%9%H$4$H$K%a%C%;!<%8%@%$%8%'%9%H$r7W;;$9$k(B + ($BCM$O%-%c%C%7%e$5$l$^$;$s(B) $B$3$H$+$i!"(B + $B%5!<%P%Q%U%)!<%^%s%9$,Dc2<$9$k$3$H$K$D$$$FCm0U$7$F$/$@$5$$!#(B

    + +

    Content-MD5 + $B$O!"%3%"5!G=$K$h$j=hM}$5$l$?%I%-%e%a%s%H$rAw$k$H$-$N$_M-8z$G$"$j!"(B + SSI $B%I%-%e%a%s%H$d(B CGI $B%9%/%j%W%H$N=PNO!"(B + $B%P%$%H%l%s%8$r;XDj$7$?1~Ez$N>l9g$K$O$3$N%X%C%@$OIUM?$5$l$^$;$s!#(B +

    +
    + +

    CoreDumpDirectory $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: CoreDumpDirectory + $B%G%#%l%/%H%j%Q%9(B
    + $B%G%U%)%k%H(B: ServerRoot $B$HF1$8>l=j(B
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k(B
    + $B%9%F!<%?%9(B: core + +

    $B$3$l$K$h$j!"(BApache + $B$,%3%"%@%s%W$r$9$kA0$K0\F0$9$k$?$a$N%G%#%l%/%H%j$r;XDj$G$-$^$9!#(B + $B%G%U%)%k%H$N>l9g$O!"(BServerRoot + $B$K$*$$$F;XDj$7$?%G%#%l%/%H%j$H$J$k$b$N$N!"(B + $BDL>o$N>l9g$O%5!<%P$rl=j$K@_Dj$r$9$k$3$H$,$G$-$^$9!#(B +

    + +

    $B@_DjNc(B:

    + +
    + CoreDumpDirectory /tmp +
    + +
    + +

    DefaultType + $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: DefaultType + MIME-type
    + $B%G%U%)%k%H(B: DefaultType + text/html
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k!"(B + $B%P!<%A%c%k%[%9%H!"%G%#%l%/%H%j!"(B.htaccess
    + $B>e=q$-(B: FileInfo
    + $B%9%F!<%?%9(B: core + +

    $B%5!<%P$O!"(BMIME $B$N%?%$%W%^%C%W$+$i$O7hDj$G$-$J$$(B + $B%I%-%e%a%s%H$NAw?.$rMW5a$5$l$k$3$H$,$"$j$^$9!#(B

    + +

    $B%5!<%P$O!"%I%-%e%a%s%H$N%3%s%F%s%H%?%$%W$r%/%i%$%"%s%H$K(B + $BDLCN$9$kI,MW$,$"$j$^$9$N$G!"$3$N$h$&$K%?%$%W$,L$CN$N>l9g$O(B + DefaultType $B$G;XDj$5$l$?%?%$%W$rMxMQ$7$^$9!#(B + $B@_DjNc(B:

    + +
    + DefaultType image/gif +
    + $B$3$l$O(B .gif $B$H$$$&3HD%;R$,%U%!%$%kL>$K4^$^$l$F$$$J$$B?$/$N(B + GIF $B2hA|$,4^$^$l$F$$$k%G%#%l%/%H%j$KE,$7$F$$$k$G$7$g$&!#(B + +

    $B;2>H(B: AddType $B5Z$S(B TypesConfig

    + +
    + +

    <Directory> + $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: <Directory + directory-path|proxy:url-path> + ... </Directory>
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k!"(B + $B%P!<%A%c%k%[%9%H(B
    + $B%9%F!<%?%9(B: Core + +

    $B;XDj$5$l$?%G%#%l%/%H%jG[2<$K$N$_%G%#%l%/%F%#%V$rE,MQ$5$;$k$?$a$K!"(B + <Directory> $B5Z$S(B </Directory> + $B$rBP$H$7$F!"%G%#%l%/%F%#%V72$r0O$&$3$H$,$G$-$^$9!#(B + $B0O$$$NCf$G$O!"%G%#%l%/%H%j%3%s%F%-%9%H$G5v2D$5$l$?$9$Y$F$N(B + $B%G%#%l%/%F%#%V$,MxMQ$G$-$^$9!#(Bdirective-path + $B$O!"%U%k%Q%9l9g!"%7%'%k$K$*$1$k;XDjF1MM!"J8;z$NHO0O;XDj$r(B `[ ]' $B$G2DG=$G$9!#(B + $B$^$?!"(BApache 1.3$B$G$O!"(BUNIX $B$N%7%'%k$N5sF0$K;w$;$k$?$a$K!"(B + $B%o%$%k%I%+!<%I$O(B `/' $BJ8;z$K$O%^%C%A$7$^$;$s!#(B + $BNc(B:

    +
    +   <Directory /usr/local/httpd/htdocs>
    +   Options Indexes FollowSymLinks
    +   </Directory>
    +
    + +

    Apache 1.2 $B0J9_$N>l9g(B: ~ + $B$H$$$&J8;z$rIU2C$9$k$3$H$G3HD%@55,I=8=$rMxMQ$9$k$3$H$b$G$-$^$9!#(B
    + $BNc$($P!"(B

    +
    +   <Directory ~ "^/www/.*/[0-9]{3}">
    +
    + $B$H$$$C$?;XDj$N>l9g!"(B/www/ $B0J2<$K$"$k?t;z(B 3 + $BJ8;z$N%G%#%l%/%H%j$K%^%C%A$7$^$9!#(B + +

    $B$b$7J#?t$N(B ($B@55,I=8=0J30$N(B) $B%G%#%l%/%H%j%;%/%7%g%s$,(B + $B%I%-%e%a%s%H$r4^$`%G%#%l%/%H%j(B ($B$d$=$N>e0L%G%#%l%/%H%j(B) + $B$H%^%C%A$7$?$J$i$P!"(B.htaccess + $B%U%!%$%k$N%G%#%l%/%F%#%V$bFI$_9~$_$D$D!"(B + $BC;$$%Q%9$+$i=g$KE,MQ$5$l$^$9!#(B + $BNc$($P!"(B

    + +
    + <Directory />
    + AllowOverride None
    + </Directory>
    +
    + <Directory /home/*>
    + AllowOverride FileInfo
    + </Directory>
    +
    + $B$H@_Dj$7!"%I%-%e%a%s%H(B /home/web/dir/doc.html + $B$X$N%"%/%;%9$,$"$C$?>l9g$K$O0J2<$N$h$&$KF0:n$7$^$9(B: + +
      +
    • AllowOverride None $B$,E,MQ$5$l$k!#(B + (.htaccess $B%U%!%$%k$OL58z$K$J$k(B)
    • + +
    • AllowOverride FileInfo $B$,E,MQ$5$l$k(B + (/home/web $B%G%#%l%/%H%j$KBP$7$F(B)$B!#(B
    • + +
    • /home/web/.htaccess $B$N(B FileInfo + $B%G%#%l%/%F%#%V$,E,MQ$5$l$k!#(B
    • +
    + +

    $B%G%#%l%/%H%j%;%/%7%g%s$K$*$1$k@55,I=8=$K$D$$$F$O!"(BApache 1.2 $B$H(B + 1.3 $B$G + +

    Apache 1.2 $B$N>l9g!"DL>o$N%G%#%l%/%H%j%;%/%7%g%s$,F1$8$/!"(B + $B@_Dj%U%!%$%kFb$K8=$l$k=g$KI>2A$5$l$^$9!#@55,I=8=$N%G%#%l%/%H%j%;%/%7%g%s$O!"(B + $B0lHVC;$/%^%C%A$7$?>l9g$K0lEY$@$1E,MQ$5$l$^$9!#(B + + Apache 1.3 $B$G$O!"(B + $B@55,I=8=$O!"DL>o$N%;%/%7%g%s$,$9$Y$FE,MQ$5$l$k$^$G9MN8$5$l$^$;$s!#(B + $B$=$N8e!"$9$Y$F$N@55,I=8=$,@_Dj%U%!%$%k$K8=$l$?=g$G;n$5$l$^$9!#(B + $BNc$($P!"0J2<$N$h$&$J>l9g$K(B

    + +
    + <Directory ~ abc$>
    + ... directives here ...
    + </Directory>
    +
    +
    + + $B%"%/%;%9$5$l$F$$$k%U%!%$%kL>$,(B + /home/abc/public_html/abc/index.html + $B$G$"$k$H$7$^$7$g$&!#%5!<%P$O(B /, /home, + /home/abc, /home/abc/public_html $B5Z$S(B + /home/abc/public_html/abc $B$N=g$K9MN8$7$^$9!#(B + Apache 1.2 $B$G$"$l$P!"(B/home/abc + $B$NI>2A$r$9$k:]$K!"@55,I=8=$,%^%C%A$7E,MQ$5$l$^$9!#(B + + Apache 1.3 + $B$N>l9g$O@55,I=8=$O%D%j!<>e$N$=$N;~E@$G$OA4$/9MN8$5$l$^$;$s!#(B + $B$9$Y$F$NDL>o$N(B <Directory> $B$H(B .htaccess + $B%U%!%$%k$,I>2A$5$l$k$^$G!"9MN8$5$l$^$;$s!#$=$N8e!"@55,I=8=$O(B + /home/abc/public_html/abc $B$K%^%C%A$7!"E,MQ$5$l$^$9!#(B + +

    Apache $B$N%G%U%)%k%H$G$O(B <Directory /> + $B$X$N%"%/%;%9$O(B Allow from All + $B$K$J$C$F$$$k$3$H$KCm0U$7$F$/$@$5$$!#$3$l$O!"(BURL + $B$+$i%^%C%W$5$l$?$I$N%U%!%$%k$G$b(B Apache $B$OAw$k$H$$$&$3$H$G$9!#(B + $B$3$l$O0J2<$N$h$&$K$7$FJQ99$9$k$3$H$,?d>)$5$l$F$$$^$9!#(B

    +
    + <Directory />
    +     Order Deny,Allow
    +     Deny from All
    + </Directory>
    +
    + +

    $B$=$7$F%"%/%;%9$r(B$B2DG=$K$7$?$$(B + $B%G%#%l%/%H%j$KBP$7$F8DJL$K@_Dj$9$l$P$h$$$G$7$g$&!#(B + $B$3$N$"$?$j$K$D$$$F$O!"(B$B%;%-%e%j%F%#$K4X$9$k%3%D(B$B$r;2>H$7$F$/$@$5$$!#(B

    + <Directory> $B%G%#%l%/%F%#%V$OF~$l;R$K$9$k$3$H$,$G$-$:!"(B + <Limit> $B$d(B <LimitExcept> + $B%;%/%7%g%s$NCf$K$b5-=R$G$-$^$;$s!#(B + +

    mod_proxy $B$,M-8z$K$J$C$F$$$k>l9g!"(B + proxy: $B9=J8$r;H$C$F!"%W%m%-%7$5$l$F$$$k%3%s%F%s%D$K(B + $BBP$7$FE,MQ$5$;$k$3$H$,$G$-$^$9!#$3$N9=J8$O@_Dj$rE,MQ$7$?$$(B + $B%W%m%-%7$5$l$F$$$k(B URL $B$r;XDj$9$k$+!"%W%m%-%7$5$l$F$$$k%3%s%F%s%D$9$Y$F$K(B + $BE,MQ$5$;$k$?$a$K(B * $B$r;XDj$9$k!"$H$$$&$h$&$K$J$C$F$$$^$9(B:

    + +

    $B$9$Y$F$N%W%m%-%7$5$l$F$$$k%3%s%F%s%D$KE,MQ$5$;$k$K$O(B:

    + +
    +   <Directory proxy:*>
    +     ... directives here ...
    +   </Directory>
    +   
    + +

    $B%W%m%-%7$5$l$F$$$k%3%s%F%s%D$N0lItJ,$K$N$_E,MQ$5$;$k$K$O(B:

    + +
    +   <Directory proxy:http://www.example.com/>
    +     ... directives here ...
    +   </Directory>
    +   
    + +

    $B;2>H(B: $B%j%/%(%9%H$rDirectory, Location $B5Z$S(B Files + $B%;%/%7%g%s$,$I$N$h$&$KF0:n$9$k$N$+(B

    +

    $B;2>H(B: DirectoryMatch

    +
    + +

    <DirectoryMatch>

    + $B9=J8(B: <DirectoryMatch + regex> ... </DirectoryMatch>
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k!"%P!<%A%c%k%[%9%H(B
    + $B%9%F!<%?%9(B: Core
    + $B8_49@-(B: Apache 1.3 $B0J9_$G;HMQ2DG=(B + +

    $B;XDj$5$l$?%G%#%l%/%H%jG[2<$K$N$_%G%#%l%/%F%#%V$rE,MQ$5$;$k$?$a$K!"(B + <Directory> $B$HF1MM$K(B + <DirectoryMatch> $B5Z$S(B </DirectoryMatch> + $B$rBP$H$7$F!"%G%#%l%/%F%#%V72$r0O$&$3$H$,$G$-$^$9!#(B + $B$?$@$7!"0z?t$O@55,I=8=$H$J$j$^$9!#Nc$($P!"(B

    +
    +   <DirectoryMatch "^/www/.*/[0-9]{3}">
    +
    + +

    $B$H$$$C$?;XDj$N>l9g$O(B /www/ $B0J2<$K$"$k?t;z(B 3 + $BJ8;z$N%G%#%l%/%H%j$K%^%C%A$7$^$9!#(B

    + +

    $B;2>H(B: + $BDL>o$N(B <Directory> + $B%;%/%7%g%s$H0l=o$K@55,I=8=$rMxMQ$9$k$?$a$N2r@b$H$7$F$O(B + <Directory>
    + $B;2>H(B: $B%j%/%(%9%H$rDirectory, Location $B5Z$S(B Files + $B%;%/%7%g%s$,$I$N$h$&$KF0:n$9$k$N$+(B

    +
    + +

    DocumentRoot + $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: DocumentRoot + directory-path
    + $B%G%U%)%k%H(B: DocumentRoot + /usr/local/apache/htdocs
    + $B%3%s%F%-%9%H(B: + $B%5!<%P@_Dj%U%!%$%k!"%P!<%A%c%k%[%9%H(B
    + $B%9%F!<%?%9(B: core + +

    $B$3$N%G%#%l%/%F%#%V$O!"(Bhttpd + $B$,%U%!%$%k$rDs6!$9$k%G%#%l%/%H%j$r@_Dj$7$^$9!#(BAlias + $B$N$h$&$J%G%#%l%/%F%#%V$K%^%C%A$7$J$$>l9g$K$O!"%I%-%e%a%s%H$N(B + ($BLuCm(B:$B%U%!%$%k%7%9%F%`>e$N(B) $B%Q%9$r@8@.$9$k$?$a$K!"%j%/%(%9%H$5$l$?(B + URL $B$N%Q%9ItJ,$r%I%-%e%a%s%H%k!<%H$KIUM?$7$^$9!#(B + $BNc(B:

    + +
    + DocumentRoot /usr/web +
    + $B$3$N>l9g!"(B + http://www.my.host.com/index.html $B$X$N%"%/%;%9$,$"$l$P(B + /usr/web/index.html $B$,JV$5$l$^$9!#(B + +

    $B$H$3$m$G!"(BDocumentRoot + $B$N0z?t$N%Q%9$N:G8e$NJ8;z$K%9%i%C%7%e$,;XDj$5$l$F$$$k$H(B + ($BNc$($P(B$B!"(B"DocumentRoot /usr/web/" $B$N$h$&$K(B) + $BLdBj$,5/$3$k$H$$$&(B mod_dir $B$N%P%0$,$"$k$h$&$G$9!#(B + $B$=$N$?$a!"$3$N$h$&$J;XDj$O$7$J$$$h$&$K$7$F$/$@$5$$!#(B

    +
    + +

    EBCDICConvert

    + + $B9=J8(B: EBCDICConvert + On|Off[=direction] extension + [extension] ...
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k!"(B + $B%P!<%A%c%k%[%9%H!"%G%#%l%/%H%j!"(B.htaccess
    + $B%9%F!<%?%9(B: core
    + $B>e=q$-(B: FileInfo
    + $B8_49@-(B: EBCDICConvert $B$O(B + Apache 1.3.19 $B0J9_$G$+$D(B EBCDIC + $B%Y!<%9$N%W%i%C%H%U%)!<%`$K$*$$$F$N$_MxMQ2DG=$G$9!#(B + +

    EBCDICConvert + $B%G%#%l%/%F%#%V$OM?$($i$l$?%U%!%$%k$N3HD%;R$r;XDj$NJQ49@_Dj(B + (On $B$+(B Off) $B$K%^%C%W$7$^$9!#(B + $B3HD%;R$N:G=i$N%I%C%H$O$"$C$F$b$J$/$F$b9=$$$^$;$s!#(B

    + +

    $B%*%W%7%g%s$N7A<0(B On=direction ($B$d(B + Off=direction) $B$,;XDj$5$l$k$H(B (direction + $B$O(B In, Out, InOut $B$N$I$l$+(B)$B!"(B + $B%G%#%l%/%F%#%V$O;XDj$5$l$?8~$-$K$@$1E,MQ$5$l$^$9(B (In: + PUT $B$d(B POST $B%j%/%(%9%H$G%3%s%F%s%D$r%"%C%W%m!<%I!"(BOut: + GET $B$d(B POST $B%j%/%(%9%H$GJV$5$l$k%3%s%F%s%D!"(BInOut: + $BN>J}$N8~$-$GJQ49(B)$B!#(B
    + $B$=$l0J30$N7A<0$G$O!"(BInOut ($BN>J}$N8~$-$GJQ49(B) + $B$G$"$k$H$_$J$5$l$^$9!#(B

    + +

    $B0lHLE*$J(B MIME $B$K4p$E$$$?%k!<%k$r!"(B + $B$h$j:Y$+$$%U%!%$%k$N3HD%;R$K4p$E$$$?%k!<%k$,>e=q$-$G$-$k$h$&$K!"(B + $B3HD%;R$K4p$E$$$?@_Dj$O(B MIME + $B%?%$%W$K4p$E$$$?@_Dj$h$jA0$K;n$5$l$^$9!#(B

    + +

    $BNc(B:
    + $B0J2<$N@_Dj$G$O!"IaDL$N(B *.html $B%U%!%$%k$O(B + EBCDIC $B%(%s%3!<%G%#%s%0$N(B HTML $B$G!"(B*.ahtml $B%U%!%$%k$O(B + ASCII $B%(%s%3!<%G%#%s%0$N(B HTML $B$G$9(B:

    + +
    +    # *.html $B$H(B *.ahtml $B$O(B HTML:
    +    AddType  text/html  .html .ahtml
    +
    +    # *.ahtml $B$OJQ49$5$l$J$$(B ($B4{$K(B ASCII $B$K$J$C$F$$$k(B):
    +    EBCDICConvert       Off .ahtml
    +
    +    # $BB>$N$9$Y$F$N(B text/html $B%U%!%$%k$O(B EBCDIC $B$N$O$:(B:
    +    EBCDICConvertByType On  text/html
    +
    +
    +
    + + +

    $B;2>H(B: EBCDICConvertByType $B$H(B EBCDICConvertByType + $BJQ494X?t$N35MW(B

    +
    + +

    EBCDICConvertByType

    + + $B9=J8(B: EBCDICConvertByType + On|Off[=direction] mimetype + [mimetype] ...
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k!"(B + $B%P!<%A%c%k%[%9%H!"%G%#%l%/%H%j!"(B.htaccess
    + $B%9%F!<%?%9(B: core
    + $B>e=q$-(B: FileInfo
    + $B8_49@-(B: EBCDICConvertByType $B$O(B + Apache 1.3.19 $B0J9_$G$+$D(B EBCDIC $B%Y!<%9$N%W%i%C%H%U%)!<%`$K$*$$$F$N$_(B + $BMxMQ2DG=$G$9!#(B + +

    EBCDICConvertByType $B%G%#%l%/%F%#%V$OM?$($i$l$?(B MIME $B%?%$%W(B + ($B%o%$%k%I%+!<%I$b2D(B) $B$r;XDj$5$l$?JQ49@_Dj(B (On $B$+(B + Off) $B$K%^%C%W$7$^$9!#(B

    + +

    $B%*%W%7%g%s$N7A<0(B On=direction ($B$d(B + Off=direction) $B$,;XDj$5$l$k$H(B (direction + $B$O(B In, Out, InOut $B$N$I$l$+(B)$B!"(B + $B%G%#%l%/%F%#%V$O;XDj$5$l$?8~$-$K$@$1E,MQ$5$l$^$9(B (In: + PUT $B$d(B POST $B%j%/%(%9%H$G%3%s%F%s%D$r%"%C%W%m!<%I!"(BOut: + GET $B$d(B POST $B%j%/%(%9%H$GJV$5$l$k%3%s%F%s%D!"(BInOut: + $BN>J}$N8~$-$GJQ49(B)$B!#(B
    + $B$=$l0J30$N7A<0$G$O!"(BInOut ($BN>J}$N8~$-$GJQ49(B) + $B$G$"$k$H$_$J$5$l$^$9!#(B

    + +

    $BNc(B:
    + $BM-MQ$JI8=`@_Dj$K$O0J2<$N%G%U%)%k%H$,$"$k$Y$-$G$9(B:

    +
    +    # $B$9$Y$F$N%F%-%9%H%I%-%e%a%s%H$O(B EBCDIF $B$N%U%!%$%k(B:
    +    EBCDICConvertByType On  text/* message/* multipart/*
    +    EBCDICConvertByType On  application/x-www-form-urlencoded \
    +                model/vrml application/postscript
    +    # $B$9$Y$F$NB>$N%U%!%$%k$O%P%$%J%j$H$_$J$9(B
    +    EBCDICConvertByType Off */*
    +
    + $BNc$($P(B NFS $B$G%^%&%s%H$5$l$?(B unix + $B%5!<%P$+$i%I%-%e%a%s%H$rAw$k!"$H$$$&$h$&$K(B + ASCII $B$N%I%-%e%a%s%H$N$_$r07$&>l9g$O!"0J2<$N$h$&$K$7$F$/$@$5$$(B: +
    +    # $B$9$Y$F$N%I%-%e%a%s%H$O4{$K(B ASCII
    +    EBCDICConvertByType Off */*
    +
    + +

    $B;2>H(B: EBCDICConvert $B$H(B EBCDIC $BJQ494X?t$N35MW(B

    +
    + +

    EBCDICKludge

    + + $B9=J8(B: EBCDICKludge + On|Off
    + $B%G%U%)%k%H(B: EBCDICKludge + Off
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k!"(B + $B%P!<%A%c%k%[%9%H!"%G%#%l%/%H%j!"(B.htaccess
    + $B%9%F!<%?%9(B: core
    + $B>e=q$-(B: FileInfo
    + $B8_49@-(B: EBCDICKludge $B$O(B Apache + 1.3.19 $B0J9_$G(B EBCDIC $B%Y!<%9$N%W%i%C%H%U%)!<%`$G$N$_;HMQ2DG=$G$9!#(B + $BHs?d>)$G!">-Mh$N%P!<%8%g%s$G$O:o=|$5$l$kM=Dj$G$9!#(B
    + +

    EBCDICKludge $B$O(B apache $B$N%P!<%8%g%s(B 1.3.0 $B$+$i(B 1.3.18 + $B$H$N8_49@-$rJ]$D$?$a$KDs6!$5$l$F$$$^$9!#$=$l$i$N%P!<%8%g%s$G$O!"(B + "text/", "message/", "multipart" $B$G;O$^$k(B MIME $B%?%$%W$H!"(B + "application/x-www-form-urlencoded" + $B$N$9$Y$F$N%U%!%$%k$O%G%U%)%k%H$GJQ49$5$l!"(B + $BB>$N$9$Y$F$N%I%-%e%a%s%H$OL5JQ49$GAw$i$l$F$$$^$7$?!#(B + "text/x-ascii-subtype" + $B$,%I%-%e%a%s%H$KBP$7$F@_Dj$5$l$F$$$k>l9g$K$N$_!"%I%-%e%a%s%H$O(B + ASCII $B%U%)!<%^%C%H$G$"$k$H$_$J$5$l!":FJQ49$5$l$^$;$s$G$7$?!#(B + $BJQ49$9$kBe$o$j$K!"(B"x-ascii-" + $B$,%?%$%W$+$itext/subtype" + $B$,%I%-%e%a%s%H$N(B MIME $B%?%$%W$K$J$C$F$$$^$7$?!#(B

    + +

    EBCDICKludge $B%G%#%l%/%H%j$,(B On $B$K@_Dj$5$l$F$$$F!"(B + EBCDICConvert $B%G%#%l%/%F%#%V$,$=$3$N(B + $B%3%s%F%-%9%H$K%^%C%A$9$l$P!"%5!<%P$O(B + type/x-ascii-subtype $B$H$$$&7A<0$N(B + MIME $B%?%$%W$rD4$Y$^$9!#%I%-%e%a%s%H$K$=$N$h$&$J%?%$%W$,$"$l$P!"(B + "x-ascii-" $B$,Off + $B$K@_Dj$5$l$^$9!#Nc$($P(B NFS $B$G%^%&%s%H$5$l$?%G%#%l%/%H%j$N(B + ASCII $B$N%I%-%e%a%s%H$rAw$C$F$$$k$h$&$J>l9g$K!"$3$l$K$h$j(B + $B$9$Y$F$N%F%-%9%H%U%!%$%k$O(B EBCDIC + $B$G$"$k$H$$$&A0Ds$rJQ99$9$k$3$H$,$G$-$^$9!#(B
    + EBCDICKludge $B$G$O!"B>$N(B MIME $B%?%$%W(B ($BNc$($P(B model/vrml) $B$r(B + EBCDIC $B$N%F%-%9%H%U%!%$%k$H$7$F07$&$3$H$O$G$-$^$;$s!#(B + $B$=$N$h$&$JJQ49$K$O>e5-$N(B EBCDICConvertByType + $B%G%#%l%/%F%#%V$N;HMQ$,$h$jNI$$J}K!$G$9!#(B(Apache $B%P!<%8%g%s(B 1.3.19 + $B$h$jA0$G$O!"%P%$%J%j%I%-%e%a%s%H$r(B EBCDIC + $B%F%-%9%H%U%!%$%k$H$7$F07$&J}K!$OA4$/$"$j$^$;$s$G$7$?(B)$B!#(B

    + +

    $B;2>H(B: EBCDICConvert, EBCDICConvertByType $B$H(B EBCDIC $BJQ494X?t$N35MW(B

    +
    + +

    + EnableExceptionHook directive

    + + $B9=J8(B: EnableExceptionHook + on|off
    + $B%G%U%)%k%H(B: EnableExceptionHook + off
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k(B
    + $B%9%F!<%?%9(B: core
    + $B8_49@-(B: EnableExceptionHook + $B$O(B Apache 1.3.30 $B0J9_$G;HMQ2DG=(B + +

    EnableExceptionHook $B$O%b%8%e!<%k$KpJs$r(B + $B%m%0<}=8$9$k$G$-$k$h$&$K$7$^$9!#(B

    +
    + +

    ErrorDocument + $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: ErrorDocument + error-code document
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k!"(B + $B%P!<%A%c%k%[%9%H!"%G%#%l%/%H%j!"(B.htaccess
    + $B%9%F!<%?%9(B: core
    + $B>e=q$-(B: FileInfo
    + $B8_49@-(B: $B%G%#%l%/%H%j$BLdBj$d%(%i!<$,H/@8$7$?$H$-$NF0:n$H$7$F!"(B + Apache $B$K$O0J2<$N;M$D$N$&$A0l$D$NF0:n$r@_Dj$9$k$3$H$,$G$-$^$9!#(B

    + +
      +
    1. Apache $BI8=`$N4JC1$J%(%i!<%a%C%;!<%8$rI=<((B
    2. + +
    3. $B<+J,$G;XDj$7$?%a%C%;!<%8$rI=<((B
    4. + +
    5. $BLdBj$d%(%i!<$N=hM}$r$9$k0Y$K!"<+%5!<%PFb$N(B + URL-path $B$X%j%@%$%l%/%H(B
    6. + +
    7. $BLdBj$d%(%i!<$N=hM}$r$9$k0Y$K!"30It$N(B URL + $B$X%j%@%$%l%/%H(B
    8. +
    + +

    $B:G=i$N$b$N$,%G%U%)%k%H$NF0:n$G!"(B2 $BHVL\$+$i(B 4 $BHVL\$O!"(B + ErrorDocument $B%G%#%l%/%F%#%V$K$h$j!"(BHTTP + $B$N%l%9%]%s%9%3!<%I$H!"%a%C%;!<%8$+(B URL $B$r;XDj$9$k$3$H$G@_Dj$7$^$9!#(B

    + +

    $B%a%C%;!<%8(B$B$r5-=R$9$k>l9g$K$O!"Fs=E0zMQId(B 1 $BJ8;z(B + (") $B$r:G=i$KIUM?$7$^$9!#(B + $BFs=E0zMQId$O%a%C%;!<%8$K$O4^$^$l$^$;$s!#(B + Apache $B$O>l9g$K$h$C$F!"LdBj$d%(%i!<$K$D$$$FIU2CE*$J>pJs$rDs6!$7$^$9!#(B

    + +

    URL $B$N>l9g$O!"%m!<%+%k$N(B URL $B$N;XDj$H$7$F%9%i%C%7%e$G;O$^$k(B (/) + $B%Q%9$+!"%/%i%$%"%s%H$,2r + $BNc(B:

    + +
    + ErrorDocument 500 + http://foo.example.com/cgi-bin/tester
    + ErrorDocument 404 /cgi-bin/bad_urls.pl
    + ErrorDocument 401 /subscription_info.html
    + ErrorDocument 403 "Sorry can't allow you access today
    +
    + +

    $B%j%b!<%H(B URL ($BNc$($P!"F,$K(B http $B$HIUM?$7$?J}K!(B) $B$r(B + ErrorDocument $B$K;XDj$9$k$H$-!"(B + $B$?$H$(J8=q$,F1$8%5!<%P$K$"$m$&$H$b!"%I%-%e%a%s%H$,$I$3$K$"$k$+$rDLCN$9$k$?$a$K!"(B + Apache $B$O%j%@%$%l%/%H$r%/%i%$%"%s%H$KAw=P$9$k$H$$$&$3$H$K!"Cm0U$7$F$/$@$5$$!#(B + $B$3$l$K$O$$$m$$$m$H4XO"$7$F5/$3$kLdBj$,$"$j$^$9!#(B + $BCf$G$b:G$b=EMW$J$N$O!"%/%i%$%"%s%H$O85!9$N%(%i!<%9%F!<%?%9%3!<%I$r%/%i%$%"%s%H$r!":.Mp$5$;$k$+$b$7$l$^$;$s!#(B + $B$5$i$K!"(BErrorDocument 401 $B$K%j%b!<%H$N(B URL $B$r;XDj$9$k$H!"(B + $B%/%i%$%"%s%H$O(B 401 $B$H$$$&%9%F!<%?%9%3!<%I$r$C$F!"(B"ErrorDocument 401" $B$H$$$&%G%#%l%/%F%#%V$r;H$&>l9g$O!"(B + $BI,$:%m!<%+%k$JJ8=q$r;2>H$7$J$1$l$P$J$j$^$;$s!#(B

    + +

    $B%5!<%P$,@8@.$7$?%(%i!<%a%C%;!<%8$,!V>.$5$9$.$k!W$H(B + Microsoft Internet Explorer (MSIC) $B$O%G%U%)%k%H$G$=$l$rL5;k$7!"(B + $B!V?F@Z$J!W%(%i!<%a%C%;!<%8$GCV$-49$($^$9!#$7$-$$CM$O%(%i!<$N(B + $Bo!"%(%i!<%I%-%e%a%s%H$r(B 512 $B%P%$%H$h$j(B + $BBg$-$/$9$k$H!"(BMSIE $B$O%5!<%P$,@8@.$7$?%(%i!<$r1#$5$:$KI=<($7$^$9!#(B + $B$h$j>\$7$$>pJs$O(B Microsoft Knowledgebase $B$N5-;v(B Q294807 $B$K$"$j$^$9!#(B

    + +

    $B;2>H(B: $B%l%9%]%s%9$r%+%9%?%^%$%:$9$kJ}K!$K$D$$$F$N2r@b!#(B + $B%9%F!<%?%9%3!<%I$H$=$N0UL#$N40A4$J%j%9%H$O(B HTTP + $B;EMM=q(B$B$r;2>H$7$F$/$@$5$$!#(B

    +
    + +

    ErrorLog + $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: ErrorLog + file-pathh|syslog[:facility]
    + $B%G%U%)%k%H(B: ErrorLog + logs/error_log (Unix)
    + $B%G%U%)%k%H(B: ErrorLog + logs/error.log (Windows and OS/2)
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k!"%P!<%A%c%k%[%9%H(B
    + $B%9%F!<%?%9(B: core + +

    $B%(%i!<%m%0%G%#%l%/%F%#%V$O!"%5!<%P$K@8$8$?$5$^$6$^$J%(%i!<$r(B + $B5-O?$9$k$?$a$N%U%!%$%k$NL>A0$r@_Dj$7$^$9!#(B + file-path $B$,%9%i%C%7%e(B (/) $B$+$i;O$^$i$J$$>l9g$O!"(BServerRoot $B$+$i$NAjBP%Q%9$H$_$J$5$l$^$9!#(B + file-path $B$,%Q%$%W(B (|) $B$+$i;O$^$k>l9g$O!"(B + $B%(%i!<%m%0$r=hM}$9$k$?$a$K + +

    $BNc(B

    + +

    ErrorLog logs/vhost1.error

    + + or + +

    ErrorLog |/usr/local/bin/errorlog.pl

    + +

    Apache 1.3 $B0J9_$N>l9g(B: $B%U%!%$%kL>$NBe$o$j$K(B + syslog $B$H;XDj$9$k$3$H$K$h$C$F!"(B + $B%7%9%F%`$,%5%]!<%H$7$F$$$l$P(B syslogd(8) + $B$rMxMQ$7$?%m%.%s%0$,M-8z$K$J$j$^$9!#%G%U%)%k%H$G$O!"(B + local7 $B%U%!%7%j%F%#$H$J$j$^$9$,!"(B + syslog:facility + $B$H$$$C$?7A$G5-=R$9$k$3$H$K$h$j!"DL>o(B syslog(1) + $B$N%I%-%e%a%s%H$G@bL@$5$l$F$$$k%U%!%7%j%F%#$N0l$D$r;H$&$h$&$K(B + $B$9$k$3$H$,$G$-$^$9!#(B

    + +

    $BNc(B:

    + +

    ErrorLog syslog

    + + or + +

    ErrorLog syslog:user

    + +

    $B%;%-%e%j%F%#(B: + $B%m%0%U%!%$%k$r3JG<$9$k%G%#%l%/%H%j$,!"%5!<%P$r5/F0$7$?%f!<%60J30$N(B + $B%f!<%6$K$h$C$F=q$-9~$a$k>l9g$K%;%-%e%j%F%#$,GK$i$l$k2DG=@-$,$"$k$3$H$K(B + $B4X$9$k>\:Y$O(B $B%;%-%e%j%F%#$K4X$9$k%3%D(B + $B$r;2>H$7$F$/$@$5$$!#(B

    + + +

    $B;2>H(B: LogLevel + $B5Z$S(B Apache $B$N%m%0%U%!%$%k(B

    +
    + +

    FileETag $B%G%#%l%/%F%#%V(B

    + $B9=J8(B: FileETag + component ...
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k!"(B + $B%P!<%A%c%k%[%9%H!"%G%#%l%/%H%j!"(B.htaccess
    + $B>e=q$-(B: FileInfo
    + $B%9%F!<%?%9(B: core
    + $B8_49@-(B: Apache 1.3.23 $B0J9_$GMxMQ2DG=$G$9!#(B + +

    FileETag + $B%G%#%l%/%F%#%V$O%I%-%e%a%s%H$,%U%!%$%k$K4p$E$$$?$b$N$G$"$k$H$-$K!"(B + ETag ($B%(%s%F%#%F%#%?%0(B) $B1~Ez%X%C%@%U%#!<%k%I$r:n@.$9$k$H$-$K;HMQ$9$k(B + $B%U%!%$%k$NB0@-$r@_Dj$7$^$9!#(B (ETag $B$NCM$O%M%C%H%o!<%/$NBS0h$r@aLs$9$k$?$a$N(B + $B%-%c%C%7%e$N4IM}$G;H$o$l$^$9!#(B) Apache 1.3.22 $B0JA0$G$O!"(BETag $B$NCM$O(B + $B>o$K(B$B%U%!%$%k$N(B inode, $B%5%$%:!":G=*=$@5;~9o(B (mtime) $B$+$i:n@.(B + $B$5$l$F$$$^$7$?!#(BFileETag $B%G%#%l%/%F%#%V$K$h$j!"$3$l$i$N$I$l$r;H$&$+$r(B + $BA*$V$3$H$,$G$-$^$9!#G'<1$5$l$k%-!<%o!<%I$O(B: +

    +
    +
    INode
    +
    $B%U%!%$%k$N(B inode $BHV9f$r7W;;$K;H$$$^$9(B
    +
    MTime
    +
    $B%U%!%$%k$N:G=*=$@5;~9o$r;H$$$^$9(B
    +
    Size
    +
    $B%U%!%$%k$NCf?H$N%P%$%H?t$r;H$$$^$9(B
    +
    All
    +
    $B;HMQ2DG=$J$9$Y$F$N%U%#!<%k%I$r;H$$$^$9(B + ('FileETag INode MTime Size' $B$HEy2A$G$9(B)
    +
    None
    +
    $B%I%-%e%a%s%H$,%U%!%$%k$K4p$E$$$?$b$N$G$b!"(BETag $B%U%#!<%k%I$r(B + $B1~Ez$KIU2C$7$^$;$s(B
    +
    +

    + INode, MTime, Size $B%-!<%o!<%I$K$O(B '+' $B$d(B '-' $B$rA0$KIU$1$F(B + $B;XDj$9$k$3$H$b$G$-$^$9!#$3$N>l9g$O!"$h$j9-$$HO0O$+$i7Q>5$5$l$?(B + $B%G%U%)%k%H$N@_Dj$KJQ99$r2C$($k$h$&$K$J$j$^$9!#$=$N$h$&$J@\F,<-$N(B + $BL5$$%-!<%o!<%I$r;XDj$9$k$H!"B(:B$K7Q>5$7$?@_Dj$rL58z$K$7$^$9!#(B

    +

    + $B$"$k%G%#%l%/%H%j$N@_Dj$K(B + 'FileETag INode MTime Size' $B$,$"$j!"(B + $B%5%V%G%#%l%/%H%j$N@_Dj$K(B 'FileETag -INode' $B$,$"$k$H$-$O!"(B + $B$=$N%5%V%G%#%l%/%H%j$N@_Dj$O(B ($B@_Dj$,>e=q$-$5$l$J$1$l$P%5%V%G%#%l%/%H%j$N(B + $B%5%V%G%#%l%/%H%j$K$b7Q>5$5$l$^$9(B) 'FileETag MTime Size' + $B$HF1$8$K$J$j$^$9!#(B

    +
    + +

    <Files> $B%G%#%l%/%F%#%V(B

    + $B9=J8(B: <Files + filename> ... </Files>
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k!"%P!<%A%c%k%[%9%H!"(B.htaccess
    + $B%9%F!<%?%9(B: core
    + $B8_49@-(B: Apache 1.2 $B0J9_$GMxMQ2DG=$G$9!#(B + +

    <Files> $B%G%#%l%/%F%#%V$O!"%U%!%$%kL>$K$h$k%"%/%;%9@)8f$r9T$&$b$N$G!"(B<Directory> $B%G%#%l%/%F%#%V$d(B <Location> $B%G%#%l%/%F%#%V$HF1$8$h$&$J5!G=$r;}$A$^$9!#(B + $B$3$l$O!"(B</Files> $B%G%#%l%/%F%#%V$HBP$K$J$C$F$$$J$1$l$P$J$j$^$;$s!#(B + $B$3$N%;%/%7%g%sCf$N%G%#%l%/%F%#%V$O!"%Y!<%9L>(B ($B%U%!%$%kL>$N:G8e$NItJ,(B) + $B$,;XDj$5$l$?%U%!%$%kL>$K%^%C%A$9$k$9$Y$F$N%*%V%8%'%/%H$KE,MQ$5$l$^$9!#(B + + <Files> $B%;%/%7%g%s$O(B <Directory> + $B%;%/%7%g%s$H(B .htaccess $B$,FI$_9~$^$l$?8e!"(B + <Location> + $B%;%/%7%g%s$h$j$O@h$K@_Dj%U%!%$%k$K8=$l$?=g$KE,MQ$5$l$^$9!#(B + <Files> $B$O!"(B<Directory> + $B%;%/%7%g%sFb$K%M%9%H$5$;$k$3$H$,$G$-!"(B + $B%U%!%$%k%7%9%F%`$N0lIt$K$N$_8BDj$7$FE,MQ$5$;$k$3$H$,$G$-$^$9!#(B

    + +

    filename + $B0z?t$O!"%U%!%$%kL>$+%o%$%k%I%+!<%IJ8;zNs$G!"%o%$%k%I%+!<%I$G$O(B + `?' $B$O0l$D$NJ8;z!"(B`*' $B$OG$0U$NJ8;zNs$K%^%C%A$7$^$9!#(B~ + $B$H$$$&J8;z$rIU2C$9$k$3$H$G3HD%@55,I=8=$r;H$&$3$H$b$G$-$^$9!#(B + $BNc$($P!"(B

    +
    +   <Files ~ "\.(gif|jpe?g|png)$">
    +
    + $B$H$9$k$3$H$K$h$j!"0lHLE*$J%$%s%?!<%M%C%H$N2hA|%U%)!<%^%C%H$K%^%C%A$7$^$9!#(B + $B$?$@$7!"(BApache 1.3 $B0J9_$N>l9g$K$O!"(B + <FilesMatch> $B$r;H$&J}$,?d>)$5$l$F$$$^$9!#(B + +

    $B$A$J$_$K!"(B<Directory> $B5Z$S(B <Location> $B%;%/%7%g%s$H$O0[$J$j!"(B + <Files> + $B$O(B .htaccess $B%U%!%$%kFb$GMxMQ$9$k$3$H$,$G$-$^$9!#(B + $B$3$l$K$h$j!"%f!<%6$,%U%!%$%kKh$K%"%/%;%9$N@)8f$r9T$J$&$3$H$,$G$-$k$h$&$K(B + $B$J$C$F$$$^$9!#(B + $BNc$($P!"%G%#%l%/%H%jFb$K$"$k0l$D$N%U%!%$%k$KBP$7$F%Q%9%o!<%I$K$h$kJ]8n$r9T$J$&$K$O!"(B + .htaccess $B$K0J2<$N$h$&$J@_Dj$rDI2C$9$l$PNI$$$G$7$g$&!#(B

    + +
    +    <Files admin.cgi>
    +    Require group admin
    +    </Files>
    + +

    $B$J$*!"$3$N%G%#%l%/%F%#%V$O%5%V%G%#%l%/%H%j$K$bE,MQ$5$l!"(B + $B>e$NNc$N>l9g$K$O!"FC$K@_Dj$,>e=q$-$5$l$J$$8B$j!"(B + $B%5%V%G%#%l%/%H%jCf$N(B admin.cgi + $B$H$$$&%U%!%$%k$K$bJ]8n$,$+$+$k$H$$$&$3$H$rK:$l$J$$$G$/$@$5$$!#(B

    + +

    (Require $B%G%#%l%/%F%#%V$N;H$$J}$K$D$$$F$O!"(BRequire$B$r;2>H$7$F$/$@$5$$!#(B)

    + +

    $B;2>H(B: + $B%j%/%(%9%H$r + Directory, Location, Files $B%;%/%7%g%s$NF0:nJ}K!(B

    +
    + +

    <FilesMatch>

    + $B9=J8(B: <FilesMatch + regex> ... </FilesMatch>
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k!"%P!<%A%c%k%[%9%H!"(B.htaccess
    + $B%9%F!<%?%9(B: core
    + $B8_49@-(B: Apache 1.3 $B0J9_$GMxMQ2DG=$G$9!#(B + +

    <FilesMatch> $B%G%#%l%/%F%#%V$O!"(B<Files> + $B%G%#%l%/%F%#%VF1MM$K%U%!%$%kL>$K$h$k%"%/%;%9@)8f$N5!G=$rDs6!$7$^$9!#$?$@$7!"(B + $B$3$N%G%#%l%/%F%#%V$K$O@55,I=8=$r;XDj$7$^$9!#(B + $BNc$($P(B:

    +
    +   <FilesMatch "\.(gif|jpe?g|png)$">
    +
    + +

    $B$O0lHLE*$J%$%s%?!<%M%C%H$N2hA|7A<0$K%^%C%A$7$^$9!#(B

    +

    $B;2>H(B: + $B%j%/%(%9%H$r + Directory, Location, Files $B%;%/%7%g%s$NF0:nJ}K!(B

    +
    + +

    Group $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: Group + unix-group
    + $B%G%U%)%k%H(B: Group + #-1
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k!"%P!<%A%c%k%[%9%H(B
    + $B%9%F!<%?%9(B: core + +

    Group + $B%G%#%l%/%F%#%V$O!"%5!<%P$,%j%/%(%9%H$K1~Ez$9$k:]$N%0%k!<%W$r@_Dj$7$^$9!#(B + $B$3$N%G%#%l%/%F%#%V$r;H$&$?$a$K$O!"%9%?%s%I%"%m!<%s%5!<%P$r(B root + $B$G5/F0$7$J$1$l$P$J$j$^$;$s!#(B + Unix-group $B$O!"0J2<$N$I$A$i$+$r$H$j$^$9!#(B

    + +
    +
    $B%0%k!<%WL>(B
    + +
    $BL>A0$G%0%k!<%W$r;XDj$7$^$9!#(B
    + +
    # $B$r@hF,$K%0%k!<%W(B ID
    + +
    $B?t;z$G%0%k!<%W$r;XDj$7$^$9!#(B
    +
    +

    $B%5!<%P$r)$5$l$F$$$^$9!#(B + nobody $B$H;XDj$9$k4IM}l9g$b$"$j$^$9$7!"K>$^$7$/$b$"$j$^$;$s!#(B

    + +

    $BNc(B:

    + + Group www-group + +

    $BCm0UE@(B: root $B%f!<%60J30$G%5!<%P$r5/F0$5$l$?>l9g!"(B + $B;XDj$7$?%0%k!<%W$X0\$k$3$H$,$G$-$:!"$=$N$^$^$N%f!<%6$G + +

    $BFC$KCm0U$9$Y$-E@(B: <VirtualHost> + $BFb$G$3$N%G%#%l%/%F%#%V$r;HMQ$9$k$?$a$K$O!"(BsuEXEC + $B%i%C%Q!<(B$B$,@_Dj$5$l$F$$$J$1$l$P$J$j$^$;$s!#(B + $B$3$N>l9g!"(BCGI $B$rl9g$K$O!"%a%$%s@_Dj$K$*$1$k(B Group + $B%G%#%l%/%F%#%V$G;XDj$5$l$?%0%k!<%W$G=hM}$5$l$^$9!#(B

    + +

    $B%;%-%e%j%F%#(B: $B%;%-%e%j%F%#$K4X$9$k2r@b$O(B User + $B$r;2>H$7$F$/$@$5$$!#(B

    +
    + +

    HostnameLookups $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: HostnameLookups + on|off|double
    + $B%G%U%)%k%H(B: HostnameLookups + off
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k!"%P!<%A%c%k%[%9%H!"%G%#%l%/%H%j(B
    + $B%9%F!<%?%9(B: core
    + $B8_49@-(B: + double $B$O(B Apache 1.3 $B0J9_$GMxMQ2DG=$G$9!#(B
    + $B8_49@-(B: Apache 1.3 $B$h$jA0$O%G%U%)%k%H$,(B + on $B$K$J$C$F$$$^$9!#(B + +

    $B$3$N%G%#%l%/%F%#%V$O!"%[%9%HL>$r%m%0<}=8$G$-$k$h$&$K(B DNS + $B%k%C%/%"%C%W$rM-8z$K$7$^$9(B ($B$5$i$K!"(BCGI/SSI $B$K(B + REMOTE_HOST $BJQ?t$H$7$FEO$7$^$9(B)$B!#(Bdouble + $B$r;XDj$7$?>l9g!"Fs=E$N5U0z$-$r9T$$$^$9!#$D$^$j!"5U0z$-$N8e$K!"(B + $B$=$N7k2L$KBP$7$F@50z$-$r9T$$$^$9!#@50z$-$N7k2L$N(B IP + $B%"%I%l%9$NCf$K%*%j%8%J%k$N%"%I%l%9$H0lCW$9$k$b$N$,$J$1$l$P$J$j$^$;$s(B + ("tcpwrappers" $B$NMQ8l$G$O(B PARANOID $B$H8F$P$l$F$$$^$9(B)$B!#(B

    + +

    $B$A$J$_$K!"(Bmod_access + $B$G%[%9%HL>$K$h$k%"%/%;%9@)8f$r9T$&>l9g$K$O!"@_Dj$NG!2?$K$h$i$:(B + $BFs=E$N5U0z$-$,HostnameLookups double $B$r@_Dj$7$J$$8B$j!"(B + $BB>$NItJ,$O$3$NFs=E5U0z$-$N7k2L$r;H$&$3$H$O$G$-$^$;$s!#Nc$($P!"(B + HostnameLookups on $B$H@_Dj$7$F$"$k>uBV$G!"(B + $B%[%9%HL>$K$h$k%"%/%;%9@)8B$r9T$C$?%*%V%8%'%/%H$X$N(B + $B%j%/%(%9%H$rREMOTE_HOST $B$K$ODL>o$N5U0z$-7k2L$,EO$5$l$^$9!#(B

    + +

    Apache 1.3 $B$h$jA0$N%P!<%8%g%s$G$O!"$3$N%G%#%l%/%F%#%V$N%G%U%)%k%H$O(B + on $B$G$7$?$,!"(B + $BK\Ev$K5U0z$-$rI,MW$H$7$F$$$k$o$1$G$O$J$$%5%$%H$N(B + $B%M%C%H%o!<%/%H%i%U%#%C%/$rDc8:$5$;$k$?$a$K!"(Boff + $B$KJQ99$5$l$^$7$?!#%k%C%/%"%C%W$K$h$kM>7W$JCY1d$,$J$/$J$k$?$a!"(B + $B%(%s%I%f!<%6$K$H$C$F$bNI$$$G$7$g$&!#(B + DNS $B$N%k%C%/%"%C%W$K$O!"$+$J$j$N;~4V$,I,MW$H$J$k>l9g$,B?$/!"(B + $BIi2Y$N9b$$%5%$%H$G$O$3$N%G%#%l%/%F%#%V$O(B off + $B$K$9$Y$-$G$9!#$J$*!"(B/support $B%G%#%l%/%H%j$K4^$^$l$k(B + logresolve + $B%f!<%F%#%j%F%#$K$h$j!"(BApache $B$NF0:n$H$OJL$K!"%m%0$K;D$5$l$F$$$k(B + IP $B%"%I%l%9$+$i%[%9%HL>$r%k%C%/%"%C%W$9$k$3$H$,2DG=$G$9!#(B

    +
    + +

    IdentityCheck + $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: IdentityCheck + on|off
    + $B%G%U%)%k%H(B: IdentityCheck + off
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k!"(B + $B%P!<%A%c%k%[%9%H!"%G%#%l%/%H%j(B
    + $B%9%F!<%?%9(B: core + +

    $B$3$N%G%#%l%/%F%#%V$O!"%/%i%$%"%s%H%^%7%s>e$G(B + identd $B$d$=$l$KN`;w$7$?%G!<%b%s$,F0:n$7$F$$$k$H$-$K!"(B + $B$=$l$>$l$N@\B3$KBP$7$F(B RFC 1413 + $B$K=`=h$7$?%j%b!<%H%f!<%6$NL>A0$N%m%.%s%0$r9T$J$&$h$&$K$7$^$9!#(B + $B$3$N>pJs$O!"%"%/%;%9%m%0$K<}=8$5$l$^$9!#(B

    + +

    $B$3$3$GF@$i$l$?>pJs$O4JC1$J%f!<%6DI@W$K;H$&0J30$O!"(B + $BA4$/?.Mj$9$k$Y$-$G$O$"$j$^$;$s!#(B

    + +

    $B$9$Y$F$N%j%/%(%9%H$KBP$7$F%k%C%/%"%C%W$,9T$J$o$l$^$9$N$G!"(B + $B?<9o$JCY1d$NLdBj$r5/$3$9$+$b$7$l$J$$$3$H$KCm0U$7$F$/$@$5$$!#(B + ($BLuCm(B: $BNc$($P%/%i%$%"%s%HB&$K(B) $B%U%!%$%"%&%)!<%k$,$"$k$H!"(B + $B%k%C%/%"%C%W$,<:GT$7!"3F%j%/%(%9%H$K(B 30 + $BIC$NCY1d$,2C$o$k$3$H$K$J$k2DG=@-$,$"$j$^$9!#(B + $B=>$C$F!"0lHLE*$K$O%$%s%?!<%M%C%H$+$i%"%/%;%92DG=$J%Q%V%j%C%/$J%5!<%P$G(B + $BM-1W$J$b$N$G$O$"$j$^$;$s!#(B

    +
    + +

    <IfDefine> + $B%G%#%l%/%F%#%V(B

    + $B9=J8(B: <IfDefine + [!]parameter-name> ... + </IfDefine>
    + $B%G%U%)%k%H(B: None
    + $B%3%s%F%-%9%H(B: $B$9$Y$F(B
    + $B%9%F!<%?%9(B: Core
    + $B8_49@-(B: <IfDefine> + $B$O(B Apache 1.3.1 $B0J9_$GMxMQ2DG=$G$9!#(B + +

    <IfDefine test>...</IfDefine> + $B%;%/%7%g%s$O!"%G%#%l%/%F%#%V$r>r7oIU$-$G;XDj$9$k$?$a$KMxMQ$7$^$9!#(B + IfDefine $B%;%/%7%g%s$K4^$^$l$k%G%#%l%/%F%#%V$O!"(Btest + $B$,Dj5A$5$l$F$$$k$H$-$N$_=hM}$5$l$^$9!#$b$7!"(Btest + $B$,Dj5A$5$l$F$$$J$1$l$P!"(B + $B3+;O$H=*N;$N;XDj$N4V$N%G%#%l%/%F%#%V$OL5;k$5$l$^$9!#(B

    + +

    <IfDefine> $B%;%/%7%g%s%G%#%l%/%F%#%V$K;XDj$9$k(B + test $B$O!" + +

      +
    • parameter-name
    • + +
    • !parameter-name
    • +
    + +

    $BA0parameter-name + $B$HL>IU$1$i$l$?%Q%i%a!<%?$,Dj5A$5$l$F$$$l$P!"(B + $B3+;O$H=*N;$N4V$N%G%#%l%/%F%#%V$,=hM}$5$l$^$9!#8el9g$O5U$G!"(B + parameter-name + $B$,;XDj$5$l$F(B$B$$$J$$(B$B>l9g$K=hM}$5$l$^$9!#(B

    + +

    parameter-name $B0z?t$O!"%5!<%P$r5/F0$9$k:]$K(B + httpd $B$N%3%^%s%I%i%$%s$K(B + -Dparameter- $B$H$$$&7A$G;XDj$9$k$HDj5A$5$l$^$9!#(B

    + +

    <IfDefine> $B%;%/%7%g%s$OF~$l;R$K$9$k$3$H$,$G$-!"(B + $BJ#?t$N%Q%i%a!<%?$K$h$k%F%9%H$r$9$k$?$a$K;HMQ$G$-$^$9!#(B + $BNc(B:

    +
    +  $ httpd -DReverseProxy ...
    +
    +  # httpd.conf
    +  <IfDefine ReverseProxy>
    +  LoadModule rewrite_module libexec/mod_rewrite.so
    +  LoadModule proxy_module   libexec/libproxy.so
    +  </IfDefine>
    +
    +
    + +

    <IfModule> + $B%G%#%l%/%F%#%V(B

    + $B9=J8(B: <IfModule + [!]module-name> ... + </IfModule>
    + $B%G%U%)%k%H(B: None
    + $B%3%s%F%-%9%H(B: $B$9$Y$F(B
    + $B%9%F!<%?%9(B: Core
    + $B8_49@-(B: IfModule $B$O(B Apache 1.2 + $B0J9_$GMxMQ2DG=$G$9!#(B + +

    <IfModule test>...</IfModule> + $B%;%/%7%g%s$O!"%G%#%l%/%F%#%V$r>r7oIU$-$G;XDj$9$k$?$a$KMxMQ$7$^$9!#(B + IfModule $B%;%/%7%g%s$K4^$^$l$k%G%#%l%/%F%#%V$O!"(Btest + $B$G;XDj$9$k%b%8%e!<%k$,AH$_9~$^$l$F$$$k$H$-$N$_=hM}$5$l$^$9!#$b$7(B + test $B$,AH$_9~$^$l$F$$$J$1$l$P!"3+;O$H=*N;$N4V$N%G%#%l%/%F%#%V(B + $B$OL5;k$5$l$^$9!#(B

    + +

    <IfModule> $B%;%/%7%g%s%G%#%l%/%F%#%V$K;XDj$9$k(B + test $B$O!" + +

      +
    • module name
    • + +
    • !module name
    • +
    + +

    $BA0module name + $B$HL>IU$1$i$l$?%b%8%e!<%k$,(B Apache $B$KAH$_9~$^$l$F$$$l$P(B + ($B%3%s%Q%$%k:Q$_$N$b$N$H!"(BLoadModule + $B$rMxMQ$7$FF0E*$KFI$_9~$s$@$b$N$NN>J}(B)$B!"(B + $B3+;O$H=*N;$N4V$N%G%#%l%/%F%#%V$,=hM}$5$l$^$9!#8el9g$O5U$G!"(B + module name + $B$,AH$_9~$^$l$F(B$B$$$J$$(B$B>l9g$K=hM}$5$l$^$9!#(B

    + +

    module name + $B0z?t$O!"%3%s%Q%$%k$r$7$?;~$N%b%8%e!<%k$N%U%!%$%kL>$G!"Nc$($P(B + mod_rewrite.c $B$H$$$C$?7A$K$J$j$^$9!#(B

    + +

    <IfModule> $B%;%/%7%g%s$OF~$l;R$K$9$k$3$H$,2DG=$G$"$j!"(B + $BJ#?t$N%b%8%e!<%k$N%F%9%H$r9T$J$&$?$a$K;HMQ$G$-$^$9!#(B

    +
    + +

    Include $B%G%#%l%/%F%#%V(B

    + $B9=J8(B: Include + file-path|directory-path|wildcard-path
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k(B
    + $B%9%F!<%?%9(B: Core
    + $B8_49@-(B: Include $B$O(B Apache 1.3 + $B0J9_$GMxMQ2DG=$G$9!#%o%$%k%I%+!<%I$O%P!<%8%g%s(B 1.3.27 + $B$GF3F~$5$l$^$7$?!#(B + +

    $B$3$N%G%#%l%/%F%#%V$K$h$j!"%5!<%P$N@_Dj%U%!%$%k$+$i(B + $BB>$N@_Dj%U%!%$%k$r%$%s%/%k!<%I$9$k$3$H$,$G$-$^$9!#(B

    + +

    file-path $B$O!"(B($B%9%i%C%7%e$+$i;O$^$k(B) $B%U%k%Q%9$+!"(B + ServerRoot $B$+$i$NAjBP%Q%9$G;XDj$7$^$9!#(B

    + +

    Apache 1.3.13 $B$+$i!"(BInclude $B$K%U%!%$%k$NBe$o$j$K(B + $B%G%#%l%/%H%j$r;XDj$9$k$3$H$K$h$C$F!"(B + $B%G%#%l%/%H%j$H$=$N%5%V%G%#%l%/%H%jFb$N$9$Y$F$N%U%!%$%k$r(B + $BFI$_9~$s$G=hM}$G$-$k$h$&$K$J$j$^$7$?!#(B

    +

    $B%o%$%k%I%+!<%I$r;H$&$3$H$G!"$3$l$rNc$($P(B '*.conf' + $B%U%!%$%k$N$_$K@)8B$9$k$3$H$,$G$-$^$9!#(B

    + +

    $BNc(B:

    + +
    + Include /usr/local/apache/conf/ssl.conf
    + Include /usr/local/apache/conf/vhosts/ +
    +
    + +

    ServerRoot $B$+$i$NAjBP%Q%9$N>l9g$O(B:

    + +
    + Include conf/ssl.conf
    + Include conf/vhosts/ +
    +
    + +

    $B$J$*!"%G%#%l%/%H%j$r;XDj$9$k:]$O!"%(%G%#%?$N%F%s%]%i%j%U%!%$%k$J$I!"(B + $BL\E*30$N%U%!%$%k$rCV$+$J$$$h$&$K$7$J$1$l$P$J$j$^$;$s!#(B + $B$=$N$h$&$J%U%!%$%k$,$"$k$H!"(BApache $B$O$=$l$i$+$i%G%#%l%/%F%#%V$r(B + $BFI$_9~$b$&$H$7$F!"5/F0$K<:GT$9$k$+$b$7$l$^$;$s!#(B + apachectl configtest $B$r + +

    +root@host# apachectl configtest
    + Processing config directory: /usr/local/apache/conf/vhosts
    + Processing config file: /usr/local/apache/conf/vhosts/vhost1
    + Processing config file: /usr/local/apache/conf/vhosts/vhost2
    +Syntax OK
    +
    + +

    $B$3$l$K$h$j!"@_Dj$N0lIt$H$7$F0U?^$7$?%U%!%$%k$@$1$,(B + $B;H$o$l$F$$$k$+$I$&$+$r3NG'$G$-$^$9!#(B

    +

    $B;2>H(B: apachectl

    + +
    + +

    KeepAlive + $B%G%#%l%/%F%#%V(B

    + $B9=J8(B: (Apache 1.1) KeepAlive + max-requests
    + $B%G%U%)%k%H(B: (Apache 1.1) KeepAlive + 5
    + $B9=J8(B: (Apache 1.2) KeepAlive on|off
    + $B%G%U%)%k%H(B: (Apache 1.2) KeepAlive + On
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k(B
    + $B%9%F!<%?%9(B: Core
    + $B8_49@-(B: KeepAlive $B$O(B Apache 1.1 $B0J9_$GMxMQ2DG=$G$9!#(B + +

    HTTP/1.0 $B$N(B Keep-Alive $B3HD%$H(B HTTP/1.1 + $B$N;}B3E*@\B3$N5!G=$O!"J#?t$N%j%/%(%9%H$,F1$8(B TCP + $B$N@\B3$GAw$i$l$k!"D9;~4V;}B3$9$k(B HTTP + $B%;%C%7%g%s$rDs6!$7$^$9!#$?$/$5$s$N2hA|$,4^$^$l$k(B HTML + $B%I%-%e%a%s%H$G$O>l9g$K$h$C$F$OCY1d;~4V$,(B 50% + $BC;=L$5$l$k7k2L$b$G$F$$$^$9!#(BApache 1.2 $B0J9_$G(B Keep-Alive + $B@\B3$rM-8z$K$9$k$K$O(B KeepAlive On $B$H@_Dj$7$^$9!#(B

    + +

    HTTP/1.0 $B$KBP1~$7$?%/%i%$%"%s%H$N:]$K$O!"(B + $B%/%i%$%"%s%H$h$jFC$KMW5a$,$"$C$?>l9g$N$_(B Keep-Alive $B@\B3$H$J$j$^$9!#(B + $B$5$i$K!"(BHTTP/1.0 $B%/%i%$%"%s%H$G$O!"%3%s%F%s%D$NMFNL$,@h$K(B + ($BLuCm(B: $BMW5a$KBP$7$F1~Ez$rJV$9A0$K(B) $B$o$+$k>l9g$N$_(B Keep-Alive + $B@\B3$rMxMQ$G$-$^$9!#$3$l$O!"(BCGI $B$N=PNO$d(B SSI $B$N%Z!<%8!"(B + $B%5!<%P$,@8@.$7$?%G%#%l%/%H%j$N%j%9%H$N$h$&$JF0E*%3%s%F%s%D$r(B + HTTP/1.0 $B%/%i%$%"%s%H$KAw$k>l9g$K$O(B Keep-Alive + $B@\B3$r;H$($J$$$3$H$r0UL#$7$^$9!#(BHTTP/1.1 + $B$KBP1~$7$?%/%i%$%"%s%H$N:]$K$O!"(B + $BFC$K;XDj$5$l$J$$8B$j$O%G%U%)%k%H$H$7$F;}B3E*$J@\B3$,9T$J$o$l$^$9!#(B + $B%/%i%$%"%s%H$,MW5a$9$l$P!"%3%s%F%s%D$NMFNL$rH=JL$G$-$J$$$b$N$r(B + $B;}B3E*$J@\B3$rDL$7$FAw$k$?$a$K!"%A%c%s%/%(%s%3!<%G%#%s%0$,MQ$$$i$l$^$9!#(B

    + +

    Apache 1.1 $B$N$_(B: + Apache $B$,@\B3$4$H$Kmax-requests + $B$K$F;XDj$G$-$^$9!#(B + $B@)8B$O!"%5!<%P$N%j%=!<%9$rB?Bg$KMxMQ$9$k$h$&$J%/%i%$%"%s%H$rKI$0$?$a$K(B + $B9T$J$$$^$9!#(B + 0 $B$K@_Dj$9$k$H@)8BCM$O$J$/$J$j$^$9!#(B + Apache 1.2 $B5Z$S(B 1.3 $B$N>l9g$K$O!"(BMaxKeepAliveRequests + $B%G%#%l%/%F%#%V$K$h$j@)8f$7$^$9!#(B

    + +

    $B;2>H(B MaxKeepAliveRequests

    +
    + +

    KeepAliveTimeout $B%G%#%l%/%F%#%V(B

    + $B9=J8(B: KeepAliveTimeout + seconds
    + $B%G%U%)%k%H(B: KeepAliveTimeout + 15
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k(B
    + $B%9%F!<%?%9(B: Core
    + $B8_49@-(B: KeepAliveTimeout + $B$O(B Apache 1.1 $B0J9_$GMxMQ2DG=$G$9!#(B + +

    $B@\B3$rJD$8$kA0$K!"(BApache $B$,Timeout $B%G%#%l%/%F%#%V$K$h$C$F(B + $B;XDj$5$l$?%?%$%`%"%&%HCM$,;H$o$l$^$9!#(B

    + +

    KeepAliveTimeout $B$rBg$-$JCM$K@_Dj$9$k$H!"(B + $BIi2Y$N9b$$%5!<%P$K$*$$$F$O%Q%U%)!<%^%s%9$NLdBj$r0z$-5/$3$9>l9g$,$"$j$^$9!#(B + $B%?%$%`%"%&%H$,D9$1$l$PD9$$$[$I!"$h$jB?$/$N%5!<%P%W%m%;%9$,(B + $B3hH/$G$J$$%/%i%$%"%s%H$+$i$N@\B3$N=*N;$rBT$AB3$1$k$3$H$K$J$j$^$9!#(B

    +
    + +

    <Limit> $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: <Limit + method [method] ... > ... + </Limit>
    + $B%3%s%F%-%9%H(B: any
    + $B%9%F!<%?%9(B: core + +

    $B%"%/%;%9@)8f$O!"DL>o(B$B$9$Y$F$N(B$B%"%/%;%9%a%=%C%I$KBP$7$F(B + $B1F6A$7!"IaDL$O$3$l$,K>$^$7$$5sF0$G$9!#(B + $B$=$&$7$?$3$H$+$i!"BgItJ,$N>l9g$K$O%"%/%;%9@)8f$K4X$o$k%G%#%l%/%F%#%V$r(B + <limit> $B%;%/%7%g%sFb$K=q$/$Y$-$G$O$"$j$^$;$s!#(B

    + +

    <Limit> + $B%G%#%l%/%F%#%V$NL\E*$O!"%"%/%;%9@)8f$NHO0O$r;XDj$5$l$?(B HTTP + $B%a%=%C%I$K8BDj$9$k$?$a$G$9!#$=$l0J30$N%a%=%C%I$O!"(B<Limit> + $B$G0O$o$l$?%"%/%;%9@)8f$N(B$B1F6A$r$B!#(B + $B0J2<$NNc$O!"(BPOST, PUT, DELETE + $B$N%a%=%C%I$KBP$7$F$N$_%"%/%;%9$N@)8f$r9T$$!"(B + $B$=$l0J30$N%a%=%C%I$K$D$$$F$O@)8B$7$^$;$s(B:

    + +
    + <Limit POST PUT DELETE>
    + Require valid-user
    + </Limit>
    +
    +

    $B%a%=%C%I$NL>A0$K$O!"(BGET, POST, PUT, DELETE, CONNECT, OPTIONS, + PATCH, PROPFIND, PROPPATCH, MKCOL, COPY, MOVE, LOCK, UNLOCK + $B$NCf$+$i!"0l$D0J>e$rNs5s$9$k$3$H$,$G$-$^$9!#(B + $B%a%=%C%I$NL>A0$O!"BgJ8;z>.J8;z$r6hJL$7$^$9!#(B + $B$^$?!"(BGET $B$r;XDj$9$k$H(B HEAD $B$K4X$7$F$b@)8B$,$+$+$j$^$9!#(B + TRACE $B%a%=%C%I$r@)8B$9$k$3$H$O$G$-$^$;$s!#(B

    + +

    $B7Y9p(B: $B%"%/%;%9@)8B$r9T$J$&$H$-$O(B <Limit> $B$h$j$b(B <LimitExcept> $B%;%/%7%g%s$r(B + $B;H$&$h$&$K$7$F$/$@$5$$!#(B<LimitExcept> + $B%;%/%7%g%s$OG$0U$N%a%=%C%I$KBP$9$kJ]8n$O9T$J$$$^$;$s$N$G!#(B

    + +
    + +

    <LimitExcept> + $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: <LimitExcept + method [method] ... > ... + </LimitExcept>
    + $B%3%s%F%-%9%H(B: any
    + $B%9%F!<%?%9(B: core
    + $B8_49@-(B: Apache 1.3.5 $B0J9_$GMxMQ2DG=$G$9!#(B + +

    <LimitExcept> $B$H(B </LimitExcept> + $B$O!"0z?t$K(B$B4^$^$l$F$$$J$$(B HTTP + $B$N%"%/%;%9%a%=%C%I$KE,MQ$9$k$?$a$N%"%/%;%9@)8f(B + $B%G%#%l%/%F%#%V$r0O$`$?$a$KMxMQ$7$^$9!#(B$B$D$^$j(B$B!"(B<Limit> $B%;%/%7%g%s$NH?BP$NF0:n$r$7!"(B + $BI8=`$N%a%=%C%I$HI8=`30$dL$G'<1$N%a%=%C%I$N>l9g$NN>J}$r@_Dj$G$-$^$9!#(B + <Limit> + $B$N%I%-%e%a%s%H$bJ;$;$F;2>H$7$F$/$@$5$$!#(B

    + +

    $BNc(B:

    + +
    +    <LimitExcept POST GET>
    +    Require valid-user
    +    </LimitExcept>
    +    
    + +
    + +

    LimitInternalRecursion directive

    + + $B9=J8(B: LimitInternalRecursion + number [number]
    + $B%G%U%)%k%H(B: LimitInternalRecursion + 20
    + $B%3%s%F%-%9%H(B: + $B%5!<%P@_Dj%U%!%$%k!"%P!<%A%c%k%[%9%H(B
    + $B%9%F!<%?%9(B: core
    + $B8_49@-(B: LimitInternalRecursion + is $B$O(B Apache 1.3.28 $B0J9_$G$N$_;HMQ2DG=$G$9!#(B + +

    $BFbIt%j%@%$%l%/%H$O!"Nc$($P!"%*%j%8%J%k$N%j%/%(%9%H$r(B + CGI $B%9%/%j%W%H$KFbIt%j%@%$%l%/%H$9$k(B Action + $B%G%#%l%/%F%#%V$r;H$C$?>l9g$KH/@8$7$^$9!#(B + $B%5%V%j%/%(%9%H$O$"$k(B URI + $B$,%j%/%(%9%H$5$l$?>l9g$K2?$,5/$-$k$N$+$rFM$-;_$a$k$?$a$N(B Apache + $B$NJ}K!$G$9!#Nc$($P!"(Bmod_dir + $B$O(B DirectoryIndex + $B$K5s$2$i$l$F$$$k%U%!%$%k$rC5$9$?$a$K%5%V%j%/%(%9%H$r;H$$$^$9!#(B

    + +

    LimitInternalRecursion $B$OFbIt%j%@%$%l%/%H$d(B + $B%5%V%j%/%(%9%H$,L58B%k!<%W$K4Y$C$?>l9g$K(B + $B%5!<%P$,%/%i%C%7%e$9$k$N$rKI$.$^$9!#(B + $B$3$N$h$&$J%k!<%W$ODL>o!"@_Dj%_%9$,860x$G5/$3$j$^$9!#(B

    + +

    $B$3$N%G%#%l%/%F%#%V$OFs$D$N0[$J$k@)8BCM$rJ]B8$7$^$9!#$=$l$>$l$NCM$O!"(B + $B%j%/%(%9%HC10L$GI>2A$5$l$^$9!#:G=i$N(B number $B$O8e$KB3$/$3$H$N$G$-$k(B + $BFbIt%j%@%$%l%/%H$N>e8B$r@_Dj$7$^$9!#Fs$D$a$N(B number $B$O(B + $B%5%V%j%/%(%9%H$NF~$l;R9=B$$N?<$5$r@_Dj$7$^$9!#(BNumber $B$r(B + $B0l$D$@$1;XDj$7$?>l9g$O!"$=$NCM$,N>J}$N@)8BCM$K;HMQ$5$l$^$9!#(B + $BCM(B 0 $B$O!VL5@)8B!W$r0UL#$7$^$9!#(B

    + +

    $BNc(B

    +
    +    LimitInternalRecursion 5
    +    
    + +
    +

    LimitRequestBody $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: LimitRequestBody + bytes
    + $B%G%U%)%k%H(B: LimitRequestBody + 0
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k!"%P!<%A%c%k%[%9%H!"%G%#%l%/%H%j!"(B.htaccess
    + $B%9%F!<%?%9(B: core
    + $B8_49@-(B: LimitRequestBody + $B$O(B Apache 1.3.2 $B0J9_$GMxMQ2DG=$G$9!#(B + +

    $B$3$N%G%#%l%/%F%#%V$O!"%j%/%(%9%H%\%G%#$K$*$$$F5v$5$l$k(B 0 + ($BL5@)8B$r0UL#$7$^$9(B) $B$+$i(B 2147483647 (2GB) + $B$^$G$N%P%$%H?t!"(Bbytes $B$r;XDj$7$^$9!#(B

    + +

    LimitRequestBody $B%G%#%l%/%F%#%V$O!";XDj$5$l$?%3%s%F%-%9%H(B + ($B%5!<%PA4BN!"%G%#%l%/%H%j!"%U%!%$%k!"%m%1!<%7%g%s(B) $BFb$K$*$$$F(B + HTTP $B%j%/%(%9%H%a%C%;!<%8%\%G%#$N5vMF$5$l$k%5%$%:$K@)8B$r$+$1$k$3$H$,$G$-$^$9!#(B + $B%/%i%$%"%s%H$N%j%/%(%9%H$,$=$N@)8BCM$rD6$($F$$$l$P!"(B + $B%5!<%P$O%j%/%(%9%H$r=hM}$;$:$K%(%i!<$rJV$7$^$9!#(B + $BDL>o$N%j%/%(%9%H%a%C%;!<%8%\%G%#$N%5%$%:$O!"%j%=!<%9$NpJs$rAw?.$9$k$?$a$K(B + $B%a%C%;!<%8%\%G%#$r;H$$$^$9!#(B + PUT $B%a%=%C%I$N/$J$/$H$b$"$k%j%=!<%9$KBP$7$F%5!<%P$, + +

    $B$3$N%G%#%l%/%F%#%V$O!"(B + $B4IM}o$J%j%/%(%9%H$r@)8f$G$-$k$h$&$K$7!"(B + $B2?$i$+$N7A$N%5!<%S%95qH]967b(B ($BLuCm(B:DoS) $B$rHr$1$k$N$KM-8z$G$9!#(B

    + +

    $B$"$k>l=j$X$N%U%!%$%k%"%C%W%m!<%I$r5v2D$9$k$H$7$?>l9g$K!"(B + $B%"%C%W%m!<%I$G$-$k%U%!%$%k$N%5%$%:$r(B 100K $B$K@)8B$7$?$1$l$P!"(B + $B0J2<$N$h$&$K;XDj$9$l$P$h$$$G$7$g$&!#(B

    + +
    LimitRequestBody 102400
    + +
    + +

    LimitRequestFields $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: LimitRequestFields + number
    + $B%G%U%)%k%H(B: + LimitRequestFields 100
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k(B
    + $B%9%F!<%?%9(B: core
    + $B8_49@-(B: + LimitRequestFields $B$O(BApache 1.3.2 $B0J9_$GMxMQ2DG=$G$9!#(B + +

    number$B$K$O!"(B0 ($BL5@)8B$r0UL#$7$^$9(B) $B$+$i(B 32767 + $B$^$G$N?tCM$r;XDj$7$^$9!#(B + $B%G%U%)%k%HCM$O!"Dj?t(B DEFAULT_LIMIT_REQUEST_FIELDS + $B$K$h$j%3%s%Q%$%k;~$KDj5A$5$l$^$9(B ($BG[I[;~$K$O(B 100 $B$H;XDj$5$l$F$$$^$9(B)$B!#(B

    + +

    LimitRequestBody $B%G%#%l%/%F%#%V$O!"%5!<%P4IM}o$N%/%i%$%"%s%H$+$i$N%j%/%(%9%H$K4^$^$l$k$G$"$m$&(B + $B%U%#!<%k%I$N?t$h$jBg$-$JCM$rI,MW$H$7$^$9!#(B + $B%/%i%$%"%s%H$K$h$j;H$o$l$?MW5a%X%C%@!<%U%#!<%k%I$N?t$,(B + 20 $B$rD6$($k$3$H$O$[$H$s$I$"$j$^$;$s$,!"(B + $B$3$l$O\:Y$J%3%s%F%s%H%M%4%7%(!<%7%g%s$r$9$k$?$a$N%V%i%&%6$N@_Dj$K$^$G$b(B + $B1F6A$5$l$k$3$H$,$"$j$^$9!#%*%W%7%g%s$N(B HTTP + $B3HD%$O%j%/%(%9%H%X%C%@%U%#!<%k%I$r;H$C$F8=$5$l$k>l9g$,(B + $BB?$/$"$j$^$9!#(B

    + +

    $B$3$N%G%#%l%/%F%#%V$O!"(B + $B4IM}o$J%j%/%(%9%H$r@)8f$G$-$k$h$&$K$7!"(B + $B2?$i$+$N7A$N%5!<%S%95qH]967b(B ($BLuCm(B:DoS) $B$rHr$1$k$N$KM-8z$G$9!#(B

    + +

    $BNc(B:

    + +
    LimitRequestFields 50
    + +
    + +

    LimitRequestFieldsize + $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: LimitRequestFieldsize + bytes
    + $B%G%U%)%k%H(B: + LimitRequestFieldsize 8190
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k(B
    + $B%9%F!<%?%9(B: core
    + $B8_49@-(B: + LimitRequestFieldsize $B$O(B Apache 1.3.2 $B0J9_$GMxMQ2DG=$G$9!#(B + +

    $B$3$N%G%#%l%/%F%#%V$O!"(BHTTP + $B%j%/%(%9%H%X%C%@Fb$K4^$a$k$3$H$N$G$-$k%P%$%H!"(Bbytes $B$r(B + 0 $B$+$i%3%s%Q%$%k;~$KDj5A$5$l$kDj?t(B + DEFAULT_LIMIT_REQUEST_FIELDSIZE ($BG[I[;~$K$O(B 8192 $B$H;XDj(B) + $B$G;XDj$5$l$?CM$^$G$N?t;z$G;XDj$7$^$9!#(B

    + +

    LimitRequestFieldsize $B%G%#%l%/%F%#%V$O!"(B + $B%5!<%P$N%3%s%Q%$%k;~$K;XDj$7$?%$%s%W%C%H%P%C%U%!MFNL0J2<$K(B + HTTP $B%j%/%(%9%H%X%C%@$N5vMF$5$l$k%5%$%:$r@)8B$9$k$3$H$,$G$-$^$9!#(B + $B%5!<%P$O!"$3$N%G%#%l%/%F%#%V$NCM$H$7$F!"(B + $BDL>o$N%/%i%$%"%s%H%j%/%(%9%H$+$iAw$i$l$?8D!9$N%X%C%@%U%#!<%k%I$K(B + $B==J,B-$kBg$-$5$rI,MW$H$7$^$9!#(B + $BIaDL$N%j%/%(%9%H%X%C%@$N%5%$%:$O!"8D!9$N%/%i%$%"%s%H$K$h$jBg$-$/JQ$o$j!"(B + $B>\:Y$J%3%s%F%s%H%M%4%7%(!<%7%g%s$r$9$k$?$a$N%V%i%&%6$N@_Dj$K$^$G$b(B + $B1F6A$5$l$k$3$H$,$"$j$^$9!#(B +

    + +

    $B$3$N%G%#%l%/%F%#%V$O!"(B + $B4IM}o$J%j%/%(%9%H$r@)8f$G$-$k$h$&$K$7!"(B + $B2?$i$+$N7A$N%5!<%S%95qH]967b(B ($BLuCm(B:DoS) $B$rHr$1$k$N$KM-8z$G$9!#(B

    + +

    $BNc(B:

    + +
    LimitRequestFieldSize 16380
    + +

    $BDL>o$O%G%U%)%k%H$+$iJQ99$9$kI,MW$O$J$$$G$7$g$&!#(B

    +
    + +

    LimitRequestLine $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: LimitRequestLine + bytes
    + $B%G%U%)%k%H(B: LimitRequestLine + 8190
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k(B
    + $B%9%F!<%?%9(B: core
    + $B8_49@-(B: LimitRequestLine + $B$O(B Apache 1.3.2 $B0J9_$GMxMQ2DG=$G$9!#(B + +

    $B$3$N%G%#%l%/%F%#%V$O!"(BHTTP $B%j%/%(%9%H9TFb$G5vMF$5$l$k%P%$%H?t(B + bytes $B$r(B 0 $B$+$i%3%s%Q%$%k;~$NDj?t(B + DEFAULT_LIMIT_REQUEST_LINE ($BG[I[;~$K$O(B 8192 $B$H;XDj(B) + $B$G;XDj$5$l$?CM$^$G$N?t;z$G;XDj$7$^$9!#(B

    + +

    LimitRequestLine $B%G%#%l%/%F%#%V$K$h$j!"%5!<%P4IM}A0$,F~$k$KB-$k(B + $BBg$-$5$rI,MW$H$7$^$9!#(B

    + +

    $B$3$N%G%#%l%/%F%#%V$O!"(B + $B4IM}o$J%j%/%(%9%H$r@)8f$G$-$k$h$&$K$7!"(B + $B2?$i$+$N7A$N%5!<%S%95qH]967b(B ($BLuCm(B:DoS) $B$rHr$1$k$N$KM-8z$G$9!#(B

    + +

    $BNc(B:

    + +
    LimitRequestLine 16380
    + +

    $BDL>o$N>l9g$K$O!"%G%U%)%k%H$+$iJQ99$9$kI,MW$J$$$G$7$g$&!#(B

    +
    + +

    Listen $B%G%#%l%/%F%#%V(B

    + $B9=J8(B: Listen + [IP-address:]port
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k(B
    + $B%9%F!<%?%9(B: core
    + $B8_49@-(B: Listen $B$O(B Apache 1.1 + $B0J9_$GMxMQ2DG=$G$9!#(B + +

    Listen $B%G%#%l%/%F%#%V$O!"(BApache $B$,J#?t$N(B IP $B%"%I%l%9$d%]!<%H$r(B + listen $B$9$k$h$&$K;X<($7$^$9!#%G%U%)%k%H$G$O!"$9$Y$F$N(B + IP $B%$%s%?!<%U%'!<%9$X$N%j%/%(%9%H$K1~Ez$7!"(BPort $B%G%#%l%/%F%#%V$,;XDj$7$?%]!<%H$N$_$r(B + listen $B$9$k$3$H$K$J$j$^$9!#(B

    + BindAddress $B$d(B Port + $B$NBe$o$j$K(B Listen $B$r;HMQ$9$k$3$H$,$G$-$^$9!#(B + Listen $B$OFCDj$N%]!<%Hl9g$K$O!"(B + $B%5!<%P$O(B Port $B%G%#%l%/%F%#%V$GM?$($i$l$?%]!<%H$KBe$o$j!"(B + $B$9$Y$F$N%$%s%?!<%U%'!<%9>e$G;XDj$5$l$?%]!<%H$r(B listen + $B$7$^$9!#$b$7!"%]!<%H$H0l=o$K(B IP $B%"%I%l%9$,;XDj$5$l$F$$$l$P!"(B + $B;XDj$5$l$?%$%s%?!<%U%'!<%9$N%]!<%H$r(B listen $B$7$^$9!#(B + +

    $B$J$*!"(BApache $B$,<+J,$N%5!<%P$r;X$9(B URL $B$r@5$7$/@8@.$G$-$k$h$&$K(B + Port $B%G%#%l%/%F%#%V$b;H$&I,MW$,$"$k$+$b$7$l$J$$$3$H$K(B + $BCm0U$7$F$/$@$5$$!#(B

    + +

    Listen $B$9$kJ#?t$N%"%I%l%9$H%]!<%H$r;XDj$9$k$?$a$K!"(B + $BJ#?t$N(B Listen $B%G%#%l%/%F%#%V$r;HMQ$9$k$3$H$,$G$-$^$9!#(B + $B$=$N>l9g!"%5!<%P$O;XDj$5$l$?$9$Y$F$N%"%I%l%9$H%]!<%H$G!"(B + $B%j%/%(%9%H$KBP$9$k1~Ez$r9T$J$$$^$9!#(B

    + +

    $B%5!<%P$,(B 80 $BHV%]!<%H$H(B 8000 $BHV%]!<%H$NN>J}$G@\B3$r +

    +   Listen 80
    +   Listen 8000
    +
    + $BFs$D$N%$%s%?!<%U%'!<%9$H%]!<%HHV9f$K$*$$$F@\B3$r + Listen 192.170.2.1:80 + Listen 192.170.2.5:8000 + + +

    $B;2>H(B: DNS $B$K4X$9$kLdBj(B
    + $B;2>H(B: Apache $B$,MxMQ$9$k%"%I%l%9$H%]!<%H$N@_Dj(B
    + $B;2>H(B: $B4{CN$N%P%0(B

    +
    + +

    ListenBacklog + $B%G%#%l%/%F%#%V(B

    + $B9=J8(B: ListenBacklog + backlog
    + $B%G%U%)%k%H(B: ListenBacklog + 511
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k(B
    + $B%9%F!<%?%9(B: Core
    + $B8_49@-(B: ListenBacklog $B$O(B Apache 1.2.0 + $B0J9_$GMxMQ2DG=$G$9!#(B + +

    $Bo$OJQ99$NI,MW$O$"$j$^$;$s$7!"JQ99$9$k$3$H$OK>$^$7$/$"$j$^$;$s!#(B + $B$7$+$7!"%7%9%F%`$K$h$C$F$O(B TCP SYN $B%U%i%C%I967b$rl9g$,$"$j$^$9!#(Blisten(2) + $B%7%9%F%`%3!<%k$N(B backlog $B%Q%i%a!<%?$r;2>H$7$F$/$@$5$$!#(B

    + +

    $B$3$N?tCM$O!"(BOS $B$K$h$C$F>.$5$JCM$K@)8B$5$l$F$$$k$3$H$,$h$/$"$j!"(B + OS $B$K$h$C$F$5$^$6$^$G$9!#$5$i$K!"B?$/$N(B OS $B$O(B backlog + $B$G;XDj$5$l$?CM$=$N$b$N$r;H$&$N$G$O$J$/!"$=$l$K4p$E$/CM(B + ($BDL>o$O$h$jBg$-$JCM(B) $B$r;H$&$H$$$&$3$H$K$bCm0U$7$F$/$@$5$$!#(B

    +
    + +

    <Location> + $B%G%#%l%/%F%#%V(B

    + $B9=J8(B: <Location + URL-path|URL> ... </Location>
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k!"%P!<%A%c%k%[%9%H(B
    + $B%9%F!<%?%9(B: core
    + $B8_49@-(B: Location $B$O(B Apache 1.1 + $B0J9_$GMxMQ2DG=$G$9!#(B + +

    <Location> $B%G%#%l%/%F%#%V$O!"(BURL + $B$K$h$k%"%/%;%9@)8f$rDs6!$7$^$9!#(B<Directory> $B%G%#%l%/%F%#%V$H;w$F$$$F!"(B + </Location> $B%G%#%l%/%F%#%V$G=*N;$9$k%5%V%;%/%7%g%s$r3+;O$7$^$9!#(B + <Location> $B%;%/%7%g%s$O!"(B<Directory> + $B%;%/%7%g%s$H(B .htaccess $B$NFI$_9~$_$N8e!"(B<Files> + $B%;%/%7%g%s$rE,MQ$7$?8e$K!"@_Dj%U%!%$%k$K8=$l$?=g$K=hM}$5$l$^$9!#(B

    + +

    URL $B$O%U%!%$%k%7%9%F%`$KBP1~$9$kI,MW$O$J$/!"(B<Location> + $B$O40A4$K%U%!%$%k%7%9%F%`$K4X78$;$:F0:n$9$k$3$H$r6/D4$7$F$*$-$^$9!#(B

    + +

    $B$9$Y$F$N%j%/%(%9%H(B ($B%W%m%-%7$r=|$/(B) $B$KBP$7!"(BURL $B$O(B + /path/ $B$H$$$&!"(Bhttp://servername + $B$H$$$&@\F,<-$r4^$^$J$$7A$G%^%C%A$7$^$9!#(B + $B%W%m%-%7%j%/%(%9%H$N>l9g$K$O!"(Bscheme://servername/path + $B$H$$$&@\F,<-$r4^$`7A$G%^%C%A$7!"@\F,<-$r4^$a$F;XDj$9$kI,MW$,$"$j$^$9!#(B

    + +

    URL $B$K$O%o%$%k%I%+!<%I$rMxMQ$9$k$3$H$,$G$-$^$9!#(B + `?' $B$OG$0U$N0lJ8;z!"(B`*' $B$OG$0U$NJ8;zNs$K%^%C%A$7$^$9!#(B

    + +

    Apache 1.2 $B0J9_$N>l9g(B: + ~ $B$H$$$&J8;z$rDI2C$9$k$3$H$G!"3HD%@55,I=8=$r(B + $BMxMQ$9$k$3$H$b$G$-$^$9!#(B + $BNc$($P!"(B

    +
    +   <Location ~ "/(extra|special)/data">
    +
    + +

    $B$O(B URL $B$K(B "/extra/data" $B$+(B "/special/data" + $B$H$$$&J8;zNs$,4^$^$l$F$$$k>l9g$K%^%C%A$7$^$9!#$=$7$F!"(B + Apache 1.3 $B0J9_$N>l9g$K$O!"(B<Location> + $B$N@55,I=8=HG$HA4$/F1$8F0:n$r$9$k(B <LocationMatch> + $B$H$$$&?7$7$$%G%#%l%/%F%#%V$,$"$j$^$9!#(B

    + +

    Location $B5!G=$O!"(BSetHandler + $B%G%#%l%/%F%#%V$HAH9g$o$;$FMxMQ$9$k$HFC$KJXMx$G$9!#(B + $BNc$($P!"(Bfoo.com $B$N%V%i%&%6$+$i$N$_%9%F!<%?%9$N;2>H$rM-8z$K$7$?$1$l$P!"(B + $B +

    +    <Location /status>
    +    SetHandler server-status
    +    Order Deny,Allow
    +    Deny from all
    +    Allow from .foo.com
    +    </Location>
    +
    + +

    Apache 1.3 $B0J9_$K$*$1$k(B / ($B%9%i%C%7%e(B) + $B$N + $B%9%i%C%7%eJ8;z$O!"(BURL + $BFb$K8=$l$k>l=j$K1~$8$FJQ$o$kFCJL$J0UL#$r;}$C$F$$$^$9!#(B + $B%U%!%$%k%7%9%F%`$K$*$$$FMxMQ$9$k>l9g$K$OJ#?t$N%9%i%C%7%e$G$b0l$D$N(B + $B%9%i%C%7%e$H$7$F07$o$l$^$9$,!"(B($BNc$($P!"(B/home///foo + $B$O(B /home/foo $B$H$$$C$?$h$&$K(B) URL + $B$K$*$$$F$OI,$:$7$b$=$&$J$k$o$1$G$O$"$j$^$;$s!#(B + <LocationMatch> + $B%G%#%l%/%F%#%V$d@55,I=8=$rMxMQ$7$?(B <Location> + $B%G%#%l%/%F%#%V$G$=$N$h$&$JF0:n$r$5$;$?$1$l$P!"(B + $BL@<(E*$KJ#?t$N%9%i%C%7%e$r5-=R$9$kI,MW$,$"$j$^$9!#(B + $BNc$($P!"(B<LocationMatch ^/abc> $B$O!"(B + /abc $B$H$$$&%j%/%(%9%H(B URL $B$K%^%C%A$7$^$9$,!"(B + //abc $B$H$$$&%j%/%(%9%H(B URL $B$K$O%^%C%A$7$^$;$s!#(B + ($B@55,I=8=$G$J$$(B) <Location> $B%G%#%l%/%F%#%V$O!"(B + Proxy $B%j%/%(%9%H$KBP$7$FMxMQ$9$k:]$K$OF1MM$N$U$k$^$$$r$7$^$9$,!"(B + ($B@55,I=8=$G$J$$(B) <Location> $B$r(B Proxy + $B$G$J$$%j%/%(%9%H$KBP$7$FMxMQ$9$k:]$K$O!"(B + $B0l$D$N%9%i%C%7%e$GJ#?t$N%9%i%C%7%e$K%^%C%A$7$^$9!#(B + $BNc$($P!"(B<Location /abc/def> $B$H;XDj$7!"(B + /abc//def + $B$H$$$&%j%/%(%9%H$,$"$l$P!"%^%C%A$9$k$3$H$K$J$j$^$9!#(B

    + +

    $B;2>H(B: $B%j%/%(%9%H$r + Directory, Location, Files $B%;%/%7%g%s$NF0:nK!(B

    +
    + +

    <LocationMatch>

    + $B9=J8(B: <LocationMatch + regex> ... </LocationMatch>
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k!"%P!<%A%c%k%[%9%H(B
    + $B%9%F!<%?%9(B: core
    + $B8_49@-(B: LocationMatch $B$O(B Apache 1.3 + $B0J9_$GMxMQ2DG=$G$9!#(B + +

    + <LocationMatch> $B%G%#%l%/%F%#%V$O!"(B<Location> $B$HF1$8MM$K(B + URL $B$K$h$k%"%/%;%9@)8f$rDs6!$7$^$9!#(B + $B$?$@$7!"0z?t$OIaDL$NJ8;zNs$G$O$J$/!"@55,I=8=$H$J$j$^$9!#Nc$($P!"(B

    +
    +   <LocationMatch "/(extra|special)/data">
    +
    + +

    $B$O(B URL $B$K(B "/extra/data" $B$+(B "/special/data" $B$H$$$&J8;zNs$,(B + $B4^$^$l$F$$$k>l9g$K%^%C%A$7$^$9!#(B

    +

    $B;2>H(B: $B%j%/%(%9%H$r + Directory, Location, Files $B%;%/%7%g%s$NF0:nK!(B

    +
    + +

    LockFile + $B%G%#%l%/%F%#%V(B

    + $B9=J8(B: LockFile + $B%U%!%$%k%Q%9(B
    + $B%G%U%)%k%H(B: LockFile + logs/accept.lock
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k(B
    + $B%9%F!<%?%9(B: core + +

    LockFile $B%G%#%l%/%F%#%V$O(B Apache $B$,(B USE_FCNTL_SERIALIZED_ACCEPT + $B$+(B USE_FLOCK_SERIALIZED_ACCEPT + $B$G%3%s%Q%$%k$5$l$?$H$-$K;H$&%m%C%/%U%!%$%k$X$N%Q%9$r;XDj$7$^$9!#(B + $B$3$N%G%#%l%/%F%#%V$ODL>o$O%G%U%)%k%HCM$N$^$^$K$7$F$*$/$Y$-$G$9!#(B + $B$3$l$rJQ$($klogs $B%G%#%l%/%H%j$,(B NFS + $B%^%&%s%H$5$l$F$$$k!"$H$$$&$b$N$G$9!#$3$l$O!"(B$B%m%C%/%U%!%$%k$O(B + $B%m!<%+%k%G%#%9%/>e$K:n$i$l$J$1$l$P$J$i$J$$(B$B$+$i$G$9!#(B + $B$N8e$KDI2C$5$l$^$9!#(B

    + +

    $B%;%-%e%j%F%#(B /var/tmp + $B$N$h$&$J3'$,=q$-9~$a$k%G%#%l%/%H%j$OHr$1$k$N$,8-L@$G$9!#(B + $B$3$l$O!"%5!<%P$,:n@.$7$h$&$H$9$k%m%C%/%U%!%$%k$HF1$8L>A0$N%U%!%$%k$r(B + $B:n@.$9$k$3$H$G!"%5!<%P$N5/F0$rAK;_$9$k!"$H$$$&%5!<%S%95qH]967b$r(B + $B9T$&$3$H$,2DG=$K$J$k$+$i$G$9!#(B

    +
    + +

    LogLevel + $B%G%#%l%/%F%#%V(B

    + $B9=J8(B: LogLevel + level
    + $B%G%U%)%k%H(B: LogLevel + warn
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k!"%P!<%A%c%k%[%9%H(B
    + $B%9%F!<%?%9(B: core
    + $B8_49@-(B: LogLevel $B$O(B Apache 1.3 + $B0J9_$GMxMQ2DG=$G$9!#(B + +

    LogLevel $B$O!"%(%i!<%m%0$X5-O?$9$k%a%C%;!<%8$N>iD9@-$r;XDj$7$^$9(B + (ErrorLog $B%G%#%l%/%F%#%V$r8+$F$/$@$5$$(B)$B!#(B + $B0J2<$N(B level $B$r;XDj$G$-!"=g$K=EMWEY$,2<$,$C$F$$$-$^$9!#(B

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    $B%l%Y%k(B $B@bL@(B $BNc(B
    emerg $B6[5^(B - $B%7%9%F%`$,MxMQ$G$-$J$$(BChild cannot open lock file. Exiting + ($B;R%W%m%;%9$,%m%C%/%U%!%$%k$r3+$1$J$$$?$a=*N;$7$?(B)
    alert $BD>$A$KBP=h$,I,MW(Bgetpwuid: couldn't determine user name from uid + (getpwuid: UID $B$+$i%f!<%6L>$rFCDj$G$-$J$+$C$?(B)
    crit $BCWL?E*$J>uBV(Bsocket: Failed to get a socket, exiting child + (socket: $B%=%1%C%H$,F@$i$l$J$$$?$a!";R%W%m%;%9$r=*N;$5$;$?(B)
    error $B%(%i!<(BPremature end of script headers + ($B%9%/%j%W%H$N%X%C%@$,B-$j$J$$$^$^$G=*$o$C$?(B)
    warn $B7Y9p(Bchild process 1234 did not exit, sending another SIGHUP + ($B;R%W%m%;%9(B 1234 $B$,=*N;$7$J$+$C$?!#$b$&0lEY(B SIGHUP $B$rAw$k(B)
    notice $BIaDL$@$,!"=EMW$J>pJs(Bhttpd: caught SIGBUS, attempting to dump core in ... + (httpd: SIGBUS $B%7%0%J%k$r +
    info $BDI2C>pJs(B"Server seems busy, (you may need to increase + StartServers, or Min/MaxSpareServers)..." ($B!V%5!<%P$OIi2Y$,9b$$!"(B + (StartServers $B$d(B Min/MaxSpareServers $B$NCM$rA}$d$9I,MW$,$"$k$+$b(B)$B!W(B)
    debug $B%G%P%C%0%a%C%;!<%8(B"Opening config file ..." ($B@_Dj%U%!%$%k$r3+$$$F$$$k(B...)
    + +

    $BFCDj$N%l%Y%k$,;XDj$5$l$?>l9g!"$=$l$h$j9b$$%l%Y%k$N$9$Y$F$N(B + $B%a%C%;!<%8$,Js9p$5$l$^$9!#(B + $BNc$($P(B$B!"(BLogLevel info $B$K;XDj$9$k$H!"(B + notice $B$H(B warn $B$bJs9p$5$l$^$9!#(B

    + +

    $B$J$*(B crit $B0J>e$r;XDj$9$k$3$H$,?d>)$5$l$^$9!#(B

    + +

    $BNc(B:

    + +
    LogLevel notice
    + +

    $BCm(B: $BDL>o$N%U%!%$%k$K5-O?$9$k>l9g%l%Y%k(B + notice $B$N%a%C%;!<%8$OM^@)$9$k$3$H$,$G$-$:!"(B + $B>o$K5-O?$5$l$^$9!#$7$+$7!"$3$l$O(B syslog + $B$r;H$C$F%m%0<}=8$r9T$J$&>l9g$K$O$"$F$O$^$j$^$;$s!#(B

    + +
    + +

    MaxClients + $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: MaxClients + $B?tCM(B
    + $B%G%U%)%k%H(B: MaxClients + 256
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k(B
    + $B%9%F!<%?%9(B: core + +

    MaxClients + $B%G%#%l%/%F%#%V$O!"F1;~$K%5%]!<%H$G$-$k:GBg%j%/%(%9%H?t$r@_Dj$7$^$9!#(B + $B;R%5!<%P%W%m%;%9$O!"$3$l$h$jB?$/$O:n@.$5$l$^$;$s!#(B + $B$J$*!"(B256 $B%/%i%$%"%s%H$h$jBg$-$J?tCM$r;XDj$9$k$?$a$K$O!"(Bhttpd.h $B$N(B + HARD_SERVER_LIMIT $B$rJT=8$7$F:F%3%s%Q%$%k$7$J$1$l$P$J$j$^$;$s!#(B

    + +

    MaxClients $B$N@)8B$rD6$($?@\B3$O!"DL>o$O(B ListenBacklog + $B%G%#%l%/%F%#%V$G;XDj$7$??t$^$G%-%e!<$KF~$l$i$l$^$9!#(B + $B$=$7$F!"JL$N%j%/%(%9%H$r=*N;$7;R%W%m%;%9$,2rJ|$5$l$?;~E@$G!"(B + $B@\B3$, +


    + +

    MaxKeepAliveRequests + $B%G%#%l%/%F%#%V(B

    + $B9=J8(B: MaxKeepAliveRequests + $B?tCM(B
    + $B%G%U%)%k%H(B: + MaxKeepAliveRequests 100
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k(B
    + $B%9%F!<%?%9(B: core
    + $B8_49@-(B: Apache 1.2 $B0J9_$GMxMQ2DG=$G$9!#(B + +

    MaxKeepAliveRequests $B%G%#%l%/%F%#%V$O!"(BKeepAlive $B$,M-8z$J>l9g$K!"(B + $B0l2s$N@\B3$G0" $B$K@_Dj$7$F$$$l$P!"e$5$;$k$?$a$K!"Bg$-$J?tCM$r;XDj$9$k$3$H$r4+$a$^$9!#(B + $B$J$*!"(BApache 1.1 $B$G$O$3$NCM$O!"(BKeepAlive + $B%G%#%l%/%F%#%V$N%*%W%7%g%s$H$7$F;XDj$5$l$F$$$^$7$?!#(B

    + +

    $BNc(B

    + +
    MaxKeepAliveRequests 500
    + +
    + +

    MaxRequestsPerChild + $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: MaxRequestsPerChild + $B?tCM(B
    + $B%G%U%)%k%H(B: + MaxRequestsPerChild 0
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k(B
    + $B%9%F!<%?%9(B: core + +

    MaxRequestsPerChild $B%G%#%l%/%F%#%V$O!"(B + $B8D!9$N;R%5!<%P!<%W%m%;%9$,=hM}$G$-$k%j%/%(%9%H$N:GBg?t$r@_Dj$7$^$9!#(B + MaxRequestsPerChild + $B$G;XDj$5$l$??t$N%j%/%(%9%H$r=hM}$9$k$H!";R%W%m%;%9$O=*N;$7$^$9!#(B + $B$J$*!"(B0 $B$r;XDj$9$k$H!"%W%m%;%9$O8B$j$J$/F0$-$D$E$1$^$9!#(B

    + +

    MaxRequestsPerChild $B$K$h$j!":GBg?t$r(B 0 + $B0J30$NCM$K@_Dj$9$k$3$H$O!"Fs$D$NM-1W$J8z2L$,$"$j$^$9!'(B

    + +
      +
    • ($BM=4|$;$L(B) $B%a%b%j%j!<%/$K$h$C$F%W%m%;%9$,>CHq$9$k(B + $B%a%b%j$NAmNL$r@)8B$9$k$3$H$,$G$-$^$9!#(B
    • + +
    • $B%W%m%;%9$N/$5$;$k$3$H$r=u$1$^$9!#(B
    • +
    + +

    $B$?$@$7!"(BWin32 $B$K$*$$$F$O$3$l$r(B 0 $B$K@_Dj$7$?J}$,NI$$$G$7$g$&!#(B + 0 $B0J30$r;XDj$9$k$H!"%j%/%(%9%H$N@)8B$KE~C#$7$?$H$-$K;R%W%m%;%9$,=*N;$7!"(B + $B;R%W%m%;%9$,$b$&0lEY:n$i$l!"$=$N:]$K@_Dj%U%!%$%k$rFI$_D>$7$^$9!#(B + $B$3$l$K$h$j!"@_Dj%U%!%$%k$r=$@58e$K!"(B + $B$^$@=$@5FbMF$,E,MQ$5$l$k$N$r4|BT$7$F$$$J$$$H$-$K(B + $BM=4|$;$L?6$kIq$$$r$9$k$3$H$,$"$j$^$9!#(B + ThreadsPerChild $B$b;2>H$7$F$/$@$5$$!#(B

    + +

    $BCm0U(B: KeepAlive $B%j%/%(%9%H$N>l9g!"(B + $B:G=i$N%j%/%(%9%H$N$_%+%&%s%H$5$l$^$9!#(B + $B$B@\B3?t(B$B$r;XDj$9$k$b$N$H$$$($^$9!#(B

    +
    + +

    MaxSpareServers $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: MaxSpareServers + $B?tCM(B
    + $B%G%U%)%k%H(B: MaxSpareServers + 10
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k(B
    + $B%9%F!<%?%9(B: core + +

    MaxSpareServers $B%G%#%l%/%F%#%V$O!"(B$B%"%$%I%k>uBV(B$B$G$"$k(B + $B;R%5!<%P%W%m%;%9$NK>$^$7$$:GBg?t$r;XDj$7$^$9!#(B + $B%"%$%I%k>uBV$N%W%m%;%9$H$O!"%j%/%(%9%H$r=hM}$7$F$$$J$$%W%m%;%9$N$3$H$G$9!#(B + MaxSpareServers $B$G;XDj$7$??t0J>e$,%"%$%I%k>uBV$G$"$l$P!"(B + $B?F%W%m%;%9$OA}$($9$.$?%W%m%;%9$r(B kill $B$7$^$9!#(B

    + +

    $B$3$N?tCM$NJQ99$O!"$H$F$b%"%/%;%9$NB?$$%5%$%H$K$*$$$F$N$_I,MW$H$J$k$G$7$g$&!#(B + $BBg$-$J?tCM$r;XDj$9$k$3$H$O!"$[$H$s$I$N>l9g$K$ONI$/$J$$@_Dj$G$9!#(B

    + +

    $B$J$*!"$3$l$O(B$BM=Hw(B$B%5!<%P$N:GBg?t$G$"$j!"(B + $B%/%i%$%"%s%H$+$i$N%j%/%(%9%H$r0lEY$K$I$l$@$1=hM}$G$-$k$N$+$N:GBg?t$r(B + $B;XDj$9$k$b$N$G$O$"$j$^$;$s!#(B + $B$b$7!"$=$&$$$C$?:GBg?t$r;XDj$7$?$$$N$G$"$l$P!"(BMaxClients $B%G%#%l%/%F%#%V$r;2>H$7$F$/$@$5$$!#(B

    + +

    $B$3$N%G%#%l%/%F%#%V$O!"(BMicrosoft Windows $B%W%i%C%H%U%)!<%`$K$*$1$k(B + Apache $B%5!<%P$G$O0UL#$r;}$A$^$;$s!#(B

    + +

    MinSpareServers$B!"(BStartServers$B!"(BMaxClients $B$b;2>H$7$F$/$@$5$$!#(B

    +
    + +

    MinSpareServers $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: MinSpareServers + $B?tCM(B
    + $B%G%U%)%k%H(B: MinSpareServers + 5
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k(B
    + $B%9%F!<%?%9(B: core + +

    MinSpareServers $B%G%#%l%/%F%#%V$O!"(B$B%"%$%I%k>uBV(B$B$G$"$k(B + $B;R%5!<%P%W%m%;%9$NK>$^$7$$:G>.?t$r;XDj$7$^$9!#(B + $B%"%$%I%k>uBV$N%W%m%;%9$H$O!"%j%/%(%9%H$r=hM}$7$F$$$J$$%W%m%;%9$N$3$H$G$9!#(B + $B$b$7(B MinSpareServers $B$G;XDj$7$??t$h$j%"%$%I%k>uBV$N%5!<%P$,>/$J$1$l$P!"(B + $B?F%W%m%;%9$O(B 1 $BIC4V$K(B 1 $B8D$r8BEY$H$7$F?7$7$$;R%W%m%;%9$r@8@.$7$^$9!#(B

    + +

    $B$3$N?tCM$NJQ99$O!"$H$F$b%"%/%;%9$NB?$$%5%$%H$K$*$$$F$N$_I,MW$H$J$k$G$7$g$&!#(B + $BBg$-$J?tCM$r;XDj$9$k$3$H$O!"$[$H$s$I$N>l9g$K$ONI$/$J$$@_Dj$G$9!#(B

    + +

    $B$J$*!"$3$N%G%#%l%/%F%#%V$K$*$$$F$"$k?tCM(B m $B$r;XDj$7$?$H$9$k$H!"(B + n $B$H$$$&?t$N2TF0Cf$N%/%i%$%"%s%H%j%/%(%9%H$,$"$k;~$K!"(B + n + m $B0J>e$N(B httpd + $B%W%m%;%9$,3N + +

    $B$3$N%G%#%l%/%F%#%V$O!"(BMicrosoft Windows + $B%W%i%C%H%U%)!<%`$G$O0UL#$r;}$A$^$;$s!#(B

    + +

    MinSpareServers$B!"(BStartServers$B!"(BMaxClients $B$b;2>H$7$F$/$@$5$$!#(B

    +
    + +

    NameVirtualHost $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: NameVirtualHost + addr[:port]
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k(B
    + $B%9%F!<%?%9(B: core
    + $B8_49@-(B: NameVirtualHost + $B$O(B Apache 1.3 $B0J9_$GMxMQ2DG=$G$9!#(B + +

    NameVirtualHost $B%G%#%l%/%F%#%V$O!"(B + $BL>A0%Y!<%9$N%P!<%A%c%k%[%9%H(B$B$N@_Dj$r9T$$$?$$>l9g$K(B + $BI,MW$H$J$k$b$N$G$9!#(B

    + +

    addr $B$K$O%[%9%HL>$r;XDj$G$-$^$9$,!">o$K(B IP + $B%"%I%l%9$+%o%$%k%I%+!<%I$r;XDj$9$k$N$,?d>)$5$l$^$9!#(B + $BNc$($P!"(B

    + +
    + NameVirtualHost 111.22.33.44 +
    + NameVirtualHost $B%G%#%l%/%F%#%V$O!"L>A0%Y!<%9$N%P!<%A%c%k%[%9%H$r(B + $BMxMQ$7$F%j%/%(%9%H$rA0%Y!<%9$N%P!<%A%c%k%[%9%H%"%I%l%9$G$9!#(B + $B$?$@$7!"%U%!%$%"!<%&%)!<%k$dB>$N%W%m%-%7$,%j%/%(%9%H$rl9g$O!"(B + $B%j%/%(%9%H$rDs6!$7$?$$%^%7%s>e$NJ*M}%$%s%?!<%U%'!<%9$N(B + IP $B%"%I%l%9$r;XDj$9$kI,MW$,$"$j$^$9!#(B + $BJ#?t$N%"%I%l%9$GJ#?t$NL>A0%Y!<%9$N%P!<%A%c%k%[%9%H$r;XDj$9$k>l9g$O(B + $B3F%"%I%l%9$KBP$7$F%G%#%l%/%F%#%V$r=q$$$F$/$@$5$$!#(B + +

    $B!V$B$"$j$^$;$s(B ($B$J$<$+(B NameVirtualHost + $B$r;XDj$7$?$1$I$=$N%"%I%l%9$K(B VirtualHost $B$rDj5A$7$J$+$C$?>l9g$r=|$/(B)$B!#(B

    + +

    $B$J$*!"L>A0%Y!<%9$N%P!<%A%c%k%[%9%H$K%]!<%HHV9f$r;XDj$9$k$3$H$b2DG=$G$9!#(B
    + $BNc$($P!"(B

    + +
    + NameVirtualHost 111.22.33.44:8080 +
    + Apache 1.3.13 $B0J>e$N>l9g$K$O!"(Baddr $B$K(B * + $B$r;XDj$9$k$3$H$,$G$-$^$9!#(B + $B$3$l$K$h$j!"(BNameVirtualHost$B%G%#%l%/%F%#%V$d(B <VirtualHost> $B%;%/%7%g%s$G;XDj$5$l$J$+$C$?!"(B + $B$h$j:Y$+$/@_Dj$5$l$F$$$k%"%I%l%90J30$N$9$Y$F$N%"%I%l%9$X$N@\B3$K%^%C%A$7$^$9!#(B + $BL>A0%Y!<%9$N%P!<%A%c%k%[%9%H$@$1$rMxMQ$7$?$$>l9g$d!"(B + $B@_Dj%U%!%$%kCf$K%5!<%P$N(B IP + $B%"%I%l%9$r5-=R$9$k$3$H$rK>$^$J$$>l9g$KM-MQ$G$7$g$&!#(B + +

    $B;2>H(B: Apache $B%P!<%A%c%k%[%9%H2r@b=q(B

    +
    + +

    Options $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: Options + [+|-]option [[+|-]option] ...
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k!"%P!<%A%c%k%[%9%H!"%G%#%l%/%H%j!"(B.htaccess
    + $B>e=q$-(B: Options
    + $B%9%F!<%?%9(B: core + +

    Options $B%G%#%l%/%F%#%V$O!"FCDj$N%G%#%l%/%H%j$KBP$7$F(B + $B$I$N5!G=$rM-8z$K$9$k$N$+$r@)8f$7$^$9!#(B

    + +

    option $B$r(B None + $B$K;XDj$9$k$H!"FCJL$J5!G=$O$9$Y$FL58z$K$J$j$^$9!#$^$?!"0J2<$N<($9(B + 1 $B8D0J>e$N$b$N$r;XDj$G$-$^$9!#(B

    + +
    +
    All
    + +
    MultiViews $B$r=|$$$?$9$Y$F$N5!G=$,M-8z$H$J$j$^$9!#(B + $B$3$l$,%G%U%)%k%H$G$9!#(B
    + +
    ExecCGI
    + +
    + CGI $B%9%/%j%W%H$N + +
    FollowSymLinks
    + +
    + $B%5!<%P$,!"$3$N%G%#%l%/%H%jFb$G%7%s%\%j%C%/%j%s%/$r$?$I$l$k$h$&$K$7$^$9!#(B
    + $BCm0UE@(B: + $B%5!<%P$,%7%s%\%j%C%/%j%s%/$r$?$I$k>l9g$G$b!"(B + <Directory> + $B%;%/%7%g%s$K%^%C%A$5$;$k$?$a$N%Q%9L>$O(B$BJQ99$5$l$^$;$s(B$B!#(B
    + $BCm0UE@(B: <Location> + $BFb$K$3$N%*%W%7%g%s$r;XDj$7$F$bL5;k$5$l$^$9!#(B
    + +
    Includes
    + +
    + SSI $B$rM-8z$K$7$^$9!#(B
    + +
    IncludesNOEXEC
    + +
    + SSI $B$OM-8z$K$J$j$^$9$,!"(B#exec $B%3%^%s%I(B $B$H(B #exec CGI + $B$OL58z$K$J$j$^$9!#$?$@$7!"(B#include virtual $B$K$h$j!"(BScriptAlias + $B$5$l$?%G%#%l%/%H%j$G(B CGI $B$r + +
    Indexes
    + +
    + $B$b$7!"(BURL $B$,%G%#%l%/%H%j$K%^%C%W$9$k%j%/%(%9%H$G$"$C$F!"$+$D(B + DirectoryIndex $B$G;XDj$7$?%U%!%$%k(B ($BNc$($P!"(Bindex.html) $B$,(B + $B%G%#%l%/%H%jFb$KL5$1$l$P!"(B + $B%G%#%l%/%H%jFb$N0lMw$r@07A$7$FJV$;$k$h$&$K$7$^$9!#(B
    + +
    MultiViews
    + +
    + $B%3%s%F%s%H%M%4%7%(!<%7%g%s(B + $B$5$l$?(B MultiViews $B$r5v2D$7$^$9!#(B
    + +
    SymLinksIfOwnerMatch
    + +
    + $B%7%s%\%j%C%/@h$N%U%!%$%k$^$?$O%G%#%l%/%H%j$,!"(B + $B%7%s%\%j%C%/%j%s%/$N=jM-%f!<%6(B ID + $B$HF1$8>l9g$K$N$_%7%s%\%j%C%/%j%s%/$r$?$I$l$k$h$&$K$7$^$9!#(B
    + $BCm0UE@(B: <Location> + $BFb$K$3$N%*%W%7%g%s$r;XDj$7$F$bL5;k$5$l$^$9!#(B
    +
    + $BDL>o!"%G%#%l%/%H%j$KBP$7$FJ#?t$N(B Options + $B$,E,MQ2DG=$J>l9g!":G$b6a$$$b$N0l$D$N$_$,E,MQ$5$l$^$9!#(B + $BJ#?t$N;XDj$,%^!<%8$5$l$k$o$1$G$O$"$j$^$;$s!#$7$+$7!"$9$Y$F$N(B + Options $B%G%#%l%/%F%#%V$,(B + $B$d(B - + $BIU$-$G;XDj$5$l$?>l9g$O%*%W%7%g%s$NCM$O%^!<%8$5$l$^$9!#(B + + $B$rF,$K$D$1$l$P8=:_$N@_Dj$K2C$($i$l!"(B- + $B$rIU$1$l$P8=:_$N@_Dj$+$i:o=|$5$l$^$9!#(B + +

    $BNc$($P!"(B+ $B$d(B - $B$rMxMQ$7$J$$>l9g$O(B:

    + +
    + <Directory /web/docs>
    + Options Indexes FollowSymLinks
    + </Directory>
    + <Directory /web/docs/spec>
    + Options Includes
    + </Directory>
    +
    + + /web/docs/spec $B$H$$$&%G%#%l%/%H%j$K$O!"(BIncludes + $B$@$1$,E,MQ$5$l$^$9!#$7$+$7!"(B2 $BHVL\$N(B Options $B$G(B + + $B$d(B - $B$rMxMQ$7$F$_$k$H(B: + +
    + <Directory /web/docs>
    + Options Indexes FollowSymLinks
    + </Directory>
    + <Directory /web/docs/spec>
    + Options +Includes -Indexes
    + </Directory>
    +
    + + /web/docs/spec $B$H$$$&%G%#%l%/%H%j$K$O!"(B FollowSymLinks + $B$H(B Includes $B$,E,MQ$5$l$^$9!#(B + + +

    $BCm0U(B: -IncludesNOEXEC $B-Includes + $B$r;XDj$9$k$H!"A0$N@_Dj$,$I$N$h$&$K$J$C$F$$$h$&$H$b(B SSI + $B$OL58z$H$J$j$^$9!#(B

    + +

    $B$I$N$h$&$J@_Dj$b$5$l$F$$$J$1$l$P!"%G%U%)%k%H$G$O(B + All $B$K$J$j$^$9!#(B

    +
    + +

    PidFile $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: PidFile + $B%U%!%$%k%Q%9(B
    + $B%G%U%)%k%H(B: PidFile + logs/httpd.pid
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k(B
    + $B%9%F!<%?%9(B: core + +

    PidFile $B%G%#%l%/%F%#%V$O%5!<%P$,%G!<%b%s$N%W%m%;%9(B ID + $B$r5-O?$9$k%U%!%$%k$r@_Dj$7$^$9!#%U%!%$%kL>$,%9%i%C%7%e(B + (/) $B$+$i;O$a$i$l$F$$$J$1$l$P!"(BServerRoot $B$+$i$NAjBP%Q%9$H$J$j$^$9!#(B + PidFile $B$O(B standalone + $B%b!<%I$G$N$_;HMQ$G$-$^$9!#(B

    + +

    ErrorLog $B$H(B TransferLog $B$rJD$8$F3+$-D>$7$F!"(B + $B@_Dj%U%!%$%k$r:FFI$_9~$_$5$;$k$3$H$,$G$-$k$h$&$K%5!<%P$K(B + $B%7%0%J%k$rAw$k$3$H$,$G$-$l$PJXMx$J$3$H$,$"$j$^$9!#(B + $B$3$l$O!"(BSIGHUP (kill -1) $B%7%0%J%k$r(B PidFile + $B$K5-:\$5$l$F$$$k%W%m%;%9(B ID $B$KAw$k$3$H$K$h$C$F2DG=$G$9!#(B

    + +

    PidFile $B$O%m%0%U%!%$%k$N>l=j$H(B $B0BA4@-(B$B$HF1$8$h$&$J(B + $BCm0U$,I,MW$G$9!#(B

    +
    + +

    Port $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: Port + number
    + $B%G%U%)%k%H(B: Port + 80
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k(B
    + $B%9%F!<%?%9(B: core + +

    number$B$K$O!"(B0 $B$+$i(B 65535 + $B$^$G$NHV9f$r;XDj$7$^$9!#$$$/$D$+$N%]!<%HHV9f(B ($BFC$K(B1024$BHV0JA0(B) + $B$O!"FCDj$N%W%m%H%3%k$N$?$a$KM=Ls$5$l$F$$$^$9!#(B + /etc/services + $B$r8+$k$H!"Dj5A$5$l$F$$$k%]!<%H$N0lMw$,$"$j$^$9!#DL>o!"(BHTTP + $B%W%m%H%3%k$NI8=`$N%]!<%H$O(B 80 $B$G$9!#(B

    + +

    Port $B%G%#%l%/%F%#%V$O!"Fs$D$N0UL#$r;}$C$F$*$j!"0l$D$O(B + NCSA $B$N>e0L8_49$H$7$F$NI,MW@-$G$9(B (Apache + $B$N@_Dj$G$O:.F1$7$d$9$$E@$G$9(B)

    +
      +
    • $B%]!<%HHV9f$r;XDj$7$F$$$k(B Listen $B$d(B BindAddress $B$,$J$1$l$P!"<VirtualHost> $B%;%/%7%g%s30(B) + $B$K5-=R$9$k$3$H$K$h$C$F!"%5!<%P$,(B listen + $B$9$k%]!<%H$NHV9f$r;XDj$G$-$^$9!#(BListen $B:number $B$H$$$C$?;XDj$,$5$l$F$$$l$P!"(BPort + $B$O%5!<%P$,(B listen $B$9$k%]!<%H$K$O1F6A$7$^$;$s!#(B
    • + +
    • Port $B%G%#%l%/%F%#%V$NCM$O!"(BSERVER_PORT $B4D6-JQ?t(B + (CGI $B$d(B + SSI $B$K$*$$$F@_Dj$5$l$k(B) + $B$r@_Dj$7!"%5!<%P$,<+J,<+?H$r;2>H$9$k(B URL $B$r@8@.$9$k(B + ($BNc$($P!"<+J,<+?H$X30It%j%@%$%l%/%H$r:n@.$9$k>l9g$J$I(B) + $B>l9g$KMxMQ$5$l$^$9!#$3$NF0:n$O(B UseCanonicalName + $B$K$h$jJQ99$G$-$^$9!#(B
    • +
    + + Port $B%G%#%l%/%F%#%V$NServerName + $B%G%#%l%/%F%#%V$HF1MM$N$b$N$H$_$J$9$3$H$,$G$-$^$9!#(B + ServerName $B$H(B Port + $B$O!"%5!<%P$N(B$B@5<0$J(B$B%"%I%l%9$,!"2?$G$"$k$+$r;XDj$7$^$9!#(B + +

    80 $BHV%]!<%H$O!"(BUNIX $B$NFCJL$J%]!<%H$N0l$D$G$9!#(B1024 + $BHVL$K~$N$9$Y$F$N%]!<%H$O%7%9%F%`$,;HMQ$9$k$?$a$KM=Ls$5$l$F$$$^$9!#(B + $B$9$J$o$A(B$B!"0lHL%f!<%6(B (root $B0J30(B) $B$O;HMQ$9$k$3$H$,$G$-$^$;$s!#(B + $B0lHL%f!<%6$O$=$l0J>e$N%]!<%H$7$+;HMQ$G$-$^$;$s!#$=$N$?$a!"(B + 80 $BHV%]!<%H$r;HMQ$9$k$K$O!"(Broot + $B%"%+%&%s%H$G%5!<%P$r5/F0$7$J$1$l$P$J$j$^$;$s!#(B + $B5/F08e$K!"%]!<%H$r%P%$%s%I$7$?8e!"%j%/%(%9%H$rUser + $B%G%#%l%/%F%#%V(B$B$G;XDj$5$l$?!"$h$jFC8"$NDc$$%f!<%6$K0\9T$7$^$9!#(B

    + +

    $B$b$7!"(B80 $BHV%]!<%H$r;HMQ$G$-$J$$>l9g$K$O!"(B + $B;HMQ$7$F$$$J$$B>$NG$0U$N%]!<%H$rA*$s$G$/$@$5$$!#(Broot $B0J30$N%f!<%6$J$i!"(B + 8000 $B$J$I$N$h$&$K(B 1023 $B$h$j>e$N%]!<%H$rA*$s$G2<$5$$!#(B

    + +

    $B%;%-%e%j%F%#(B: $B$b$7!"(Broot $B$K$h$C$F%5!<%P$r5/F0$7$?$J$i!"(B + User $B$r(B root $B0J30$K@_Dj$7$F$/$@$5$$!#@\B3$r(B + root $B$G07$&$H!"%5%$%H$O=EBg$J%;%-%e%j%F%#967b$K$5$i$5$l$k(B + $B2DG=@-$,$"$j$^$9!#(B

    +
    + +

    ProtocolReqCheck + $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: ProtocolReqCheck + on|off
    + $B%G%U%)%k%H(B: ProtocolReqCheck + on
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k(B +
    + $B%9%F!<%?%9(B: core
    + $B8_49@-(B: + ProtocolReqCheck $B$O(B Apache 1.3.27 $B0J9_$G$N$_;HMQ2DG=$G$9!#(B + +

    $B$3$N%G%#%l%/%F%#%V$O(B Request $B9T$N(B Protocol + $B%U%#!<%k%I$N87L)$J%A%'%C%/$r9T$&$h$&$K$7$^$9!#(BApache $B$N(B 1.3.26 + $B0JA0$N%P!<%8%g%s$O(B (HTTP-1.1 $B$N$h$&$J(B) $B4V0c$C$?(B + Protocol $B$rL[$C$FHTTP/1.0 + $B$H$_$J$7$F$$$^$7$?!#$3$N%P!<%8%g%s$G$O$=$&$G$O$J$/!"(BProtocol + $B%U%#!<%k%I$O@5$7$$$b$N$G$J$1$l$P$J$i$J$/$J$j$^$7$?!#(B + 1.3.26 $B0JA0$NF0:n$,K>$^$7$+$C$?$j!"I,MW$@$C$?$j$9$k>l9g$O(B + ProtocolReqCheck off + $B$H@_Dj$9$k$3$H$K$h$j87L)$J%A%'%C%/$r$7$J$$$h$&$K$G$-$^$9!#(B

    + +
    + +

    Require $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: Require + entity-name [entity-name] ...
    + $B%3%s%F%-%9%H(B: $B%G%#%l%/%H%j!"(B.htaccess
    + $B>e=q$-(B: AuthConfig
    + $B%9%F!<%?%9(B: core + +

    $B$3$N%G%#%l%/%F%#%V$O!"$I$NG'>Z:Q$_$N%f!<%6$,%j%=!<%9$K(B + $B%"%/%;%9$9$k$3$H$,$G$-$k$+$r;XDj$7$^$9!#(B + $B0J2<$N$h$&$J9=J8$K$J$j$^$9!#(B

    + +
      +
    • + Require user userid [userid] ... + +

      $B;XDj$5$l$?%f!<%6$N$_!"%j%=!<%9$X$N%"%/%;%9$r5v2D$7$^$9!#(B

      +
    • + +
    • + Require group group-name [group-name] ... + + +

      $B;XDj$5$l$?%0%k!<%W$KB0$9$k%f!<%6$N$_!"%j%=!<%9$X$N%"%/%;%9$r5v2D$7$^$9!#(B

      +
    • + +
    • + Require valid-user + +

      $B$9$Y$F$NG'>Z$5$l$?%f!<%6$K!"%j%=!<%9$X$N%"%/%;%9$r5v2D$7$^$9!#(B

      +
    • +
    • file-owner +

      $BL>A0$,%U%!%$%k$N=jM-A0$K9g$&%f!<%6$@$1$,(B + $B%j%=!<%9$r%"%/%;%9$G$-$^$9!#(B
      + [Apache 1.3.20 $B0J9_$G;HMQ2DG=(B]

      +
    • +
    • file-group +

      $B%U%!%$%k$N=jM-A0$K9g$&%0%k!<%W$N%a%s%P$@$1$,(B + $B%j%=!<%9$K%"%/%;%9$G$-$^$9!#(B
      [Apache 1.3.20 $B0J9_$G;HMQ2DG=(B]

      +
    • +
    + +

    Require $B$O!"@5$7$/F0:n$9$k$?$a$K$O(B AuthName $B5Z$S(B AuthType $B%G%#%l%/%F%#%V$d!"(B + AuthUserFile $B5Z$S(B AuthGroupFile + ($B%f!<%6$H%0%k!<%W$r;XDj$9$k$?$a$K(B) $B$H$$$C$?%G%#%l%/%F%#%V$H6&$K(B + $B;XDj$9$kI,MW$,$"$j$^$9!#(B + $BNc$($P(B:

    + +
    + AuthType Basic
    + AuthName "Restricted Directory"
    + AuthUserFile /web/users
    + AuthGroupFile /web/groups
    + Require group admin
    +
    +
    + $B%"%/%;%9@)8f$O!"(B$B$9$Y$F$N(B$B%a%=%C%I$KBP$7$F9T$o$l$^$9!#(B + $BDL>o$O!"$3$l$,K>$^$7$$F0:n$G$9!#(B + $B$b$7!"FCDj$N%a%=%C%I$KBP$7$F$N$_%"%/%;%9$N@)8f$rE,MQ$7!"(B + $BB>$N%a%=%C%I$O@)8B$7$J$$>l9g$K$O!"(B<Limit> $B%;%/%7%g%sFb$K(B Require + $B$r;XDj$7$F$/$@$5$$!#(B + +

    Satisfy $B5Z$S(B mod_access $B$b;2>H$7$F$/$@$5$$!#(B

    +
    + +

    ResourceConfig + $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: ResourceConfig + file-path|directory-path|wildcard-path
    + $B%G%U%)%k%H(B: ResourceConfig + conf/srm.conf
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k!"%P!<%A%c%k%[%9%H(B
    + $B%9%F!<%?%9(B: core
    + $B8_49@-(B: $B%U%!%$%kL>$G$O$J$/!"(B + $B%G%#%l%/%H%j$r;XDj$9$k5!G=$O(B Apache 1.3.13 $B0J9_$G$N$_;HMQ2DG=$G$9!#(B + +

    $B%5!<%P$O(B httpd.conf $B%U%!%$%k$rFI$_9~$s$@8e!"(B + $BDI2C$N%G%#%l%/%F%#%V$r$3$3$G5-$7$?%U%!%$%k$+$iFI$_9~$_$^$9!#(B + File-path$B$O!"(BServerRoot + $B$+$i$NAjBP%Q%9$G$9!#(B
    + $B$3$N5!G=$rL58z$K$9$k$K$O + +

    + ResourceConfig /dev/null +
    + Win32 $B$N>l9g(B + +
    + ResourceConfig nul +
    + + $B0JA0$O!"%5!<%P@_Dj$K4X$9$k%G%#%l%/%F%#%V$H(B <$B%G%#%l%/%H%j(B> + $B%;%/%7%g%s0J30$N$[$H$s$I$N%G%#%l%/%F%#%V$,=q$+$l$F$$$^$7$?!#(B + $Bsrm.conf $B$G$O$3$N%U%!%$%kFb$K$O%3%a%s%H$7$+=q$+$l$F$*$i$:!"(B + $B$9$Y$F$N%G%#%l%/%F%#%V$,%5!<%P@_Dj%U%!%$%k$N(B httpd.conf + $B$K5-=R$5$l$F$$$^$9!#(B + +

    + ResourceConfig + $B$,%U%!%$%k$G$O$J$/%G%#%l%/%H%j$r;XDj$7$F$$$l$P!"(BApache + $B$O$=$N%G%#%l%/%H%jFb$H$9$Y$F$N%5%V%G%#%l%/%H%jFb$N$9$Y$F$N%U%!%$%k$r(B + $BFI$_9~$_!"$=$l$i$r@_Dj%U%!%$%k$H$7$F=hM}$7$^$9!#(B

    +

    $BBe$o$j$K!"%o%$%k%I%+!<%I$r;H$C$FHO0O$r9J$k$3$H$b$G$-$^$9!#(B + $B$9$J$o$A!"(B*.conf $B%U%!%$%k$N$_!"$H$$$C$?$h$&$K!#(B

    +

    $B%G%U%)%k%H$G$O;XDj$5$l$?%G%#%l%/%H%j$N!V(B$B$I$N$h$&$J(B$B!W(B + $B%U%!%$%k$G$b@_Dj%U%!%$%k$H$7$FFI$_9~$^$l$^$9!#(B

    +

    $B$G$9$+$i8m$C$F(B ($BNc$($P%(%G%#%?$G%F%s%]%i%j%U%!%$%k$r:n@.$9$kEy(B) + $B%U%!%$%k$rCV$+$J$$$h$&$KCm0U$7$F$/$@$5$$!#(B

    + +

    $B;2>H(B: AccessConfig

    +
    + +

    RLimitCPU $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: RLimitCPU + number|max [number|max]
    + $B%G%U%)%k%H(B: Unset; uses + operating system defaults
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k!"%P!<%A%c%k%[%9%H(B
    + $B%9%F!<%?%9(B: core
    + $B8_49@-(B: RLimitCPU $B$O(B Apache 1.2 + $B0J9_$GMxMQ2DG=$G$9!#(B + +

    $B0l$D$+Fs$D$N%Q%i%a!<%?$r;XDj$G$-$^$9!#(B + $B:G=i$N%Q%i%a!<%?$OA4%W%m%;%9$KBP$9$k%j%=!<%9$N%=%U%H%j%_%C%H$r@_Dj$7!"(B + 2 $BHVL\$N%Q%i%a!<%?$O:GBg$N%j%=!<%9%j%_%C%H$r@_Dj$7$^$9!#(B + $B%Q%i%a!<%?$K$O?t;z$+!"%*%Z%l!<%F%#%s%0%7%9%F%`$N:GBg$H$J$k(B + max $B$N$I$A$i$+$r;XDj$9$k$3$H$,$G$-$^$9!#(B + $B:GBg$N%j%=!<%9%j%_%C%H$r>e$2$k$?$a$K$O!"%5!<%P$r(B root + $B$G + +

    $B$A$J$_$K!"$3$N@_Dj$O(B Apache + $B$N;R%W%m%;%9<+BN$G$O$J$/!"%j%/%(%9%H$r + +

    CPU $B%j%=!<%9$N%j%_%C%H$O%W%m%;%9$"$?$j$NIC?t$GI=$o$5$l$^$9!#(B

    + +

    RLimitMEM $B$d(B RLimitNPROC $B$b;2>H$7$F$/$@$5$$!#(B

    +
    + +

    RLimitMEM + $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: RLimitMEM + number|max [number|max]
    + $B%G%U%)%k%H(B: Unset; uses + operating system defaults
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k!"%P!<%A%c%k%[%9%H(B
    + $B%9%F!<%?%9(B: core
    + $B8_49@-(B: RLimitMEM $B$O(B Apache 1.2 $B0J9_$GMxMQ2DG=$G$9!#(B + +

    $B0l$D$+Fs$D$N%Q%i%a!<%?$r;XDj$G$-$^$9!#(B + $B:G=i$N%Q%i%a!<%?$OA4%W%m%;%9$KBP$9$k%j%=!<%9$N%=%U%H%j%_%C%H$r@_Dj$7!"(B + 2 $BHVL\$N%Q%i%a!<%?$O:GBg$N%j%=!<%9%j%_%C%H$r@_Dj$7$^$9!#(B + $B%Q%i%a!<%?$K$O?t;z$+!"%*%Z%l!<%F%#%s%0%7%9%F%`$N:GBg$H$J$k(B + max $B$N$I$A$i$+$r;XDj$9$k$3$H$,$G$-$^$9!#(B + $B:GBg$N%j%=!<%9%j%_%C%H$r>e$2$k$?$a$K$O!"%5!<%P$r(B root + $B$G + +

    $B$A$J$_$K!"$3$N@_Dj$O(B Apache + $B$N;R%W%m%;%9<+BN$G$O$J$/!"%j%/%(%9%H$r + +

    $B%a%b%j%j%=!<%9$N%j%_%C%H$O%W%m%;%9$"$?$j$N%P%$%H?t$GI=$5$l$^$9!#(B

    + +

    RLimitCPU $B$d(B RLimitNPROC $B$b;2>H$7$F$/$@$5$$!#(B

    +
    + +

    RLimitNPROC + $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: RLimitNPROC + number|max [number|max]
    + $B%G%U%)%k%H(B: Unset; uses + operating system defaults
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k!"%P!<%A%c%k%[%9%H(B
    + $B%9%F!<%?%9(B: core
    + $B8_49@-(B: RLimitNPROC $B$O(B Apache 1.2 $B0J9_$GMxMQ2DG=$G$9!#(B + +

    $B0l$D$+Fs$D$N%Q%i%a!<%?$r;XDj$G$-$^$9!#(B + $B:G=i$N%Q%i%a!<%?$OA4%W%m%;%9$KBP$9$k%j%=!<%9$N%=%U%H%j%_%C%H$r@_Dj$7!"(B + 2 $BHVL\$N%Q%i%a!<%?$O:GBg$N%j%=!<%9%j%_%C%H$r@_Dj$7$^$9!#(B + $B%Q%i%a!<%?$K$O?t;z$+!"%*%Z%l!<%F%#%s%0%7%9%F%`$N:GBg$H$J$k(B + max $B$N$I$A$i$+$r;XDj$9$k$3$H$,$G$-$^$9!#(B + $B:GBg$N%j%=!<%9%j%_%C%H$r>e$2$k$?$a$K$O!"%5!<%P$r(B root + $B$G + +

    $B$A$J$_$K!"$3$N@_Dj$O(B Apache + $B$N;R%W%m%;%9<+BN$G$O$J$/!"%j%/%(%9%H$r + +

    $B%W%m%;%9$N@)8B$O!"%f!<%6$"$?$j$N%W%m%;%9?t$G@)8f$5$l$^$9!#(B

    + +

    $BCm0UE@(B: CGI $B%W%m%;%9$,%&%'%V%5!<%P$N%f!<%6(B ID + $B0J30$G$BL5$1$l$P(B$B!"$3$N%G%#%l%/%F%#%V$O!"(B + $B%5!<%P<+?H$,@8@.$G$-$k%W%m%;%9$N?t$r@)8B$9$k$3$H$K$J$j$^$9!#(B + $B$=$N$h$&$J>u67$K$J$C$F$$$k$+$I$&$+$O!"%(%i!<%m%0$NCf$N(B + cannot fork + $B$H$$$&%a%C%;!<%8$K$h$j3NG'$9$k$3$H$,$G$-$^$9!#(B

    + +

    RLimitCPU $B$d(B RLimitCPU $B$b;2>H$7$F$/$@$5$$!#(B

    +
    + +

    Satisfy $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: Satisfy any|all
    + $B%G%U%)%k%H(B: Satisfy all
    + $B%3%s%F%-%9%H(B: $B%G%#%l%/%H%j!"(B.htaccess
    + $B%9%F!<%?%9(B: core
    + $B8_49@-(B: Satisfy $B$O(B Apache 1.2 + $B0J9_$GMxMQ2DG=$G$9!#(B + +

    Allow $B$H(B Require + $B$NN>J}$,;H$o$l$F$$$k$H$-$N%"%/%;%9%]%j%7!<$r@_Dj$7$^$9!#%Q%i%a!<%?$O(B + 'all' $B$+(B 'any' + $B$G$9!#$3$N%G%#%l%/%F%#%V$O$"$k>l=j$X$N%"%/%;%9$,%f!<%6L>(B/$B%Q%9%o!<%I(B + $B$H(B$B%/%i%$%"%s%H$N%[%9%H$N%"%I%l%9$G@)8B$5$l$F$$$k$H$-$K$N$_(B + $BLrN)$A$^$9!#%G%U%)%k%H$NF0:n(B ("all") + $B$O%/%i%$%"%s%H$,%"%I%l%9$K$h$k%"%/%;%9@)8B$rK~$?$7!"(B + $B$+$D(B$B@5$7$$%f!<%6L>$H%Q%9%o!<%I$rF~NO$9$k$3$H$rMW5a$7$^$9!#(B + "any" $B$G$O!"%/%i%$%"%s%H$O%[%9%H$N@)8B$rK~$?$9$+!"(B + $B@5$7$$%f!<%6L>$H%Q%9%o!<%I$NF~NO$r$9$k$+$r$9$l$P%"%/%;%9$r5v2D$5$l$^$9!#(B + $B$3$l$O!"$"$k>l=j$r%Q%9%o!<%I$GJ]8n$9$k$1$l$I!"FCDj$N%"%I%l%9$+$i$N(B + $B%/%i%$%"%s%H$K$O%Q%9%o!<%I$NF~NO$rMW5a$;$:$K%"%/%;%9$r5v2D$9$k!"(B + $B$H$$$&$h$&$J$H$-$K;HMQ$G$-$^$9!#(B

    + +

    Require $B$H(B Allow $B$b;2>H$7$F$/$@$5$$!#(B

    +
    + +

    ScoreBoardFile + $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: ScoreBoardFile + $B%U%!%$%k%Q%9(B
    + $B%G%U%)%k%H(B: ScoreBoardFile + logs/apache_status
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k(B
    + $B%9%F!<%?%9(B: core + +

    $B%"!<%-%F%/%A%c$K$h$C$F$O!"%5!<%P$N?F%W%m%;%9$H;R%W%m%;%9$,(B + $BDL?.$9$k$?$a$N%U%!%$%k$rCV$/>l=j$r;XDj$9$k$?$a$K(B ScoreBoardFile + $B%G%#%l%/%F%#%V$r;H$&I,MW$,$"$k$3$H$,$"$j$^$9!#(B + $B;HMQ$7$F$$$k%"!<%-%F%/%A%c$,(B scoreboard + $B%U%!%$%k$rI,MW$H$7$F$$$k$+$I$&$+$rD4$Y$k0lHV4JC1$JJ}K!$O(B Apache + $B$rl9g$O!"$3$N%U%!%$%k$r;H$&(B + Apache $B$O0l$D$@$1$G$"$k$3$H$r3N + +

    ScoreBoardFile $B$r;H$&I,MW$,$"$k>l9g$O!"$=$l$r(B RAM + $B%G%#%9%/>e$KCV$/$3$H$GB.EY$,8~>e$9$k$G$7$g$&!#(B + $B$?$@$7!"%m%0%U%!%$%k$N0LCV$H(B + $B%;%-%e%j%F%#(B$B$K4X$9$k(B + $B7Y9p$r==J,Cm0U$9$kI,MW$,$"$j$^$9!#(B

    + +

    Apache 1.2 $B0J9_(B:

    + +

    Linux 1.x $B%f!<%6$O(B Configuration $B$N(B + EXTRA_CFLAGS $B$K(B -DHAVE_SHMGET $B$r(B + $B@_Dj$9$k$3$H$,$G$-$k$+$b$7$l$^$;$s!#$3$l$O!"(B1.x + $B$N$$$/$D$+$G$OF0:n$7$^$9$,!"(B + $B$9$Y$F$GF0:n$9$k$H$$$&$o$1$G$O$"$j$^$;$s!#(B(1.3b4 $B$h$jA0$G$O(B + HAVE_SHMGET $B$G==J,$G$7$?!#(B)

    + +

    SVR4 $B%f!<%6$O(B Configuration $B$N(B + EXTRA_CFLAGS $B$K(B -DUSE_SHMGET_SCOREBOARD + $B$rDI2C$9$k$3$H$r9MN8$7$?J}$,NI$$$G$7$g$&!#(B + $B$3$l$OF0:n$9$k$H9M$($i$l$F$$$^$9$,!"(B1.2 + $B$N%j%j!<%9$^$G$K%F%9%H$r$9$k$3$H$O$G$-$^$;$s$G$7$?!#(B(1.3b4 + $B$h$jA0$G$O(B HAVE_SHMGET $B$G==J,$G$7$?!#(B)

    + +

    $B;2>H(B: Apache $B$NDd;_$H:F5/F0(B

    +
    + +

    ScriptInterpreterSource + $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: ScriptInterpreterSource + registry|script
    + $B%G%U%)%k%H(B: + ScriptInterpreterSource script
    + $B%3%s%F%-%9%H(B: $B%G%#%l%/%H%j!"(B.htaccess
    + $B%9%F!<%?%9(B: core (Windows $B$N$_(B) + +

    $B$3$N%G%#%l%/%F%#%V$O!"(BApache 1.3.5 $B0J9_$G(B CGI + $B%9%/%j%W%H$rl9g$KMxMQ$9$k%$%s%?!<%W%j%?$r!"(B + $B$I$N$h$&$KC5$7=P$9$+$K$D$$$F@)8f$9$k$?$a$K;HMQ$7$^$9!#(B + $B%G%U%)%k%H$N>l9g$O%9%/%j%W%H$N(B #! + $B9T$K;X$5$l$F$$$k%$%s%?!<%W%j%?$r;HMQ$7$^$9$,(B + ScriptInterpreterSource registry + $B$r;XDj$9$k$H!"%9%/%j%W%H%U%!%$%k$N3HD%;R(B ($BNc$($P!"(B .pl) + $B$r%-!<$H$7$F!"(BWindows $B$N%l%8%9%H%j$r8!:w$9$k$h$&$K$J$j$^$9!#(B

    +
    + +

    SendBufferSize + $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: SendBufferSize + bytes
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k(B
    + $B%9%F!<%?%9(B: core + +

    $B%5!<%P$O!"(BTCP + $B%P%C%U%!$N%5%$%:$r;XDj$5$l$?%P%$%H?t$K@_Dj$7$^$9!#9bB.$GBg$-$JCY1d(B + ($BNc$($P(B$B!"(B100ms $BDxEY$"$k$h$&$J9bB.$JBgN&2#CG2s@~$J$I(B) + $B$N$"$k>l9g$K!"%5%$%:$rI8=`$N(B OS + $B$N%G%U%)%k%H0J>e$KBg$-$/$9$k$?$a$KHs>o$KM-MQ$G$9!#(B

    +
    + +

    ServerAdmin + $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: ServerAdmin + email-address
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k!"%P!<%A%c%k%[%9%H(B
    + $B%9%F!<%?%9(B: core + +

    ServerAdmin + $B$O!"%/%i%$%"%s%H$KJV$9$5$^$6$^$J%(%i!<%a%C%;!<%8Cf$K5-=R$9$k!"(B + $BEE;R%a!<%k$N%"%I%l%9$r@_Dj$7$^$9!#(B

    + +

    $B$=$N:]!"$3$l$N$?$a$K@lMQ$N%"%I%l%9$r@_Dj$9$k$N$,NI$$$G$7$g$&!#(B + $BNc$($P!"(B

    + +
    + ServerAdmin www-admin@foo.bar.com +
    + $B$H$$$C$?$h$&$K$7$^$9!#%f!<%6$O$$$D$b%5!<%P$K4X$9$kOC$G$"$k$H$$$&$3$H$r(B + $BL@5-$7$F$/$k$o$1$G$O$"$j$^$;$s$N$G!#(B + +
    + +

    ServerAlias + $B%G%#%l%/%F%#%V(B

    + $B9=J8(B: ServerAlias + hostname [hostname] ...
    + $B%3%s%F%-%9%H(B: $B%P!<%A%c%k%[%9%H(B
    + $B%9%F!<%?%9(B: core
    + $B8_49@-(B: ServerAlias $B$O(B Apache 1.1 + $B0J9_$GMxMQ2DG=$G$9!#(B + +

    ServerAlias$B%G%#%l%/%F%#%V$O!"(B$B%M!<%`%Y!<%9$N%P!<%A%c%k%[%9%H(B$B$K$*$$$F(B + $B;HMQ$9$k%[%9%H$NJLL>$r;XDj$7$^$9!#(B

    + +

    $BNc(B:

    + +
    +    <VirtualHost *>
    +    ServerName server.domain.com
    +    ServerAlias server server2.domain.com server2
    +    ...
    +    </VirtualHost>
    +    
    + +

    $B;2>H(B: Apache $B%P!<%A%c%k%[%9%H@bL@=q(B

    +
    + +

    ServerName + $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: ServerName + fully-qualified-domain-name
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k!"%P!<%A%c%k%[%9%H(B
    + $B%9%F!<%?%9(B: core + +

    ServerName $B%G%#%l%/%F%#%V$O!"%5!<%P$N%[%9%HL>$r@_Dj$7$^$9!#(B + $B$3$l$O!"%j%@%$%l%/%H$9$k(B URL $B$r@8@.$9$k:]$KMxMQ$5$l$^$9!#(B + $BFC$K;XDj$,$J$5$l$F$$$J$+$C$?>l9g$K$O!"<+%5!<%P$KIUM?$5$l$F$$$k(B + IP $B%"%I%l%9$+$i?dB,$7$^$9$,!"$3$l$O3N$rJV$9$H$b8B$j$^$;$s!#(B
    + $BNc$($P(B:

    + +
    + ServerName www.example.com +
    + $B$r!"%^%7%s$KBP$9$k@5$7$$(B ($B%a%$%s$N(B) $BL>A0$,!"(B + simple.example.com $B$G$"$k$H$-$K;H$&$3$H$,$G$-$^$9!#(B + +

    $BL>A0%Y!<%9$N%P!<%A%c%k%[%9%H(B + $B$rMxMQ$7$F$$$k>l9g!"(B<VirtualHost> + $B%;%/%7%g%sFb$N(B ServerName + $B$O$3$N%P!<%A%c%k%[%9%H$K%^%C%A$9$k$?$a$K2?$,%j%/%(%9%H$N(B + Host: $B%X%C%@$K8=$l$kI,MW$,$"$k$N$+$r;XDj$7$^$9!#(B

    + +

    $B;2>H(B:
    + DNS $B$K4X$9$kLdBj(B
    + Apache$B%P!<%A%c%k%[%9%H@bL@=q(B
    + UseCanonicalName
    + NameVirtualHost
    + ServerAlias
    +

    +
    + +

    ServerPath + $B%G%#%l%/%F%#%V(B

    + $B9=J8(B: ServerPath + $B%G%#%l%/%H%j%Q%9(B
    + $B%3%s%F%-%9%H(B: $B%P!<%A%c%k%[%9%H(B
    + $B%9%F!<%?%9(B: core
    + $B8_49@-(B: ServerPath $B$O(B Apache 1.1 + $B0J9_$GMxMQ2DG=$G$9!#(B + +

    ServerPath $B%G%#%l%/%F%#%V$O!"(B$B%M!<%`%Y!<%9$N%P!<%A%c%k%[%9%H(B$B$K$*$$$FMxMQ$9$k(B + $B%l%,%7!<$J(B URL $B%Q%9L>$r@_Dj$7$^$9!#(B

    + +

    $B;2>H(B: Apache + $B%P!<%A%c%k%[%9%H@bL@=q(B

    +
    + +

    ServerRoot + $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: ServerRoot + $B%G%#%l%/%H%j%Q%9(B
    + $B%G%U%)%k%H(B: ServerRoot + /usr/local/apache
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k(B
    + $B%9%F!<%?%9(B: core + +

    ServerRoot + $B%G%#%l%/%F%#%V$O!"%5!<%P$,o!"(Bconf/ $B$d(B logs/ + $B$H$$$C$?%5%V%G%#%l%/%H%j$,4^$^$l$^$9!#(B + $B$^$?!"B>$N@_Dj%U%!%$%k$K$*$1$kAjBP%Q%9$O!"(B + $B$3$N%G%#%l%/%H%j$+$i$H$J$j$^$9!#(B

    + +

    httpd $B$N(B -d $B$K$D$$$F(B + $B$r;2>H$7$F$/$@$5$$!#(B

    + +

    ServerRoot $B$N8"8B$r$I$N$h$&$K@_Dj$9$k$+$K$D$$$F$O(B $B%;%-%e%j%F%#$K4X$9$k3P=q(B + $B$K>pJs$,$"$j$^$9!#(B

    +
    + +

    ServerSignature $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: ServerSignature + On|Off|EMail
    + $B%G%U%)%k%H(B: ServerSignature + Off
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k!"%P!<%A%c%k%[%9%H!"%G%#%l%/%H%j!"(B.htaccess
    + $B%9%F!<%?%9(B: core
    + $B8_49@-(B: ServerSignature + $B$O(B Apache 1.3 $B0J9_$GMxMQ2DG=$G$9!#(B + +

    ServerSignature $B%G%#%l%/%F%#%V$O!"%5!<%P$,@8@.$9$k%I%-%e%a%s%H(B + ($B%(%i!<%a%C%;!<%8!"(Bmod_proxy $B$K$*$1$k(B FTP $B$N%G%#%l%/%H%j%j%9%H!"(B + mod_info $B$N=PNO!"Ey!9(B) + $B$N:G2<9T$KIUM?$9$k%U%C%?$N@_Dj$r9T$J$$$^$9!#(B + $B$=$N$h$&$J!"%U%C%?9T$rM-8z$K$7$?$$M}M3$H$7$F$O!"(B + $B%W%m%-%7$,J#?tO"$J$C$F$$$k>l9g$K!"%f!<%6$O$I$N%5!<%P$,JV$7$?(B + $B%(%i!<%a%C%;!<%8$+$rCN$k + $B%G%U%)%k%H$G$"$k(B Off + $B$K@_Dj$r$9$k$H!"%(%i!<$N:]$N9T$,M^@)$5$l$^$9!#(B + ($B$=$7$F!"(BApache-1.2 $B0JA0$H8_49$NF0:n$r$7$^$9(B) + On $B$K@_Dj$7$?>l9g$O!"C1$K%I%-%e%a%s%H$NCf$K!"(B + $B%5!<%P$N%P!<%8%g%s!"2TF0Cf$N%P!<%A%c%k%[%9%H$N(B ServerName $B$N=q$+$l$?9T$rDI2C$7!"(B + EMail $B$K$7$?>l9g$O$5$i$K;2>H$5$l$?%I%-%e%a%s%H$KBP$9$k(B ServerAdmin $B$r;X$9(B "mailto:" $B$,DI2C$5$l$^$9!#(B

    +
    + +

    ServerTokens + $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: ServerTokens + Minimal|ProductOnly|OS|Full
    + $B%G%U%)%k%H(B: ServerTokens + Full
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k(B
    + $B%9%F!<%?%9(B: core
    + $B8_49@-(B: ServerTokens $B$O(B Apache 1.3 + $B0J9_$GMxMQ2DG=$G$9!#(B + $B$^$?!"(BProductOnly $B%-!<%o!<%I$O(B Apache 1.3.12 + $B0J9_$GMxMQ2DG=$G$9!#(B + +

    $B$3$N%G%#%l%/%F%#%V$O!"%/%i%$%"%s%H$KAw$jJV$9(B Server + $B%l%9%]%s%9%X%C%@Fb$K!"%5!<%P$N0lHLE*$J(B OS + $BpJs$r(B + $B4^$a$k$+$I$&$+$r;XDj$7$^$9!#(B

    + +
    +
    ServerTokens Prod[uctOnly]
    + +
    $B%5!<%P$O(B ($BNc$($P(B): Server: + Apache $B$H$$$C$?$h$&$KAw$j$^$9!#(B
    + +
    ServerTokens Min[imal]
    + +
    $B%5!<%P$O(B ($BNc$($P(B): Server: + Apache/1.3.0 $B$H$$$C$?$h$&$KAw$j$^$9!#(B
    + +
    ServerTokens OS
    + +
    $B%5!<%P$O(B ($BNc$($P(B): Server: Apache/1.3.0 + (Unix) $B$H$$$C$?$h$&$KAw$j$^$9!#(B
    + +
    ServerTokens Full ($B$b$7$/$OL$;XDj(B)
    + +
    $B%5!<%P$O(B ($BNc$($P(B): Server: Apache/1.3.0 + (Unix) PHP/3.0 MyMod/1.2 $B$H$$$C$?$h$&$KAw$j$^$9!#(B
    +
    + +

    $B$3$N@_Dj$O%5!<%PA4BN$KE,MQ$5$l!"(B + $B%P!<%A%c%k%[%9%H>e$GM-8z$K$7$?$jL58z$K$7$?$j$O$G$-$^$;$s!#(B

    +
    + +

    ServerType + $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: ServerType + type
    + $B%G%U%)%k%H(B: ServerType + standalone
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k(B
    + $B%9%F!<%?%9(B: core + +

    ServerType $B%G%#%l%/%F%#%V$O!"%5!<%P$,%7%9%F%`$K$I$N$h$&$K(B + $BType $B$K$O!" + +

    +
    inetd
    + +
    $B%5!<%P$O!"(Binetd $B%W%m%;%9$+$i/etc/inetd.conf $B$K5/F0$9$k%3%^%s%I$r5-=R$7$^$9!#(B
    + +
    standalone
    + +
    $B%5!<%P$O!"%G!<%b%s%W%m%;%9$H$7$F/etc/rc.local $B$+(B /etc/rc3.d/...) + $B$K5/F0$9$k%3%^%s%I$r5-=R$7$^$9!#(B
    +
    + + Inetd $B$O!"$"$^$jMxMQ$5$l$^$;$s!#(B + $B$=$N@_Dj$G$O!"(BHTTP $B@\B3$re$2$i$l!"@\B3$,=*N;$7$?8e$K%W%m%0%i%`$b=*N;$7$^$9!#(B + $B$3$l$O!"@\B3$NEY$K$H$F$bIi2Y$,$+$+$j$^$9$,!"(B + $B%;%-%e%j%F%#$rM}M3$K$3$N%*%W%7%g%s$r9%$`4IM}$B$?$@!"(BInetd $B%b!<%I$O?d>)$5$l$F$*$i$:!"(B + $B:#8e$b$:$C$HMxMQ2DG=$H$$$&$o$1$G$O$"$j$^$;$s!#(B + $B2DG=$J8B$j;H$o$J$$$G$/$@$5$$!#(B + +

    Standalone $B$O!"$:$C$H8zN(E*$G$"$k$?$a!"(BServerType + $B$NI8=`E*$J@_Dj$H$J$C$F$$$^$9!#(B + $B%5!<%P$O0lEY5/F0$5$l$k$H!"$9$Y$F$N@\B3$r=hM}$7$^$9!#(B + $B$b$7!"Ii2Y$N9b$$%5%$%H$G(B Apache $B$rMxMQ$9$k$D$b$j$G$"$l$P!"(B + standalone $B$OM#0l$N%*%W%7%g%s$H$$$($k$G$7$g$&!#(B

    +
    + +

    ShmemUIDisUser + $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: ShmemUIDisUser + on|off
    + $B%G%U%)%k%H(B: ShmemUIDisUser + off
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k(B
    + $B%9%F!<%?%9(B: core + $B8_49@-(B: + +

    ShmemUIDisUser $B%G%#%l%/%F%#%V$O(B System V + $B6&M-%a%b%j$K4p$E$$$?%9%3%"%\!<%I$N!"=jM-uid $B$H(B + gid $B$r%5!<%P$N@_Dj$N(B User $B$H(B + Group $B$KJQ99$9$k$+$I$&$+$r@)8f$7$^$9!#(B + Apache 1.3.26 $B$^$G$N%j%j!<%9$O%G%U%)%k%H$G$3$l$r9T$C$F$$$^$7$?!#(B + $B;R%W%m%;%9$O4{$K6&M-%a%b%j%;%0%a%s%H$K%"%?%C%A$5$l$F$$$^$9$N$G!"(B + $B$=$NF0:n$O(B Apache $B$NDL>o$NF0:n$K$OI,MW$G$O$J$/!"967b$rKI$0$?$a$K$b!"(B + Apache $B$O$=$N$h$&$JF0:n$r$7$J$/$J$j$^$7$?!#$7$+$7!"FCJL$J>l9g$K$O(B + $B0JA0$NF0:n$,I,MW$K$J$k$3$H$b$"$j!"$=$l$O$3$N%G%#%l%/%F%#%V$r(B + on $B$K$9$k$3$H$G + +

    $B$3$N%G%#%l%/%F%#%V$O(BSystem V $B$K4p$E$$$?%9%3%"%\!<%I$G$O$J$$!"(B + mmap $B$N$h$&$J%7%9%F%`$G$O8zNO$O$"$j$^$;$s!#(B + +

    + +
    + +

    StartServers + $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: StartServers + $B?tCM(B
    + $B%G%U%)%k%H(B: StartServers + 5
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k(B
    + $B%9%F!<%?%9(B: core + +

    StartServers $B%G%#%l%/%F%#%V$O!"5/F0;~$K$I$l$@$1$N%5!<%P;R%W%m%;%9$r(B + $B + +

    Microsoft Windows + $B$Gl9g$K$O!"$3$N%G%#%l%/%F%#%V$O0UL#$r;}$A$^$;$s!#(B + Windows $B$G$O>o$K0l$D$N;R%W%m%;%9$,$9$Y$F$N%j%/%(%9%H$r07$$$^$9!#(B + $B;R%W%m%;%9$NFbIt$G$O!"%j%/%(%9%H$O%9%l%C%I$G=hM}$5$l$^$9!#(B + ThreadsPerChild $B%G%#%l%/%F%#%V$O(B + $B%j%/%(%9%H$r07$&:GBg$N;R%9%l%C%I$N?t$r@)8f$7$^$9$N$G!"(BUNIX $B$G(B + StartServers $B$r;XDj$7$?$N$HF1$8$h$&$J8z2L$K$J$j$^$9!#(B

    + +

    MinSpareServers $B$d(B + MaxSpareServers $B$b;2>H$7$F$/$@$5$$!#(B

    +
    + +

    ThreadsPerChild

    + $B9=J8(B: ThreadsPerChild + $B?tCM(B
    + $B%G%U%)%k%H(B: ThreadsPerChild + 50
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k(B
    + $B%9%F!<%?%9(B: core (Windows, + NetWare)
    + $B8_49@-(B: Windows $B>e$GF0:n$9$k(B Apache 1.3 + $B0J9_$K$*$$$F$N$_M-8z(B + +

    $B$3$N%G%#%l%/%F%#%V$O!"%5!<%P$,$I$l$@$1$N%9%l%C%I$r;HMQ$9$k$N$+$r(B + $B;X<($7$^$9!#(B + $B$3$l$,!"%5!<%P$,=hM}$G$-$k:GBg@\B3?t$K$J$j$^$9!#(B + $B$?$/$5$s$N%R%C%H$,$"$k%5%$%H$N>l9g$K$O?tCM$rA}$d$9I,MW$,$"$j$^$9!#(B

    + +

    $B$J$*!"$3$N%G%#%l%/%F%#%V$O(B UNIX $B%7%9%F%`>e$G$O0UL#$r;}$A$^$;$s!#(B + UNIX $B$N>l9g$K$O!"(B StartServers $B$d(B MaxRequestsPerChild + $B$r;2>H$7$F$/$@$5$$!#(B

    +
    + +

    ThreadStackSize

    + $B9=J8(B: ThreadStackSize + $B?tCM(B
    + $B%G%U%)%k%H(B: ThreadStackSize + 65536
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k(B
    + $B%9%F!<%?%9(B: core (NetWare)
    + $B8_49@-(B: NetWare $B>e$GF0:n$9$k(B Apache 1.3 + $B0J9_$K$*$$$F$N$_M-8z(B + +

    $B$3$N%G%#%l%/%F%#%V$O!"3F%9%l%C%I$N%9%?%C%/$N%5%$%:$r%5!<%P$K;X<($7$^$9!#(B + $B%9%?%C%/$,%*!<%P%U%m!<$9$k$h$&$G$"$l$P!"$h$jBg$-$J?tCM$K@_Dj$9$k(B + $BI,MW$,$"$j$^$9!#(B

    + +

    $B$3$N%G%#%l%/%F%#%V$O!"B>$N%7%9%F%`$N>l9g$K$O0UL#$r;}$A$^$;$s!#(B

    +
    + +

    TimeOut $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: TimeOut + $B?tCM(B
    + $B%G%U%)%k%H(B: TimeOut + 300
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k(B
    + $B%9%F!<%?%9(B: core + +

    TimeOut $B%G%#%l%/%F%#%V$O!"8=:_$N$H$3$m(B + $B0J2<$N;0$D$NBT$A;~4V$K$D$$$F$NDj5A$r9T$$$^$9(B:

    + +
      +
    1. GET $B%j%/%(%9%H$r + +
    2. POST $B$d(B PUT$B%j%/%(%9%H$K$*$$$F!" + +
    3. $B%l%9%]%s%9$rJV$9:]!"(BTCP $B$N(B ACK $B$,5"$C$F$/$k$^$G$N;~4V(B
    4. +
    + $B>-Mh$K$OJL!9$N@_Dj$r$9$k$3$H$,2DG=$K$G$-$k$h$&9M0FCf$G$9!#(B + Apache 1.2 $B0JA0$K$*$$$F$O%?%$%^!<$O(B 1200 $B$,%G%U%)%k%H$G$7$?$,!"(B + 300 $B$K2<$2$i$l$^$7$?!#(B300 $B$G$b$[$H$s$I$N>l9g$O==J,$9$.$kCM$G$9!#(B + $B%3!<%ICf$NJQ$J>l=j$K$^$@%Q%1%C%H$rAw$k:]$K%?%$%^$r%j%;%C%H$7$J$$(B + $B>l=j$,$"$k$+$b$7$l$J$$$N$G!"%G%U%)%k%H$r$h$j>.$5$$CM$K$O$7$F$$$^$;$s!#(B +
    + +

    UseCanonicalName $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: UseCanonicalName + on|off|dns
    + $B%G%U%)%k%H(B: UseCanonicalName + on
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k!"%P!<%A%c%k%[%9%H!"%G%#%l%/%H%j(B
    + $B>e=q$-(B: Options
    + $B8_49@-(B: UseCanonicalName + $B$O(B Apache 1.3 $B0J9_$GMxMQ2DG=$G$9!#(B + +

    $BB?$/$N>u67$G(B Apache $B$O(B$B<+8J;2>H(B + URL$B!"$9$J$o$AF1$8%5!<%P$r;X$9(B URL$B!"$r:n@.$9$kI,MW$,$"$j$^$9!#(B + UseCanonicalName on $B$r;H$&$H(B (1.3 + $B$h$jA0$N$9$Y$F$N%P!<%8%g%s$G$b(B) Apache $B$O(B ServerName $B%G%#%l%/%F%#%V$H(B Port + $B%G%#%l%/%F%#%V$r;H$C$F%5!<%P$N@5<0$JL>A0$r:n@.$7$^$9!#(B + $B$3$NL>A0$,$9$Y$F$N<+8J;2>H(B URL $B$G;H$o$l!"(BCGI $B$N(B + SERVER_NAME $B$H(B SERVER_PORT + $B$K$b;H$o$l$^$9!#(B

    + +

    $BNc$($P!"(BServerName $B$,(B + www.example.com $B$K@_Dj$5$l$F$$$F!"(BPort $B$,(B 9090 + $B$K@_Dj$5$l$F$$$k>l9g$O!"%5!<%P$N(B$B@5<0$JL>A0(B$B$O(B + www.example.com:9090 $B$K$J$j$^$9!#(BPort + $B$NCM$,%G%U%)%k%H$N(B 80 $B$G$"$k$H$-$O!"(B + :80 $B$O(B$B@5<0$JL>A0(B$B$+$i$O>J$+$l$^$9!#(B

    + +

    UseCanonicalName off $B$G$O(B Apache + $B$O%/%i%$%"%s%H$,%[%9%HL>$H%]!<%H$rDs6!$7$?>l9g$K$O$=$l$i$r85$K<+8J;2>H(B + URL $B$r:n@.$7$^$9(B ($BDs6!$5$l$F$$$J$$>l9g$O>e$GDj5A$5$l$F$$$k$h$&$K(B + $B@5<0$JL>A0$r;H$$$^$9(B)$B!#(B + $B$3$l$i$NCM$O(B$BL>A0%Y!<%9$N(B + $B%P!<%A%c%k%[%9%H(B$B$rSERVER_NAME $B$H(B SERVER_PORT + $B$b%/%i%$%"%s%H$+$iM?$($i$l$?CM$+$i:n@.$5$l$^$9!#(B

    + +

    $B$3$l$,M-MQ$J>l9g$NNc$O!"%$%s%H%i%M%C%H$N%5!<%P$G!"(Bwww + $B$N$h$&$JC;$$L>A0$G%f!<%6$,%^%7%s$K@\B3$7$F$$$k$H$-$G$9!#(B + $B%f!<%6$,C;$$L>A0$rF~NO$7$F!"(BURL + $B$,(B$B:G8e$N%9%i%C%7%eL5$7$N(B$B%G%#%l%/%H%j$X$N$b$N$G$"$k$H$-$K!"(B + Apache $B$O%j%/%(%9%H$r(B http://www.domain.com/splat/ + $B$X%j%@%$%l%/%H$9$k$3$H$K5$IU$/$G$7$g$&!#(B + $BG'>Z$r$9$k$h$&$K@_Dj$7$F$$$k$H!"$3$N>l9g%f!<%6$O(B + 2 $B2sG'>Z$r$7$J$1$l$P$J$i$J$/$J$j$^$9(B (www $B$KBP$7$F(B + 1 $B2s!"(Bwww.domain.com $B$KBP$7$F$b$&0l2s(B -- + $B$h$j>\$7$$>pJs$O(B $B$3$NOCBj$N(B + FAQ $B$r;2>H$7$F$/$@$5$$(B)$B!#$7$+$7!"(BUseCanonicalName + $B$,(B off $B$K$J$C$F$$$k$H!"(BApache $B$O(B htttp://www/splat/ + $B$K%j%@%$%l%/%H$7$^$9!#(B

    + +

    $B;0$DL\$N%*%W%7%g%s(B UseCanonicalName DNS $B$O!"(B + Host: + $B%X%C%@$rDs6!$7$J$$8E$$%/%i%$%"%s%H$r%5%]!<%H$7$?Bg5,LO$J(B IP + $B%Y!<%9$N%P!<%A%c%k%[%9%F%#%s%0$G;HMQ$5$l$k$3$H$r0U?^$7$F$$$^$9!#(B + $B$3$N%*%W%7%g%s$G$O!"(BApache $B$O%/%i%$%"%s%H$,@\B3$7$?(B IP $B%"%I%l%9$K(B + DNS $B$N5U0z$-$r9T$J$C$F<+8J;2>H(B URL $B$r:n@.$7$^$9!#(B

    + +

    $B7Y9p(B: CGI $B$,(B SERVER_NAME + $B$K4X$9$k2>Dj$r9T$J$C$F$$$k$H$-$O!"(B + $B$3$N%*%W%7%g%s$N@_Dj$GF0:n$7$J$/$J$k$+$b$7$l$^$;$s!#(B + $B%/%i%$%"%s%H$O$K$H$7$F(B + $B2?$G$bK>$_$NCM$r;XDj$9$k$3$H$,$G$-$^$9!#$7$+$7!"(BCGI $B$,(B + SERVER_NAME $B$N$_$r;H$C$F<+8J;2>H(B URL + $B$r:n@.$7$F$$$k>l9g$O$I$N@_Dj$r9T$J$C$F$bBg>fIW$J$O$:$G$9!#(B

    + +

    $B;2>H(B: ServerName, Port

    +
    + +

    User $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: User + unix-userid
    + $B%G%U%)%k%H(B: User + #-1
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k!"%P!<%A%c%k%[%9%H(B
    + $B%9%F!<%?%9(B: core + +

    User $B%G%#%l%/%F%#%V$O%5!<%P$,%j%/%(%9%H$K1~Ez$9$k$H$-$N%f!<%6(B + ID $B$r@_Dj$7$^$9!#$3$N%G%#%l%/%F%#%V$r;H$&$?$a$K$O!"(Bstandalone + $B%5!<%P$,(B root $B$H$7$F5/F0$5$l$F$$$J$1$l$P$J$j$^$;$s!#(B + Unix-userid $B$O0J2<$N$I$l$+$G$9(B:

    + +
    +
    $B%f!<%6L>(B
    + +
    $BL>A0$G%f!<%6$r;XDj!#(B
    + +
    # $B$N8e$K%f!<%6HV9f!#(B
    + +
    $BHV9f$G%f!<%6$r;XDj!#(B
    +
    + $B%f!<%6$O30$N@$3&$+$i8+$i$l$k$3$H$r0U?^$7$F$$$J$$%U%!%$%k$r%"%/%;%9(B + $B$G$-$F$7$^$&$h$&$J8"8B$,L5$$$b$N$K$9$Y$-$G!"F1MM$K(B httpd $B$N%j%/%(%9%H(B + $B$KBP$7$F0U?^$5$l$F$$$J$$%3!<%I$rnobody $B$r;H$&?M$b$$$^$9$,!"(B + $B$3$N%f!<%6$O>o$K;HMQ2DG=$H$$$&$o$1$G$O$J$/!"K>$^$7$$$o$1$G$b$"$j$^$;$s!#(B + $BNc$($P!"(Bmod_proxy $B$N%-%c%C%7%e$r;HMQ$7$F$$$k$H$-$O!"(B + $B$=$l$r$3$N%f!<%6$,%"%/%;%9$G$-$kI,MW$,$"$j$^$9(B + (CacheRoot + $B%G%#%l%/%F%#%V(B $B$r;2>H(B)$B!#(B + +

    $BCm0U(B: root $B$G$J$$%f!<%6$G%5!<%P$rl9g$O!"$h$j>/$J$$8"8B$N(B + $B%f!<%6$X$NJQ99$K<:GT$7!"85!9$N%f!<%6$H$7$Fo$JF0:n$G$9!#(B

    + +

    $BFCJL$JCm0U(B: $B$3$N%G%#%l%/%F%#%V$r(B <VirtualHost> + $BFb$G;H$&$K$OE,@Z$K@_Dj$5$l$?(B suEXEC + $B%i%C%Q!<(B$B$,I,MW$G$9!#$3$N$h$&$K(B <VirtualHost> + $B$NCf$G;H$o$l$?$H$-$O(B CGI $B$r + +

    $B%;%-%e%j%F%#(B: $B<+J,$,2?$r$d$C$F$$$k$+$r40A4$KM}2r$7$F$$$F(B + $B$I$N$h$&$J4m81@-$,$"$k$+$rM}2r$7$F$$$J$$>l9g$O!"(B + User ($B$b$7$/$O(B Group) $B$r(B root + $B$K$7$J$$$G$/$@$5$$!#(B

    + +
    + +

    <VirtualHost> + $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: <VirtualHost + addr[:port] [addr[:port]] + ...> ... </VirtualHost>
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k(B
    + $B%9%F!<%?%9(B: Core.
    + $B8_49@-(B: IP $B%"%I%l%9%Y!<%9$G$J$$%P!<%A%c%k%[%9%H$O!"(B + Apache 1.1 $B0J9_$GMxMQ2DG=$G$9!#(B
    + $B8_49@-(B: $BJ#?t$N%"%I%l%9$N;XDj$O(B Apache 1.2 + $B0J9_$G$N$_2DG=$G$9!#(B + +

    <VirtualHost> $B5Z$S(B </VirtualHost> $B$O!"(B + $B$"$k%P!<%A%c%k%[%9%H$KBP$7$F$N$_E,MQ$5$l$k%G%#%l%/%F%#%V72$r0O$`(B + $B$?$a$K;H$o$l$^$9!#(B + $B%P!<%A%c%k%[%9%H%3%s%F%-%9%H$G5v2D$5$l$k$9$Y$F$N%G%#%l%/%F%#%V$r;XDj2DG=$G$9!#(B + $B%5!<%P$,!";XDj$5$l$?%P!<%A%c%k%[%9%H$K$"$k%I%-%e%a%s%H$X$N%j%/%(%9%H$rl9g!"(B + <VirtualHost> $B%;%/%7%g%s$NCf$K$"$k%G%#%l%/%F%#%V$,E,MQ$5$l$^$9!#(B + + Addr$B!!$O!" + +

      +
    • $B%P!<%A%c%k%[%9%H$N(B IP $B%"%I%l%9(B
    • + +
    • $B%P!<%A%c%k%[%9%H$N(B IP $B$KBP1~$9$k40A4$J%I%a%$%sL>(B
    • +
    + $BNc(B: + +
    + <VirtualHost 10.1.2.3>
    + ServerAdmin webmaster@host.foo.com
    + DocumentRoot /www/docs/host.foo.com
    + ServerName host.foo.com
    + ErrorLog logs/host.foo.com-error_log
    + TransferLog logs/host.foo.com-access_log
    + </VirtualHost>
    +
    + $B3F!9$N%P!<%A%c%k%[%9%H$K$O$=$l$>$l0c$&(B IP + $B%"%I%l%9!"%]!<%HHV9f$KBP1~$9$kI,MW$,$"$j!"(B + 1 $BHVL\$N>l9g$K$OJ#?t$N%"%I%l%9$G(B IP + $B%Q%1%C%H$rl9g$O!"(B + (OS$B$,%5%]!<%H$7$F$$$l$P(B) ifconfig alias $B%3%^%s%I$d(B + VIF $B$N$h$&$J%+!<%M%k%Q%C%A(B + (SunOS(TM) 4.1.x $BMQ(B) $B$K$h$jC#@.$G$-$^$9(B)$B!#(B + +

    $BJ#?t$N(B IP $B%"%I%l%9$rDj5A$9$k$3$H$b$G$-$^$9!#(B + $BFs$D$N%$%s%?%U%'!<%9$KBP$7$FF1$8L>A0$G1~Ez$7$F$$$k$H$-$KM-MQ$G$7$g$&!#(B + $BNc$($P!"FbIt8~$1(B ($B%$%s%H%i%M%C%H(B) $B$H(B + $B30It8~$1(B ($B%$%s%?!<%M%C%H(B) $B$K%P!<%A%c%k%[%9%H$r$7$F$$$k>l9g$G$9!#(B
    + $B@_DjNc(B:

    + +
    + <VirtualHost 192.168.1.2 204.255.176.199>
    + DocumentRoot /www/docs/host.foo.com
    + ServerName host.foo.com
    + ServerAlias host
    + </VirtualHost>
    +
    + + _default_ $B$H$$$&FCJL$JL>A0$r;XDj$9$k$3$H$K$h$j!"(B + $BB>$N%P!<%A%c%k%[%9%H$G;XDj$5$l$F$$$J$$(B IP + $B%"%I%l%9$9$Y$F$KBP$7$F%^%C%A$5$;$k$3$H$,2DG=$G$9!#(B_default_ + $B%P!<%A%c%k%[%9%H$,L5$$$H$-$O!"$b$7$I$3$K$b%^%C%A$7$J$$$H(B VirtualHost + $B%;%/%7%g%s$N30$NDj5A$+$i$J$k!V:port + $B$H$$$C$?7A<0$G5-=R$9$k$3$H$K$h$j!"%^%C%A$5$;$k%]!<%H$rJQ992DG=$G$9!#(B + $B$3$N;XDj$r$7$J$$>l9g$K$O!"Port + $B$G;XDj$5$l$?%]!<%H$,%G%U%)%k%H$H$J$j$^$9!#(B + :* $B$r;XDj$9$k$3$H$K$h$j!"(B + $B%"%I%l%9>e$N$9$Y$F$N%]!<%H$K%^%C%A$7$^$9!#(B(_default_ + $B$N$H$-$O$3$l$r;H$&$3$H$,?d>)$5$l$F$$$^$9!#(B)

    + +

    $B%;%-%e%j%F%#$K4X$7$F(B: + $B%5!<%P!<$r5/F0$7$?0J30$N%f!<%6$,%m%0%U%!%$%k$,J]4I$5$l$k%G%#%l%/%H%j$K(B + $B=q$-9~$_2DG=$J$H$-$K$J$<%;%-%e%j%F%#$,GK$i$l$k2DG=@-$,$"$k$+$N>\:Y$O(B + $B%;%-%e%j%F%#$K4X$9$k%3%D(B + $B$r;2>H$7$F$/$@$5$$!#(B

    + +

    $BCm0UE@(B: <VirtualHost> $B$O(B Apache $B$,(B + Listen $B$9$k(B IP $B%"%I%l%9$K$O1F6A$rM?$((B$B$^$;$s(B$B!#(B + BindAddress $B$+(B + Listen $B$r;H$C$F(B Apache $B$,@5$7$$%"%I%l%9$r(B + listen $B$9$k$h$&$K@_Dj$9$kI,MW$,$"$k$+$b$7$l$^$;$s!#(B

    + +

    $B;2>H(B: Apache $B%P!<%A%c%k%[%9%H@bL@=q(B
    + $B;2>H(B: DNS $B$K4X$9$kLdBj(B
    + $B;2>H(B: Apache $B$,MxMQ$9$k%"%I%l%9$H%]!<%H$r@_Dj$9$k(B
    + $B;2>H(B: + $B%j%/%(%9%H$rDirectory, Location, Files $B%;%/%7%g%s$NF0:nK!(B +

    +
    + + + + + + + diff --git a/htdocs/manual/mod/directive-dict.html.en b/htdocs/manual/mod/directive-dict.html.en new file mode 100644 index 00000000000..33f21e53937 --- /dev/null +++ b/htdocs/manual/mod/directive-dict.html.en @@ -0,0 +1,304 @@ + + + + + + + Definitions of terms used to describe Apache + directives + + + + + + +

    Terms Used to Describe Apache + Directives

    + +

    Each Apache configuration directive is described using a + common format that looks like this:

    + +
    +
    Syntax: + directive-name some args
    + Default: + directive-name default-value
    + Context: + context-list
    + Override: + override
    + Status: + status
    + Module: + module-name
    + Compatibility: + compatibility notes
    +
    + +

    Each of the directive's attributes, complete with possible + values where possible, are described in this document.

    + +

    Directive Terms

    + + +
    + +

    Syntax

    + +

    This indicates the format of the directive as it would + appear in a configuration file. This syntax is extremely + directive-specific, and is described in detail in the + directive's definition. Generally, the directive name is + followed by a series of one or more space-separated arguments. + If an argument contains a space, the argument must be enclosed + in double quotes. Optional arguments are enclosed in square + brackets. Where an argument can take on more than one possible + value, the possible values are separated by vertical bars "|". + Literal text is presented in the default font, while + argument-types for which substitution is necessary are + emphasized. Directives which can take a variable + number of arguments will end in "..." indicating that the last + argument is repeated.

    + +

    Directives use a great number of different argument types. A + few common ones are defined below.

    + +
    +
    URL
    + +
    A complete Uniform Resource Locator including a scheme, + hostname, and optional pathname as in + http://www.example.com/path/to/file.html
    + +
    URL-path
    + +
    The part of a url which follows the scheme and + hostname as in /path/to/file.html. The + url-path represents a web-view of a resource, as + opposed to a file-system view.
    + +
    file-path
    + +
    The path to a file in the local file-system beginning + with the root directory as in + /usr/local/apache/htdocs/path/to/file.html. + Unless otherwise specified, a file-path which does + not begin with a slash will be treated as relative to the ServerRoot.
    + +
    directory-path
    + +
    The path to a directory in the local file-system + beginning with the root directory as in + /usr/local/apache/htdocs/path/to/.
    + +
    filename
    + +
    The name of a file with no accompanying path information + as in file.html.
    + +
    regex
    + +
    A regular + expression, which is a way of describing a pattern to + match in text. The directive definition will specify what the + regex is matching against.
    + +
    extension
    + +
    In general, this is the part of the filename + which follows the last dot. However, Apache recognizes + multiple filename extensions, so if a filename + contains more than one dot, each dot-separated part of the + filename following the first dot is an extension. + For example, the filename file.html.en + contains two extensions: .html and + .en. For Apache directives, you may specify + extensions with or without the leading dot. In + addition, extensions are not case sensitive.
    + +
    MIME-type
    + +
    A method of describing the format of a file which + consists of a major format type and a minor format type, + separated by a slash as in text/html.
    + +
    env-variable
    + +
    The name of an environment + variable defined in the Apache configuration process. + Note this is not necessarily the same as an operating system + environment variable. See the environment variable documentation for + more details.
    +
    +
    + +

    Default

    + +

    If the directive has a default value (i.e., if you + omit it from your configuration entirely, the Apache Web server + will behave as though you set it to a particular value), it is + described here. If there is no default value, this section + should say "None". Note that the default listed here + is not necessarily the same as the value the directive takes in + the default httpd.conf distributed with the server.

    +
    + +

    Context

    + +

    This indicates where in the server's configuration files the + directive is legal. It's a comma-separated list of one or more + of the following values:

    + +
    +
    server config
    + +
    This means that the directive may be used in the server + configuration files (e.g., httpd.conf, + srm.conf, and access.conf), but + not within any + <VirtualHost> or <Directory> + containers. It is not allowed in .htaccess files + at all.
    + +
    virtual host
    + +
    This context means that the directive may appear inside + <VirtualHost> containers in the server + configuration files.
    + +
    directory
    + +
    A directive marked as being valid in this context may be + used inside <Directory>, + <Location>, and <Files> + containers in the server configuration files, subject to the + restrictions outlined in How + Directory, Location and Files sections work.
    + +
    .htaccess
    + +
    If a directive is valid in this context, it means that it + can appear inside per-directory + .htaccess files. It may not be processed, though + depending upon the overrides currently active.
    +
    + +

    The directive is only allowed within the designated + context; if you try to use it elsewhere, you'll get a + configuration error that will either prevent the server from + handling requests in that context correctly, or will keep the + server from operating at all -- i.e., the server won't + even start.

    + +

    The valid locations for the directive are actually the + result of a Boolean OR of all of the listed contexts. In other + words, a directive that is marked as being valid in + "server config, .htaccess" can be used in the + httpd.conf file and in .htaccess + files, but not within any <Directory> or + <VirtualHost> containers.

    +
    + +

    Override

    + +

    This directive attribute indicates which configuration + override must be active in order for the directive to be + processed when it appears in a .htaccess file. If + the directive's context + doesn't permit it to appear in .htaccess files, + this attribute should say "Not applicable".

    + +

    Overrides are activated by the AllowOverride directive, and apply + to a particular scope (such as a directory) and all + descendants, unless further modified by other + AllowOverride directives at lower levels. The + documentation for that directive also lists the possible + override names available.

    +
    + +

    Status

    + +

    This indicates how tightly bound into the Apache Web server + the directive is; in other words, you may need to recompile the + server with an enhanced set of modules in order to gain access + to the directive and its functionality. Possible values for + this attribute are:

    + +
    +
    Core
    + +
    If a directive is listed as having "Core" status, that + means it is part of the innermost portions of the Apache Web + server, and is always available.
    + +
    Base
    + +
    A directive labeled as having "Base" status is supported + by one of the standard Apache modules which is compiled into + the server by default, and is therefore normally available + unless you've taken steps to remove the module from your + configuration.
    + +
    Extension
    + +
    A directive with "Extension" status is provided by one of + the modules included with the Apache server kit, but the + module isn't normally compiled into the server. To enable the + directive and its functionality, you will need to change the + server build configuration files and re-compile Apache.
    + +
    Experimental
    + +
    "Experimental" status indicates that the directive is + available as part of the Apache kit, but you're on your own + if you try to use it. The directive is being documented for + completeness, and is not necessarily supported. The module + which provides the directive may or may not be compiled in by + default; check the top of the page which describes the + directive and its module to see if it remarks on the + availability.
    +
    +
    + +

    Module

    + +

    This quite simply lists the name of the source module which + defines the directive.

    +
    + +

    Compatibility

    + +

    If the directive wasn't part of the original Apache version + 1 distribution, the version in which it was introduced should + be listed here. If the directive has the same name as one from + the NCSA HTTPd server, any inconsistencies in behavior between + the two should also be mentioned. Otherwise, this attribute + should say "No compatibility issues."

    + + + + diff --git a/htdocs/manual/mod/directive-dict.html.fr b/htdocs/manual/mod/directive-dict.html.fr new file mode 100644 index 00000000000..5f6e3c84118 --- /dev/null +++ b/htdocs/manual/mod/directive-dict.html.fr @@ -0,0 +1,251 @@ + + + + + + + + + Termes utilisés pour décrire les + directives Apache + + + + + + +

    Termes utilisés pour décrire + les directives Apache

    + +

    Chaque directive de configuration d'Apache est + décrite selon un format de présentation commun + ressemblant à ceci :

    + +
    +
    Syntaxe: + nomDirective arguments
    + Défaut: + nomDirective + valeursParDéfaut
    + Contexte: + listeDeContextes
    + Surcharge: + DirectivesSurchargées
    + Statut: + statut
    + Module: + nomModule
    + Compatibilité: + notes concernant la compatibilité
    +
    + +

    Chacun des attributs possibles pour les directives, avec + toutes leurs valeurs possibles sont décrites dans ce + document.

    + +

    Termes employés pour les directives

    + + +
    + +

    Syntaxe

    + +

    Indique le format dans laquelle la directive doit être + inscrite dans les fichiers de configuration. Cette syntaxe est + très spécifique pour chaque directive, et est + décrite en détail dans la définition de la + directive. Généralement, le nom de la directive + est suivi d'un ou de plusieurs arguments. Les arguments + optionnels sont entourés de crochets Quand un argument + peut prendre plus d'une valeur possible, les valeurs possibles + sont séparées par une barre verticale. Les + valeurs littérales sont affichée avec la fontes + par défaut, tandis qur les type d'arguments pour + lesquels une substitution doit être faite sont en + italique. Les diretrives pouvant avoir un nombre variable + d'arguments se terminent avec "..." indiquant que le dernier + argument se répète.

    +
    + +

    Défaut

    + +

    Si la directive a une valeur par défaut + (c-à-d., si elle n'apparait pas du tout dans le + fichier de configuration, le serveur Apache se comportera comme + si cette directive avait été écrite en + mentionnant cette valeur), elle est spécifiée + ici. Si aucune valeur n'est définie par défaut, + cette section précisera "Non + précisé".

    +
    + +

    Contexte

    + +

    Indique là ou l'implantation de la directive dans le + fichier de configuration est licite. Il est exprimé + comme une liste séparée par des virgules, et + pouvant contenir les éléments suivants :

    + +
    +
    configuration serveur
    + +
    La directive peut être utilisée dans le + fichier de configuration du serveur (ex., + httpd.conf, srm.conf, et + access.conf), mais dans aucune + des sections intérieures des containers + <VirtualHost> ni <Directory>. Elle + n'est pas permise dans aucun des fichiers + .htaccess.
    + +
    hôte virtuel
    + +
    Dans ce contexte, la directive peut apparaître dans + les containers <VirtualHost> écrits + dans les fichiers de configuration du serveur.
    + +
    répertoire
    + +
    La directive peut apparaître dans les containers + <Directory> écrits dans les + fichiers de configuration du serveur.
    + +
    .htaccess
    + +
    La directive peut apparaître dans les fichiers + .htaccess situé dans chacun des + répertoires. Elle peut ou ne pas être + interprétée, suivant la configuration des + directives de + surcharge.
    +
    + +

    Les directives ne sont autorisées que dans + les contextes cités ; si vous essayez de les + écrire ailleurs, vous provoquerez une erreur de + configuration qui soit conduira le serveur à ignorer les + requêtes dans le contexte spécifié, soit + peut empêcher le serveur de fonctionner -- + c-à-d., le serveur refusera de + démarrer.

    + +

    Les emplacements valides pour les directives sont le + résultat d'un OU booléen de tous les contextes + cités. En d'autres termes, une directive marquée + comma étant valide dans le contexte "configuration + serveur, .htaccess" peut être utilisée dans + le fichier httpd.conf et dans les fichiers + .htaccess, mais pas dans le container + <Directory> ni <VirtualHost>.

    +
    + +

    Surcharge

    + +

    Cet attribut de directive précise quelle surcharge + doit être permise pour que la directive puisse être + interprétée lorsqu'elle apparaît dans un + fichier .htaccess. Si le contexte de directive ne permet pas une + écriture dans les fichiers .htaccess, cet + attribut doit mentionner "Non applicable".

    + +

    Les surcharges sont gérées par la directive AllowOverrides, et ont une + portée définie, par exemple un répertoire + donné et tous ses descendants, sauf si la configuration + de surcharge est changée à un endroit de la + descendance par une directive AllowOverrides d'un + niveau inférieur. La documentation pour cette directive + liste aussi les noms possibles de surcharges disponibles.

    +
    + +

    Statut

    + +

    Indique à quel module du serveur Apache Web la + directive est rattachée ; en d'autres termes, vous + devrez peut être recompiler le serveur en + précisant un ensemble plus large de modules pour pouvoir + bénéficier de cette fonctionnalité. Les + valeurs possibles pour cet attribut sont :

    + +
    +
    Noyau
    + +
    Il s'agit d'une directive du noyau d'Apache et est de ce + fait toujours disponible.
    + +
    Base
    + +
    La directive est implémentée dans un module + d'Apache faisant partie de l'ensemble de compilation de base, + et est normalement disponible sauf si vous avez explicitement + enlevé ce module à la compilation.
    + +
    Extension
    + +
    La directive est implémentée par un module + faisant partie de l'Apache Server Kit, mais ce module n'est + pas compilé par défaut. Pour activer cette + directive, et rendre opérationnelle cette + fonctionnalité, vous devrez modifier le fichier de + configuration de compilation et recompiler Apache.
    + +
    Expérimental
    + +
    Le statut "Experimental" indique que la directive est + disponible dans le Kit Apache, mais que vous ne pouvez + l'utiliser qu'à vos risques et périls. La + directive est documenté dans un souci + d'exhaustivité mais n'est pas forcément + supportée. Le module qui donne accès à + cette directive peut être ou ne pas être + compilé par défaut ; reportez vous en + tête de la page qui décrit la directive et le + module pour toute remarque concernant sa + disponibilité.
    +
    +
    + +

    Module

    + +

    Donne simplement le nom du module ou est + implémentée cette fonctionnalité.

    +
    + +

    Compatibilité

    + +

    Si la directive ne faisait pas partie de la version 1 + d'Apache, le numéro indique la version dans laquelle + elle a été introduite. Si la directive a le + même nom qu'une ancienne directive du serveur HTTPd du + NCSA, toute différence de comportement y sera + mentionnée. Dans les autres cas, cette rubrique + affichera "Pas de remarques sur + compatiblité."

    + + + + diff --git a/htdocs/manual/mod/directive-dict.html.html b/htdocs/manual/mod/directive-dict.html.html new file mode 100644 index 00000000000..d5444a6c35d --- /dev/null +++ b/htdocs/manual/mod/directive-dict.html.html @@ -0,0 +1,4 @@ + + + diff --git a/htdocs/manual/mod/directive-dict.html.ja.jis b/htdocs/manual/mod/directive-dict.html.ja.jis new file mode 100644 index 00000000000..cf4f5b63c95 --- /dev/null +++ b/htdocs/manual/mod/directive-dict.html.ja.jis @@ -0,0 +1,300 @@ + + + + +Apache $B$N%G%#%l%/%F%#%V$N2r@b$K;H$o$l$kMQ8l(B + + + + + +

    Apache +$B$N%G%#%l%/%F%#%V$N2r@b$K;H$o$l$kMQ8l(B

    + +

    $B$=$l$>$l$N(B Apache +$B%G%#%l%/%F%#%V$O!" + +

    +
    $B9=J8(B: +directive-name some args
    + $B%G%U%)%k%H(B: +directive-name default-value
    + $B%3%s%F%-%9%H(B: +context-list
    + $B>e=q$-(B: +override
    + $B%9%F!<%?%9(B: +status
    + $B%b%8%e!<%k(B: +module-name
    + $B8_49@-(B: +compatibility notes
    +
    + +

    $B$3$N%I%-%e%a%s%H$G$O%G%#%l%/%F%#%V$N$=$l$>$l$NB0@-$,@bL@$5$l(B +$B$F$$$^$9!#2DG=$J>l9g$O%G%#%l%/%F%#%V$, + +

    $B%G%#%l%/%F%#%V$NMQ8l(B

    + + + +
    +

    $B9=J8(B

    + +

    $B@_Dj%U%!%$%kCf$N%G%#%l%/%F%#%V$N=q<0$r<($7$^$9!#(B +$B$3$N9=J8$O%G%#%l%/%F%#%VFCM-$J$N$G!">\:Y$O%G%#%l%/%F%#%V$N@bL@$r(B +$B;2>H$7$F$/$@$5$$!#0lHLE*$K!"%G%#%l%/%F%#%VL>$N8e$K$O(B +$B6uGr$K$h$jJ,3d$5$l$?$$$/$D$+$N0z?t$,B3$-$^$9!#(B +$B0z?t$,6uGr$r4^$`$H$-$OFs=E0zMQId(B ($BLuCm(B: ") +$B$G0O$^$l$F$$$^$9!#(B $B%*%W%7%g%J%k$J0z?t$O3g8L(B ($BLuCm(B: +[]) $B$G0O$^$l$F$$$^$9!#(B +$B0z?t$,J#?t$NCM$rl9g$O!"$=$l$i$NCM$O?bD>$NK@(B "|" $B$G(B +$BJ,3d$5$l$F$$$^$9!#(B +$BJQ99$5$l$J$$%F%-%9%H$O%G%U%)%k%H$N%U%)%s%H$GI=<($5$l!"CV49$NI,MW$J(B +$B0z?t$O(B$B6/D4$5$l$F(B$BI=<($5$l$^$9!#(B +$B0z?t$N?t$,JQ$o$k%G%#%l%/%F%#%V$O:G8e$N(B +$B0z?t$,7+$jJV$5$l$k$3$H$r<($9$?$a$K(B "..." $B$G=*$o$j$^$9!#(B

    + +

    $B%G%#%l%/%F%#%V$OB?$/$N0c$&7?$N0z?t$r$H$j$^$9!#$$$/$D$+!"NI$/(B +$B;H$o$l$k$b$N$r0J2<$GDj5A$7$^$9!#(B

    + +
    +
    URL
    + +
    http://www.example.com/path/to/file.html +$B$N$h$&$K!"(B +$B%9%-!<%`!"%[%9%HL>!"%Q%9L>(B($B>JN,2DG=(B)$B$r4^$s$G$$$k40A4$J(B +Uniform Resource Locator$B!#(B
    + +
    URL-path
    + +
    /path/to/file.html $B$N$h$&$K!"%9%-!<%`$H(B +$B%[%9%HL>$N8e$KB3$/(B url $B$N0lIt!#(Burl-path +$B$O(B $B%U%!%$%k%7%9%F%`$+$i$N;kE@$G$O$J$/!"(B +$B%&%'%V$+$i$N;kE@$G%j%=!<%9$rI=8=$7$^$9!#(B
    + +
    file-path
    + +
    /usr/local/apache/htdocs/path/to/file.html +$B$N$h$&$K!"(B +$B%k!<%H%G%#%l%/%H%j$+$i;O$^$k%m!<%+%k$N%U%!%$%k%7%9%F%`>e$N%U%!%$%k$X$N%Q%9!#(B +$BDL>o!"%9%i%C%7%e$G;O$^$i$J$$(B file-path $B$O(B ServerRoot $B$+$i$NAjBP%Q%9$H$7$F(B +$B07$o$l$^$9!#(B
    + +
    directory-path
    + +
    /usr/local/apache/htdocs/path/to/ $B$N$h$&$K!"(B +$B%k!<%H%G%#%l%/%H%j$+$i;O$^$k%m!<%+%k$N%U%!%$%k%7%9%F%`$N%G%#%l%/%H%j$X$N(B +$B%Q%9!#(B
    + +
    filename
    + +
    file.html $B$N$h$&$K!"%Q%9>pJs$NIU$$$F$$$J$$(B +$B%U%!%$%kL>!#(B
    + +
    regex
    + +
    $B@55,I=8=(B$B!#$3$l$O!"(B +$B%F%-%9%H$N%^%C%A$N%Q%?!<%s$rI=$7$^$9!#%G%#%l%/%F%#%V$NDj5A$,(B +regex $B$,2?$KBP$7$F%^%C%A$r9T$J$&$N$+$r;XDj$7$^$9!#(B
    + +
    extension
    + +
    $B0lHLE*$K$O(B filename +$B$N:G8e$N%I%C%H$N8e$NItJ,$G$9!#(B $B$7$+$7!"(BApache +$B$OJ#?t$N%U%!%$%k$N3HD%;R$rG'<1$7$^$9$N$G!"(Bfilename +$B$KJ#?t$N%I%C%H$,$"$k$H!":G=i$N%I%C%H$N8e$N!"$=$l$>$l$N%I%C%H$GJ,N%$5$l$?ItJ,$,(B +extension ($BLuCm(B: $B3HD%;R(B) +$B$K$J$j$^$9!#Nc$($P!"(Bfilename file.html.en +$B$K$OFs$D$N3HD%;R$,$"$j$^$9!#(B.html $B$H(B +.en $B$G$9!#(BApache +$B$N%G%#%l%/%F%#%V$G$O!"(Bextension +$B$O%I%C%HIU$-$G$bL5$7$G$b;XDj$G$-$^$9!#$5$i$K!"(Bextension +$B$O(B $BBgJ8;z>.J8;z$r6hJL$7$^$;$s!#(B
    + +
    MIME-type
    + +
    text/html $B$N$h$&$K!"%9%i%C%7%e$GJ,N%$5$l$?(B +$B + +
    env-variable
    + +
    Apache $B$N@_Dj$K$h$jDj5A$5$l$k(B $B4D6-JQ?t(B$B$NL>A0$G$9!#$3$l$O%*%Z%l!<%F%#%s%0%7%9%F%`$N(B +$B4D6-JQ?t$HF1$8$H$O8B$i$J$$$3$H$KCm0U$7$F$/$@$5$$!#>\:Y$O(B $B4D6-JQ?t$N@bL@(B$B$r;2>H$7$F$/$@$5$$!#(B
    +
    + +
    +

    $B%G%U%)%k%H(B

    + +

    $B%G%#%l%/%F%#%V$K%G%U%)%k%HCM(B +($B$9$J$o$A(B$B!"@_Dj%U%!%$%k$+$i(B +$B>JN,$5$l$F$$$F$b!"(BApache +$B%&%'%V%5!<%P$OFCDj$NCM$K@_Dj$5$l$F$$$k$+$N$h$&$K(B +$BF0:n$7$^$9(B) $B$,$"$k>l9g$O$3$3$K5-=R$5$l$^$9!#(B +$B%G%U%)%k%HCM$NL5$$>l9g!"$3$3$O(B "None" $B$H(B +$B=q$+$l$^$9!#$3$3$G=q$+$l$F$$$k%G%U%)%k%H$O%5!<%P$H6&$KG[I[$5$l$F$$$k(B +$B%G%U%)%k%H$N(B httpd.conf +$BFb$K=q$+$l$F$$$k%G%#%l%/%F%#%V$NCM$H(B +$B0c$&2DG=@-$,$"$k$3$H$KCm0U$7$F$/$@$5$$!#(B

    + +
    +

    $B%3%s%F%-%9%H(B

    + +

    +$B$3$l$O!"%5!<%P$N@_Dj%U%!%$%kCf$N$I$3$G%G%#%l%/%F%#%V$,M-8z$J$N$+$r<($7$^$9!#(B +$Be%+%s%^6h@Z$j$GNs5s$5$l$F$$$^$9!#(B

    + +
    +
    $B%5!<%P@_Dj%U%!%$%k(B
    + +
    $B$3$l$O!"%5!<%P@_Dj%U%!%$%k(B +($BNc$($P(B$B!"(Bhttpd.conf, +srm.conf, access.conf) +$BFb$G$O;HMQ$G$-$^$9$,!"(B <VirtualHost>$B$d(B +<Directory> $B$NCf$G$O(B +$B;HMQ$G$-$J$$(B$B$3$H$r<($7$^$9!#(B +.htaccess$B%U%!%$%k$G$N;HMQ$O5v2D$5$l$F$$$^$;$s!#(B
    + +
    $B%P!<%A%c%k%[%9%H(B
    + +
    $B$3$l$O!"%5!<%P@_Dj%U%!%$%k$N(B <VirtualHost> +$B$NCf$G;HMQ$G$-$k$3$H$r<($7$^$9!#(B
    + +
    $B%G%#%l%/%H%j(B
    + +
    $B$3$l$O!"%5!<%P@_Dj%U%!%$%k$N(B +<Directory>$B!"(B +<Location>$B!"(B<Files> +$B$NCf$G!"(B Directory$B!"(BLocation$B!"(BFiles +$B%;%/%7%g%s$N5!G=(B +$B$G@bL@$5$l$F$$$k@)8B$N2<$G;HMQ$G$-$k$3$H$r<($7$^$9!#(B
    + +
    .htaccess
    + +
    $B$3$l$O!"%G%#%l%/%H%j(B$BKh(B$B$N(B +.htaccess $B%U%!%$%kFb$G(B +$B;HMQ2DG=$G$"$k$3$H$r<($7$^$9!#(B $B$?$@!"(B$B>e=q$-(B +$B$N@_Dj$K$h$C$F$O!"=hM}$5$l$J$$$+$b$7$l$^$;$s!#(B
    +
    + +

    +$B%G%#%l%/%F%#%V$O;X<($5$l$?%3%s%F%-%9%H$G(B$B$N$_(B$B5v2D$5$l$^$9!#(B +$BB>$N>l=j$G;H$*$&$H$9$k$H!"%5!<%P$,$=$N%3%s%F%-%9%H$r@5$7$/07$($J$/(B +$B$J$k$h$&$J@_Dj%(%i!<$,H/@8$9$k$+!"%5!<%P$,$^$C$?$/F0:n$7$J$/$J$k!"(B +$B$9$J$o$A(B$B!"%5!<%P$,5/F0$7$J$/$J$k$H$$$&$3$H$K$J$j$^$9!#(B

    + +

    +$B%G%#%l%/%F%#%V$NM-8z$J0LCV$O!"$B%5!<%P@_Dj%U%!%$%k!"(B.htaccess" $B$GM-8z$@$H(B +$B5-$5$l$F$$$k%G%#%l%/%F%#%V$O(B httpd.conf +$B%U%!%$%k$H(B .htaccess $B%U%!%$%k$H$GM-8z$G$9$,!"(B +<Directory> $B$d(B +<VirtualHost> $B$NCf$G$O;HMQ$G$-$^$;$s!#(B

    + +
    +

    $B>e=q$-(B

    + +

    $B$3$N%G%#%l%/%F%#%V$NB0@-$O!"(B.htaccess +$B%U%!%$%kCf$K(B +$B%G%#%l%/%F%#%V$,8=$l$?$H$-$K!"$=$l$N=hM}$rM-8z$K$9$k$?$a$K(B +$B$I$N@_Dj$N>e=q$-$,I,MW$+$r<($7$^$9!#(B $B%G%#%l%/%F%#%V$N(B $B%3%s%F%-%9%H(B +$B$,!"(B.htaccess +$B%U%!%$%kCf$G$O5v2D$7$F$$$J$$>l9g$O!"(B $B$3$NB0@-$O(B +"$BE,MQIT2D(B" $B$H=q$+$l$^$9!#(B

    + +

    $B>e=q$-$O!"(BAllowOverride +$B%G%#%l%/%F%#%V$K$h$C$FM-8z$K$5$l!"(B +$BFCDj$N%9%3!<%W(B($B%G%#%l%/%H%j$J$I(B)$B$H!"(B +$B$5$i$K2<0L$N%l%Y%k$N(B AllowOverride +$B$G=$@5$5$l$J$$8B$j!"(B $B$=$NG[2<$KBP$7$FE,MQ$5$l$^$9!#(B +$B%G%#%l%/%F%#%V$N%I%-%e%a%s%H$Oe=q$-$NL>A0$b5s$2$^$9!#(B

    + +
    +

    $B%9%F!<%?%9(B

    + +

    $B$3$l$O%G%#%l%/%F%#%V$,(B Apache +$B%&%'%V%5!<%P$K$I$l$/$i$$$-$D$/AH$_9~$^$l$F$$$k$+$r(B +$B<($7$^$9!#8@$$49$($l$P!"%G%#%l%/%F%#%V$H$=$N5!G=$rMxMQ$9$k$?$a$K!"(B +$B%b%8%e!<%k$N?t$rA}$d$7$F!"%5!<%P$r:F%3%s%Q%$%k$9$kI,MW$,$"$k$+$b$7$l$J$$(B +$B$H$$$&$3$H$r<($7$^$9!#(B +$B$3$NB0@-$, + +

    +
    Core
    + +
    "Core" $B$N%G%#%l%/%F%#%V$O(B Apache +$B%&%'%V%5!<%P$N4pK\$H$J$k$Y$-$b$N$G$"$j!"(B +$B>o$K;HMQ2DG=$G$"$k$3$H$r<($7$^$9!#(B
    + +
    Base
    + +
    "Base" $B$N%G%#%l%/%F%#%V$O(B +$B%G%U%)%k%H$G%5!<%P$KAH$_9~$^$l$F$$$kI8=`%b%8%e!<%k$NCf$N0l$D$G%5(B +$B%]!<%H$5$l$F$$$F!"$o$6$o$6@_Dj$+$i%b%8%e!<%k$r:o=|$7$?$H$-$r=|$$$F!"(B +$BDL>o$G$O;HMQ2DG=$G$"$k$3$H$r<($7$^$9!#(B
    + +
    Extension
    + +
    "Extension" $B$N%G%#%l%/%F%#%V$O!"(B Apache +$B%5!<%P$NG[I[J*$KF1:-$5$l$F$$$k%b%8%e!<%k$N0l$D$GDs6!$5$l$F$$$k$b$N$N!"(B +$BDL>o$G$O%5!<%P$KAH$_9~$^$l$F$$$J$$$3$H$r<($7$^$9!#(B +$B%G%#%l%/%F%#%V$H$=$N5!G=$rM-8z$K$9$k$K$O!"%5!<%P%S%k%IMQ$N@_Dj%U%!%$%k$r(B +$BJQ99$7$F(B Apache $B$r:F%3%s%Q%$%k$9$kI,MW$,$"$j$^$9!#(B
    + +
    Experimental
    + +
    "Experimental" $B$N%G%#%l%/%F%#%V$O!"(BApache $BG[I[J*$K(B +$BF1:-$5$l$F$$$k$b$N$N!";n$7$?$$>l9g$O<+8J@UG$$G9T$J$&(B +$BI,MW$,$"$k$H$$$&$3$H$r<($7$^$9!#%G%#%l%/%F%#%V$O!"$9$Y$F$N%I%-%e%a%s%H$r(B +$B40A4$K$=$m$o$;$k$?$a$K2r@b$5$l$F$$$^$9$,!"%5%]!<%H$5$l$F$$$k$H$O8B$j$^$;$s!#(B +$B%G%#%l%/%F%#%V$rDs6!$9$k%b%8%e!<%k$O%G%U%)%k%H$GAH$_9~$^$l$F$$$k$+$b(B +$B$7$l$^$;$s$7!"$=$&$G$J$$$+$b$7$l$^$;$s!#;HMQ2DG=$+$I$&$+$O!"(B +$B%G%#%l%/%F%#%V$H%b%8%e!<%k$N@bL@$r$7$F$$$k%Z!<%8$N@hF,$rD4$Y$F$/$@$5$$!#(B
    +
    + +
    +

    $B%b%8%e!<%k(B

    + +

    +$B$3$l$OC1=c$K%G%#%l%/%F%#%V$,Dj5A$5$l$F$$$k%b%8%e!<%k$NL>A0$r5-:\$7$^$9!#(B

    + +
    +

    $B8_49@-(B

    + +

    $B%G%#%l%/%F%#%V$,(B Apache 1 +$B$NG[I[$KAH$_9~$^$l$F$$$J$+$C$?>l9g!"(B +$B%G%#%l%/%F%#%V$,F3F~$5$l$?%P!<%8%g%s$,$3$3$K=q$+$l$F$$$^$9!#(B +$B%G%#%l%/%F%#%V$,(B NCSA HTTPd +$B%5!<%P$N$b$N$HF1$8L>A0$G$"$k>l9g!"(B +$B0[$J$k5sF0$,$"$k$H$3$3$K=q$+$l$^$9!#(B +$B5sF0$,F1$8>l9g$O!"(B"$B8_49@-$NLdBjL5$7(B" +$B$H=q$+$l$F$$$^$9!#(B

    + + + + diff --git a/htdocs/manual/mod/directives.html.de b/htdocs/manual/mod/directives.html.de new file mode 100644 index 00000000000..da94e519f38 --- /dev/null +++ b/htdocs/manual/mod/directives.html.de @@ -0,0 +1,255 @@ + + + +Apache Konfigurationsdirektiven + + + + + +

    Apache Konfigurationsdirektiven

    +

    +Dieses Dokument enthält eine vollständige Liste aller +Konfigurationsdirektiven der Apache Standard-Distribution. +Die Beschreibungen sind dabei in einem einheitlichen Format verfasst, +wobei es zu den im Beschreibungsformat verwendeten Feldern eine eigene +Legende +gibt. +

    + + + + + diff --git a/htdocs/manual/mod/directives.html.en b/htdocs/manual/mod/directives.html.en new file mode 100644 index 00000000000..7f75ba1a204 --- /dev/null +++ b/htdocs/manual/mod/directives.html.en @@ -0,0 +1,595 @@ + + + + + + + Apache directives + + + + + + +

    Apache Directives

    + +

    Each Apache directive available in the standard Apache + distribution is listed here. They are described using a + consistent format, and there is a dictionary of the terms used in their + descriptions available.

    + + + + + + diff --git a/htdocs/manual/mod/directives.html.fr b/htdocs/manual/mod/directives.html.fr new file mode 100644 index 00000000000..d0a53b39eb5 --- /dev/null +++ b/htdocs/manual/mod/directives.html.fr @@ -0,0 +1,572 @@ + + + + + + + + + Directives Apache + + + + + + +

    Directives Apache

    + +

    Chacune des directives Apache disponible dans la + distribution standard est listée ici. Elles sont + décrites selon un format précis, et nous + fournissons un dictionnaire des termes utilisés pour + leur description.

    + + + + + + diff --git a/htdocs/manual/mod/directives.html.html b/htdocs/manual/mod/directives.html.html new file mode 100644 index 00000000000..ae7d722522e --- /dev/null +++ b/htdocs/manual/mod/directives.html.html @@ -0,0 +1,4 @@ + + + diff --git a/htdocs/manual/mod/directives.html.ja.jis b/htdocs/manual/mod/directives.html.ja.jis new file mode 100644 index 00000000000..b043eab707e --- /dev/null +++ b/htdocs/manual/mod/directives.html.ja.jis @@ -0,0 +1,592 @@ + + + + + + Apache $B%G%#%l%/%F%#%V(B + + + + + + + +

    Apache $B%G%#%l%/%F%#%V(B

    + +

    $BDL>o$N(B Apache $BG[I[$K4^$^$l$k(B Apache $B$N%G%#%l%/%F%#%V$O!"(B + $B$B<-=q(B $B$,MQ0U$5$l$F$$$^$9!#(B +

    + + + + + diff --git a/htdocs/manual/mod/footer.html b/htdocs/manual/mod/footer.html new file mode 100644 index 00000000000..70ddfccdcd0 --- /dev/null +++ b/htdocs/manual/mod/footer.html @@ -0,0 +1,5 @@ +
    + +

    Apache HTTP Server Version 1.3

    + Index + Home diff --git a/htdocs/manual/mod/header.html b/htdocs/manual/mod/header.html new file mode 100644 index 00000000000..09a28d8ca6c --- /dev/null +++ b/htdocs/manual/mod/header.html @@ -0,0 +1,5 @@ +
    + [APACHE DOCUMENTATION] + +

    Apache HTTP Server Version 1.3

    +
    diff --git a/htdocs/manual/mod/index-bytype.html.en b/htdocs/manual/mod/index-bytype.html.en new file mode 100644 index 00000000000..4c05d03f378 --- /dev/null +++ b/htdocs/manual/mod/index-bytype.html.en @@ -0,0 +1,297 @@ + + + + + + + Apache modules + + + + + + +

    Apache modules

    + +

    Below is a list of all of the modules that come as part of + the Apache distribution. See also the list of modules sorted alphabetically and the complete + alphabetical list of all Apache + directives. For modules that are not part of the Apache + distribution, please see http://modules.apache.org.

    + +

    Core

    + +
    +
    Core
    + +
    Core Apache features
    +
    + +

    Environment Creation

    + +
    +
    mod_env
    + +
    Passing of environments to CGI scripts
    + +
    mod_setenvif Apache 1.3 + and up
    + +
    Set environment variables based on client + information
    + +
    mod_unique_id Apache 1.3 + and up
    + +
    Generate unique request identifier for every request
    +
    + +

    Content Type Decisions

    + +
    +
    mod_mime
    + +
    Determining document types using file extensions
    + +
    mod_mime_magic
    + +
    Determining document types using "magic numbers"
    + +
    mod_negotiation
    + +
    Content negotiation
    +
    + +

    URL Mapping

    + +
    +
    mod_alias
    + +
    Mapping different parts of the host filesystem in the + document tree, and URL redirection
    + +
    mod_rewrite Apache 1.2 and + up
    + +
    Powerful URI-to-filename mapping using regular + expressions
    + +
    mod_userdir
    + +
    User home directories
    + +
    mod_speling Apache 1.3 and + up
    + +
    Automatically correct minor typos in URLs
    + +
    mod_vhost_alias Apache + 1.3.7 and up
    + +
    Support for dynamically configured mass virtual + hosting
    +
    + +

    Directory Handling

    + +
    +
    mod_dir
    + +
    Basic directory handling
    + +
    mod_autoindex
    + +
    Automatic directory listings
    +
    + +

    Access Control

    + +
    +
    mod_access
    + +
    Access control based on client hostname or IP + address
    + +
    mod_auth
    + +
    User authentication using text files
    + +
    mod_auth_dbm
    + +
    User authentication using DBM files
    + +
    mod_auth_db
    + +
    User authentication using Berkeley DB files
    + +
    mod_auth_anon Apache 1.1 + and up
    + +
    Anonymous user access to authenticated areas
    + +
    mod_auth_digest Apache + 1.3.8 and up
    + +
    Experimental MD5 authentication
    + +
    mod_digest Apache 1.1 and + up
    + +
    MD5 authentication
    +
    + +

    HTTP Response

    + +
    +
    mod_headers Apache 1.2 and + up
    + +
    Add arbitrary HTTP headers to resources
    + +
    mod_cern_meta Apache 1.1 + and up
    + +
    Support for HTTP header metafiles
    + +
    mod_expires Apache 1.2 and + up
    + +
    Apply Expires: headers to resources
    + +
    mod_asis
    + +
    Sending files which contain their own HTTP headers
    +
    + +

    Dynamic Content

    + +
    +
    mod_include
    + +
    Server-parsed documents
    + +
    mod_cgi
    + +
    Invoking CGI scripts
    + +
    mod_actions Apache 1.1 and + up
    + +
    Executing CGI scripts based on media type or request + method
    + +
    mod_isapi WIN32 only
    + +
    Windows ISAPI Extension support
    +
    + +

    Internal Content Handlers

    + +
    +
    mod_status Apache 1.1 and + up
    + +
    Server status display
    + +
    mod_info Apache 1.1 and + up
    + +
    Server configuration information
    +
    + +

    Logging

    + +
    +
    mod_log_config
    + +
    User-configurable logging replacement for + mod_log_common
    + +
    mod_log_forensic
    + +
    Forensic logging of requests made to the server
    + +
    mod_log_agent
    + +
    Logging of User Agents
    + +
    mod_log_referer
    + +
    Logging of document references
    + +
    mod_usertrack Apache 1.2 + and up
    + +
    User tracking using Cookies (replacement for + mod_cookies.c)
    +
    + +

    Miscellaneous

    + +
    +
    mod_imap Apache 1.1 and + up
    + +
    The imagemap file handler
    + +
    mod_proxy Apache 1.1 and + up
    + +
    Caching proxy abilities
    + +
    mod_so Apache 1.3 and up
    + +
    Support for loading modules (DLLs on Windows) at + runtime
    + +
    mod_mmap_static Apache + 1.3 and up
    + +
    Experimental file caching, mapping files into memory to + improve performace
    +
    + +

    Development

    + +
    +
    mod_example Apache 1.2 and + up
    + +
    Demonstrates Apache API
    +
    + +

    Obsolete

    + +
    +
    mod_browser Apache 1.2.* + only
    + +
    Set environment variables based on User-Agent strings. + Replaced by mod_setenvif in Apache 1.3 and up
    + +
    mod_cookies up to Apache + 1.1.1
    + +
    Support for Netscape-like cookies. Replaced in Apache 1.2 + by mod_usertrack
    + +
    mod_dld Apache 1.2.* and + earlier
    + +
    Start-time linking with the GNU libdld. Replaced in + Apache 1.3 by mod_so
    + +
    mod_log_common up to + Apache 1.1.1
    + +
    Standard logging in the Common Logfile Format. Replaced + by the mod_log_config module in Apache 1.2 and up
    +
    + + + + diff --git a/htdocs/manual/mod/index-bytype.html.fr b/htdocs/manual/mod/index-bytype.html.fr new file mode 100644 index 00000000000..401ed552719 --- /dev/null +++ b/htdocs/manual/mod/index-bytype.html.fr @@ -0,0 +1,323 @@ + + + + + + + + + Modules Apache + + + + + + +

    Modules Apache

    + +

    Ci dessous est donnée une liste des modules faisant + partie de la distribution Apache. Voir aussi la liste des + modules triés alphabétiquement + et la liste complète alphabétique de toutes les directives d'Apache. Pour + les modules d'Apache qui ne font pas partie de la distribution, + vous pouvez consulter http://modules.apache.org

    + +

    Base

    + +
    +
    Base
    + +
    Fonctionnalités de base d'Apache
    +
    + +

    Création de l'environnement

    + +
    +
    mod_env Apache 1.1 et + supérieur
    + +
    Passage d'environnement aux scripts CGI
    + +
    mod_setenvif Apache 1.3 + et supérieur
    + +
    Définition de variables d'environnement en + fonction des informations client
    + +
    mod_unique_id Apache 1.3 + et supérieur
    + +
    Génération d'identifiants uniques de + requête
    +
    + +

    Gestion du type de contenu

    + +
    +
    mod_mime
    + +
    Détermination du type des documents en fonction de + l'extension du fichier
    + +
    mod_mime_magic
    + +
    Détermination du type des documents en fonction de + "nombres magiques"
    + +
    mod_negotiation
    + +
    Négotiation de contenu
    +
    + +

    Transformation d'URL

    + +
    +
    mod_alias
    + +
    Association de différentes parties du + système de fichier de l'hôte dans l'arborescence + des documents, et redirection des URL.
    + +
    mod_rewrite Apache 1.2 et + supérieur
    + +
    Association des URI à des fichiers en utilisant + des expressions régulières
    + +
    mod_userdir
    + +
    Répertoires personnels d'utilisateurs
    + +
    mod_speling Apache 1.3 et + supérieur
    + +
    Correction automatique d'erreurs de frappe mineures dans + les URL
    + +
    mod_vhost_alias Apache + 1.3.7 et supérieur
    + +
    Support d'hôtes virtuels dynamiquement + configurables
    +
    + +

    Gestion des répertoires

    + +
    +
    mod_dir
    + +
    Gestion de base des répertoires
    + +
    mod_autoindex
    + +
    Création automatique des listes des + répertoires
    +
    + +

    Contrôle d'accès

    + +
    +
    mod_access
    + +
    Contrôle d'accès basé sur le nom du + client ou son adresse IP
    + +
    mod_auth
    + +
    Authentification des utilisateurs à partir d'un + fichier texte
    + +
    mod_auth_dbm
    + +
    Authentification des utilisateurs à partir d'un + fichier DBM
    + +
    mod_auth_db Apache 1.1 and + up
    + +
    Authentification des utilisateurs à partir d'une + base Berkeley
    + +
    mod_auth_anon Apache 1.1 + et supérieur
    + +
    Accès aux utilisateurs anonymes à des zones + authentifiées
    + +
    mod_auth_digest Apache + 1.3.8 et supérieur
    + +
    Authentication des utilisateurs à partir d'un + fichier MD5 (expérimental)
    + +
    mod_digest Apache 1.1 et + supérieur
    + +
    Authentication des utilisateurs à partir d'un + fichier MD5
    +
    + +

    Réponse HTTP

    + +
    +
    mod_headers Apache 1.2 et + supérieur
    + +
    Ajout d'en-têtes HTTP aux ressources
    + +
    mod_cern_meta Apache 1.1 + et supérieur
    + +
    Support des métafichiers d'en-tête HTTP
    + +
    mod_expires Apache 1.2 et + supérieur
    + +
    Ajout de l'en-tête Expires: pour les ressources + demandées
    + +
    mod_asis
    + +
    Envoi de fichiers contenant leurs propres en-têtes + HTTP
    +
    + +

    Contenu dynamique

    + +
    +
    mod_include
    + +
    Documents analysés par le serveur
    + +
    mod_cgi
    + +
    Appel des scripts CGI
    + +
    mod_actions Apache 1.1 et + supérieur
    + +
    Exécution de scripts CGI en fonction du type de + média ou de la requête
    + +
    mod_isapi WIN32 + seulement
    + +
    Support des extensions Windows ISAPI
    +
    + +

    Gestion du contenu interne

    + +
    +
    mod_status Apache 1.1 et + supérieur
    + +
    Affichage de l'état du système
    + +
    mod_info Apache 1.1 et + supérieur
    + +
    Informations sur la configuration du serveur
    +
    + +

    Trace

    + +
    +
    mod_log_config
    + +
    Trace configurable des accès. Remplace + mod_log_common
    + +
    mod_log_forensic
    + +
    Forensic logging of requests made to the server
    + +
    mod_log_agent
    + +
    Trace des User Agents
    + +
    mod_log_referer
    + +
    Trace des référence d'un document
    + +
    mod_usertrack Apache 1.2 + et supérieur
    + +
    Suivi des utilisateurs à l'aide de cookies + (remplacement de mod_cookies)
    +
    + +

    Divers

    + +
    +
    mod_imap Apache 1.1 et + supérieur
    + +
    Gestion des fichiers imagemap
    + +
    mod_proxy Apache 1.1 et + supérieur
    + +
    Module de cache par proxy
    + +
    mod_so Apache 1.3 et + supérieur
    + +
    Support des modules dynamiques (.so sur Unix, .dll sur + Win32)
    + +
    mod_mmap_static Apache + 1.3 et supérieur
    + +
    Module expérimental de cache mémoire des + fichiers afin d'améliorer les performances
    +
    + +

    Développement

    + +
    +
    mod_example Apache 1.2 et + supérieur
    + +
    Démonstration de l'API Apache
    +
    + +

    Obsolète

    + +
    +
    mod_browser Apache 1.2.* + seulement
    + +
    Définition de variables d'environnement en + fonction de la chaîne User-Agent. Ce module est + remplacé par mod_setenvif à partir de la + version 1.3
    + +
    mod_cookies jusqu'à + Apache 1.1.1
    + +
    Support des cookies Netscape. Ce module est + remplacé dans Apache 1.2 par le module + mod_usertrack
    + +
    mod_dld Apache 1.2.* et + précédents
    + +
    Lien au lancement en utilisant la librairie GNU libdld. + Ce module est remplcé dans Apache 1.3 par mod_so
    + +
    mod_log_common + jusqu'à Apache 1.1.1
    + +
    Trace des accès utilisant le "Common Logfile + Format". Ce module est remplacé par mod_log_config + à partir d'Apache 1.2
    +
    + + + + diff --git a/htdocs/manual/mod/index-bytype.html.html b/htdocs/manual/mod/index-bytype.html.html new file mode 100644 index 00000000000..18aca3abb22 --- /dev/null +++ b/htdocs/manual/mod/index-bytype.html.html @@ -0,0 +1,4 @@ + + + diff --git a/htdocs/manual/mod/index-bytype.html.ja.jis b/htdocs/manual/mod/index-bytype.html.ja.jis new file mode 100644 index 00000000000..172a7ca492c --- /dev/null +++ b/htdocs/manual/mod/index-bytype.html.ja.jis @@ -0,0 +1,272 @@ + + + + + + + Apache $B%b%8%e!<%k(B + + + + + + + +

    Apache $B%b%8%e!<%k(B

    + +

    Apache $B$NG[I[$K4^$^$l$F$$$k%b%8%e!<%k$O!"0J2<$NDL$j$G$9!#(B + $B%"%k%U%!%Y%C%H=g(B $B$d(B Apache + $B$NA4%G%#%l%/%F%#%V(B $B$N%"%k%U%!%Y%C%H=g%j%9%H$b;2>H$7$F$/$@$5$$!#(B + Apache $B$NG[I[$K4^$^$l$J$$(B Apache $B%b%8%e!<%k$K$D$$$F$O(B http://modules.apache.org + $B$r;2>H$7$F$/$@$5$$!#(B

    + +

    $B%3%"(B

    + +
    +
    Core
    + +
    Apache $B$N%3%"(B
    +
    + +

    $B4D6-JQ?t$NA`:n(B

    + +
    +
    mod_env
    + +
    CGI $B%9%/%j%W%H$KBP$7$F$5$^$6$^$J4D6-JQ?t$rEO$9(B
    + +
    mod_setenvif Apache 1.3 $B0J9_(B
    + +
    $B%/%i%$%"%s%H$N>pJs$r85$K4D6-JQ?t$r@_Dj$9$k(B
    + +
    mod_unique_id Apache 1.3 + and up
    + +
    $B%j%/%(%9%H$4$H$K!"0l0U$J%j%/%(%9%H(B ID $B$r@8@.$9$k(B
    +
    + +

    $B%3%s%F%s%D$N + +
    +
    mod_mime
    + +
    $B%U%!%$%k$N3HD%;R$rMxMQ$7$F%I%-%e%a%s%H%?%$%W$NH=Dj$r9T$J$&(B
    + +
    mod_mime_magic
    + +
    "$B%^%8%C%/%J%s%P!<(B" $B$rMxMQ$7$F%I%-%e%a%s%H%?%$%W$NH=Dj$r9T$J$&(B
    + +
    mod_negotiation
    + +
    $B%3%s%F%s%H%M%4%7%(!<%7%g%s5!G=$rDs6!$9$k(B
    +
    + +

    URL $B$N%^%C%T%s%0$r9T$&(B

    + +
    +
    mod_alias
    + +
    $B%[%9%H%U%!%$%k%7%9%F%`$N%I%-%e%a%s%H%D%j!<$X$N%^%C%T%s%05Z$S(B + URL $B$N%j%@%$%l%/%7%g%s$r9T$J$&(B
    + +
    mod_rewrite Apache 1.2 $B0J9_(B
    + +
    $B@55,I=8=$rMxMQ$7$?!"(BURI + $B$+$i%U%!%$%kL>$X$N6/NO$J%^%C%T%s%05!G=$rDs6!$9$k(B
    + +
    mod_userdir
    + +
    $B%f!<%6$N%[!<%`%G%#%l%/%H%j$K%"%/%;%9$9$k5!G=$rDs6!$9$k(B
    + +
    mod_speling Apache 1.3 $B0J9_(B
    + +
    URL $B$N>.$5$J5-=R%_%9$r<+F0E*$K=$@5$9$k(B
    + +
    mod_vhost_alias Apache 1.3.7 $B0J9_(B
    + +
    $B$?$/$5$s$N%P!<%A%c%k%[%9%H@_Dj$rF0E*$K9=@.$9$k(B
    +
    + +

    $B%G%#%l%/%H%j$r + +
    +
    mod_dir
    + +
    $B%G%#%l%/%H%j$N + +
    mod_autoindex
    + +
    $B<+F0E*$K%G%#%l%/%H%j0lMw$r:n@.$9$k(B
    +
    + +

    $B%"%/%;%9@)8f(B

    + +
    +
    mod_access
    + +
    $B%/%i%$%"%s%H$N%[%9%HL>$d(B IP $B%"%I%l%9$K$h$C$F%"%/%;%9@)8f$r9T$J$&(B
    + +
    mod_auth
    + +
    $B%F%-%9%H%U%!%$%k7A<0$NG'>Z%U%!%$%k$r;HMQ$7$?%f!<%6G'>Z5!G=$rDs6!$9$k(B
    + +
    mod_auth_dbm
    + +
    DBM $B7A<0$NG'>Z%U%!%$%k$r;HMQ$7$?%f!<%6G'>Z5!G=$rDs6!$9$k(B
    + +
    mod_auth_db
    + +
    Berkeley DB $B7A<0$NG'>Z%U%!%$%k$r;HMQ$7$?%f!<%6G'>Z5!G=$rDs6!$9$k(B
    + +
    mod_auth_anon Apache 1.1 $B0J9_(B
    + +
    $BG'>Z$,I,MW$H$J$k%(%j%"$X$NF?L>(B (anonymous) $B$G$N%"%/%;%95!G=$rDs6!$9$k(B
    + +
    mod_auth_digest Apache 1.3.8 $B0J9_(B
    + +
    MD5 $B$r;HMQ$7$?G'>Z5!G=(B ($BLuCm(B: Digest $BG'>Z(B) $B$rDs6!$9$k(B
    + +
    mod_digest Apache 1.1 $B0J9_(B
    + +
    MD5 $BG'>Z(B ($BLuCm(B: Digest $BG'>Z(B) $B5!G=$rDs6!$9$k(B + (mod_auth_digest $B$K$h$j!"(Bmod_digest $B$OHs?d>)$K$J$C$F$$$k(B)
    +
    + +

    HTTP $B%l%9%]%s%9(B

    + +
    +
    mod_headers Apache 1.2 $B0J9_(B
    + +
    $B%j%=!<%9$KG$0U$N(B HTTP $B%X%C%@$r2C$($k(B
    + +
    mod_cern_meta Apache 1.1 $B0J9_(B
    + +
    HTTP $B%X%C%@%a%?%U%!%$%k$r%5%]!<%H$9$k(B
    + +
    mod_expires Apache 1.2 $B0J9_(B
    + +
    $B%j%=!<%9$K(B Expires: $B%X%C%@$rE,MQ$9$k(B
    + +
    mod_asis
    + +
    HTTP $B%X%C%@$r4^$`%U%!%$%k$rAw?.$9$k(B
    +
    + +

    $BF0E*%3%s%F%s%D(B

    + +
    +
    mod_include
    + +
    SSI $B%I%-%e%a%s%H$rM-8z$K$9$k(B
    + +
    mod_cgi
    + +
    CGI $B%9%/%j%W%H$r + +
    mod_actions Apache 1.1 $B0J9_(B
    + +
    $B%a%G%#%"%?%$%W$d%j%/%(%9%H%a%=%C%I$K$h$C$F(B CGI + $B%9%/%j%W%H$r + +
    mod_isapi WIN32 $B$N$_(B
    + +
    Windows ISAPI $B%(%/%9%F%s%7%g%s$r%5%]!<%H$9$k(B
    +
    + +

    $BFbIt%3%s%F%s%D%O%s%I%i(B-

    + +
    +
    mod_status Apache 1.1 $B0J9_(B
    + +
    $B%5!<%P$N2TF0>u67$rI=<($9$k(B
    + +
    mod_info Apache 1.1 $B0J9_(B
    + +
    $B%5!<%P$N@_Dj>pJs$r1\Mw$9$k(B
    +
    + +

    $B%m%.%s%0(B

    + +
    +
    mod_log_config
    + +
    mod_log_common $B$NBe$o$j$H$J$k$b$N$G!"%f!<%6$,=q<0$r@_Dj$G$-$k(B
    + +
    mod_log_forensic
    + +
    $B%5!<%P$X$N%j%/%(%9%H$N(B forensic $B%m%0<}=8(B
    + +
    mod_log_agent
    + +
    User Agent $B$N%m%0$r5-O?$9$k(B
    + +
    mod_log_referer
    + +
    $B%I%-%e%a%s%H$N;2>H85(B (REFERER) $B$N%m%0$r5-O?$9$k(B
    + +
    mod_usertrack Apache 1.2 $B0J9_(B
    + +
    cookie $B$K$h$j%f!<%6$NDI@W$r9T$J$&(B (mod_cookies.c $B$rCV$-49$($?$b$N(B)
    +
    + +

    $B$=$NB>(B

    + +
    +
    mod_imap Apache 1.1 $B0J9_(B
    + +
    $B%$%a!<%8%^%C%W%U%!%$%k$r + +
    mod_proxy Apache 1.1 $B0J9_(B
    + +
    proxy $B%-%c%C%7%e5!G=$rDs6!$9$k(B
    + +
    mod_so Apache 1.3 $B0J9_(B
    + +
    $B + +
    mod_mmap_static Apache $B0J9_(B
    + +
    $B%U%!%$%k$N%-%c%C%7%s%0$r9T$J$&e$5$;$k(B
    +
    + +

    $B3+H/MQ(B

    + +
    +
    mod_example Apache 1.2 $B0J9_(B
    + +
    Apache API $B$N%G%b%s%9%H%l!<%7%g%sMQ(B
    +
    + +

    $B8=:_$G$OMxMQ$5$l$F$$$J$$%b%8%e!<%k(B

    + +
    +
    mod_browser Apache 1.2.* $B$N$_(B
    + +
    User-Agent $BJ8;zNs$r85$K4D6-JQ?t$r@_Dj$9$k!#(BApache 1.3 + $B0J9_$K$*$$$F!"(Bmod_setenvif $B$GCV$-49$($i$l$?(B
    + +
    mod_cookies Apache 1.1.1 $B0J9_(B
    + +
    Netscape $B$N$h$&$J(B cookie $B$r%5%]!<%H$9$k!#(B Apache 1.2 + $B$K$*$$$F!"(Bmod_usertrack $B$KCV$-49$($i$l$?(B
    + +
    mod_dld Apache 1.2.* $B0JA0(B
    + +
    GNU libdld $B$rMQ$$$F5/F0;~$K%b%8%e!<%k$N%j%s%/$r9T$J$&!#(BApache + 1.3 $B$K$*$$$F!"(Bmod_so $B$KCV$-49$($i$l$?(B
    + +
    mod_log_common Apache 1.1.1 $B0J9_(B
    + +
    Common Logfile Format + $B$G$NI8=`E*$J=q<0$K$h$j%m%0$r5-O?$9$k!#(BApache 1.2 + $B0J9_$K$*$$$F!"(Bmod_log_config $B%b%8%e!<%k$KCV$-49$($i$l$?(B
    +
    + + + + diff --git a/htdocs/manual/mod/index.html.en b/htdocs/manual/mod/index.html.en new file mode 100644 index 00000000000..719790a9351 --- /dev/null +++ b/htdocs/manual/mod/index.html.en @@ -0,0 +1,248 @@ + + + + + + + Apache modules + + + + + + +

    Apache modules

    + +

    Below is a list of all of the modules that come as part of + the Apache distribution. See also the list of modules sorted by type and the complete + alphabetical list of all Apache + directives. For Apache modules that are not part of the + Apache distribution, please see http://modules.apache.org

    + +
    +
    Core
    + +
    Core Apache features
    + +
    mod_access
    + +
    Access control based on client hostname or IP + address
    + +
    mod_actions Apache 1.1 and + up
    + +
    Executing CGI scripts based on media type or request + method
    + +
    mod_alias
    + +
    Mapping different parts of the host filesystem in the + document tree, and URL redirection
    + +
    mod_asis
    + +
    Sending files which contain their own HTTP headers
    + +
    mod_auth
    + +
    User authentication using text files
    + +
    mod_auth_anon Apache 1.1 + and up
    + +
    Anonymous user access to authenticated areas
    + +
    mod_auth_db Apache 1.1 and + up
    + +
    User authentication using Berkeley DB files
    + +
    mod_auth_dbm
    + +
    User authentication using DBM files
    + +
    mod_auth_digest Apache + 1.3.8 and up
    + +
    MD5 authentication
    + +
    mod_autoindex
    + +
    Automatic directory listings
    + +
    mod_browser Apache 1.2.* + only
    + +
    Set environment variables based on User-Agent strings. + Replaced by mod_setenvif in Apache 1.3 and up
    + +
    mod_cern_meta Apache 1.1 + and up
    + +
    Support for HTTP header metafiles
    + +
    mod_cgi
    + +
    Invoking CGI scripts
    + +
    mod_cookies up to Apache + 1.1.1
    + +
    Support for Netscape-like cookies. Replaced in Apache 1.2 + by mod_usertrack
    + +
    mod_digest Apache 1.1 and + up
    + +
    MD5 authentication (deprecated by mod_auth_digest)
    + +
    mod_dir
    + +
    Basic directory handling
    + +
    mod_dld Apache 1.2.* and + earlier
    + +
    Start-time linking with the GNU libdld. Replaced in + Apache 1.3 by mod_so
    + +
    mod_env Apache 1.1 and up
    + +
    Passing of environments to CGI scripts
    + +
    mod_example Apache 1.2 and + up
    + +
    Demonstrates Apache API
    + +
    mod_expires Apache 1.2 and + up
    + +
    Apply Expires: headers to resources
    + +
    mod_headers Apache 1.2 and + up
    + +
    Add arbitrary HTTP headers to resources
    + +
    mod_imap Apache 1.1 and + up
    + +
    The imagemap file handler
    + +
    mod_include
    + +
    Server-parsed documents
    + +
    mod_info Apache 1.1 and + up
    + +
    Server configuration information
    + +
    mod_isapi WIN32 only
    + +
    Windows ISAPI Extension support
    + +
    mod_log_agent
    + +
    Logging of User Agents
    + +
    mod_log_common up to + Apache 1.1.1
    + +
    Standard logging in the Common Logfile Format. Replaced + by the mod_log_config module in Apache 1.2 and up
    + +
    mod_log_config
    + +
    User-configurable logging replacement for + mod_log_common
    + +
    mod_log_forensic
    + +
    Forensic logging of requests made to the server
    + +
    mod_log_referer
    + +
    Logging of document references
    + +
    mod_mime
    + +
    Determining document types using file extensions
    + +
    mod_mime_magic
    + +
    Determining document types using "magic numbers"
    + +
    mod_mmap_static Apache + 1.3 and up
    + +
    Experimental file caching, mapping files into memory to + improve performance
    + +
    mod_negotiation
    + +
    Content negotiation
    + +
    mod_proxy Apache 1.1 and + up
    + +
    Caching proxy abilities
    + +
    mod_rewrite Apache 1.2 and + up
    + +
    Powerful URI-to-filename mapping using regular + expressions
    + +
    mod_setenvif Apache 1.3 + and up
    + +
    Set environment variables based on client + information
    + +
    mod_so Apache 1.3 and up
    + +
    Support for loading modules (.so's on Unix, .dll's on + Win32) at runtime
    + +
    mod_speling Apache 1.3 and + up
    + +
    Automatically correct minor typos in URLs
    + +
    mod_status Apache 1.1 and + up
    + +
    Server status display
    + +
    mod_unique_id Apache 1.3 + and up
    + +
    Generate unique request identifier for every request
    + +
    mod_userdir
    + +
    User home directories
    + +
    mod_usertrack Apache 1.2 + and up
    + +
    User tracking using Cookies (replacement for + mod_cookies.c)
    + +
    mod_vhost_alias Apache + 1.3.7 and up
    + +
    Support for dynamically configured mass virtual + hosting
    +
    + + + + diff --git a/htdocs/manual/mod/index.html.fr b/htdocs/manual/mod/index.html.fr new file mode 100644 index 00000000000..d399396fa5b --- /dev/null +++ b/htdocs/manual/mod/index.html.fr @@ -0,0 +1,272 @@ + + + + + + + + + Modules Apache + + + + + + +

    Modules Apache

    + +

    Ci dessous est donnée une liste des modules faisant + partie de la distribution Apache. Voir aussi la liste des + modules triés par type + et la liste complète alphabétique de toutes les directives d'Apache. Pour + les modules d'Apache qui ne font pas partie de la distribution, + vous pouvez consulter http://modules.apache.org

    + +
    +
    Base
    + +
    Fonctionnalités de base d'Apache
    + +
    mod_access
    + +
    Contrôle d'accès basé sur le nom du + client ou son adresse IP
    + +
    mod_actions Apache 1.1 et + supérieur
    + +
    Exécution de scripts CGI en fonction du type de + média ou de la requête
    + +
    mod_alias
    + +
    Association de différentes parties du + système de fichier de l'hôte dans l'arborescence + des documents, et redirection des URL.
    + +
    mod_asis
    + +
    Envoi de fichiers contenant leurs propres en-têtes + HTTP
    + +
    mod_auth
    + +
    Authentification des utilisateurs à partir d'un + fichier texte
    + +
    mod_auth_anon Apache 1.1 + et supérieur
    + +
    Accès aux utilisateurs anonymes à des zones + authentifiées
    + +
    mod_auth_db Apache 1.1 et + supérieur
    + +
    Authentification des utilisateurs à partir d'une + base Berkeley
    + +
    mod_auth_dbm
    + +
    Authentification des utilisateurs à partir d'un + fichier DBM
    + +
    mod_auth_digest Apache + 1.3.8 et supérieur
    + +
    Authentication des utilisateurs à partir d'un + fichier MD5 (expérimental)
    + +
    mod_autoindex
    + +
    Création automatique des listes des + répertoires
    + +
    mod_browser Apache 1.2.* + seulement
    + +
    Définition de variables d'environnement en + fonction de la chaîne User-Agent. Ce module est + remplacé par mod_setenvif à partir de la + version 1.3
    + +
    mod_cern_meta Apache 1.1 + et supérieur
    + +
    Support des métafichiers d'en-tête HTTP
    + +
    mod_cgi
    + +
    Appel des scripts CGI
    + +
    mod_cookies jusqu'à + Apache 1.1.1
    + +
    Support des cookies Netscape. Ce module est + remplacé dans Apache 1.2 par le module + mod_usertrack
    + +
    mod_digest Apache 1.1 et + supérieur
    + +
    Authentication MD5
    + +
    mod_dir
    + +
    Gestion de base des répertoires
    + +
    mod_dld Apache 1.2.* et + précédents
    + +
    Lien au lancement en utilisant la librairie GNU libdld. + Ce module est remplcé dans Apache 1.3 par mod_so
    + +
    mod_env Apache 1.1 et + supérieur
    + +
    Passage d'environnement aux scripts CGI
    + +
    mod_example Apache 1.2 et + supérieur
    + +
    Démonstration de l'API Apache
    + +
    mod_expires Apache 1.2 et + supérieur
    + +
    Ajout de l'en-tête Expires: pour les ressources + spécifiées
    + +
    mod_headers Apache 1.2 et + supérieur
    + +
    Ajout d'en-têtes HTTP aux ressources
    + +
    mod_imap Apache 1.1 et + supérieur
    + +
    Gestion des fichiers imagemap
    + +
    mod_include
    + +
    Documents analysés par le serveur
    + +
    mod_info Apache 1.1 et + supérieur
    + +
    Informations sur la configuration du serveur
    + +
    mod_isapi WIN32 + seulement
    + +
    Support des extensions Windows ISAPI
    + +
    mod_log_agent
    + +
    Trace des User Agents
    + +
    mod_log_common + jusqu'à Apache 1.1.1
    + +
    Trace des accès utilisant le "Common Logfile + Format". Ce module est remplacé par mod_log_config + à partir d'Apache 1.2
    + +
    mod_log_config
    + +
    Trace configurable des accès. Remplace + mod_log_common
    + +
    mod_log_forensic
    + +
    Forensic logging of requests made to the server
    + +
    mod_log_referer
    + +
    Trace des référants d'un document
    + +
    mod_mime
    + +
    Détermination du type des documents en fonction de + l'extension du fichier
    + +
    mod_mime_magic
    + +
    Détermination du type des documents en fonction de + "nombres magiques"
    + +
    mod_mmap_static Apache + 1.3 et supérieur
    + +
    Module expérimental de cache mémoire des + fichiers afin d'améliorer les performances
    + +
    mod_negotiation
    + +
    Négotiation de contenu
    + +
    mod_proxy Apache 1.1 et + supérieur
    + +
    Module de cache par proxy
    + +
    mod_rewrite Apache 1.2 et + supérieur
    + +
    Association des URI à des fichiers en utilisant + des expressions régulières
    + +
    mod_setenvif Apache 1.3 + et supérieur
    + +
    Définition de variables d'environnement en + fonction des informations client
    + +
    mod_so Apache 1.3 et + supérieur
    + +
    Support des modules dynamiques (.so sur Unix, .dll sur + Win32)
    + +
    mod_speling Apache 1.3 et + supérieur
    + +
    Correction automatique d'erreurs de frappe mineures dans + les URL
    + +
    mod_status Apache 1.1 et + supérieur
    + +
    Affichage de l'état du système
    + +
    mod_userdir
    + +
    Répertoires personnels d'utilisateurs
    + +
    mod_unique_id Apache 1.3 + et supérieur
    + +
    Génération d'identifiants uniques de + requête
    + +
    mod_usertrack Apache 1.2 + et supérieur
    + +
    Suivi des utilisateurs à l'aide de cookies + (remplacement de mod_cookies)
    + +
    mod_vhost_alias Apache + 1.3.7 et supérieur
    + +
    Support d'hôtes virtuels dynamiquement + configurables
    +
    + + + + diff --git a/htdocs/manual/mod/index.html.html b/htdocs/manual/mod/index.html.html new file mode 100644 index 00000000000..f2710912dc8 --- /dev/null +++ b/htdocs/manual/mod/index.html.html @@ -0,0 +1,4 @@ + + + diff --git a/htdocs/manual/mod/index.html.ja.jis b/htdocs/manual/mod/index.html.ja.jis new file mode 100644 index 00000000000..2935b70913e --- /dev/null +++ b/htdocs/manual/mod/index.html.ja.jis @@ -0,0 +1,248 @@ + + + + + + Apache $B%b%8%e!<%k(B + + + + + + + +

    Apache $B%b%8%e!<%k(B

    + +

    Apache $B$NG[I[$K4^$^$l$F$$$k%b%8%e!<%k$O!"0J2<$NDL$j$G$9!#(B + $B $B$d(B + Apache $B$NA4%G%#%l%/%F%#%V(B + $B$N%"%k%U%!%Y%C%H=g%j%9%H$b;2>H$7$F$/$@$5$$!#(B + Apache $B$NG[I[$K4^$^$l$J$$(B Apache $B%b%8%e!<%k$K$D$$$F$O(B + http://modules.apache.org $B$r;2>H$7$F$/$@$5$$!#(B

    + +
    +
    Core
    + +
    Apache $B$N%3%"(B
    + +
    mod_access
    + +
    $B%/%i%$%"%s%H$N%[%9%HL>$d(B IP + $B%"%I%l%9$K$h$C$F%"%/%;%9@)8f$r9T$J$&(B
    + +
    mod_actions + Apache 1.1 $B0J9_(B
    + +
    $B%a%G%#%"%?%$%W$d%j%/%(%9%H%a%=%C%I$K$h$C$F(B CGI + $B%9%/%j%W%H$r + +
    mod_alias
    + +
    $B%[%9%H%U%!%$%k%7%9%F%`$N%I%-%e%a%s%H%D%j!<$X$N%^%C%T%s%05Z$S(B + URL $B$N%j%@%$%l%/%7%g%s$r9T$J$&(B
    + +
    mod_asis
    + +
    HTTP $B%X%C%@$r4^$`%U%!%$%k$rAw?.$9$k(B
    + +
    mod_auth
    + +
    $B%F%-%9%H%U%!%$%k7A<0$NG'>Z%U%!%$%k$r;HMQ$7$?(B + $B%f!<%6G'>Z5!G=$rDs6!$9$k(B
    + +
    mod_auth_anon + Apache 1.1 $B0J9_(B
    + +
    $BG'>Z$,I,MW$H$J$k%(%j%"$X$NF?L>(B (anonymous) + $B$G$N%"%/%;%95!G=$rDs6!$9$k(B
    + +
    mod_auth_db + Apache 1.1 $B0J9_(B
    + +
    Berkeley DB + $B7A<0$NG'>Z%U%!%$%k$r;HMQ$7$?%f!<%6G'>Z5!G=$rDs6!$9$k(B
    + +
    mod_auth_dbm
    + +
    DBM $B7A<0$NG'>Z%U%!%$%k$r;HMQ$7$?%f!<%6G'>Z5!G=$rDs6!$9$k(B
    + +
    mod_auth_digest + Apache 1.3.8 $B0J9_(B
    + +
    MD5 $B$r;HMQ$7$?G'>Z5!G=(B ($BLuCm(B: Digest $BG'>Z(B) + $B$rDs6!$9$k(B
    + +
    mod_autoindex
    + +
    $B<+F0E*$K%G%#%l%/%H%j0lMw$r:n@.$9$k(B
    + +
    mod_browser + Apache 1.2.* $B$G$N$_M-8z(B
    + +
    User-Agent $BJ8;zNs$r85$K4D6-JQ?t$r@_Dj$9$k!#(B + Apache 1.3 $B0J9_$K$*$$$F!"(Bmod_setenvif $B$GCV$-49$($i$l$?(B
    + +
    mod_cern_meta + Apache 1.1 $B0J9_(B
    + +
    HTTP $B%X%C%@%a%?%U%!%$%k$r%5%]!<%H$9$k(B
    + +
    mod_cgi
    + +
    CGI $B%9%/%j%W%H$r + +
    mod_cookies + Apache 1.1.1 $B0J9_(B
    + +
    Netscape $B$N$h$&$J(B cookie $B$r%5%]!<%H$9$k!#(B + Apache 1.2 $B$K$*$$$F!"(Bmod_usertrack $B$KCV$-49$($i$l$?(B
    + +
    mod_digest Apache 1.1 $B0J9_(B
    + +
    MD5 $BG'>Z(B ($BLuCm(B: Digest $BG'>Z(B) $B5!G=$rDs6!$9$k(B + (mod_auth_digest $B$K$h$j!"(Bmod_digest $B$OHs?d>)$K$J$C$F$$$k(B)
    + +
    mod_dir
    + +
    $B%G%#%l%/%H%j$N + +
    mod_dld + Apache 1.2.* $B5Z$S$=$l0JA0(B
    + +
    GNU libdld $B$rMQ$$$F5/F0;~$K%b%8%e!<%k$N%j%s%/$r9T$J$&!#(B + Apache 1.3 $B$K$*$$$F!"(Bmod_so $B$KCV$-49$($i$l$?(B
    + +
    mod_env Apache 1.1 $B0J9_(B
    + +
    CGI $B%9%/%j%W%H$KEO$94D6-JQ?t$NA`:n$r9T$J$&(B
    + +
    mod_example + Apache 1.2 $B0J9_(B
    + +
    Apache API $B$N%G%b%s%9%H%l!<%7%g%sMQ(B
    + +
    mod_expires + Apache 1.2 $B0J9_(B
    + +
    $B%j%=!<%9$K(B Expires: $B%X%C%@$rE,MQ$9$k(B
    + +
    mod_headers + Apache 1.2 $B0J9_(B
    + +
    $B%j%=!<%9$KG$0U$N(B HTTP $B%X%C%@$r2C$($k(B
    + +
    mod_imap Apache 1.1 $B0J9_(B
    + +
    $B%$%a!<%8%^%C%W%U%!%$%k$r + +
    mod_include
    + +
    SSI $B%I%-%e%a%s%H$rM-8z$K$9$k(B
    + +
    mod_info Apache 1.1 $B0J9_(B
    + +
    $B%5!<%P$N@_Dj>pJs$r1\Mw$9$k(B
    + +
    mod_isapi WIN32 $B$N$_(B
    + +
    Windows ISAPI $B%(%/%9%F%s%7%g%s$r%5%]!<%H$9$k(B
    + +
    mod_log_agent
    + +
    User Agent $B$N%m%0$r5-O?$9$k(B
    + +
    mod_log_common + Apache 1.1.1 $B0J9_(B
    + +
    Common Logfile Format $B$G$NI8=`E*$J=q<0$K$h$j%m%0$r5-O?$9$k!#(B + Apache 1.2 $B0J9_$K$*$$$F!"(Bmod_log_config + $B%b%8%e!<%k$KCV$-49$($i$l$?(B
    + +
    mod_log_config
    + +
    mod_log_common + $B$NBe$o$j$H$J$k$b$N$G!"%f!<%6$,=q<0$r@_Dj$G$-$k(B
    + +
    mod_log_forensic
    + +
    $B%5!<%P$X$N%j%/%(%9%H$N(B forensic $B%m%0<}=8(B
    + +
    mod_log_referer
    + +
    $B%I%-%e%a%s%H$N;2>H85(B (REFERER) $B$N%m%0$r5-O?$9$k(B
    + +
    mod_mime
    + +
    $B%U%!%$%k$N3HD%;R$rMxMQ$7$F%I%-%e%a%s%H%?%$%W$NH=Dj$r9T$J$&(B
    + +
    mod_mime_magic
    + +
    "$B%^%8%C%/%J%s%P!<(B" + $B$rMxMQ$7$F%I%-%e%a%s%H%?%$%W$NH=Dj$r9T$J$&(B
    + +
    mod_mmap_static + Apache 1.3 $B0J9_(B
    + +
    $B%U%!%$%k$N%-%c%C%7%s%0$r9T$J$&e$5$;$k(B
    + +
    mod_negotiation
    + +
    $B%3%s%F%s%H%M%4%7%(!<%7%g%s5!G=$rDs6!$9$k(B
    + +
    mod_proxy Apache 1.1 $B0J9_(B
    + +
    proxy $B%-%c%C%7%e5!G=$rDs6!$9$k(B
    + +
    mod_rewrite + Apache 1.2 $B0J9_(B
    + +
    $B@55,I=8=$rMxMQ$7$?!"(BURI + $B$+$i%U%!%$%kL>$X$N6/NO$J%^%C%T%s%05!G=$rDs6!$9$k(B
    + +
    mod_setenvif + Apache 1.3 $B0J9_(B
    + +
    $B%/%i%$%"%s%H$N>pJs$r85$K4D6-JQ?t$r%;%C%H$9$k(B
    + +
    mod_so Apache 1.3 $B0J9_(B
    + +
    $B + +
    mod_speling + Apache 1.3 $B0J9_(B
    + +
    URL $B$N>.$5$J5-=R%_%9$r<+F0E*$K=$@5$9$k(B
    + +
    mod_status Apache 1.1 $B0J9_(B
    + +
    $B%5!<%P$N2TF0>u67$rI=<($9$k(B
    + +
    mod_userdir
    + +
    $B%f!<%6$N%[!<%`%G%#%l%/%H%j$K%"%/%;%9$9$k5!G=$rDs6!$9$k(B
    + +
    mod_unique_id + Apache 1.3 $B0J9_(B
    + +
    $B%j%/%(%9%H$4$H$K!"0l0U$J%j%/%(%9%H(B ID $B$r@8@.$9$k(B
    + +
    mod_usertrack + Apache 1.2 $B0J9_(B
    + +
    cookie $B$K$h$j%f!<%6$NDI@W$r9T$J$&(B + (mod_cookies.c $B$rCV$-49$($?$b$N(B)
    + +
    mod_vhost_alias + Apache 1.3.7 $B0J9_(B
    + +
    $B$?$/$5$s$N%P!<%A%c%k%[%9%H@_Dj$rF0E*$K9=@.$9$k(B
    +
    + + + diff --git a/htdocs/manual/mod/mod_access.html.en b/htdocs/manual/mod/mod_access.html.en new file mode 100644 index 00000000000..6b47ed347fa --- /dev/null +++ b/htdocs/manual/mod/mod_access.html.en @@ -0,0 +1,340 @@ + + + + + + + Apache module mod_access + + + + + + +

    Module mod_access

    + +

    This module provides access control based on client + hostname, IP address, or other characteristics of the client + request.

    + +

    Status: Base
    + Source File: mod_access.c
    + Module Identifier: + access_module

    + +

    Summary

    + +

    The directives provided by mod_access are used in <Directory>, <Files>, and <Location> sections + as well as .htaccess files to + control access to particular parts of the server. Access can be + controlled based on the client hostname, IP address, or other + characteristics of the client request, as captured in environment variables. The + Allow and Deny directives are used to + specify which clients are or are not allowed access to the + server, while the Order directive sets the default + access state, and configures how the Allow and + Deny directives interact with each other.

    + +

    Both host-based access restrictions and password-based + authentication may be implemented simultaneously. In that case, + the Satisfy directive is used + to determine how the two sets of restrictions interact.

    + +

    In general, access restriction directives apply to all + access methods (GET, PUT, + POST, etc). This is the desired behavior in most + cases. However, it is possible to restrict some methods, while + leaving other methods unrestricted, by enclosing the directives + in a <Limit> section.

    + +

    Directives

    + + + +

    See also Satisfy and Require.

    +
    + +

    Allow directive

    + +

    + Syntax: Allow from + all|host|env=env-variable + [host|env=env-variable] ...
    + Context: directory, + .htaccess
    + Override: Limit
    + Status: Base
    + Module: mod_access

    + +

    The Allow directive affects which hosts can + access an area of the server. Access can be controlled by + hostname, IP Address, IP Address range, or by other + characteristics of the client request captured in environment + variables.

    + +

    The first argument to this directive is always + from. The subsequent arguments can take three + different forms. If Allow from all is specified, + then all hosts are allowed access, subject to the configuration + of the Deny and Order directives as + discussed below. To allow only particular hosts or groups of + hosts to access the server, the host can be specified + in any of the following formats:

    + +
    +
    A (partial) domain-name
    + +
    Example: Allow from apache.org
    + Hosts whose names match, or end in, this string are allowed + access. Only complete components are matched, so the above + example will match foo.apache.org but it will + not match fooapache.org. This configuration will + cause the server to perform a double reverse DNS lookup on the + client IP address, regardless of the setting of the HostnameLookups + directive. It will do a reverse DNS lookup on the IP address to + find the associated hostname, and then do a forward lookup on + the hostname to assure that it matches the original IP address. + Only if the forward and reverse DNS are consistent and the + hostname matches will access be allowed.
    + +
    A full IP address
    + +
    Example: Allow from 10.1.2.3
    + An IP address of a host allowed access
    + +
    A partial IP address
    + +
    Example: Allow from 10.1
    + The first 1 to 3 bytes of an IP address, for subnet + restriction.
    + +
    A network/netmask pair
    + +
    Example: Allow from + 10.1.0.0/255.255.0.0
    + A network a.b.c.d, and a netmask w.x.y.z. For more + fine-grained subnet restriction. (Apache 1.3 and later)
    + +
    A network/nnn CIDR specification
    + +
    Example: Allow from 10.1.0.0/16
    + Similar to the previous case, except the netmask consists of + nnn high-order 1 bits. (Apache 1.3 and later)
    +
    + +

    Note that the last three examples above match exactly the + same set of hosts.

    + +

    The third format of the arguments to the Allow + directive allows access to the server to be controlled based on + the existence of an environment + variable. When Allow from + env=env-variable is specified, then the request + is allowed access if the environment variable + env-variable exists. The server provides the ability + to set environment variables in a flexible way based on + characteristics of the client request using the directives + provided by mod_setenvif. + Therefore, this directive can be used to allow access based on + such factors as the clients User-Agent (browser + type), Referer, or other HTTP request header + fields.

    + +

    Example:

    + +
    +
    +SetEnvIf User-Agent ^KnockKnock/2\.0 let_me_in
    +<Directory /docroot>
    +    Order Deny,Allow
    +    Deny from all
    +    Allow from env=let_me_in
    +</Directory>
    +
    +
    + +

    In this case, browsers with a user-agent string beginning + with KnockKnock/2.0 will be allowed access, and all + others will be denied.

    + +

    See also Deny, Order and SetEnvIf.

    +
    + +

    Deny directive

    + +

    + Syntax: Deny from + all|host|env=env-variable + [host|env=env-variable] ...
    + Context: directory, + .htaccess
    + Override: Limit
    + Status: Base
    + Module: mod_access

    + +

    This directive allows access to the server to be restricted + based on hostname, IP address, or environment variables. The + arguments for the Deny directive are identical to + the arguments for the Allow directive.

    + +

    See also Allow, Order and SetEnvIf.

    +
    + +

    Order directive

    + +

    + Syntax: Order + ordering
    + Default: Order + Deny,Allow
    + Context: directory, + .htaccess
    + Override: Limit
    + Status: Base
    + Module: mod_access

    + +

    The Order directive controls the default access + state and the order in which Allow and Deny directives are evaluated. + Ordering is one of

    + +
    +
    Deny,Allow
    + +
    The Deny directives are evaluated before the + Allow directives. Access is allowed by default. + Any client which does not match a Deny directive + or does match an Allow directive will be allowed + access to the server.
    + +
    Allow,Deny
    + +
    The Allow directives are evaluated before + the Deny directives. Access is denied by + default. Any client which does not match an + Allow directive or does match a + Deny directive will be denied access to the + server.
    + +
    Mutual-failure
    + +
    Only those hosts which appear on the Allow + list and do not appear on the Deny list are + granted access. This ordering has the same effect as + Order Allow,Deny and is deprecated in favor of + that configuration.
    +
    + +

    Keywords may only be separated by a comma; no whitespace is + allowed between them. Note that in all cases every + Allow and Deny statement is + evaluated.

    + +

    In the following example, all hosts in the apache.org domain + are allowed access; all other hosts are denied access.

    + +
    + Order Deny,Allow
    + Deny from all
    + Allow from apache.org
    +
    +
    + +

    In the next example, all hosts in the apache.org domain are + allowed access, except for the hosts which are in the + foo.apache.org subdomain, who are denied access. All hosts not + in the apache.org domain are denied access because the default + state is to deny access to the server.

    + +
    + Order Allow,Deny
    + Allow from apache.org
    + Deny from foo.apache.org
    +
    +
    + +

    On the other hand, if the Order in the last + example is changed to Deny,Allow, all hosts will + be allowed access. This happens because, regardless of the + actual ordering of the directives in the configuration file, + the Allow from apache.org will be evaluated last + and will override the Deny from foo.apache.org. + All hosts not in the apache.org domain will also + be allowed access because the default state will change to + allow.

    + +

    The presence of an Order directive can affect + access to a part of the server even in the absence of + accompanying Allow and Deny + directives because of its effect on the default access state. + For example,

    + +
    + <Directory /www>
    +   Order Allow,Deny
    + </Directory>
    +
    + +

    will deny all access to the /www directory + because the default access state will be set to + deny.

    + +

    The Order directive controls the order of + access directive processing only within each phase of the + server's configuration processing. This implies, for example, + that an Allow or Deny directive + occurring in a <Location> section will always be + evaluated after an Allow or Deny + directive occurring in a <Directory> section or + .htaccess file, regardless of the setting of the + Order directive. For details on the merging of + configuration sections, see the documentation on How Directory, Location and Files + sections work.

    + +

    See also: Deny and Allow. +

    + + + diff --git a/htdocs/manual/mod/mod_access.html.html b/htdocs/manual/mod/mod_access.html.html new file mode 100644 index 00000000000..bf6d8c4e8a1 --- /dev/null +++ b/htdocs/manual/mod/mod_access.html.html @@ -0,0 +1,4 @@ + + + diff --git a/htdocs/manual/mod/mod_access.html.ja.jis b/htdocs/manual/mod/mod_access.html.ja.jis new file mode 100644 index 00000000000..4b9dca5d6b2 --- /dev/null +++ b/htdocs/manual/mod/mod_access.html.ja.jis @@ -0,0 +1,339 @@ + + + + + + Apache module mod_access + + + + + + + +

    mod_access $B%b%8%e!<%k(B

    + +

    $B$3$N%b%8%e!<%k$O%/%i%$%"%s%H$N%[%9%HL>!"(BIP + $B%"%I%l%9!"$=$NB>$N%/%i%$%"%s%H$N%j%/%(%9%H$NFCD'$K4p$E$$$?(B + $B%"%/%;%9@)8f5!G=$rDs6!$7$^$9!#(B

    + +

    $B%9%F!<%?%9(B: Base
    + $B%=!<%9%U%!%$%k(B: mod_access.c
    + $B%b%8%e!<%k<1JL;R(B: + access_module

    + +

    $B35MW(B

    + +

    mod_access $B$K$h$jDs6!$5$l$k%G%#%l%/%F%#%V$O%5!<%P$NFCDj$NItJ,$X$N(B + $B%"%/%;%9$r@)8f$9$k$?$a$K(B <Directory>, <Files>, <Location> $B$H(B .htaccess $B%U%!%$%k$G;HMQ$5$l$^$9!#%/%i%$%"%s%H$N%[%9%HL>!"(BIP + $B%"%I%l%9$d(B $B4D6-JQ?t(B$B$H$7$F$N%j%/%(%9%H$NFCD'$K4p$E$$$F(B + $B%"%/%;%9@)8f$r9T$J$&$3$H$,$G$-$^$9!#(BAllow $B$H(B + Deny $B%G%#%l%/%F%#%V$O$I$N$h$&$J%/%i%$%"%s%H$K%"%/%;%9$r(B + $B5v2D$9$k!"$7$J$$$+$r;XDj$9$k$?$a$K;HMQ$5$l$^$9!#0lJ}!"(B + Order $B%G%#%l%/%F%#%V$O%G%U%)%k%H$N%"%/%;%9>uBV$H!"(B + Allow $B%G%#%l%/%F%#%V$H(B Deny + $B%G%#%l%/%F%#%V$H$N$*8_$$$X$N1F6A$N;EJ}$r@_Dj$7$^$9!#(B +

    + +

    $B%[%9%H$K$h$k%"%/%;%9@)8B$H%Q%9%o!<%I$K$h$kG'>Z$rF1;~$K(B + $B9T$J$&$3$H$,2DG=$G$9!#$=$N>l9g!"$=$NFs$D$N@)8B$N4X78$r;XDj$9$k$?$a$K(B + Satisfy + $B%G%#%l%/%F%#%V$r;HMQ$7$^$9!#(B

    + +

    $B0lHLE*$K$O!"%"%/%;%9@)8B%G%#%l%/%F%#%V$O$9$Y$F$N%"%/%;%9%a%=%C%I(B + (GET, PUT, POST $B$J$I(B) + $B$KE,MQ$5$l$^$9!#$=$7$F!"$[$H$s$I$N>l9g$3$l$,K>$^$7$$F0:n$G$9!#(B + $B$7$+$7!"(B<Limit> + $B%;%/%7%g%s$NCf$K%G%#%l%/%F%#%V$r=q$/$3$H$G!"(B + $B0lIt$N%a%=%C%I$K$N$_@)8B$r$+$1$k$3$H$b$G$-$^$9!#(B

    + +

    $B%G%#%l%/%F%#%V(B

    + + + +

    Satisfy $B$H(B + Require $B$b;2>H$7$F$/$@$5$$!#(B

    +
    + +

    Allow $B%G%#%l%/%F%#%V(B

    + +

    + $B9=J8(B: Allow from + all|host|env=env-variablename + [host|env=env-variablename] ...
    + $B%3%s%F%-%9%H(B: $B%G%#%l%/%H%j!"(B + .htaccess
    + $B>e=q$-(B: Limit
    + $B%9%F!<%?%9(B: Base
    + $B%b%8%e!<%k(B: mod_access

    + +

    Allow $B%G%#%l%/%F%#%V$O$I$N%[%9%H$,(B + $B%5!<%P$N$"$kNN0h$r%"%/%;%9$G$-$k$+$K1F6A$rM?$($^$9!#(B + $B%"%/%;%9$O%[%9%HL>!"(BIP $B%"%I%l%9!"(BIP $B%"%I%l%9$NHO0O$d!"(B + $B4D6-JQ?t$H$7$F$N%/%i%$%"%s%H$N%j%/%(%9%H$N(B + $BFCD'$K$h$C$F@)8f$9$k$3$H$,$G$-$^$9!#(B

    + +

    $B$3$N%G%#%l%/%F%#%V$N:G=i$N0z?t$O>o$K(B from $B$G$9!#(B + $B$=$l$KB3$/0z?t$O;0$D$N0c$C$?7A<0$,$"$j$^$9!#(BAllow from + all $B$,;XDj$5$l$F$$$l$P!"$9$Y$F$N%[%9%H$K%"%/%;%9$r5v2D$7!"(B + $B%"%/%;%9@)8B$O2<$G@bL@$5$l$F$$$k$h$&$K!"(BDeny + $B%G%#%l%/%F%#%V$H(B Order + $B%G%#%l%/%F%#%V$N@_Dj$G7h$^$j$^$9!#(B + $BFCDj$N%[%9%H$d%[%9%H72$K$N$_%5!<%P$X$N%"%/%;%9$r5v2D$9$k$?$a$K$O!"(B + $B0J2<$N$I$l$+$N7A<0$G(B host $B$r;XDj$9$k$3$H$,$G$-$^$9(B:

    + +
    +
    $B%I%a%$%sL>(B ($B$N0lIt(B)
    + +
    $BNc(B: Allow from apache.org
    + $B$3$NJ8;zNs$K9g$&$+!"$3$l$G=*$o$kL>A0$N%[%9%H$N%"%/%;%9$,5v2D$5$l$^$9!#(B + $B3FItJ,$,40A4$K9g$&$b$N$@$1$KE,MQ$5$l$^$9$N$G!">e$NNc$O(B + foo.apache.org $B$K$O%^%C%A$7$^$9$,!"(B + fooapache.org $B$K$O%^%C%A$7$^$;$s!#(B + $B$3$N@_Dj$r$9$k$H!"%5!<%P$O(B + HostnameLookups + $B$N@_Dj$K4X$o$i$:!"%/%i%$%"%s%H$N(B IP $B%"%I%l%9$KBP$7$F(B + DNS $B$NFs=E$N5U0z$-$r9T$J$$$^$9!#$3$l$O(B IP $B%"%I%l%9$G(B DNS + $B$N5U0z$-$r9T$J$C$F$=$l$K4XO"IU$1$i$l$?%[%9%HL>$r8+$D$1!"(B + $B$=$l$+$i%[%9%HL>$G@50z$-$r9T$J$C$F%*%j%8%J%k$N(B IP + $B%"%I%l%9$H0lCW$9$k$+3NG'$7$^$9!#%"%/%;%9$O@50z$-$H5U0z$-$KL7=b$,L5$/!"(B + $B%[%9%HL>$,0lCW$7$?>l9g$K8B$j5v2D$5$l$^$9!#(B
    + +
    $B40A4$J(B IP $B%"%I%l%9(B
    + +
    $BNc(B: Allow from 10.1.2.3
    + $B%"%/%;%9$r5v2D$9$k(B IP $B%"%I%l%9$G$9!#(B
    + +
    IP $B%"%I%l%9$N0lIt(B
    + +
    $BNc(B: Allow from 10.1
    + $B%5%V%M%C%H$N@)8BMQ$N!"(BIP + $B%"%I%l%9$N:G=i$N0l$D$+$i;0$D$^$G$N%P%$%H$G$9!#(B
    + +
    $B%M%C%H%o!<%/(B/$B%M%C%H%^%9%/(B $B$NBP(B
    + +
    $BNc(B: Allow from 10.1.0.0/255.255.0.0
    + $B%M%C%H%o!<%/(B a.b.c.d $B$H%M%C%H%^%9%/(B w.x.y.z $B$G$9!#(B + $B$h$j:YN3EY$N%5%V%M%C%H@)8BMQ$G$9!#(B(Apache 1.3 $B0J9_(B)
    + +
    $B%M%C%H%o!<%/(B/nnn CIDR $B;XDj(B
    + +
    $BNc(B: Allow from 10.1.0.0/16
    + $B%M%C%H%^%9%/$,(B nnn $B$N>e0L%S%C%H$,(B 1 + $B$H$J$C$F$$$k$b$N$+$i$J$k$3$H0J30$OA0$N$b$N$HF1$8$G$9!#(B + (Apache 1.3 $B0J9_(B)
    +
    + +

    $BCm(B: $B:G8e$N;0$D$NNc$O$^$C$?$/F1$8%[%9%H$K9g$$$^$9!#(B

    + + +

    Allow $B%G%#%l%/%F%#%V$N0z?t$N;0$DL\$N7A<0$O!"(B + $B4D6-JQ?t(B + $B$NB8:_$K$h$j%"%/%;%9$N@)8f$r9T$J$($k$h$&$K$9$k$b$N$G$9!#(B + Allow from env=variablename + $B$,;XDj$5$l$F$$$k$H!"4D6-JQ?t(B variablename + $B$,B8:_$7$?>l9g$K%j%/%(%9%H$O%"%/%;%9$r5v2D$5$l$^$9!#%5!<%P$O(B + mod_setenvif + $B$N%G%#%l%/%F%#%V$K$h$j!"%/%i%$%"%s%H$N%j%/%(%9%H(B + $B$NFCD'$K4p$E$$$F=@Fp$K4D6-JQ?t$r@_Dj$9$k5!G=$rDs6!$7$^$9!#(B + $B$G$9$+$i!"$3$N%G%#%l%/%F%#%V$O%/%i%$%"%s%H$N(B + User-Agent ($B%V%i%&%6$NReferer + $B$dB>$N(B HTTP $B%j%/%(%9%H$N%X%C%@%U%#!<%k%I$J$I$K4p$E$$$F(B + $B%"%/%;%95v2D$r$9$k$?$a$K;H$&$3$H$,$G$-$^$9!#(B +

    + +

    $BNc(B:

    + +
    +
    +SetEnvIf User-Agent ^KnockKnock/2\.0 let_me_in
    +<Directory /docroot>
    +    Order Deny,Allow
    +    Deny from all
    +    Allow from env=let_me_in
    +</Directory>
    +
    +
    + +

    $B$3$N>l9g!"(Buser-agent $B$NJ8;zNs$,(B KnockKnock/2.0 + $B$G;O$^$k%V%i%&%6$N$_$,%"%/%;%9$r5v2D$5$l!"(B + $BB>$N$b$N$O%"%/%;%9$r5qH]$5$l$^$9!#(B

    + +

    Deny, Order, + SetEnvIf + $B%G%#%l%/%F%#%V$b;2>H$7$F$/$@$5$$!#(B

    +
    + +

    Deny $B%G%#%l%/%F%#%V(B

    + +

    + $B9=J8(B: Deny from + all|host|env=variablename + [host|env=variablename] ...
    + $B%3%s%F%-%9%H(B: $B%G%#%l%/%H%j!"(B + .htaccess
    + $B>e=q$-(B: Limit
    + $B%9%F!<%?%9(B: Base
    + $B%b%8%e!<%k(B: mod_access

    + +

    $B$3$N%G%#%l%/%F%#%V$O%[%9%HL>!"(BIP + $B%"%I%l%9!"4D6-JQ?t$K4p$E$$$F%5!<%P$X$N%"%/%;%9$r@)8B$7$^$9!#(B + Deny $B%G%#%l%/%F%#%V$N0z?t$O(B Allow + $B%G%#%l%/%F%#%V$H$^$C$?$/F1$8$G$9!#(B

    + +

    Allow, Order, + SetEnvIf + $B$b;2>H$7$F$/$@$5$$!#(B

    +
    + +

    Order $B%G%#%l%/%F%#%V(B

    + +

    + $B9=J8(B: Order + ordering
    + $B%G%U%)%k%H(B: Order + Deny,Allow
    + $B%3%s%F%-%9%H(B: $B%G%#%l%/%H%j!"(B + .htaccess
    + $B>e=q$-(B: Limit
    + $B%9%F!<%?%9(B: Base
    + $B%b%8%e!<%k(B: mod_access

    + +

    Order $B%G%#%l%/%F%#%V$O%G%U%)%k%H$N%"%/%;%9$N>uBV$H(B + Allow $B%G%#%l%/%F%#%V$H(B Deny + $B%G%#%l%/%F%#%V$,I>2A$5$l$k=gHV$r@)8f$7$^$9!#(B + Ordering $B$O0J2<$N$I$l$+$G$9!#(B

    + +
    +
    Deny,Allow
    + +
    Deny $B%G%#%l%/%F%#%V$,(B Allow + $B%G%#%l%/%F%#%V$NA0$KI>2A$5$l$^$9!#(B + $B%"%/%;%9$O%G%U%)%k%H$G5v2D$5$l$^$9!#(BDeny + $B%G%#%l%/%F%#%V$K9g$o$J$$$+!"(BAllow + $B%G%#%l%/%F%#%V$K9g$&%/%i%$%"%s%H$O%"%/%;%9$r5v2D$5$l$^$9!#(B
    + +
    Allow,Deny
    + +
    Allow $B%G%#%l%/%F%#%V$,(B Deny + $B%G%#%l%/%F%#%V$NA0$KI>2A$5$l$^$9!#(B + $B%"%/%;%9$O%G%U%)%k%H$G5qH]$5$l$^$9!#(BAllow + $B%G%#%l%/%F%#%V$K9g$o$J$$$+!"(BDeny + $B%G%#%l%/%F%#%V$K9g$&%/%i%$%"%s%H$O%"%/%;%9$r5qH]$5$l$^$9!#(B +
    + +
    Mutual-failure
    + +
    Allow $B$N%j%9%H$K8=$l$F!"(BDeny + $B$N%j%9%H$K8=$l$J$$%[%9%H$N$_$,%"%/%;%9$r5v2D$5$l$^$9!#(B + $B$3$N=gHVIU$1$O(B Order Allow,Deny $B$HF1$88z2L$r;}$A!"(B + $B$=$N@_Dj$NJ}$,9%$^$7$$$?$a$KHs?d>)$H$J$C$F$$$^$9!#(B
    +
    + +

    $B%-!<%o!<%I$O%3%s%^$GJ,N%$9$k$3$H$@$1$,2DG=$G$9!#(B + $B4V$K6uGr$,$"$C$F$O$$$1$^$;$s!#$I$N>l9g$G$b!"(BAllow $B$H(B + Deny $BJ8$OA4$FI>2A$5$l$k$H$$$&$3$H$KCm0U$7$F$/$@$5$$!#(B +

    + +

    $B0J2<$NNc$G$O!"(Bapache.org + $B%I%a%$%s$N$9$Y$F$N%[%9%H$O%"%/%;%9$r5v2D$5$l$^$9!#(B + $BB>$N$9$Y$F$N%[%9%H$O%"%/%;%9$r5qH]$5$l$^$9!#(B

    + +
    + Order Deny,Allow
    + Deny from all
    + Allow from apache.org
    +
    +
    + +

    $BuBV$,%"%/%;%95qH]$N$?$a!"(B + $B%5!<%P$X$N%"%/%;%9$r5qH]$5$l$^$9!#(B

    + +
    + Order Allow,Deny
    + Allow from apache.org
    + Deny from foo.apache.org
    +
    +
    + +

    $B0lJ}!">e$NNc$N(B Order $B$,(B Deny,Allow + $B$KJQ$o$C$F$$$l$P!"$9$Y$N%[%9%H$K%"%/%;%9$,5v2D$5$l$^$9!#(B + $B$3$l$O!"@_Dj%U%!%$%kCf$NAllow from apache.org $B$,:G8e$KI>2A$5$l$F!"(B + Deny from foo.apache.org $B$r>e=q$-$9$k$+$i$G$9!#(B + apache.org + $B%I%a%$%s$K$J$$%[%9%H$b!"%G%U%)%k%H$N>uBV$,(B allow + $B$KJQ2=$9$k$?$a$K!"%"%/%;%9$r5v2D$5$l$^$9!#(B +

    + +

    Order + $B%G%#%l%/%F%#%V$O%G%U%)%k%H$N%"%/%;%9$N>uBV$K1F6A$rM?$($k$N$G!"(B + Allow $B%G%#%l%/%F%#%V$H(B Deny + $B%G%#%l%/%F%#%V$,L5$/$F$b!"%5!<%P$N%"%/%;%9$K1F6A$rM?$($k$3$H$,$G$-$^$9!#(B + $B$?$H$($P!"(B

    + +
    + <Directory /www>
    +   Order Allow,Deny
    + </Directory>
    +
    + +

    $B$O%G%U%)%k%H$N%"%/%;%9>uBV$,(B deny $B$K$J$k$?$a!"(B + /www $B%G%#%l%/%H%j$X$N$9$Y$F$N%"%/%;%9$r5qH]$7$^$9!#(B +

    + +

    Order + $B%G%#%l%/%F%#%V$O%5!<%P$N@_Dj=hM}$N3FCJ3,$G$@$1(B + $B%"%/%;%9%G%#%l%/%F%#%V$N=hM}$N=gHV$rJQ99$7$^$9!#$3$l$O!"$?$H$($P!"(B + Order $B%G%#%l%/%F%#%V$N@_Dj$K4X$o$i$:!"(B + <Location> $B%;%/%7%g%s$N(B Allow $B%G%#%l%/%F%#%V$d(B + Deny $B%G%#%l%/%F%#%V$O!"(B<Directory> $B%;%/%7%g%s$d(B + .htaccess $B%U%!%$%k$N(B Allow + $B%G%#%l%/%F%#%V$d(B Deny + $B%G%#%l%/%F%#%V$h$j$b>o$K8e$KI>2A$5$l$k$H$$$&$3$H$r0UL#$7$^$9!#(B + $B@_Dj%;%/%7%g%s$N%^!<%8$N>\:Y$K$D$$$F$O!"(B + Directory,Location, Files + $B%;%/%7%g%s$NF0:nJ}K!(B $B$r;2>H$7$F$/$@$5$$!#(B

    + +

    Deny $B$H(B Allow + $B$b;2>H$7$F$/$@$5$$!#(B

    + + + diff --git a/htdocs/manual/mod/mod_actions.html.en b/htdocs/manual/mod/mod_actions.html.en new file mode 100644 index 00000000000..bab6c636fb6 --- /dev/null +++ b/htdocs/manual/mod/mod_actions.html.en @@ -0,0 +1,153 @@ + + + + + + + Module mod_actions + + + + + + +

    Module mod_actions

    + +

    This module provides for executing CGI scripts based on + media type or request method.

    + +

    Status: Base
    + Source File: + mod_actions.c
    + Module Identifier: + action_module
    + Compatibility: Available in + Apache 1.1 and later.

    + +

    Summary

    + +

    This module has two directives. The Action directive lets + you run CGI scripts whenever a file of a certain type is + requested. The Script directive lets you run CGI scripts + whenever a particular method is used in a request. This makes + it much easier to execute scripts that process files.

    + +

    Directives

    + + +
    + +

    Action directive

    + +

    Syntax: Action action-type + cgi-script
    + Context: server config, virtual + host, directory, .htaccess
    + Override: FileInfo
    + Status: Base
    + Module: mod_actions
    + Compatibility: Action is only + available in Apache 1.1 and later

    + +

    This directive adds an action, which will activate + cgi-script when action-type is triggered by the + request. The cgi-script is the URL-path to a resource that + has been configured as a CGI script using ScriptAlias + or AddHandler. The action-type can be either + a handler or a MIME content type. It + sends the URL and file path of the requested document using the + standard CGI PATH_INFO and PATH_TRANSLATED environment + variables.

    + +

    Examples:

    +
    +    # Requests for files of a particular type:
    +    Action image/gif /cgi-bin/images.cgi
    +
    +    # Files of a particular file extension
    +    AddHandler my-file-type .xyz
    +    Action my-file-type /cgi-bin/program.cgi
    +    
    + +

    In the first example, requests for files with a MIME content + type of image/gif will instead be handled by the + specified cgi script /cgi-bin/images.cgi.

    + +

    In the second example, requests for files with a file extension of + .xyz are handled instead by the specified cgi script + /cgi-bin/program.cgi.

    + +

    See also: AddHandler

    + +
    + +

    Script directive

    + +

    Syntax: Script method + cgi-script
    + Context: server config, virtual + host, directory
    + Status: Base
    + Module: mod_actions
    + Compatibility: Script is only + available in Apache 1.1 and later; arbitrary method use is only + available with 1.3.10 and later

    + +

    This directive adds an action, which will activate + cgi-script when a file is requested using the method of + method. The cgi-script is the URL-path to a resource + that has been configured as a CGI script using + ScriptAlias or AddHandler. The URL and + file path of the requested document is sent using the standard CGI + PATH_INFO and PATH_TRANSLATED environment variables.

    + +
    + Prior to Apache 1.3.10, method can only be one of + GET, POST, PUT, or + DELETE. As of 1.3.10, any arbitrary method name + may be used. Method names are case-sensitive, so + Script PUT and Script put + have two entirely different effects. +
    + +

    Note that the Script command defines default actions only. + If a CGI script is called, or some other resource that is + capable of handling the requested method internally, it will do + so. Also note that Script with a method of GET + will only be called if there are query arguments present + (e.g., foo.html?hi). Otherwise, the request will + proceed normally.

    + +

    Examples:

    +
    +    # For <ISINDEX>-style searching
    +    Script GET /cgi-bin/search
    +    # A CGI PUT handler
    +    Script PUT /~bob/put.cgi
    +
    + + + + diff --git a/htdocs/manual/mod/mod_actions.html.html b/htdocs/manual/mod/mod_actions.html.html new file mode 100644 index 00000000000..f8c05b7832b --- /dev/null +++ b/htdocs/manual/mod/mod_actions.html.html @@ -0,0 +1,4 @@ + + + diff --git a/htdocs/manual/mod/mod_actions.html.ja.jis b/htdocs/manual/mod/mod_actions.html.ja.jis new file mode 100644 index 00000000000..dcd0d1fc7c4 --- /dev/null +++ b/htdocs/manual/mod/mod_actions.html.ja.jis @@ -0,0 +1,154 @@ + + + + + + Module mod_actions + + + + + + + +

    mod_actions $B%b%8%e!<%k(B

    + +

    $B$3$N%b%8%e!<%k$O%a%G%#%"%?%$%W$d%j%/%(%9%H%a%=%C%I$K1~$8$F(B + CGI $B%9%/%j%W%H$r + +

    $B%9%F!<%?%9(B: Base
    + $B%=!<%9%U%!%$%k(B: + mod_actions.c
    + $B%b%8%e!<%k<1JL;R(B: + action_module
    + $B8_49@-(B: + Apache 1.1 $B0J9_$G$N$_;HMQ2DG=!#(B

    + +

    $B35MW(B

    + +

    $B$3$N%b%8%e!<%k$K$OFs$D$N%G%#%l%/%F%#%V$,$"$j$^$9!#(BAction + $B%G%#%l%/%F%#%V$OFCDj$N%?%$%W$N%U%!%$%k$r%j%/%(%9%H$5$l$?>l9g$K(B + CGI $B%9%/%j%W%H$, + +

    $B%G%#%l%/%F%#%V(B

    + + +
    + +

    Action $B%G%#%l%/%F%#%V(B

    + +

    $B9=J8(B: Action action-type + cgi-script
    + $B%3%s%F%-%9%H(B: + $B%5!<%P@_Dj%U%!%$%k!"%P!<%A%c%k%[%9%H!"(B $B%G%#%l%/%H%j!"(B.htaccess
    + $B>e=q$-(B: FileInfo
    + $B%9%F!<%?%9(B: Base
    + $B%b%8%e!<%k(B: mod_actions
    + $B8_49@-(B: + Apache 1.1 $B0J9_$G$N$_;HMQ2DG=!#(B

    + +

    $B$3$N%G%#%l%/%F%#%V$O(B action-type + $B$,%j%/%(%9%H$5$l$?$H$-$K(B cgi-script + $B$,cgi-script $B$O(B + ScriptAlias $B$d(B AddHandler $B$K$h$C$F(B + CGI $B%9%/%j%W%H$K@_Dj$5$l$?%j%=!<%9$X$N(B URL-path $B$G$9!#(B + Action-type $B$K$O(B + handler $B$+(B MIME + $B%3%s%F%s%H%?%$%W$r;XDj$G$-$^$9!#%j%/%(%9%H$5$l$?%I%-%e%a%s%H$N(B URL + $B$H%U%!%$%k$N%Q%9$OI8=`(B CGI $B4D6-JQ?t(B PATH_INFO $B$H(B PATH_TRANSLATED + $B$r;H$C$FEA$($i$l$^$9!#(B

    + +

    $BNc(B:

    +
    +    # Requests for files of a particular type:
    +    Action image/gif /cgi-bin/images.cgi
    +
    +    # Files of a particular file extension
    +    AddHandler my-file-type .xyz
    +    Action my-file-type /cgi-bin/program.cgi
    +    
    + +

    $B:G=i$NNc$G$O!"(BMIME $B%3%s%F%s%H%?%$%W$,(B image/gif + $B$N%U%!%$%k$X$N%j%/%(%9%H$O!"$=$N%U%!%$%k$NBe$o$j$K;XDj$5$l$?%9%/%j%W%H(B + /cgi-bin/images.cgi $B$,8F$P$l$^$9!#(B

    + +

    2 $BHVL\$NNc$G$O!"3HD%;R$,(B .xyz $B$N%U%!%$%k$X$N%j%/%(%9%H$O!"(B + $B$=$N%U%!%$%k$NBe$o$j$K;XDj$5$l$?%9%/%j%W%H(B + /cgi-bin/program.cgi $B$,8F$P$l$^$9!#(B

    + +

    AddHandler + $B$b(B$B;2>H(B$B$7$F$/$@$5$$(B

    + +
    + +

    Script $B%G%#%l%/%F%#%V(B

    + +

    $B9=J8(B: Script method + cgi-script
    + $B%3%s%F%-%9%H(B: + $B%5!<%P@_Dj%U%!%$%k!"%P!<%A%c%k%[%9%H!"(B $B%G%#%l%/%H%j(B
    + $B%9%F!<%?%9(B: Base
    + $B%b%8%e!<%k(B: mod_actions
    + $B8_49@-(B: Script $B$O(B Apache 1.1 + $B0J9_$G$N$_;HMQ2DG=!#G$0U$N%a%=%C%I$N;HMQ$O(B 1.3.10 + $B0J9_$G$N$_;HMQ2DG=!#(B

    + +

    $B$3$N%G%#%l%/%F%#%V$O(B method + $B$H$$$&%a%=%C%I$r;H$C$F%j%/%(%9%H$,9T$J$o$l$?$H$-$K(B + cgi-script $B$rcgi-script $B$O(B + ScriptAlias $B$d(B AddHandler $B$K$h$C$F(B + CGI $B%9%/%j%W%H$K@_Dj$5$l$?%j%=!<%9$X$N(B URL-path $B$G$9!#(B + $B%j%/%(%9%H$5$l$?%I%-%e%a%s%H$N(B URL $B$H%U%!%$%k$N%Q%9$OI8=`(B CGI + $B4D6-JQ?t(B PATH_INFO $B$H(B PATH_TRANSLATED $B$r;H$C$FEA$($i$l$^$9!#(B

    + +
    + Apache 1.3.10 $B$h$jA0$G$O!"(Bmethod $B$O(B GET, + POST, PUT, DELETE + $B$@$1$,;XDj2DG=$G$7$?!#(B1.3.10 + $B$G$O!"G$0U$N%a%=%C%IL>$r;HMQ$9$k$3$H$,$G$-$^$9!#(B + $B%a%=%C%IL>$OBgJ8;z>.J8;z$r6hJL$7$^$9(B$B!#$G$9$+$i!"(B + Script PUT $B$H(B Script put + $B$O$^$C$?$/0c$C$?8z2L$K$J$j$^$9!#(B +
    + +

    Script $B%3%^%s%I$O%G%U%)%k%H$NF0:n$rDI2C$9$k$@$1$G$"$k$3$H$K(B + $BCm0U$7$F$/$@$5$$!#$b$7(B CGI $B%9%/%j%W%H$,8F$P$l$?$j!"%j%/%(%9%H$5$l$?(B + $B%a%=%C%I$rFbIt$G07$&$3$H$N$G$-$kB>$N%j%=!<%9$,$"$l$P!"$=$l$,9T$J$o$l$^$9!#(B + GET $B%a%=%C%I$N(B Script $B$OLd9g$;0z?t$,$"$k>l9g$K$N$_(B + ($B$?$H$($P(B$B!"(Bfoo.html?hi) $B8F$P$l$k$H$$$&$3$H$K$bCm0U$7$F$/$@$5$$!#(B + $B$=$&$G$J$$>l9g$O!"%j%/%(%9%H$ODL>oDL$j=hM}$5$l$^$9!#(B

    + +

    $BNc(B:

    +
    +    # For <ISINDEX>-style searching
    +    Script GET /cgi-bin/search
    +    # A CGI PUT handler
    +    Script PUT /~bob/put.cgi
    +
    + + + diff --git a/htdocs/manual/mod/mod_alias.html.en b/htdocs/manual/mod/mod_alias.html.en new file mode 100644 index 00000000000..f285c69911e --- /dev/null +++ b/htdocs/manual/mod/mod_alias.html.en @@ -0,0 +1,385 @@ + + + + + + + Apache module mod_alias + + + + + + +

    Module mod_alias

    + +

    This module provides for mapping different parts of the host + filesystem in the document tree, and for URL redirection.

    + +

    Status: Base
    + Source File: mod_alias.c
    + Module Identifier: + alias_module

    + +

    Summary

    + +

    The directives contained in this module allow for + manipulation and control of URLs as requests arrive at the + server. The Alias and ScriptAlias + directives are used to map between URLs and filesystem paths. + This allows for content which is not directly under the DocumentRoot to + be served as part of the web document tree. The + ScriptAlias directive has the additional effect of + marking the target directory as containing only CGI + scripts.

    + +

    The Redirect directives are used to instruct + clients to make a new request with a different URL. They are + often used when a resource has moved to a new location.

    + +

    A more powerful and flexible set of directives for + manipulating URLs is contained in the mod_rewrite + module.

    + +

    Directives

    + + +
    + +

    Alias directive

    + +

    + Syntax: Alias URL-path + file-path|directory-path
    + Context: server config, virtual + host
    + Status: Base
    + Module: mod_alias

    + +

    The Alias directive allows documents to be stored in the + local filesystem other than under the DocumentRoot. URLs with a + (%-decoded) path beginning with url-path will be + mapped to local files beginning with + directory-filename.

    + +

    Example:

    + +
    + Alias /image /ftp/pub/image +
    + +

    A request for http://myserver/image/foo.gif would cause the + server to return the file /ftp/pub/image/foo.gif.

    + +

    Note that if you include a trailing / on the + url-path then the server will require a trailing / in + order to expand the alias. That is, if you use Alias + /icons/ /usr/local/apache/icons/ then the url + /icons will not be aliased.

    + +

    Note that you may need to specify additional <Directory> + sections which cover the destination of aliases. + Aliasing occurs before <Directory> sections + are checked, so only the destination of aliases are affected. + (Note however <Location> + sections are run through once before aliases are performed, so + they will apply.)

    + +

    See also ScriptAlias.

    +
    + +

    AliasMatch

    + +

    Syntax: AliasMatch regex + file-path|directory-path
    + Context: server config, virtual + host
    + Status: Base
    + Module: mod_alias
    + Compatibility: Available in + Apache 1.3 and later

    + +

    This directive is equivalent to Alias, + but makes use of standard regular expressions, instead of + simple prefix matching. The supplied regular expression is + matched against the URL-path, and if it matches, the server + will substitute any parenthesized matches into the given string + and use it as a filename. For example, to activate the + /icons directory, one might use:

    +
    +    AliasMatch ^/icons(.*) /usr/local/apache/icons$1
    +
    +
    + +

    Redirect + directive

    + +

    + Syntax: Redirect + [status] URL-path URL
    + Context: server config, virtual + host, directory, .htaccess
    + Override: FileInfo
    + Status: Base
    + Module: mod_alias
    + Compatibility: The directory + and .htaccess context's are only available in versions 1.1 and + later. The status argument is only available in Apache + 1.2 or later.

    + +

    The Redirect directive maps an old URL into a new one. The + new URL is returned to the client which attempts to fetch it + again with the new address. URL-path a (%-decoded) + path; any requests for documents beginning with this path will + be returned a redirect error to a new (%-encoded) URL beginning + with URL.

    + +

    Example:

    + +
    + Redirect /service http://foo2.bar.com/service +
    + +

    If the client requests http://myserver/service/foo.txt, it + will be told to access http://foo2.bar.com/service/foo.txt + instead.

    + +

    Note: Redirect directives take precedence + over Alias and ScriptAlias directives, irrespective of their + ordering in the configuration file. Also, URL-path + must be a fully qualified URL, not a relative path, even when used + with .htaccess files or inside of <Directory> + sections.

    + +

    If no status argument is given, the redirect will + be "temporary" (HTTP status 302). This indicates to the client + that the resource has moved temporarily. The status + argument can be used to return other HTTP status codes:

    + +
    +
    permanent
    + +
    Returns a permanent redirect status (301) indicating that + the resource has moved permanently.
    + +
    temp
    + +
    Returns a temporary redirect status (302). This is the + default.
    + +
    seeother
    + +
    Returns a "See Other" status (303) indicating that the + resource has been replaced.
    + +
    gone
    + +
    Returns a "Gone" status (410) indicating that the + resource has been permanently removed. When this status is + used the url argument should be omitted.
    +
    + +

    Other status codes can be returned by giving the numeric + status code as the value of status. If the status is + between 300 and 399, the url argument must be present, + otherwise it must be omitted. Note that the status must be + known to the Apache code (see the function + send_error_response in http_protocol.c).

    + +

    Example:

    + +
    +    Redirect permanent /one http://example.com/two
    + Redirect 303 /two http://example.com/other +
    +
    + +

    RedirectMatch

    + +

    Syntax: RedirectMatch + [status] regex URL
    + Context: server config, virtual + host, directory, .htaccess
    + Override: FileInfo
    + Status: Base
    + Module: mod_alias
    + Compatibility: Available in + Apache 1.3 and later

    + +

    This directive is equivalent to Redirect, but makes use of standard + regular expressions, instead of simple prefix matching. The + supplied regular expression is matched against the URL-path, + and if it matches, the server will substitute any parenthesized + matches into the given string and use it as a filename. For + example, to redirect all GIF files to like-named JPEG files on + another server, one might use:

    +
    +    RedirectMatch (.*)\.gif$ http://www.anotherserver.com$1.jpg
    +
    +
    + +

    RedirectTemp + directive

    + +

    + Syntax: RedirectTemp + URL-path URL
    + Context: server config, virtual + host, directory, .htaccess
    + Override: FileInfo
    + Status: Base
    + Module: mod_alias
    + Compatibility: This directive + is only available in Apache 1.2 and later

    + +

    This directive makes the client know that the Redirect is + only temporary (status 302). Exactly equivalent to + Redirect temp.

    +
    + +

    RedirectPermanent + directive

    + +

    + Syntax: RedirectPermanent + URL-path URL
    + Context: server config, virtual + host, directory, .htaccess
    + Override: FileInfo
    + Status: Base
    + Module: mod_alias
    + Compatibility: This directive + is only available in Apache 1.2 and later

    + +

    This directive makes the client know that the Redirect is + permanent (status 301). Exactly equivalent to Redirect + permanent.

    +
    + +

    ScriptAlias + directive

    + +

    + Syntax: ScriptAlias + URL-path file-path|directory-path
    + Context: server config, virtual + host
    + Status: Base
    + Module: mod_alias

    + +

    The ScriptAlias directive has the same behavior as the Alias directive, except that in addition it + marks the target directory as containing CGI scripts that will be + processed by mod_cgi's cgi-script + handler. URLs with a (%-decoded) path beginning with + URL-path will be mapped to scripts beginning with the + second argument which is a full pathname in the local + filesystem.

    + +

    Example:

    + +
    + ScriptAlias /cgi-bin/ /web/cgi-bin/ +
    + +

    A request for http://myserver/cgi-bin/foo would cause the + server to run the script /web/cgi-bin/foo.

    +
    + +

    ScriptAliasMatch

    + +

    Syntax: ScriptAliasMatch + regex file-path|directory-path
    + Context: server config, virtual + host
    + Status: Base
    + Module: mod_alias
    + Compatibility: Available in + Apache 1.3 and later

    + +

    This directive is equivalent to ScriptAlias, but makes use of standard + regular expressions, instead of simple prefix matching. The + supplied regular expression is matched against the URL-path, + and if it matches, the server will substitute any parenthesized + matches into the given string and use it as a filename. For + example, to activate the standard /cgi-bin, one + might use:

    +
    +    ScriptAliasMatch ^/cgi-bin(.*) /usr/local/apache/cgi-bin$1
    +
    + + + + diff --git a/htdocs/manual/mod/mod_alias.html.html b/htdocs/manual/mod/mod_alias.html.html new file mode 100644 index 00000000000..ce0cc1e6756 --- /dev/null +++ b/htdocs/manual/mod/mod_alias.html.html @@ -0,0 +1,4 @@ + + + diff --git a/htdocs/manual/mod/mod_alias.html.ja.jis b/htdocs/manual/mod/mod_alias.html.ja.jis new file mode 100644 index 00000000000..1ceac6d44a9 --- /dev/null +++ b/htdocs/manual/mod/mod_alias.html.ja.jis @@ -0,0 +1,387 @@ + + + + + + Apache module mod_alias + + + + + + + +

    mod_alias $B%b%8%e!<%k(B

    + +

    $B$3$N%b%8%e!<%k$O!"%[%9%H%U%!%$%k%7%9%F%`>e$N$$$m$$$m$J0c$&>l=j$r(B + $B%I%-%e%a%s%H%D%j!<$K%^%C%W$9$k5!G=$H!"(B + URL $B$N%j%@%$%l%/%H$r9T$J$&5!G=$rDs6!$7$^$9!#(B

    + +

    $B%9%F!<%?%9(B: Base
    + $B%=!<%9%U%!%$%k(B: mod_alias.c
    + $B%b%8%e!<%k<1JL;R(B: + alias_module

    + +

    $B35MW(B

    + +

    $B$3$N%b%8%e!<%k$N%G%#%l%/%F%#%V$O%5!<%P$K%j%/%(%9%H$,E~Ce$7$?$H$-$K(B + URL $B$NA`:n$d@)8f$r$9$k$3$H$r2DG=$K$7$^$9!#(BAlias + $B%G%#%l%/%F%#%V$H(B ScriptAlias $B%G%#%l%/%F%#%V$O(B + URL $B$H%U%!%$%k%7%9%F%`$N%Q%9$r%^%C%W$9$k$?$a$K;HMQ$5$l$^$9!#$3$l$O(B + DocumentRoot + $B$N2<$K$J$$%I%-%e%a%s%H$r%&%'%V$N%I%-%e%a%s%H%D%j!<$N0lIt$H$7$F(B + $BAw$i$l$k$h$&$K$7$^$9!#(BScriptAlias + $B%G%#%l%/%F%#%V$K$O%^%C%W@h$N%G%#%l%/%H%j$,(B CGI + $B%9%/%j%W%H$N$_$G$"$k$3$H$r<($9$H$$$&DI2C$N8z2L$,$"$j$^$9!#(B +

    + +

    Redirect $B%G%#%l%/%F%#%V$O%/%i%$%"%s%H$K0c$C$?(B + URL $B$K?7$7$$%j%/%(%9%H$rAw$k$h$&$K;X<($7$^$9!#$3$l$O!"(B + $B%j%=!<%9$,?7$7$$>l=j$K0\F0$7$?$H$-$K$h$/;HMQ$5$l$^$9!#(B

    + +

    URL $B$rA`:n$9$k$?$a$N$h$j6/NO$G=@Fp$J%G%#%l%/%F%#%V72$O(B mod_rewrite + $B%b%8%e!<%k$K$"$j$^$9!#(B +

    + +

    $B%G%#%l%/%F%#%V(B

    + + +
    + +

    Alias $B%G%#%l%/%F%#%V(B

    + +

    + $B9=J8(B: Alias URL-path + file-path|directory-path
    + $B%3%s%F%-%9%H(B: + $B%5!<%P@_Dj%U%!%$%k!"%P!<%A%c%k%[%9%H(B
    + $B%9%F!<%?%9(B: Base
    + $B%b%8%e!<%k(B: mod_alias

    + +

    Alias $B%G%#%l%/%F%#%V$O%I%-%e%a%s%H$r%m!<%+%k%U%!%$%k%7%9%F%`$N(B + DocumentRoot + $B0J30$N>l=j$KJ]4I$9$k$3$H$r2DG=$K$7$^$9!#(BUrl-path + (% $B$,I|9f$5$l$?(B) $B$G;O$^$k%Q%9$N(B URL $B$O(B + directory-filename + $B$G;O$^$k%m!<%+%k%U%!%$%k$K%^%C%W$5$l$^$9!#(B

    + +

    $BNc(B:

    + +
    + Alias /image /ftp/pub/image +
    + +

    http://myserver/image/foo.gif $B$X$N%j%/%(%9%H$KBP$7$F!"%5!<%P$O(B + $B%U%!%$%k(B /ftp/pub/image/foo.gif $B$rJV$7$^$9!#(B

    + +

    $B$b$7(B url-path $B$N:G8e$K(B / + $B$r=q$$$?$J$i!"%5!<%P$O%(%$%j%"%9$rE83+$9$k$?$a$K:G8e$N(B / + $B$rMW5a$9$k$H$$$&$3$H$KCm0U$7$F$/$@$5$$!#$9$J$o$A!"(BAlias /icons/ + /usr/local/apache/icons/ $B$H$$$&$b$N$r;HMQ$7$F$$$k$H!"(B + /icons $B$H$$$&(B url $B$O%(%$%j%"%9$5$l$^$;$s!#(B

    + +

    $B%(%$%j%"%9$N(B$B9T$-@h(B$B$r4^$s$G$$$k(B <Directory> + $B%;%/%7%g%s$rDI2C$9$kI,MW$,$"$k$+$b$7$l$J$$$3$H$KCm0U$7$F$/$@$5$$!#(B + $B%(%$%j%"%9$NE83+$O(B <Directory> + $B%;%/%7%g%s$rD4$Y$kA0$K9T$J$o$l$^$9$N$G!"(B + $B%(%$%j%"%9$N9T$-@h$N(B <Directory> $B%;%/%7%g%s$N$_(B + $B8z2L$,$"$j$^$9!#(B + ($B$7$+$7!"(B<Location> + $B%;%/%7%g%s$O%(%$%j%"%9$,=hM}$5$l$kA0$K + +

    ScriptAlias + $B$b;2>H$7$F$/$@$5$$!#(B

    +
    + +

    AliasMatch

    + +

    $B9=J8(B: AliasMatch regex + file-path|directory-path
    + $B%3%s%F%-%9%H(B: + $B%5!<%P@_Dj%U%!%$%k!"%P!<%A%c%k%[%9%H(B
    + $B%9%F!<%?%9(B: Base
    + $B%b%8%e!<%k(B: mod_alias
    + $B8_49@-(B: Apache 1.3 + $B0J9_$G;HMQ2DG=(B

    +

    $B$3$N%G%#%l%/%F%#%V$O(B Alias + $B$H$[$H$s$IF1$8$G$9$,!"4JC1$J@hF,$+$i$N%^%C%A$r9T$J$&$N$G$O$J$/!"(B + $BI8=`@55,I=8=$rMxMQ$7$^$9!#$3$3$G;XDj$5$l$?@55,I=8=$H(B URL-path + $B$,9g$&$+$I$&$+$rD4$Y!"9g$&>l9g$O3g8L$G0O$^$l$?%^%C%A$r(B + $BM?$($i$l$?J8;zNs$GCV$-49$(!"$=$l$r%U%!%$%kL>$H$7$F;HMQ$7$^$9!#Nc$($P!"(B + /icons $B%G%#%l%/%H%j$r;HMQ$9$k$h$&$K$9$k(B + $B$?$a$K$O0J2<$N$h$&$J$b$N$,;HMQ$G$-$^$9(B:

    +
    +    AliasMatch ^/icons(.*) /usr/local/apache/icons$1
    +
    +
    + +

    Redirect + $B%G%#%l%/%F%#%V(B

    + +

    + $B9=J8(B: Redirect [status] + URL-path URL
    + $B%3%s%F%-%9%H(B: + $B%5!<%P@_Dj%U%!%$%k!"%P!<%A%c%k%[%9%H!"(B + $B%G%#%l%/%H%j!"(B.htaccess
    + $B>e=q$-(B: FileInfo
    + $B%9%F!<%?%9(B: Base
    + $B%b%8%e!<%k(B: mod_alias
    + $B8_49@-(B: $B%G%#%l%/%H%j$H(B + .htaccess $B$N%3%s%F%-%9%H$O(B 1.1 $B0J9_$N$_!#(BStatus + $B0z?t$O(B Apache 1.2 $B0J9_!#(B

    + +

    Redirect $B%G%#%l%/%F%#%V$O8E$$(B URL $B$r?7$7$$$b$N$X%^%C%W$7$^$9!#(B + $B?7$7$$(B URL $B$,%/%i%$%"%s%H$KJV$5$l$^$9!#$=$7$F!"(B + $B%/%i%$%"%s%H$O?7$7$$%"%I%l%9$r$b$&0l2sURL-path (% $B$,I|9f$5$l$?(B) $B%Q%9$G;O$^$k%I%-%e%a%s%H$X$N(B + $B$9$Y$F$N%j%/%(%9%H$O(B URL $B$G;O$^$k?7$7$$(B + (% $B$,Id9f2=$5$l$?(B) URL $B$X$N%j%@%$%l%/%H%(%i!<$,JV$5$l$^$9!#(B

    + +

    $BNc(B:

    + +
    + Redirect /service http://foo2.bar.com/service +
    + +

    $B%/%i%$%"%s%H$O(B http://myserver/service/foo.txt + $B$X$N%j%/%(%9%H$r9T$J$&$H!"Be$o$j$K(B http://foo2.bar.com/service/foo.txt + $B$r%"%/%;%9$9$k$h$&$K9p$2$i$l$^$9!#(B

    + +

    $BCm0U(B: + $B@_Dj%U%!%$%kCf$N=gHV$K4X$o$i$:!"(BRedirect $B%G%#%l%/%F%#%V$O(B Alias + $B%G%#%l%/%F%#%V$H(B ScriptAlias $B%G%#%l%/%F%#%V$h$j$bM%@h$5$l$^$9!#(B + $B$^$?!"(B.htaccess $B%U%!%$%k$d(B <Directory> + $B%;%/%7%g%s$NCf$G;H$o$l$F$$$?$H$7$F$b!"(BURL-path + $B$OAjBP%Q%9$G$O$J$/!"40A4$J(B URL $B$G$J$1$l$P$J$j$^$;$s!#(B

    + +

    $B$b$7(B status $B0z?t$,M?$($i$l$F$$$J$1$l$P!"%j%@%$%l%/%H$O(B + "temporary" (HTTP $B%9%F!<%?%9(B 302) $B$K$J$j$^$9!#$3$l$O%/%i%$%"%s%H$K(B + $B%j%=!<%9$,0l;~E*$K0\F0$7$?$H$$$&$3$H$r<($7$^$9!#(BStatus + $B0z?t$O(B $BB>$N(B HTTP $B$N%9%F!<%?%9%3!<%I$rJV$9$?$a$K;HMQ$9$k$3$H$,$G$-$^$9(B:

    + +
    +
    permanent
    + +
    $B1J5W$K%j%@%$%l%/%H$r$9$k%9%F!<%?%9(B (301) $B$rJV$7$^$9!#(B + $B$3$l$O%j%=!<%9$,1J5W$K0\F0$7$?$H$$$&$3$H$r0UL#$7$^$9!#(B
    + +
    temp
    + +
    $B0l;~E*$J%j%@%$%l%/%H%9%F!<%?%9(B (302) + $B$rJV$7$^$9!#$3$l$,%G%U%)%k%H$G$9!#(B
    + +
    seeother
    + +
    "See Other" $B%9%F!<%?%9(B (303) $B$rJV$7$^$9!#(B + $B$3$l$O%j%=!<%9$,B>$N$b$N$GCV$-49$($i$l$?$3$H$r0UL#$7$^$9!#(B
    + +
    gone
    + +
    "Gone" $B%9%F!<%?%9(B (410) $B$rJV$7$^$9!#$3$l$O%j%=!<%9$,1J5W$K(B + $B:o=|$5$l$?$3$H$r0UL#$7$^$9!#$3$N%9%F!<%?%9$,;HMQ$5$l$?>l9g!"(B + url $B0z?t$O>JN,$5$l$J$1$l$P$J$j$^$;$s!#(B
    +
    + +

    Status $B$NCM$K%9%F!<%?%9%3!<%I$r?tCM$GM?$($k$3$H$G(B + $BB>$N%9%F!<%?%9%3!<%I$bJV$9$3$H$,$G$-$^$9!#%9%F!<%?%9$,(B 300 $B$H(B 399 + $B$N4V$K$"$k>l9g!"(Burl $B0z?t$OB8:_$7$F$$$J$1$l$P$$$1$^$;$s!#(B + $B$=$NB>$N>l9g$O>JN,$5$l$F$$$J$1$l$P$J$j$^$;$s!#$?$@$7!"(B + $B%9%F!<%?%9$O(B Apache $B$N%3!<%I$,CN$C$F$$$k$b$N$G$"$kI,MW$,$"$j$^$9(B + (http_protocol.c $B$N4X?t(B send_error_response + $B$r8+$F$/$@$5$$(B)$B!#(B

    +

    $BNc(B:

    + +
    +    Redirect permanent /one http://example.com/two
    + Redirect 303 /two http://example.com/other +
    +
    + +

    RedirectMatch

    + +

    $B9=J8(B: RedirectMatch + [status] regex URL
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k!"(B + $B%P!<%A%c%k%[%9%H!"%G%#%l%/%H%j!"(B.htaccess
    + $B>e=q$-(B: FileInfo
    + $B%9%F!<%?%9(B: Base
    + $B%b%8%e!<%k(B: mod_alias
    + $B8_49@-(B: Apache 1.3 + $B0J9_$G;HMQ2DG=!#(B

    + +

    $B$3$N%G%#%l%/%F%#%V$O(B Redirect + $B$H$[$H$s$IF1$8$G$9$,!"4JC1$J@hF,$+$i$N%^%C%A$r9T$J$&$N$G$O$J$/!"(B + $BI8=`@55,I=8=$rMxMQ$7$^$9!#$3$3$G;XDj$5$l$?@55,I=8=$H(B URL-path + $B$,9g$&$+$I$&$+$rD4$Y!"9g$&>l9g$O3g8L$G3g$i$l$?%^%C%A$r(B + $BM?$($i$l$?J8;zNs$GCV$-49$(!"$=$l$r%U%!%$%kL>$H$7$F;HMQ$7$^$9!#(B + $B$?$H$($P!"$9$Y$F$N(B GIF $B%U%!%$%k$rJL%5!<%P$NF1MM$JL>A0$N(B JPEG + $B%U%!%$%k$K%j%@%$%l%/%H$9$k$K$O!"0J2<$N$h$&$J$b$N$r;H$$$^$9(B: +

    +
    +    RedirectMatch (.*)\.gif$ http://www.anotherserver.com$1.jpg
    +
    +
    + +

    RedirectTemp + $B%G%#%l%/%F%#%V(B

    + +

    + $B9=J8(B: RedirectTemp URL-path + URL
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k!"(B + $B%P!<%A%c%k%[%9%H!"%G%#%l%/%H%j!"(B.htaccess
    + $B>e=q$-(B: FileInfo
    + $B%9%F!<%?%9(B: Base
    + $B%b%8%e!<%k(B: mod_alias
    + $B8_49@-(B: + $B$3$N%G%#%l%/%F%#%V$O(B Apache 1.2 $B0J9_$G$N$_;HMQ2DG=(B

    + +

    $B$3$N%G%#%l%/%F%#%V$O%/%i%$%"%s%H$K(B Redirect + $B$,0l;~E*$J$b$N$G$"$k(B ($B%9%F!<%?%9(B 302) $B$3$H$rCN$i$;$^$9!#(B + Redirect temp $B$H$^$C$?$/F1$8$G$9!#(B

    +
    + +

    RedirectPermanent + $B%G%#%l%/%F%#%V(B

    + +

    + $B9=J8(B: RedirectPermanent + URL-path URL
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k!"(B + $B%P!<%A%c%k%[%9%H!"%G%#%l%/%H%j!"(B.htaccess
    + $B>e=q$-(B: FileInfo
    + $B%9%F!<%?%9(B: Base
    + $B%b%8%e!<%k(B: mod_alias
    + $B8_49@-(B: + $B$3$N%G%#%l%/%F%#%V$O(B Apache 1.2 $B0J9_$G$N$_;HMQ2DG=!#(B

    + +

    $B$3$N%G%#%l%/%F%#%V$O%/%i%$%"%s%H$K(B Redirect $B$,1J5WE*$J$b$N(B + ($B%9%F!<%?%9(B 301) $B$G$"$k$3$H$rCN$i$;$^$9!#(B + Redirect premanent $B$HA4$/F1$8$G$9!#(B

    +
    + +

    ScriptAlias + $B%G%#%l%/%F%#%V(B

    + +

    + $B9=J8(B: ScriptAlias URL-path + file-path|directory-path
    + $B%3%s%F%-%9%H(B: + $B%5!<%P@_Dj%U%!%$%k!"%P!<%A%c%k%[%9%H(B
    + $B%9%F!<%?%9(B: Base
    + $B%b%8%e!<%k(B: mod_alias

    + +

    ScriptAlias $B%G%#%l%/%F%#%V$O!"BP>]%G%#%l%/%H%j$K(B + mod_cgi $B$N(B cgi-script + $B%O%s%I%i$G=hM}$5$l$k(B CGI + $B%9%/%j%W%H$,$"$k$3$H$r<($90J30$O(B + Alias + $B%G%#%l%/%F%#%V$HF1$8?6$kIq$$$r$7$^$9!#(BURL-path + (% $B$,I|9f$5$l$?(B) $B%Q%9$G(B $B;O$^$k(B URL $B$O%m!<%+%k$N%U%!%$%k%7%9%F%`$N(B + $B%U%k%Q%9$G$"$kFsHVL\$N0z?t$K%^%C%W$5$l$^$9!#(B

    + +

    $BNc(B:

    + +
    + ScriptAlias /cgi-bin/ /web/cgi-bin/ +
    + +

    http://myserver/cgi-bin/foo $B$X$N%j%/%(%9%H$KBP$7$F%5!<%P$O%9%/%j%W%H(B + /web/cgi-bin/foo $B$r +


    + +

    ScriptAliasMatch

    + +

    $B9=J8(B: ScriptAliasMatch regex + file-path|directory-path
    + $B%3%s%F%-%9%H(B: + $B%5!<%P@_Dj%U%!%$%k!"%P!<%A%c%k%[%9%H(B
    + $B%9%F!<%?%9(B: Base
    + $B%b%8%e!<%k(B: mod_alias
    + $B8_49@-(B: Apache 1.3 + $B0J9_$G;HMQ2DG=(B

    + +

    $B$3$N%G%#%l%/%F%#%V$O(B ScriptAlias + $B$H$[$H$s$IF1$8$G$9$,!"4JC1$J@hF,$+$i$N%^%C%A$r9T$J$&$N$G$O$J$/!"(B + $BI8=`@55,I=8=$rMxMQ$7$^$9!#$3$3$G;XDj$5$l$?@55,I=8=$H(B URL-path + $B$,9g$&$+$I$&$+$rD4$Y!"9g$&>l9g$O3g8L$G0O$^$l$?%^%C%A$r(B + $BM?$($i$l$?J8;zNs$GCV$-49$(!"$=$l$r%U%!%$%kL>$H$7$F;HMQ$7$^$9!#(B + $BNc$($P!"I8=`$N(B /cgi-bin + $B$r;HMQ$9$k$h$&$K$9$k$?$a$K$O!"0J2<$N$h$&$J$b$N$r;H$$$^$9(B: +

    +
    +    ScriptAliasMatch ^/cgi-bin(.*) /usr/local/apache/cgi-bin$1
    +
    + + + diff --git a/htdocs/manual/mod/mod_asis.html.en b/htdocs/manual/mod/mod_asis.html.en new file mode 100644 index 00000000000..c71ec725c17 --- /dev/null +++ b/htdocs/manual/mod/mod_asis.html.en @@ -0,0 +1,93 @@ + + + + + + + Apache module mod_asis + + + + + + +

    Module mod_asis

    + +

    This module provides for sending files which contain their + own HTTP headers.

    + +

    Status: Base
    + Source File: mod_asis.c
    + Module Identifier: + asis_module

    + +

    Summary

    + +

    This module provides the handler send-as-is + which causes Apache to send the document without adding most of + the usual HTTP headers.

    + +

    This can be used to send any kind of data from the server, + including redirects and other special HTTP responses, without + requiring a cgi-script or an nph script.

    + +

    For historical reasons, this module will also process any + file with the mime type httpd/send-as-is.

    + +

    Directives

    + +

    This module provides no directives.

    + +

    Usage

    + +

    In the server configuration file, associate files with the + send-as-is handler e.g.

    + +
    + AddHandler send-as-is asis +
    + The contents of any file with a .asis extension + will then be sent by Apache to the client with almost no + changes. Clients will need HTTP headers to be attached, so do + not forget them. A Status: header is also required; the data + should be the 3-digit HTTP response code, followed by a textual + message. + +

    Here's an example of a file whose contents are sent as + is so as to tell the client that a file has + redirected.

    + +
    + Status: 301 Now where did I leave that URL
    + Location: http://xyz.abc.com/foo/bar.html
    + Content-type: text/html
    +
    + <HTML>
    + <HEAD>
    + <TITLE>Lame excuses'R'us</TITLE>
    + </HEAD>
    + <BODY>
    + <H1>Fred's exceptionally wonderful page has moved + to
    + <A + HREF="http://xyz.abc.com/foo/bar.html">Joe's</A> + site.
    + </H1>
    + </BODY>
    + </HTML>
    +
    + +

    Notes: the server always adds a Date: and Server: header to + the data returned to the client, so these should not be + included in the file. The server does not add a + Last-Modified header; it probably should. + +

    + + + diff --git a/htdocs/manual/mod/mod_asis.html.html b/htdocs/manual/mod/mod_asis.html.html new file mode 100644 index 00000000000..25aa303482c --- /dev/null +++ b/htdocs/manual/mod/mod_asis.html.html @@ -0,0 +1,4 @@ + + + diff --git a/htdocs/manual/mod/mod_asis.html.ja.jis b/htdocs/manual/mod/mod_asis.html.ja.jis new file mode 100644 index 00000000000..62bb0ecb89a --- /dev/null +++ b/htdocs/manual/mod/mod_asis.html.ja.jis @@ -0,0 +1,92 @@ + + + + + + Apache module mod_asis + + + + + + + +

    mod_asis $B%b%8%e!<%k(B

    + +

    $B$3$N%b%8%e!<%k$O<+J,MQ$N(B HTTP + $B%X%C%@$,$"$k%U%!%$%k$rAw?.$9$k5!G=$rDs6!$7$^$9!#(B

    + +

    $B%9%F!<%?%9(B: Base
    + $B%=!<%9%U%!%$%k(B: mod_asis.c
    + $B%b%8%e!<%k<1JL;R(B: + asis_module

    + +

    $B35MW(B

    + +

    $B$3$N%b%8%e!<%k$O%O%s%I%i(B send-as-is + $B$rDs6!$7$^$9!#$3$N%O%s%I%i$ODL>o$N(B HTTP + $B%X%C%@$r$[$H$s$IDI2C$9$k$3$H$J$/%I%-%e%a%s%H$rAw?.$7$^$9!#(B

    + +

    $B$3$l$O%5!<%P$+$i$I$s$J$NFCJL$J(B + HTTP $B1~Ez$rAw$k$3$H$,$G$-$^$9!#(B

    + +

    $BNr;KE*$JM}M3$K$h$j!"$3$N%b%8%e!<%k$O(B mime $B%?%$%W(B + httpd/send-as-is $B$N%U%!%$%k$b=hM}$7$^$9!#(B

    + +

    $B%G%#%l%/%F%#%V(B

    + +

    $B$3$N%b%8%e!<%k$K$O%G%#%l%/%F%#%V$O$"$j$^$;$s!#(B

    + +

    $B;HMQK!(B

    + +

    $B%5!<%P@_Dj%U%!%$%k$G!"%U%!%$%k$H(B send-as-is + $B%O%s%I%i$rNc$($P0J2<$N$h$&$K4XO"IU$1$F$/$@$5$$!#(B

    + +
    + AddHandler send-as-is .asis +
    + +

    $B3HD%;R$,(B .asis $B$N$9$Y$F$N%U%!%$%k$NFbMF$O(B Apache + $B$+$i%/%i%$%"%s%H$X$[$H$s$IJQ99L5$/Aw$i$l$^$9!#%/%i%$%"%s%H$K$O(B + HTTP $B%X%C%@$,I,MW$G$9$N$G!"%U%!%$%k$K=q$/$3$H$rK:$l$J$$$G$/$@$5$$!#(B + Status: $B%X%C%@$bI,MW$G$9!#%G!<%?$O(B 3 $B7e$N(B HTTP + $B1~Ez%3!<%I$H!"$=$N8e$K%F%-%9%H%a%C%;!<%8$,B3$$$?$b$N$G$J$1$l$P$J$j$^$;$s!#(B + + $B$3$l$O%/%i%$%"%s%H$K%U%!%$%k$,0\F0$7$?$3$H$rCN$i$;$k$?$a$K(B + as is ($B$=$N$^$^(B) $B$GAw$i$l$k%U%!%$%k$NFbMF$NNc$G$9!#(B +

    + +
    + Status: 301 Now where did I leave that URL
    + Location: http://xyz.abc.com/foo/bar.html
    + Content-type: text/html
    +
    + <HTML>
    + <HEAD>
    + <TITLE>Lame excuses'R'us</TITLE>
    + </HEAD>
    + <BODY>
    + <H1>Fred's exceptionally wonderful page has moved + to
    + <A + HREF="http://xyz.abc.com/foo/bar.html">Joe's</A> + site.
    + </H1>
    + </BODY>
    + </HTML>
    +
    + +

    $BCm0U(B: $B%5!<%P$O%/%i%$%"%s%H$KJV$5$l$k%G!<%?$K>o$K(B Date: $B$H(B Server: + $B%X%C%@$rDI2C$7$^$9$N$G!"$=$l$i$,%U%!%$%k$K=q$+$l$F$$$F$O$$$1$^$;$s!#(B + $B%5!<%P$O(B Last-Modified $B%X%C%@$rDI2C(B$B$7$^$;$s(B$B!#(B + $B$*$=$i$/$O$=$&$9$Y$-$G$7$g$&$1$l$I!#(B +

    + + + diff --git a/htdocs/manual/mod/mod_auth.html.en b/htdocs/manual/mod/mod_auth.html.en new file mode 100644 index 00000000000..0cf1e66ef9e --- /dev/null +++ b/htdocs/manual/mod/mod_auth.html.en @@ -0,0 +1,312 @@ + + + + + + + Apache module mod_auth + + + + + + +

    Module mod_auth

    + +

    This module provides for user authentication using text + files.

    + +

    Status: Base
    + Source File: mod_auth.c
    + Module Identifier: + auth_module

    + +

    Summary

    + +

    This module allows the use of HTTP Basic Authentication to + restrict access by looking up users in plain text password and + group files. Similar functionality and greater scalability is + provided by mod_auth_dbm and mod_auth_db. HTTP Digest + Authentication is provided by mod_auth_digest.

    + +

    Note that these credential-based security mechanisms are + only as strong as your Web server's security. As a rule, they + are not as strong as the operating system's own security + system.

    + +

    Directives

    + + + +

    See also: require, satisfy, and mod_auth require keywords.

    +
    + +

    mod_auth + Require Keywords

    + +

    The mod_auth module supports the following + keywords that can be given to the Require directive:

    + +
    +
    user username [...]
    + +
    The supplied username and password must be in the AuthUserFile database, and the + username must also be one of those listed on the Require + directive.
    + +
    group groupname [...]
    + +
    The supplied username and password must be in the AuthUserFile database, and the + username must also be a member of one of the named groups in + the AuthGroupFile database.
    + +
    valid-user
    + +
    The supplied username and password must be in the AuthUserFile database. Any valid + username from that file will be allowed.
    + +
    file-owner
    + +
    [Available after Apache 1.3.20] The supplied username and + password must be in the AuthUserFile database, and the + username must also match the system's name for the owner of + the file being requested. That is, if the operating system + say the requested file is owned by jones, then + the username used to access it through the Web must be + jones as well.
    + +
    file-group
    + +
    [Available after Apache 1.3.20] The supplied username and + password must be in the AuthUserFile database, the name of + the group that owns the file must be in the AuthGroupFile database, and the + username must be a member of that group. For example, if the + operating system says the requested file is owned by group + accounts, the group accounts must + be in the AuthGroupFile database and the username used in the + request must be a member of that group.
    +
    +
    + +

    Example of Require + file-owner

    + +

    Consider a multi-user system running the Apache Web server, + with each user having his or her own files in + ~/public_html/private. Assuming that there is a + single AuthUserFile database that lists all of their usernames, + and that their Web usernames match the ones that actually own + the files on the server, then the following stanza would allow + only the user himself access to his own files. User + jones would not be allowed to access files in + /home/smith/public_html/private unless they were + owned by jones instead of smith.

    +
    +    <Directory /home/*/public_html/private>
    +        AuthType Basic
    +        AuthName MyPrivateFile
    +        AuthUserFile /usr/local/apache/etc/.htpasswd-allusers
    +        Satisfy All
    +        Require file-owner
    +    </Directory>
    +
    +
    + +

    AuthGroupFile directive

    + Syntax: AuthGroupFile + file-path
    + Context: directory, + .htaccess
    + Override: AuthConfig
    + Status: Base
    + Module: mod_auth + +

    The AuthGroupFile directive sets the name of a textual file + containing the list of user groups for user authentication. + File-path is the path to the group file. If it is not + absolute (i.e., if it doesn't begin with a slash), it + is treated as relative to the ServerRoot.

    + +

    Each line of the group file contains a groupname followed by + a colon, followed by the member usernames separated by spaces. + Example:

    + +
    + mygroup: bob joe anne +
    + Note that searching large text files is very + inefficient; AuthDBMGroupFile + should be used instead. + +

    Security: make sure that the AuthGroupFile is stored outside + the document tree of the web-server; do not put it in + the directory that it protects. Otherwise, clients will be able + to download the AuthGroupFile.

    + +

    See also AuthName, AuthType and AuthUserFile.

    +
    + +

    AuthUserFile + directive

    + Syntax: AuthUserFile + file-path
    + Context: directory, + .htaccess
    + Override: AuthConfig
    + Status: Base
    + Module: mod_auth + +

    The AuthUserFile directive sets the name of a textual file + containing the list of users and passwords for user + authentication. File-path is the path to the user + file. If it is not absolute (i.e., if it doesn't begin + with a slash), it is treated as relative to the ServerRoot.

    + +

    Each line of the user file contains a username followed by a + colon, followed by the crypt() encrypted password. + The behavior of multiple occurrences of the same user is + undefined.

    + +

    The utility htpasswd + which is installed as part of the binary distribution, or which + can be found in src/support, is used to maintain + this password file. See the man page for more + details. In short

    + +
    + htpasswd -c Filename username
    + Create a password file 'Filename' with 'username' as the + initial ID. It will prompt for the password. htpasswd + Filename username2
    + Adds or modifies in password file 'Filename' the 'username'. +
    + +

    Note that searching large text files is very + inefficient; AuthDBMUserFile + should be used instead.

    + +
    +
    Security:
    + +
    Make sure that the AuthUserFile is stored outside the + document tree of the web-server; do not put it in + the directory that it protects. Otherwise, clients may be + able to download the AuthUserFile.
    + +
    Also be aware that null usernames are permitted, and null + passwords as well (through Apache 1.3.20). If your + AuthUserFile includes a line containing only a colon (':'), a + 'Require valid-user' will allow access if both + the username and password in the credentials are + omitted.
    +
    + See also AuthName, AuthType and AuthGroupFile. +
    + +

    AuthAuthoritative directive

    + Syntax: AuthAuthoritative + on|off
    + Default: + AuthAuthoritative on
    + Context: directory, + .htaccess
    + Override: AuthConfig
    + Status: Base
    + Module: mod_auth + +

    Setting the AuthAuthoritative directive explicitly to + 'off' allows for both authentication and + authorization to be passed on to lower level modules (as + defined in the Configuration and + modules.c files) if there is no + userID or rule matching the supplied + userID. If there is a userID and/or rule specified; the usual + password and access checks will be applied and a failure will + give an Authorization Required reply.

    + +

    So if a userID appears in the database of more than one + module; or if a valid Require directive applies to + more than one module; then the first module will verify the + credentials; and no access is passed on; regardless of the + AuthAuthoritative setting.

    + +

    A common use for this is in conjunction with one of the + database modules; such as mod_auth_db.c, mod_auth_dbm.c, + mod_auth_msql.c, and mod_auth_anon.c. + These modules supply the bulk of the user credential checking; + but a few (administrator) related accesses fall through to a + lower level with a well protected AuthUserFile.

    + +

    Default: By default; control is + not passed on; and an unknown userID or rule will result in an + Authorization Required reply. Not setting it thus keeps the + system secure; and forces an NCSA compliant behavior.

    + +

    Security: Do consider the implications of allowing a user to + allow fall-through in his .htaccess file; and verify that this + is really what you want; Generally it is easier to just secure + a single .htpasswd file, than it is to secure a database such + as mSQL. Make sure that the AuthUserFile is stored outside the + document tree of the web-server; do not put it in the + directory that it protects. Otherwise, clients will be able to + download the AuthUserFile.

    + +

    See also AuthName, AuthType and AuthGroupFile.

    + +

    +

    + + + diff --git a/htdocs/manual/mod/mod_auth.html.html b/htdocs/manual/mod/mod_auth.html.html new file mode 100644 index 00000000000..a1bd808ee75 --- /dev/null +++ b/htdocs/manual/mod/mod_auth.html.html @@ -0,0 +1,4 @@ + + + diff --git a/htdocs/manual/mod/mod_auth.html.ja.jis b/htdocs/manual/mod/mod_auth.html.ja.jis new file mode 100644 index 00000000000..bb5edf89c2f --- /dev/null +++ b/htdocs/manual/mod/mod_auth.html.ja.jis @@ -0,0 +1,325 @@ + + + + + + Apache module mod_auth + + + + + + + +

    mod_auth $B%b%8%e!<%k(B

    + +

    + $B$3$N%b%8%e!<%k$O%F%-%9%H%U%!%$%k$r;H$C$F%f!<%6$NG'>Z$r9T$J$&5!G=$r(B + $BDs6!$7$^$9!#(B

    + +

    $B%9%F!<%?%9(B: Base
    + $B%=!<%9%U%!%$%k(B: + mod_auth.c
    + $B%b%8%e!<%k<1JL;R(B: + auth_module

    + +

    $B35MW(B

    + +

    + $B$3$N%b%8%e!<%k$O%f!<%6$r%W%l!<%s%F%-%9%H$N%Q%9%o!<%I$H%0%k!<%W(B + $B%U%!%$%k$GD4$Y$k$3$H$K$h$j!"(BHTTP + $B4pK\G'>Z$G%"%/%;%9$r@)8B$9$k$3$H$r(B + $B2DG=$K$7$^$9!#F1MM$N5!G=$G%9%1!<%i%S%j%F%#$N$"$k$b$N$O(B mod_auth_dbm $B$H(B mod_auth_db $B$K$h$jDs6!$5$l$^$9!#(B + HTTP $B%@%$%8%'%9%HG'>Z$O(B mod_auth_digest + $B$K$h$jDs6!$5$l$F$$$^$9!#(B

    + +

    + $B$3$l$i$NG'>Z$K4p$E$$$?%;%-%e%j%F%#$N5!9=$O$;$$$<$$%&%'%V%5!<%P$N(B + $B%;%-%e%j%F%#$HF1DxEY$N6/EY$G$"$k$3$H$KCm0U$7$F$/$@$5$$!#(B + $B0lHL$K!"%*%Z%l!<%F%#%s%0%7%9%F%`$N%;%-%e%j%F%#%7%9%F%`$[$I$O(B + $B6/$/(B$B$"$j$^$;$s(B$B!#(B

    + +

    $B%G%#%l%/%F%#%V(B

    + + + +

    $B;2>H(B: require, satisfy, mod_auth + require $B%-!<%o!<%I(B$B!#(B

    +
    + +

    mod_auth Require + $B%-!<%o!<%I(B

    + +

    mod_auth $B%b%8%e!<%k$O(B Require $B%G%#%l%/%F%#%V$KBP$9$k(B + $B0J2<$N%-!<%o!<%I$r%5%]!<%H$7$^$9(B:

    + +
    +
    user username [...]
    + +
    $BM?$($i$l$?%f!<%6L>$H%Q%9%o!<%I$O(B AuthUserFile + $B%G!<%?%Y!<%9$KB8:_$9$k(B $BI,MW$,$"$j!"$5$i$K%f!<%6L>$,(B + Require $B%G%#%l%/%F%#%V$K%j%9%H(B + $B$5$l$F$$$kI,MW$,$"$j$^$9!#(B
    + +
    group groupname [...]
    + +
    $BM?$($i$l$?%f!<%6L>$H%Q%9%o!<%I$O(B AuthUserFile + $B%G!<%?%Y!<%9$KB8:_$9$k(B $BI,MW$,$"$j!"$5$i$K%f!<%6L>$,(B + AuthGroupFile + $B%G!<%?%Y!<%9$K$"$k(B + $B;XDj$5$l$?%0%k!<%W$N%a%s%P$G$"$kI,MW$,$"$j$^$9!#(B
    + +
    valid-user
    + +
    $BM?$($i$l$?%f!<%6L>$H%Q%9%o!<%I$,(B AuthUserFile + $B%G!<%?%Y!<%9$KB8:_$9$k(B + $BI,MW$,$"$j$^$9!#$=$N%U%!%$%k$K$"$kM-8z$J%f!<%6L>$O%"%/%;%9$,5v2D(B + $B$5$l$^$9!#(B
    + +
    file-owner
    + +
    [Apache 1.3.20 $B$+$i(B] + $BM?$($i$l$?%f!<%6L>$H%Q%9%o!<%I$O(B AuthUserFile + $B%G!<%?%Y!<%9$KB8:_$9$k(B + $BI,MW$,$"$j!"$5$i$K%f!<%6L>$,%j%/%(%9%H$5$l$?%U%!%$%k$N(B + $B%7%9%F%`$N=jM-A0$H0lCW$9$kI,MW$,$"$j$^$9!#$D$^$j!"(B + $B%*%Z%l!<%F%#%s%0%7%9%F%`$,%j%/%(%9%H$5$l$?%U%!%$%k$,(B + jones $B$G$"$k!"$H8@$C$?>l9g$O!"(BWeb + $B$rDL$7$F(B $B%"%/%;%9$9$k%f!<%6L>$b(B jones + $B$G$"$kI,MW$G$"$k!"(B $B$H$$$&$3$H$G$9!#(B
    + +
    file-group
    + +
    [Apache 1.3.20 $B$+$i(B] + $BM?$($i$l$?%f!<%6L>$H%Q%9%o!<%I$O(B AuthUserFile + $B%G!<%?%Y!<%9$KB8:_$9$k(B + $BI,MW$,$"$j!"%U%!%$%k$r=jM-$9$k%0%k!<%WL>$,(B AuthGroupFile $B%G!<%?%Y!<%9$K(B + $B$"$kI,MW$,$"$j!"%f!<%6L>$,$=$N%0%k!<%W$N%a%s%P$G$"$kI,MW$,$"$j$^$9!#(B + $BNc$($P!"%*%Z%l!<%F%#%s%0%7%9%F%`$,%j%/%(%9%H$5$l$?%U%!%$%k$,(B + $B%0%k!<%W(B accounts + $B$K$h$j=jM-$5$l$F$$$k$H8@$C$?(B $B>l9g!"%0%k!<%W(B + accounts $B$,(B AuthGroupFile $B%G!<%?%Y!<%9$K(B + $BB0$7$F$$$kI,MW$,$"$j!"%j%/%(%9%H$K;HMQ$5$l$?%f!<%6L>$b(B + $B$=$N%0%k!<%W$N%a%s%P$G$"$kI,MW$,$"$j$^$9!#(B
    +
    +
    + +

    AuthGroupFile + $B%G%#%l%/%F%#%V(B

    + $B9=J8(B: AuthGroupFile + filename
    + $B%3%s%F%-%9%H(B: + $B%G%#%l%/%H%j!"(B.htaccess
    + $B>e=q$-(B: AuthConfig
    + $B%9%F!<%?%9(B: Base
    + $B%b%8%e!<%k(B: mod_auth + +

    AuthGroupFile $B%G%#%l%/%F%#%V$O%f!<%6G'>Z$N$?$a$N(B + $B%f!<%6%0%k!<%W$N%j%9%H$,=q$+$l$?%F%-%9%H%U%!%$%k$NL>A0$r@_Dj$7$^$9!#(B + Filename + $B$O%0%k!<%W%U%!%$%k$N%Q%9$G$9!#@dBP%Q%9$G$J$$$H$-$O(B + ($B$9$J$o$A(B$B!"%9%i%C%7%e$G;O$^$i$J$$$H$-$O(B)$B!"(BServerRoot + $B$+$i$NAjBP%Q%9$H$7$F07$o$l$^$9!#(B

    + +

    + $B%0%k!<%W%U%!%$%k$N$=$l$>$l$N9T$O!"%0%k!<%WL>!"%3%m%s!"6uGr$G(B + $B6h@Z$i$l$?%0%k!<%W$KB0$9$k%f!<%6L>!"$+$i$J$j$^$9!#Nc(B:

    + +
    + mygroup: bob joe anne +
    + +

    + $BBg$-$J%F%-%9%H%U%!%$%k$rC5$9$N$O(B$BHs>o(B$B$K8zN($,0-$$$H$$$&$3$H$K(B + $BCm0U$7$F$/$@$5$$!#$=$N$h$&$J>l9g$O!"Be$o$j$K(B AuthDBMGroupFile + $B$r(B $B;H$C$F$/$@$5$$!#(B

    + +

    $B%;%-%e%j%F%#(B: AuthGroupFile + $B$OI,$:%&%'%V%5!<%P$N%I%-%e%a%s%H%D%j!<$N30$K(B + $BJ]4I$7$F$/$@$5$$!#$=$l$,J]8n$7$F$$$k%G%#%l%/%H%j$K$OCV$+(B$B$J$$(B$B$G(B + $B$/$@$5$$!#$=$&$G$J$$$H!"%/%i%$%"%s%H$,(B AuthGroupFile + $B$r%@%&%s%m!<%I(B $B$G$-$F$7$^$$$^$9!#(B

    + +

    AuthName, AuthType, AuthUserFile + $B$b;2>H$7$F$/$@$5$$!#(B

    +
    + +

    AuthUserFile + $B%G%#%l%/%F%#%V(B

    + $B9=J8(B: AuthUserFile + file-path
    + $B%3%s%F%-%9%H(B: + $B%G%#%l%/%H%j!"(B.htaccess
    + $B>e=q$-(B: AuthConfig
    + $B%9%F!<%?%9(B: Base
    + $B%b%8%e!<%k(B: mod_auth
    + + +

    AuthUserFile + $B%G%#%l%/%F%#%V$O%f!<%6G'>Z$N$?$a$N%f!<%6$H%Q%9%o!<%I$N(B + $B%j%9%H$,=q$+$l$?%F%-%9%H%U%!%$%k$rL>A0$r@_Dj$7$^$9!#(BFile-path + $B$O(B $B%f!<%6%U%!%$%k$X$N%Q%9$G$9!#@dBP%Q%9$G$J$$$H$-$O(B + ($B$9$J$o$A(B$B!"(B + $B%9%i%C%7%e$G;O$^$i$J$$$H$-$O(B)$B!"(BServerRoot + $B$+$i$NAjBP%Q%9$H$7$F07$o$l$^$9!#(B

    + +

    + $B%f!<%6%U%!%$%k$N$=$l$>$l$N9T$O!"%f!<%6L>!"%3%m%s!"(Bcrypt() + $B$K$h$j0E9f2=$5$l$?(B + $B%Q%9%o!<%I!"$+$i$J$j$^$9!#F1$8%f!<%6$,J#?t2s8=$l$?$H$-$NF0:n$O(B + $BITDj$G$9!#(B

    + +

    + $B%P%$%J%jG[I[$N0lIt$H$7$F%$%s%9%H!<%k$5$l$F$$$k$+!"(Bsrc/support + $B$K$"$k(B htpasswd + $B%f!<%F%#%j%F%#$O!"(B + $B$3$N%Q%9%o!<%I%U%!%$%k$r0];}$9$k$?$a$K;HMQ$5$l$^$9!#>\:Y$O(B + man + $B%Z!<%8$r;2>H$7$F$/$@$5$$!# + +

    + htpasswd -c Filename username
    + $B$O(B 'username' $B$r=i4|(B ID $B$H$7$F%Q%9%o!<%I%U%!%$%k(B + 'Filename' $B$r(B + $B:n@.$7$^$9!#$3$l$O%Q%9%o!<%I$NF~NO$rB%$7$^$9!#(B htpasswd + Filename username2
    + $B$O%Q%9%o!<%I%U%!%$%k(B 'Filename' $B$K(B 'username' $B$r(B + $BDI2C$9$k$+!"4{$K$"$k(B 'username' $B$r=$@5$7$^$9!#(B +
    + +

    + $BBg$-$J%F%-%9%H%U%!%$%k$rC5$9$N$O(B$BHs>o(B$B$K8zN($,0-$$$H$$$&$3$H$K(B + $BCm0U$7$F$/$@$5$$!#$=$N$h$&$J>l9g$O!"Be$o$j$K(B AuthDBMUserFile + $B$r(B $B;H$C$F$/$@$5$$!#(B

    + +

    $B%;%-%e%j%F%#(B: AuthUserFile + $B$OI,$:%&%'%V%5!<%P$N%I%-%e%a%s%H%D%j!<$N30$K(B + $BJ]4I$7$F$/$@$5$$!#$=$l$,J]8n$7$F$$$k(B + $B%G%#%l%/%H%j$K$OCV$+$J$$$G$/$@$5$$!#(B + $B$=$&$G$J$$$H!"%/%i%$%"%s%H$,(B AuthUserFile + $B$r%@%&%s%m!<%I$G$-$F$7$^$$$^$9!#(B

    + +

    AuthName, AuthType, AuthGroupFile + $B$b;2>H$7$F$/$@$5$$!#(B

    +
    + +

    AuthAuthoritative + $B%G%#%l%/%F%#%V(B

    + $B9=J8(B: AuthAuthoritative + on|off
    + $B%G%U%)%k%H(B: + AuthAuthoritative on
    + $B%3%s%F%-%9%H(B: + $B%G%#%l%/%H%j!"(B.htaccess
    + $B>e=q$-(B: AuthConfig
    + $B%9%F!<%?%9(B: Base
    + $B%b%8%e!<%k(B: mod_auth + +

    AuthAuthoritative $B%G%#%l%/%F%#%V$rL@<(E*$K(B + 'off' $B$K(B $B@_Dj$9$k$H!"(BuserID + $B$K9g$&(B userID $B$,L5$$(B $B$H$-$H!"(B + $B$=$l$K9g$&(B$B%k!<%k(B$B$,L5$$$H$-$K!"G'>Z$H8"8B$NIUM?$NN>J}$r(B + ($B@_Dj(B $B$d(B modules.c + $B$GDj5A$5$l$F$$$k(B $BJ}K!$G(B) + $B2<0L$N%b%8%e!<%k$KEO$9$3$H$r2DG=$K$7$^$9!#(B userID + $B$+%k!<%k$,;XDj$5$l$F$$$k$H$-$K$O!"DL>o$HF1$8%Q%9%o!<%I$H(B + $B%"%/%;%9$N%A%'%C%/$,9T$J$o$l!"@.8y$7$J$+$C$?>l9g$O(B + Authorization Required $B1~Ez$,JV$5$l$^$9!#(B

    + +

    $B$G$9$+$i!"(BuserID + $B$,J#?t$N%b%8%e!<%k$N%G!<%?%Y!<%9$K8=$l$?$j!"(B $B@5$7$$(B + Require + $B%G%#%l%/%F%#%V$,J#?t$N%b%8%e!<%k$KE,MQ$5$l$?$j(B + $B$9$k$H$-$O!":G=i$N%b%8%e!<%k$,;q3J$rD4::$7$^$9!#(BAuthAuthoritative + $B$N(B + $B@_Dj$K4X$o$i$:!"%"%/%;%9$ND4::$OJL$N%b%8%e!<%k$K$OEO$5$l$^$;$s!#(B

    + +

    $B$3$N%G%#%l%/%F%#%V$NIaDL$NMxMQJ}K!$O!"(Bmod_auth_db.c, mod_auth_dbm.c, + mod_auth_msql.c, mod_auth_anon.c + $B$N$h$&$J%G!<%?%Y!<%9%b%8%e!<%k$H0l=o$K;H$&$b$N$G$9!#(B + $B$3$l$i$N%b%8%e!<%k$OBgItJ,$N%f!<%6$N;q3JD4::$r9T$J$&5!G=$rDs6!$7$^$9!#(B + $B$7$+$7!">.?t$N(B ($B4IM} + +

    $B%G%U%)%k%H(B: + $B%G%U%)%k%H$G$O@)8f$OEO$5$l$^$;$s!#(B $BCN$i$J$$(B userID + $B$d%k!<%k$N7k2L$O(B Authorization Require $B1~Ez$K$J$j$^$9!#(B + $B$G$9$+$i!"$3$N%G%#%l%/%F%#%V$r@_Dj$7$J$$$H%7%9%F%`$r0BA4$KJ]$D$3$H$,$G$-!"(B + NCSA $B$HF1$8F0:n$r$9$k$h$&$K$G$-$^$9!#(B

    + +
    +
    $B%;%-%e%j%F%#(B:
    + +
    AuthUserFile + $B$OI,$:%&%'%V%5!<%P$N%I%-%e%a%s%H%D%j!<$N30$KJ]4I$7$F$/$@$5$$!#(B + $B$=$l$,J]8n$7$F$$$k(B + $B%G%#%l%/%H%j$K$OCV$+(B$B$J$$(B$B$G$/$@$5$$!#(B + $B$=$&$G$J$$$H!"%/%i%$%"%s%H$,(B AuthUserFile + $B$r%@%&%s%m!<%I$G$-$F$7$^$$$^$9!#(B
    + +
    + $B$^$?!"6u$N%f!<%6L>$d!"6u$N%Q%9%o!<%I$,5v2D$5$l$k$3$H$KCm0U$7$F$/$@$5$$(B + (Apache 1.3.20 $B$+$i(B)$B!#(B AuthUserFile $B$K%3%m%s(B + (':') $B$N$_$N9T$,$"$l$P!"(B + $BG'>Z;~$K%f!<%6L>$H%Q%9%o!<%I$,N>J}6&>JN,$5$l$?$H$-$K(B + 'Require valid-user' + $B$O%"%/%;%9$r5v2D$7$^$9!#(B
    +
    + +

    AuthName, AuthType, AuthGroupFile + $B$b;2>H$7$F$/$@$5$$!#(B

    + + + + diff --git a/htdocs/manual/mod/mod_auth_anon.html b/htdocs/manual/mod/mod_auth_anon.html new file mode 100644 index 00000000000..55a206ab30a --- /dev/null +++ b/htdocs/manual/mod/mod_auth_anon.html @@ -0,0 +1,286 @@ + + + + + + + Apache module mod_auth_anon.c + + + + + + +

    Module mod_auth_anon

    + This module allows "anonymous" user access to authenticated + areas. + +

    Status: Extension
    + Source File: + mod_auth_anon.c
    + Module Identifier: + anon_auth_module
    + Compatibility: Available in + Apache 1.1 and later.

    + +

    Summary

    + +

    This module does access control in a manner similar to + anonymous-ftp sites; i.e. have a 'magic' user id + 'anonymous' and the email address as a password. These email + addresses can be logged.

    + +

    Combined with other (database) access control methods, this + allows for effective user tracking and customization according + to a user profile while still keeping the site open for + 'unregistered' users. One advantage of using Auth-based user + tracking is that, unlike magic-cookies and funny URL + pre/postfixes, it is completely browser independent and it + allows users to share URLs.

    + +

    Directives

    + + + +

    Example

    + The example below (when combined with the Auth directives of a + htpasswd-file based (or GDM, mSQL etc.) base access + control system allows users in as 'guests' with the following + properties: + +
      +
    • It insists that the user enters a userId. + (Anonymous_NoUserId)
    • + +
    • It insists that the user enters a password. + (Anonymous_MustGiveEmail)
    • + +
    • The password entered must be a valid email address, ie. + contain at least one '@' and a '.'. + (Anonymous_VerifyEmail)
    • + +
    • The userID must be one of anonymous guest www test + welcome and comparison is not case + sensitive.
    • + +
    • And the Email addresses entered in the passwd field are + logged to the error log file + (Anonymous_LogEmail)
    • +
    + +

    Excerpt of httpd.conf:

    + +
    +
    +Anonymous_NoUserId      off
    +Anonymous_MustGiveEmail on
    +Anonymous_VerifyEmail    on
    +Anonymous_LogEmail      on
    +Anonymous        anonymous guest www test welcome
    +
    +AuthName                "Use 'anonymous' & Email address for guest entry"
    +AuthType                basic
    +
    +# An AuthUserFile/AuthDBUserFile/AuthDBMUserFile
    +# directive must be specified, or use
    +# Anonymous_Authoritative for public access.
    +# In the .htaccess for the public directory, add:
    +<Files *>
    +Order Deny,Allow          
    +Allow from all            
    +
    +Require valid-user        
    +</Files>
    +
    +
    +
    + +

    Anonymous + directive

    + Syntax: Anonymous user + [user] ...
    + Default: none
    + Context: directory, + .htaccess
    + Override: AuthConfig
    + Status: Extension
    + Module: mod_auth_anon + +

    A list of one or more 'magic' userIDs which are allowed + access without password verification. The userIDs are space + separated. It is possible to use the ' and " quotes to allow a + space in a userID as well as the \ escape character.

    + +

    Please note that the comparison is + case-IN-sensitive.
    + I strongly suggest that the magic username + 'anonymous' is always one of the allowed + userIDs.

    + +

    Example:
    + Anonymous anonymous "Not Registered" 'I don\'t + know'

    + +

    This would allow the user to enter without password + verification by using the userId's 'anonymous', + 'AnonyMous','Not Registered' and 'I Don't Know'.

    +
    + +

    Anonymous_Authoritative directive

    + Syntax: Anonymous_Authoritative + on|off
    + Default: + Anonymous_Authoritative off
    + Context: directory, + .htaccess
    + Override: AuthConfig
    + Status: Extension
    + Module: mod_auth_anon + +

    When set 'on', there is no fall-through to other + authorization methods. So if a userID does not match the values + specified in the Anonymous directive, access is + denied.

    + +

    Be sure you know what you are doing when you decide to + switch it on. And remember that it is the linking order of the + modules (in the Configuration / Make file) which details the + order in which the Authorization modules are queried.

    +
    + +

    Anonymous_LogEmail + directive

    + Syntax: Anonymous_LogEmail + on|off
    + Default: + Anonymous_LogEmail on
    + Context: directory, + .htaccess
    + Override: AuthConfig
    + Status: Extension
    + Module: mod_auth_anon + +

    When set 'on', the default, the 'password' entered (which + hopefully contains a sensible email address) is logged in the + error log. The message is logged at a level of info, + and so you must have LogLevel set + to at least info in order to see this message.

    + +

    Log entries will look like the following example:

    + +
    +[Fri Apr 26 14:49:50 2002] [info] [client 192.168.1.105] Anonymous: Passwd  Accepted
    +
    + +
    + +

    Anonymous_MustGiveEmail directive

    + + Syntax: Anonymous_MustGiveEmail + on|off
    + Default: + Anonymous_MustGiveEmail on
    + Context: directory, + .htaccess
    + Override: AuthConfig
    + Status: Extension
    + Module: mod_auth_anon + +

    Specifies whether the user must specify an email address as + the password. This prohibits blank passwords.

    +
    + +

    Anonymous_NoUserID + directive

    + Syntax: Anonymous_NoUserID + on|off
    + Default: + Anonymous_NoUserID off
    + Context: directory, + .htaccess
    + Override: AuthConfig
    + Status: Extension
    + Module: mod_auth_anon + +

    When set 'on', users can leave the userID (and perhaps the + password field) empty. This can be very convenient for + MS-Explorer users who can just hit return or click directly on + the OK button; which seems a natural reaction.

    +
    + +

    Anonymous_VerifyEmail directive

    + Syntax: Anonymous_VerifyEmail + on|off
    + Default: + Anonymous_VerifyEmail off
    + Context: directory, + .htaccess
    + Override: AuthConfig
    + Status: Extension
    + Module: mod_auth_anon + +

    When set 'on' the 'password' entered is checked for at least + one '@' and a '.' to encourage users to enter valid email + addresses (see the above Auth_LogEmail). + +

    + + + diff --git a/htdocs/manual/mod/mod_auth_db.html b/htdocs/manual/mod/mod_auth_db.html new file mode 100644 index 00000000000..e5bac8dc8f8 --- /dev/null +++ b/htdocs/manual/mod/mod_auth_db.html @@ -0,0 +1,238 @@ + + + + + + + Apache module mod_auth_db + + + + + + +

    Module mod_auth_db

    + +

    This module provides for user authentication using Berkeley + DB files.

    + +

    Status: Extension
    + Source File: + mod_auth_db.c
    + Module Identifier: + db_auth_module
    + Compatibility: Available in + Apache 1.1 and later.

    + +

    Summary

    + +

    This module provides an alternative to DBM files for those systems which + support DB and not DBM. It is only available in Apache 1.1 and + later.

    + +

    On some BSD systems (e.g., FreeBSD and NetBSD) dbm + is automatically mapped to Berkeley DB. You can use either mod_auth_dbm or mod_auth_db. The + latter makes it more obvious that it's Berkeley DB. On other + platforms where you want to use the DB library you usually have + to install it first. See http://www.sleepycat.com/ + for the distribution. The interface this module uses is the one + from DB version 1.85 and 1.86, but DB version 2.x can also be + used when compatibility mode is enabled.

    + +

    Directives

    + + + +

    See also: satisfy and require.

    +
    + +

    AuthDBGroupFile directive

    + + Syntax: AuthDBGroupFile + file-path
    + Context: directory, + .htaccess
    + Override: AuthConfig
    + Status: Extension
    + Module: mod_auth_db + +

    The AuthDBGroupFile directive sets the name of a DB file + containing the list of user groups for user authentication. + File-path is the absolute path to the group file.

    + +

    The group file is keyed on the username. The value for a + user is a comma-separated list of the groups to which the users + belongs. There must be no whitespace within the value, and it + must never contain any colons.

    + +

    Security: make sure that the AuthDBGroupFile is stored + outside the document tree of the web-server; do not + put it in the directory that it protects. Otherwise, clients + will be able to download the AuthDBGroupFile unless otherwise + protected.

    + +

    Combining Group and Password DB files: In some cases it is + easier to manage a single database which contains both the + password and group details for each user. This simplifies any + support programs that need to be written: they now only have to + deal with writing to and locking a single DBM file. This can be + accomplished by first setting the group and password files to + point to the same DB file:

    + +
    + AuthDBGroupFile /www/userbase
    + AuthDBUserFile /www/userbase
    +
    + The key for the single DB record is the username. The value + consists of + +
    + Unix Crypt-ed Password : List of Groups [ : (ignored) + ] +
    + The password section contains the Unix crypt() password as + before. This is followed by a colon and the comma separated + list of groups. Other data may optionally be left in the DB + file after another colon; it is ignored by the authentication + module. + +

    See also AuthName, AuthType and AuthDBUserFile.

    +
    + +

    AuthDBUserFile directive

    + + Syntax: AuthDBUserFile + file-path
    + Context: directory, + .htaccess
    + Override: AuthConfig
    + Status: Extension
    + Module: mod_auth_db + +

    The AuthDBUserFile directive sets the name of a DB file + containing the list of users and passwords for user + authentication. File-path is the absolute path to the + user file.

    + +

    The user file is keyed on the username. The value for a user + is the crypt() encrypted password, optionally followed by a + colon and arbitrary data. The colon and the data following it + will be ignored by the server.

    + +

    Security: make sure that the AuthDBUserFile is stored + outside the document tree of the web-server; do not + put it in the directory that it protects. Otherwise, clients + will be able to download the AuthDBUserFile.

    + +

    Important compatibility note: The implementation of + "dbmopen" in the apache modules reads the string length of the + hashed values from the DB data structures, rather than relying + upon the string being NULL-appended. Some applications, such as + the Netscape web server, rely upon the string being + NULL-appended, so if you are having trouble using DB files + interchangeably between applications this may be a part of the + problem.

    + +

    A perl script called + href="../programs/dbmmanage.html">dbmmanage is included with + Apache. This program can be used to create and update DB format + password files for use with this module.

    + See also AuthName, AuthType and AuthDBGroupFile. +
    + +

    AuthDBAuthoritative + directive

    + + Syntax: AuthDBAuthoritative + on|off
    + Default: + AuthDBAuthoritative on
    + Context: directory, + .htaccess
    + Override: AuthConfig
    + Status: Base
    + Module: mod_auth + +

    Setting the AuthDBAuthoritative directive explicitly to + 'off' allows for both authentication and + authorization to be passed on to lower level modules (as + defined in the Configuration and + modules.c file if there is no + userID or rule matching the supplied + userID. If there is a userID and/or rule specified; the usual + password and access checks will be applied and a failure will + give an Authorization Required reply.

    + +

    So if a userID appears in the database of more than one + module; or if a valid Require directive applies to + more than one module; then the first module will verify the + credentials; and no access is passed on; regardless of the + AuthAuthoritative setting.

    + +

    A common use for this is in conjunction with one of the + basic auth modules; such as mod_auth.c. Whereas this + DB module supplies the bulk of the user credential checking; a + few (administrator) related accesses fall through to a lower + level with a well protected .htpasswd file.

    + +

    By default, control is not passed on and an unknown userID + or rule will result in an Authorization Required reply. Not + setting it thus keeps the system secure and forces an NCSA + compliant behavior.

    + +

    Security: Do consider the implications of allowing a user to + allow fall-through in his .htaccess file; and verify that this + is really what you want; Generally it is easier to just secure + a single .htpasswd file, than it is to secure a database which + might have more access interfaces.

    + +

    See also AuthName, AuthType and AuthDBGroupFile.

    + +

    +

    + + + diff --git a/htdocs/manual/mod/mod_auth_dbm.html b/htdocs/manual/mod/mod_auth_dbm.html new file mode 100644 index 00000000000..2b8b5aabf38 --- /dev/null +++ b/htdocs/manual/mod/mod_auth_dbm.html @@ -0,0 +1,225 @@ + + + + + + + Apache module mod_auth_dbm + + + + + + +

    Module mod_auth_dbm

    + +

    This module provides for user authentication using DBM + files.

    + +

    Status: Extension
    + Source File: + mod_auth_dbm.c
    + Module Identifier: + dbm_auth_module

    + +

    Summary

    + +

    This module provides for HTTP Basic Authentication, where + the usernames and passwords are stored in DBM type database + files. It is an alternative to the plain text password files + provided by mod_auth and the + Berkely DB password files provided by mod_auth_db.

    + +

    Directives

    + + + +

    See also: Satisfy and Require.

    +
    + +

    AuthDBMGroupFile

    + Syntax: AuthDBMGroupFile + file-path
    + Context: directory, + .htaccess
    + Override: AuthConfig
    + Status: Extension
    + Module: mod_auth_dbm + +

    The AuthDBMGroupFile directive sets the name of a DBM file + containing the list of user groups for user authentication. + File-path is the absolute path to the group file.

    + +

    The group file is keyed on the username. The value for a + user is a comma-separated list of the groups to which the users + belongs. There must be no whitespace within the value, and it + must never contain any colons.

    + +

    Security: make sure that the AuthDBMGroupFile is stored + outside the document tree of the web-server; do not + put it in the directory that it protects. Otherwise, clients + will be able to download the AuthDBMGroupFile unless otherwise + protected.

    + +

    Combining Group and Password DBM files: In some cases it is + easier to manage a single database which contains both the + password and group details for each user. This simplifies any + support programs that need to be written: they now only have to + deal with writing to and locking a single DBM file. This can be + accomplished by first setting the group and password files to + point to the same DBM:

    + +
    + AuthDBMGroupFile /www/userbase
    + AuthDBMUserFile /www/userbase
    +
    + The key for the single DBM is the username. The value consists + of + +
    + Unix Crypt-ed Password : List of Groups [ : (ignored) + ] +
    + The password section contains the Unix crypt() password as + before. This is followed by a colon and the comma separated + list of groups. Other data may optionally be left in the DBM + file after another colon; it is ignored by the authentication + module. This is what www.telescope.org uses for its combined + password and group database. + +

    See also AuthName, AuthType and AuthDBMUserFile.

    +
    + +

    AuthDBMUserFile

    + + Syntax: AuthDBMUserFile + file-path
    + Context: directory, + .htaccess
    + Override: AuthConfig
    + Status: Extension
    + Module: mod_auth_dbm + +

    The AuthDBMUserFile directive sets the name of a DBM file + containing the list of users and passwords for user + authentication. File-path is the absolute path to the + user file.

    + +

    The user file is keyed on the username. The value for a user + is the crypt() encrypted password, optionally followed by a + colon and arbitrary data. The colon and the data following it + will be ignored by the server.

    + +

    Security: make sure that the AuthDBMUserFile is stored + outside the document tree of the web-server; do not + put it in the directory that it protects. Otherwise, clients + will be able to download the AuthDBMUserFile.

    + +

    Important compatibility note: The implementation of + "dbmopen" in the apache modules reads the string length of the + hashed values from the DBM data structures, rather than relying + upon the string being NULL-appended. Some applications, such as + the Netscape web server, rely upon the string being + NULL-appended, so if you are having trouble using DBM files + interchangeably between applications this may be a part of the + problem.

    + +

    A perl script called dbmmanage is included + with Apache. This program can be used to create and update DBM + format password files for use with this module.

    + See also AuthName, AuthType and AuthDBMGroupFile. +
    + +

    AuthDBMAuthoritative

    + + Syntax: AuthDBMAuthoritative + on|off
    + Default: + AuthDBMAuthoritative on
    + Context: directory, + .htaccess
    + Override: AuthConfig
    + Status: Extension
    + Module: mod_auth_dbm + +

    Setting the AuthDBMAuthoritative directive explicitly to + 'off' allows for both authentication and + authorization to be passed on to lower level modules (as + defined in the Configuration and + modules.c file if there is no + userID or rule matching the supplied + userID. If there is a userID and/or rule specified; the usual + password and access checks will be applied and a failure will + give an Authorization Required reply.

    + +

    So if a userID appears in the database of more than one + module; or if a valid Require directive applies to + more than one module; then the first module will verify the + credentials; and no access is passed on; regardless of the + AuthAuthoritative setting.

    + +

    A common use for this is in conjunction with one of the + basic auth modules; such as mod_auth.c. Whereas this + DBM module supplies the bulk of the user credential checking; a + few (administrator) related accesses fall through to a lower + level with a well protected .htpasswd file.

    + +

    By default, control is not passed on and an unknown userID + or rule will result in an Authorization Required reply. Not + setting it thus keeps the system secure and forces an NCSA + compliant behavior.

    + +

    Security: Do consider the implications of allowing a user to + allow fall-through in his .htaccess file; and verify that this + is really what you want; Generally it is easier to just secure + a single .htpasswd file, than it is to secure a database which + might have more access interfaces.

    + +

    See also AuthName, AuthType and AuthDBMGroupFile.

    + +

    +

    + + + diff --git a/htdocs/manual/mod/mod_auth_digest.html b/htdocs/manual/mod/mod_auth_digest.html new file mode 100644 index 00000000000..d59439ac0fe --- /dev/null +++ b/htdocs/manual/mod/mod_auth_digest.html @@ -0,0 +1,402 @@ + + + + + + + Apache module mod_auth_digest + + + + + + +

    Module mod_auth_digest

    + +

    This module provides for user authentication using MD5 + Digest Authentication.

    + +

    Status: Experimental
    + Source File: + mod_auth_digest.c
    + Module Identifier: + digest_auth_module
    + Compatibility: Available in + Apache 1.3.8 and later.

    + +

    Summary

    + +

    This is an updated version of mod_digest. However, it has not been + extensively tested and is therefore marked experimental. If you + use this module, you must make sure to not use + mod_digest (because they share some of the same configuration + directives).

    + +

    Digest authentication is described in RFC + 2617.

    + +

    Directives

    + +
    + +

    See also: Require and Satisfy.

    + +

    Using Digest + Authentication

    + +

    Using MD5 Digest authentication is very simple. Simply set + up authentication normally, using "AuthType Digest" and + "AuthDigestFile" instead of the normal "AuthType Basic" and + "AuthUserFile"; also, replace any "AuthGroupFile" with + "AuthDigestGroupFile". Then add a "AuthDigestDomain" directive + containing at least the root URI(s) for this protection space. + Example:

    +
    +  <Location /private/>
    +  AuthType Digest
    +  AuthName "private area"
    +  AuthDigestDomain /private/ http://mirror.my.dom/private2/
    +  AuthDigestFile /web/auth/.digest_pw
    +  Require valid-user
    +  </Location>
    +
    + +

    Note: Digest authentication is more secure than + Basic authentication, but only works with supporting browsers. As of + September 2004, major browsers that support digest authentication + include Amaya, Konqueror, MS Internet Explorer + for Mac OS X and Windows (although the Windows version fails when + used with a query string -- see "Working with MS + Internet Explorer" below for a workaround), Mozilla, + Netscape 7, Opera, and Safari. lynx does not + support digest authentication. Since digest authentication is not as + widely implemented as basic authentication, you should use it only + in environments where all users will have supporting browsers.

    +
    + +

    AuthDigestFile directive

    + Syntax: AuthDigestFile + file-path
    + Context: directory, + .htaccess
    + Override: AuthConfig
    + Status: Experimental
    + Module: mod_auth_digest
    + + +

    The AuthDigestFile directive sets the name of a textual file + containing the list of users and encoded passwords for digest + authentication. File-path is the absolute path to the + user file.

    + +

    The digest file uses a special format. Files in this format + can be created using the htdigest utility found in + the support/ subdirectory of the Apache distribution.

    +
    + +

    AuthDigestGroupFile + directive

    + Syntax: AuthDigestGroupFile + file-path
    + Context: directory, + .htaccess
    + Override: AuthConfig
    + Status: Experimental
    + Module: mod_auth_digest
    + Compatibility: Available in + Apache 1.3.8 and later + +

    The AuthDigestGroupFile directive sets the name of a textual + file containing the list of groups and their members (user + names). File-path is the absolute path to the group + file.

    + +

    Each line of the group file contains a groupname followed by + a colon, followed by the member usernames separated by spaces. + Example:

    + +
    + mygroup: bob joe anne +
    + Note that searching large text files is very + inefficient. + +

    Security: make sure that the AuthGroupFile is stored outside + the document tree of the web-server; do not put it in + the directory that it protects. Otherwise, clients will be able + to download the AuthGroupFile.

    +
    + +

    AuthDigestQop directive

    + Syntax: AuthDigestQop + none|auth|auth-int [auth|auth-int]
    + Default: AuthDigestQop + auth
    + Context: directory, + .htaccess
    + Override: AuthConfig
    + Status: Experimental
    + Module: mod_auth_digest
    + Compatibility: Available in + Apache 1.3.8 and later + +

    The AuthDigestQop directive determines the + quality-of-protection to use. auth will only do + authentication (username/password); auth-int is + authentication plus integrity checking (an MD5 hash of the + entity is also computed and checked); none will cause + the module to use the old RFC-2069 digest algorithm (which does + not include integrity checking). Both auth and + auth-int may be specified, in which the case the + browser will choose which of these to use. none should + only be used if the browser for some reason does not like the + challenge it receives otherwise.

    + +

    auth-int is not implemented + yet.

    +
    + +

    AuthDigestNonceLifetime + directive

    + Syntax: AuthDigestNonceLifetime + seconds
    + Default: + AuthDigestNonceLifetime 300
    + Context: directory, + .htaccess
    + Override: AuthConfig
    + Status: Experimental
    + Module: mod_auth_digest
    + Compatibility: Available in + Apache 1.3.8 and later + +

    The AuthDigestNonceLifetime directive controls how long the + server nonce is valid. When the client contacts the server + using an expired nonce the server will send back a 401 with + stale=true. If seconds is greater than 0 + then it specifies the amount of time for which the nonce is + valid; this should probably never be set to less than 10 + seconds. If seconds is less than 0 then the nonce + never expires. +

    +
    + +

    AuthDigestNonceFormat + directive

    + Syntax: AuthDigestNonceFormat + ???
    + Default: + AuthDigestNonceFormat ???
    + Context: directory, + .htaccess
    + Override: AuthConfig
    + Status: Experimental
    + Module: mod_auth_digest
    + Compatibility: Available in + Apache 1.3.8 and later + +

    Not implemented yet. +

    +
    + +

    AuthDigestNcCheck directive

    + Syntax: AuthDigestNcCheck + On|Off
    + Default: + AuthDigestNcCheck Off
    + Context: server config
    + Override: Not + applicable
    + Status: Experimental
    + Module: mod_auth_digest
    + Compatibility: Available in + Apache 1.3.8 and later + +

    Not implemented yet. +

    +
    + +

    AuthDigestAlgorithm + directive

    + Syntax: AuthDigestAlgorithm + MD5|MD5-sess
    + Default: + AuthDigestAlgorithm MD5
    + Context: directory, + .htaccess
    + Override: AuthConfig
    + Status: Experimental
    + Module: mod_auth_digest
    + Compatibility: Available in + Apache 1.3.8 and later + +

    The AuthDigestAlgorithm directive selects the algorithm used + to calculate the challenge and response hashes.

    + +

    MD5-sess is not correctly implemented + yet. +

    +
    + +

    AuthDigestDomain directive

    + Syntax: AuthDigestDomain + URI [URI] ...
    + Context: directory, + .htaccess
    + Override: AuthConfig
    + Status: Experimental
    + Module: mod_auth_digest
    + Compatibility: Available in + Apache 1.3.8 and later + +

    The AuthDigestDomain directive allows you to specify one or + more URIs which are in the same protection space (i.e. use the + same realm and username/password info). The specified URIs are + prefixes, i.e. the client will assume that all URIs "below" + these are also protected by the same username/password. The + URIs may be either absolute URIs (i.e. inluding a scheme, host, + port, etc) or relative URIs.

    + +

    This directive should always be specified and + contain at least the (set of) root URI(s) for this space. + Omitting to do so will cause the client to send the + Authorization header for every request sent to this + server. Apart from increasing the size of the request, it may + also have a detrimental effect on performance if + "AuthDigestNcCheck" is on.

    + +

    The URIs specified can also point to different servers, in + which case clients (which understand this) will then share + username/password info across multiple servers without + prompting the user each time. + +

    + + + diff --git a/htdocs/manual/mod/mod_autoindex.html.en b/htdocs/manual/mod/mod_autoindex.html.en new file mode 100644 index 00000000000..baccdf6991e --- /dev/null +++ b/htdocs/manual/mod/mod_autoindex.html.en @@ -0,0 +1,947 @@ + + + + + + + Apache module mod_autoindex + + + + + + +

    Module mod_autoindex

    + This module provides for automatic directory indexing. + +

    Status: Base
    + Source File: + mod_autoindex.c
    + Module Identifier: + autoindex_module

    + +

    Summary

    + The index of a directory can come from one of two sources: + +
      +
    • A file written by the user, typically called + index.html. The DirectoryIndex + directive sets the name of this file. This is controlled by + mod_dir.
    • + +
    • Otherwise, a listing generated by the server. The other + directives control the format of this listing. The AddIcon, AddIconByEncoding and AddIconByType are used to set a + list of icons to display for various file types; for each + file listed, the first icon listed that matches the file is + displayed. These are controlled by + mod_autoindex.
    • +
    + The two functions are separated so that you can completely + remove (or replace) automatic index generation should you want + to. + +

    Automatic index generation is enabled with using + Options +Indexes. See the Options directive for + more details.

    + +

    If FancyIndexing + is enabled, or the FancyIndexing keyword is + present on the IndexOptions directive, + the column headers are links that control the order of the + display. If you select a header link, the listing will be + regenerated, sorted by the values in that column. Selecting the + same header repeatedly toggles between ascending and descending + order.

    + +

    Note that when the display is sorted by "Size", it's the + actual size of the files that's used, not the + displayed value - so a 1010-byte file will always be displayed + before a 1011-byte file (if in ascending order) even though + they both are shown as "1K".

    + +

    Directives

    + + + +

    See also: Options and DirectoryIndex.

    + +

    Autoindex Request Query Arguments

    + +

    The column sorting headers themselves are self-referencing + hyperlinks that add the sort query options to reorder the + directory listing. The query options are of the form + X=Y, where X is one of N + (file Name), M (file last + Modified date), S (file Size), or + D (file Description), and Y + is one of A (Ascending) or D + (Descending).

    + +

    When options other than the file name are used as the + sorting key, the secondary key is always the file name. (When + the file name is used to sort by, there is no need of a + secondary sort key, since file names are guaranteed to be + unique, and so the sort order is unambiguous.)

    + +

    Example:

    + +

    If the URL http://your.server.name/foo/ + produces a directory index, then the following URLs will + produce different sort orders:

    + +
      +
    • http://your.server.name/foo/?M=D sorts the + directory by last modified date, descending.
    • + +
    • http://your.server.name/foo/?D=A sorts the + directory by file description, ascending.
    • + +
    • http://your.server.name/foo/?S=A sorts the + directory by file size, ascending.
    • +
    + +

    See IndexOrderDefault to + set the default directory ordering.

    + +

    Note also that when the directory listing is ordered in one + direction (ascending or descending) by a particular column, the + link at the top of that column then reverses, to allow sorting + in the opposite direction by that same column.

    +
    + +

    AddAlt directive

    + + Syntax: AddAlt string + file [file] ...
    + Context: server config, virtual + host, directory, .htaccess
    + Override: Indexes
    + Status: Base
    + Module: mod_autoindex + +

    This sets the alternate text to display for a file, instead + of an icon, for FancyIndexing. + File is a file extension, partial filename, wild-card + expression or full filename for files to describe. + String is enclosed in double quotes ("). + This alternate text is displayed if the client is + image-incapable or has image loading disabled.

    + +

    Examples:

    +
    +    AddAlt "PDF" *.pdf
    +    AddAlt "Compressed" *.gz *.zip *.Z
    +    
    + +
    + +

    AddAltByEncoding directive

    + + Syntax: AddAltByEncoding + string MIME-encoding [MIME-encoding] + ...
    + Context: server config, virtual + host, directory, .htaccess
    + Override: Indexes
    + Status: Base
    + Module: mod_autoindex + +

    This sets the alternate text to display for a file, instead + of an icon, for FancyIndexing. + MIME-encoding is a valid content-encoding, such as + x-compress. String is enclosed in double + quotes ("). This alternate text is displayed if + the client is image-incapable or has image loading + disabled.

    + +

    Example:

    +
    +    AddAltByEncoding "gzip" x-gzip
    +    
    + +
    + +

    AddAltByType + directive

    + + Syntax: AddAltByType string + MIME-type [MIME-type] ...
    + Context: server config, virtual + host, directory, .htaccess
    + Override: Indexes
    + Status: Base
    + Module: mod_autoindex + +

    This sets the alternate text to display for a file, instead + of an icon, for FancyIndexing. + MIME-type is a valid content-type, such as + text/html. String is enclosed in double + quotes ("). This alternate text is displayed if + the client is image-incapable or has image loading + disabled.

    + +

    Example:

    +
    +    AddAltByType "TXT" text/plain
    +    
    +
    + +

    AddDescription directive

    + + Syntax: AddDescription + "string" file|directory [file|directory] ...
    + Context: server config, virtual + host, directory, .htaccess
    + Override: Indexes
    + Status: Base
    + Module: mod_autoindex + +

    This sets the description to display for a file or directory, for IndexOptions FancyIndexing. + file|directory is a file extension, partial filename or + directory name, wild-card expression or full filename or directory name, + for files or directories to describe. String is enclosed in + double quotes ("). Example:

    + +
    + AddDescription "The planet Mars" + /web/pics/mars.gif +
    + +

    The description field is 23 bytes wide. 7 more bytes may be + added if the directory is covered by an + IndexOptions SuppressSize, and 19 bytes may + be added if IndexOptions SuppressLastModified + is in effect. The widest this column can be is therefore 49 + bytes.

    + +
    + As of Apache 1.3.10, the DescriptionWidth + IndexOptions keyword allows you to adjust this + width to any arbitrary size. +
    + Caution: Descriptive text defined with + AddDescription may contain HTML markup, such as + tags and character entities. If the width of the description + column should happen to truncate a tagged element (such as + cutting off the end of a bolded phrase), the results may affect + the rest of the directory listing. +
    + +

    AddIcon directive

    + + Syntax: AddIcon icon + name [name] ...
    + Context: server config, virtual + host, directory, .htaccess
    + Override: Indexes
    + Status: Base
    + Module: mod_autoindex + +

    This sets the icon to display next to a file ending in + name for FancyIndexing. + Icon is either a (%-escaped) relative URL to the icon, + or of the format (alttext,url) where + alttext is the text tag given for an icon for + non-graphical browsers.

    + +

    Name is either ^^DIRECTORY^^ for directories, + ^^BLANKICON^^ for blank lines (to format the list correctly), a + file extension, a wildcard expression, a partial filename or a + complete filename. Examples:

    + +
    + AddIcon (IMG,/icons/image2.gif) .gif .jpg .png
    + AddIcon /icons/dir.gif ^^DIRECTORY^^
    + AddIcon /icons/backup.gif *~
    +
    + AddIconByType should be used in + preference to AddIcon, when possible. +
    + +

    AddIconByEncoding directive

    + + Syntax: AddIconByEncoding + icon MIME-encoding [MIME-encoding] ...
    + Context: server config, virtual + host, directory, .htaccess
    + Override: Indexes
    + Status: Base
    + Module: mod_autoindex + +

    This sets the icon to display next to files with + MIME-encoding for FancyIndexing. Icon is + either a (%-escaped) relative URL to the icon, or of the format + (alttext,url) where alttext is the + text tag given for an icon for non-graphical browsers.

    + +

    Mime-encoding is a wildcard expression matching + required the content-encoding. Examples:

    + +
    + AddIconByEncoding /icons/compressed.gif + x-compress +
    +
    + +

    AddIconByType directive

    + + Syntax: AddIconByType icon + MIME-type [MIME-type] ...
    + Context: server config, virtual + host, directory, .htaccess
    + Override: Indexes
    + Status: Base
    + Module: mod_autoindex + +

    This sets the icon to display next to files of type + MIME-type for FancyIndexing. Icon is + either a (%-escaped) relative URL to the icon, or of the format + (alttext,url) where alttext is the + text tag given for an icon for non-graphical browsers.

    + +

    Mime-type is a wildcard expression matching + required the mime types. Examples:

    + +
    + AddIconByType (IMG,/icons/image3.gif) image/* +
    +
    + +

    DefaultIcon + directive

    + + Syntax: DefaultIcon + url
    + Context: server config, virtual + host, directory, .htaccess
    + Override: Indexes
    + Status: Base
    + Module: mod_autoindex + +

    The DefaultIcon directive sets the icon to display for files + when no specific icon is known, for FancyIndexing. Url is a + (%-escaped) relative URL to the icon. Examples:

    + +
    + DefaultIcon /icon/unknown.xbm +
    +
    + +

    FancyIndexing directive

    + + Syntax: FancyIndexing + on|off
    + Context: server config, virtual + host, directory, .htaccess
    + Override: Indexes
    + Status: Base
    + Module: mod_autoindex + +

    The FancyIndexing directive sets the FancyIndexing option + for a directory. The IndexOptions + directive should be used in preference.

    + +
    + Note that in versions of Apache prior to 1.3.2, the + FancyIndexing and IndexOptions + directives will override each other. You should use + IndexOptions FancyIndexing in preference to + the standalone FancyIndexing directive. As of + Apache 1.3.2, a standalone FancyIndexing + directive is combined with any IndexOptions + directive already specified for the current scope. +
    +
    + +

    HeaderName + directive

    + + Syntax: HeaderName + filename
    + Context: server config, virtual + host, directory, .htaccess
    + Override: Indexes
    + Status: Base
    + Module: mod_autoindex
    + Compatibility: some features + only available after 1.3.6; see text + +

    The HeaderName directive sets the name of the file that will + be inserted at the top of the index listing. Filename + is the name of the file to include.

    + +

    + Filename is treated as a URI path relative to the + one used to access the directory being indexed. Note that this + means that if Filename starts with a slash, it will be + taken to be relative to the DocumentRoot.

    + +

    Filename must + resolve to a document with a major content type of + "text" (e.g., text/html, + text/plain, etc.). This means that + filename may refer to a CGI script if the script's + actual file type (as opposed to its output) is marked as + text/html such as with a directive like:

    + +
    +    AddType text/html .cgi
    +
    + Content negotiation + will be performed if the MultiViews option is enabled. If + filename resolves to a static text/html + document (not a CGI script) and the Includes option is enabled, the file will + be processed for server-side includes (see the mod_include + documentation). + +

    If the file specified by HeaderName contains + the beginnings of an HTML document (<HTML>, <HEAD>, + etc) then you will probably want to set IndexOptions + +SuppressHTMLPreamble, so that these tags are not + repeated.

    + +
    + Apache 1.3.6 and earlier: The module first + attempts to include filename.html as an + HTML document, otherwise it will try to include + filename as plain text. Filename is treated + as a filesystem path relative to the directory being indexed. + In no case is SSI processing done. Example: + +
    + HeaderName HEADER +
    + when indexing the directory /web, the server + will first look for the HTML file + /web/HEADER.html and include it if found, + otherwise it will include the plain text file + /web/HEADER, if it exists. +
    + +

    See also ReadmeName.

    +
    + +

    IndexIgnore + directive

    + + Syntax: IndexIgnore + file [file] ...
    + Context: server config, virtual + host, directory, .htaccess
    + Override: Indexes
    + Status: Base
    + Module: mod_autoindex + +

    The IndexIgnore directive adds to the list of files to hide + when listing a directory. File is a file extension, + partial filename, wildcard expression or full filename for + files to ignore. Multiple IndexIgnore directives add to the + list, rather than replacing the list of ignored files. By + default, the list contains `.'. Example:

    + +
    + IndexIgnore README .htaccess *~ +
    +
    + +

    IndexOptions + directive

    + + Syntax: IndexOptions + option [option] ... (Apache 1.3.2 and + earlier)
    + Syntax: IndexOptions + [+|-]option [[+|-]option] ... (Apache 1.3.3 + and later)
    + Context: server config, virtual + host, directory, .htaccess
    + Override: Indexes
    + Status: Base
    + Module: mod_autoindex
    + Compatibility: '+/-' syntax and + merging of multiple IndexOptions directives is + only available with Apache 1.3.3 and later; the + FoldersFirst and DescriptionWidth + options are only available with Apache 1.3.10 and later; the + TrackModified option is only available with Apache + 1.3.15 and later; the IgnoreCase option is only + available with Apache 1.3.24 and later + +

    The IndexOptions directive specifies the behavior of the + directory indexing. Option can be one of

    + +
    +
    DescriptionWidth=[n + | *] (Apache 1.3.10 and later)
    + +
    The DescriptionWidth keyword allows you to + specify the width of the description column in characters. If + the keyword value is '*', then the column is + automatically sized to the length of the longest filename in + the display. See the section on AddDescription for + dangers inherent in truncating descriptions.
    + +
    FancyIndexing
    + +
    + + This turns on fancy indexing of directories. + +
    + Note that in versions of Apache prior to 1.3.2, + the FancyIndexing and + IndexOptions directives will override each + other. You should use + IndexOptions FancyIndexing in + preference to the standalone FancyIndexing + directive. As of Apache 1.3.2, a standalone + FancyIndexing directive is combined with any + IndexOptions directive already specified for + the current scope. +
    +
    + +
    FoldersFirst (Apache + 1.3.10 and later)
    + +
    If this option is enabled, subdirectories in a + FancyIndexed listing will always appear first, + followed by normal files in the directory. The listing is + basically broken into two components, the files and the + subdirectories, and each is sorted separately and then + displayed subdirectories-first. For instance, if the sort + order is descending by name, and FoldersFirst is + enabled, subdirectory Zed will be listed before + subdirectory Beta, which will be listed before + normal files Gamma and Alpha. + This option only has an effect if FancyIndexing + is also enabled.
    + +
    IconHeight[=pixels] + (Apache 1.3 and later)
    + +
    + + Presence of this option, when used with IconWidth, will cause + the server to include HEIGHT and + WIDTH attributes in the IMG tag for + the file icon. This allows browser to precalculate the page + layout without having to wait until all the images have been + loaded. If no value is given for the option, it defaults to + the standard height of the icons supplied with the Apache + software.
    + +
    IconsAreLinks
    + +
    + + This makes the icons part of the anchor for the filename, for + fancy indexing.
    + +
    IconWidth[=pixels] (Apache + 1.3 and later)
    + +
    + + Presence of this option, when used with IconHeight, will + cause the server to include HEIGHT and + WIDTH attributes in the IMG tag for + the file icon. This allows browser to precalculate the page + layout without having to wait until all the images have been + loaded. If no value is given for the option, it defaults to + the standard width of the icons supplied with the Apache + software.
    + +
    IgnoreCase + (Apache 1.3.24 and later)
    + +
    + If this option is enabled, names are sorted in case-insensitive + manner. For instance, if the sort order is ascending by name, + and IgnoreCase is enabled, file Zeta + will be listed after file alfa (Note: file + GAMMA will always be listed before file + gamma). This option only has an effect if FancyIndexing + is also enabled.
    + +
    NameWidth=[n | *] + (Apache 1.3.2 and later)
    + +
    The NameWidth keyword allows you to specify the width of + the filename column in bytes. If the keyword value is + '*', then the column is automatically sized to + the length of the longest filename in the display.
    + +
    ScanHTMLTitles
    + +
    + + This enables the extraction of the title from HTML documents + for fancy indexing. If the file does not have a description + given by AddDescription then + httpd will read the document for the value of the TITLE tag. + This is CPU and disk intensive.
    + +
    SuppressColumnSorting
    + +
    + + If specified, Apache will not make the column headings in a + FancyIndexed directory listing into links for sorting. The + default behavior is for them to be links; selecting the + column heading will sort the directory listing by the values + in that column. Only available in Apache 1.3 and + later.
    + +
    SuppressDescription
    + +
    + + This will suppress the file description in fancy indexing + listings. By default, no file descriptions are defined, and + so the use of this option will regain 23 characters of screen + space to use for something else. See AddDescription for + information about setting the file description. See also the + DescriptionWidth + index option to limit the size of the description + column.
    + +
    SuppressHTMLPreamble + (Apache 1.3 and later)
    + +
    + + If the directory actually contains a file specified by the HeaderName directive, the module + usually includes the contents of the file after a standard + HTML preamble (<HTML>, <HEAD>, et + cetera). The SuppressHTMLPreamble option disables this + behavior, causing the module to start the display with the + header file contents. The header file must contain + appropriate HTML instructions in this case. If there is no + header file, the preamble is generated as usual.
    + +
    SuppressLastModified
    + +
    + + This will suppress the display of the last modification date, + in fancy indexing listings.
    + +
    SuppressSize
    + +
    + + This will suppress the file size in fancy indexing + listings.
    + +
    TrackModified (Apache + 1.3.15 and later)
    + +
    + + This returns the Last-Modified and ETag values for the listed + directory in the HTTP header. It is only valid if the + operating system and file system return legitimate stat() + results. Most Unix systems do so, as do OS2's JFS and Win32's + NTFS volumes. OS2 and Win32 FAT volumes, for example, do not. + Once this feature is enabled, the client or proxy can track + changes to the list of files when they perform a HEAD + request. Note some operating systems correctly track new and + removed files, but do not track changes for sizes or dates of + the files within the directory.
    +
    + +

    There are some noticeable differences in the behavior of + this directive in recent (post-1.3.0) versions of Apache.

    + +
    +
    Apache 1.3.2 and earlier:
    + +
    +

    The default is that no options are enabled. If multiple + IndexOptions could apply to a directory, then the most + specific one is taken complete; the options are not merged. + For example:

    + +
    +
    +<Directory /web/docs>
    +    IndexOptions FancyIndexing
    +</Directory>
    +<Directory /web/docs/spec>
    +    IndexOptions ScanHTMLTitles
    +</Directory>
    +
    +
    + then only ScanHTMLTitles will be set for the + /web/docs/spec directory. +
    + +
    Apache 1.3.3 and later:
    + +
    +

    Apache 1.3.3 introduced some significant changes in the + handling of IndexOptions directives. In + particular,

    + +
      +
    • Multiple IndexOptions directives for a + single directory are now merged together. The result of + the example above will now be the equivalent of + IndexOptions FancyIndexing ScanHTMLTitles.
    • + +
    • The addition of the incremental syntax + (i.e., prefixing keywords with '+' or '-').
    • +
    + +

    Whenever a '+' or '-' prefixed keyword is encountered, + it is applied to the current IndexOptions + settings (which may have been inherited from an upper-level + directory). However, whenever an unprefixed keyword is + processed, it clears all inherited options and any + incremental settings encountered so far. Consider the + following example:

    + +
    + IndexOptions +ScanHTMLTitles -IconsAreLinks + FancyIndexing
    + IndexOptions +SuppressSize
    +
    +
    + +

    The net effect is equivalent to + IndexOptions FancyIndexing +SuppressSize, + because the unprefixed FancyIndexing discarded + the incremental keywords before it, but allowed them to + start accumulating again afterward.

    + +

    To unconditionally set the IndexOptions for + a particular directory, clearing the inherited settings, + specify keywords without either '+' or '-' prefixes.

    +
    +
    +
    + +

    IndexOrderDefault directive

    + + Syntax: IndexOrderDefault + Ascending|Descending Name|Date|Size|Description
    + Context: server config, virtual + host, directory, .htaccess
    + Override: Indexes
    + Status: Base
    + Module: mod_autoindex
    + Compatibility: + IndexOrderDefault is only available in Apache 1.3.4 and later. + +

    The IndexOrderDefault directive is used in + combination with the FancyIndexing + index option. By default, fancyindexed directory listings are + displayed in ascending order by filename; the + IndexOrderDefault allows you to change this + initial display order.

    + +

    IndexOrderDefault takes two arguments. The + first must be either Ascending or + Descending, indicating the direction of the sort. + The second argument must be one of the keywords + Name, Date, Size, or + Description, and identifies the primary key. The + secondary key is always the ascending filename.

    + +

    You can force a directory listing to only be displayed in a + particular order by combining this directive with the SuppressColumnSorting + index option; this will prevent the client from requesting the + directory listing in a different order.

    +
    + +

    ReadmeName + directive

    + + Syntax: ReadmeName + filename
    + Context: server config, virtual + host, directory, .htaccess
    + Override: Indexes
    + Status: Base
    + Module: mod_autoindex
    + Compatibility: some features + only available after 1.3.6; see text + +

    The ReadmeName directive sets the name of the file that will + be appended to the end of the index listing. Filename + is the name of the file to include, and is taken to be relative + to the location being indexed.

    + +
    + The filename argument is treated as a stub + filename in Apache 1.3.6 and earlier, and as a relative URI + in later versions. Details of how it is handled may be found + under the description of the HeaderName directive, which uses the + same mechanism and changed at the same time as + ReadmeName. +
    + +

    See also HeaderName.

    + +

    +

    + + + diff --git a/htdocs/manual/mod/mod_autoindex.html.html b/htdocs/manual/mod/mod_autoindex.html.html new file mode 100644 index 00000000000..924cecde032 --- /dev/null +++ b/htdocs/manual/mod/mod_autoindex.html.html @@ -0,0 +1,4 @@ + + + diff --git a/htdocs/manual/mod/mod_autoindex.html.ja.jis b/htdocs/manual/mod/mod_autoindex.html.ja.jis new file mode 100644 index 00000000000..6cd1d912a25 --- /dev/null +++ b/htdocs/manual/mod/mod_autoindex.html.ja.jis @@ -0,0 +1,946 @@ + + + + + + + Apache module mod_autoindex + + + + + + + +

    Module mod_autoindex

    + $B<+F0E*$K%G%#%l%/%H%j$N%$%s%G%C%/%9$r:n$k5!G=$rDs6!$9$k%b%8%e!<%k!#(B + +

    $B%9%F!<%?%9(B: Base
    + $B%=!<%9%U%!%$%k(B: + mod_autoindex.c
    + $B%b%8%e!<%k<1JL;R(B: + autoindex_module

    + +

    $B35MW(B

    + +

    $B%G%#%l%/%H%j$N%$%s%G%C%/%9$OFs$D$N>pJs8;$N$&$A$N(B + $B0l$D$+$i@8@.$G$-$^$9(B:

    + +
      +
    • $BIaDL$O(B index.html $B$H8F$P$l$k(B + $B%f!<%6$K$h$C$F=q$+$l$?%U%!%$%k!#(B + DirectoryIndex + $B%G%#%l%/%F%#%V$G$3$N%U%!%$%kL>$r@_Dj$7$^$9!#(B + $B$3$l$O(B mod_dir$B$G(B + $B@)8f$5$l$^$9!#(B
    • + +
    • $B$b$7$/$O!"%5!<%P$K$h$C$F@8@.$5$l$?0lMw!#(B + $B$=$NB>$N%G%#%l%/%F%#%V$G$3$N0lMw$N=q<0$r@)8f$7$^$9!#(B + AddIcon, AddIconByEncoding $B$H(B + AddIconByType + $B$r;H$&$3$H$G!"MM!9$J%U%!%$%k%?%$%W$KBP$7$F%"%$%3%s0lMw$r(B + $B%;%C%H$7$^$9!#$D$^$j!"%j%9%H$5$l$?%U%!%$%kKh$K!"(B + $B%U%!%$%k$K%^%C%A$7$?0lHV:G=i$N%"%$%3%s$,I=<($5$l$^$9!#(B + $B$3$l$i$O(B mod_autoindex $B$G@)8f$5$l$^$9!#(B
    • +
    +

    $BK>$`$J$i$P!"<+F0%$%s%G%C%/%9@8@.$r40A4$K=|5n(B ($B$"$k$$$OCV49(B) + $B$G$-$k$h$&$K!"$3$NFs$D$N5!G=$OJ,N%$5$l$F$$$^$9!#(B

    + +

    $B<+F0%$%s%G%C%/%9@8@.$O(B Options +Indexes + $B$r;H$&$3$H$GM-8z$K$J$j$^$9!#>\:Y$K$D$$$F$O!"(B + Options + $B%G%#%l%/%F%#%V$r$4Mw2<$5$$!#(B

    + +

    $B$b$7(B FancyIndexing $B%*%W%7%g%s$,(B + $BM-8z$K$J$C$F$$$k$+!"(B + IndexOptions + $B%G%#%l%/%F%#%V$K(B FancyIndexing $B$,M?$($i$l$F$$$k$J$i$P!"(B + $BNs$N@hF,$OI=<($N=gHV$r@)8f$9$k%j%s%/$K$J$j$^$9!#(B + $B@hF,$N%j%s%/$rA*Br$9$k$H!"0lMw$O:F@8@.$5$l$F(B + $B$=$NNs$NCM$G%=!<%H$5$l$^$9!#(B + $BF1$8@hF,$rB3$1$FA*Br$9$k$H!"8r8_$K>:=g$H9_=g$H$K$J$j$^$9!#(B

    + +

    "Size" $B$G%=!<%H$7$?>l9g$O!"MQ$$$i$l$k$N$O(B + $B$B%U%!%$%k$N%5%$%:$G$"$C$F!"(B + $BI=<($NCM$G$O$J$$$3$H$KCm0U$7$F$/$@$5$$(B - + $B$?$H$(N>J}$H$b$,(B "1K" $B$HI=<($5$l$F$$$?$H$7$F$b!"(B + 1010 $B%P%$%H$N%U%!%$%k$OI,$:(B 1011 + $B%P%$%H$N%U%!%$%k$h$j$bA0(B ($B>:=g$N>l9g(B) $B$KI=<($5$l$^$9!#(B

    + +

    $B%G%#%l%/%F%#%V(B

    + + + +

    $B;2>H(B: Options $B$H(B DirectoryIndex$B!#(B

    + +

    Autoindex $B%j%/%(%9%H%/%(%j!<0z?t(B

    + +

    $B%3%i%`%=!<%H$N%X%C%@<+BN$,!"%G%#%l%/%H%j$N%j%9%H$N=gHV$rJQ99$9$k(B + $B<+J,<+?H$r;2>H$9$k%j%s%/$G$9!#%/%(%j!<%*%W%7%g%s$O(B X=Y + $B$N7A<0$G!"(BX $B$K$O(B N (file Name), + M (file last Modified date), S + (file Size), D (file Description) + $B$NCf$+$i0l$D!"(BY $B$K$O(B A (Ascending) + $B$^$?$O(B D (Descending) $B$N$I$A$i$+$,F~$j$^$9!#(B

    + +

    $B%U%!%$%kL>0J30$,%=!<%H$N%-!<$H$7$F;H$o$l$?>l9g$O!"(B + $B%U%!%$%kL>$,>o$KFs$DL\$N%-!<$H$J$j$^$9!#(B + ($B%=!<%H$K%U%!%$%kL>$,;H$o$l$?>l9g$OFs$DL\$N%-!<$OI,MW$"$j$^$;$s!#(B + $B%U%!%$%kL>$O0l0U$G$"$k$3$H$,J]>Z$5$l$F$$$k$N$G!"%=!<%H=g$O(B + $B3NDj$9$k$+$i$G$9!#(B)

    + +

    $BNc(B:

    + +

    URL http://your.server.name/foo/ + $B$,%G%#%l%/%H%j%$%s%G%/%9$r@8@.$9$k>l9g!"0J2<$N(B URL + $B$G$O0[$J$k%=!<%H=g$,@8@.$5$l$^$9(B:

    + +
      +
    • http://your.server.name/foo/?M=D + $B$O%G%#%l%/%H%j$r(B last modified date $B$N9_=g$G%=!<%H$7$^$9!#(B
    • + +
    • http://your.server.name/foo/?D=A + $B$O%G%#%l%/%H%j$r(B file description $B$N>:=g$G%=!<%H$7$^$9!#(B
    • + +
    • http://your.server.name/foo/?S=A + $B$O%G%#%l%/%H%j$r(B file size $B$N>:=g$G%=!<%H$7$^$9!#(B
    • +
    + +

    $B%G%#%l%/%H%j$N%G%U%)%k%H$N=g=x$N@_Dj$O(B IndexOrderDefault + $B$r8+$F$/$@$5$$!#(B

    + +

    $B%G%#%l%/%H%j$N%j%9%H$,!"$"$k%3%i%`$N$I$A$i$+$NJ}8~(B($B>:=g$^$?$O9_=g(B) + $B$r;XDj$5$l$?>l9g!"$=$N%3%i%`$N>eIt$K$"$k%j%s%/$O5U=g$K$J$j!"(B + $BF1$8%3%i%`$N5UJ}8~$G$N%=!<%H$r2DG=$K$7$^$9!#(B

    +
    + +

    AddAlt $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: AddAlt string + file [file] ...
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k!"(B + $B%P!<%A%c%k%[%9%H!"%G%#%l%/%H%j!"(B.htaccess
    + $B>e=q$-(B: Indexes
    + $B%9%F!<%?%9(B: Base
    + $B%b%8%e!<%k(B: mod_autoindex + +

    $B$3$l$O(B FancyIndexing + $B$K$*$$$F!"%"%$%3%s$NBe$o$j$KI=<($9$kBeBX%F%-%9%H$r@_Dj$7$^$9!#(B + File $B$O!"@bL@$9$k%U%!%$%k$N%U%!%$%k3HD%;R!"(B + $B%U%!%$%kL>$N0lIt!"%o%$%k%I%+!<%II=8=!"40A4$J%U%!%$%kL>$N(B + $B$I$l$+$K$J$j$^$9!#(B + String $B$OFs=E0zMQId(B (") + $B$G0O$_$^$9!#(B + $B$3$NJ8;zNs$O!"%/%i%$%"%s%H$,2hA|$rI=<($G$-$J$$>l9g$d(B + $B2hA|$N%m!<%I$rL58z$K$7$F$$$k>l9g$KI=<($5$l$^$9!#(B

    + +

    $BNc(B:

    +
    +    AddAlt "PDF" *.pdf
    +    AddAlt "Compressed" *.gz *.zip *.Z
    +    
    + +
    + +

    AddAltByEncoding $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: AddAltByEncoding + string MIME-encoding [MIME-encoding] + ...
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k!"(B + $B%P!<%A%c%k%[%9%H!"%G%#%l%/%H%j!"(B.htaccess
    + $B>e=q$-(B: Indexes
    + $B%9%F!<%?%9(B: Base
    + $B%b%8%e!<%k(B: mod_autoindex + +

    $B$3$l$O!"(B + FancyIndexing + $B$K$*$$$F!"%"%$%3%s$NBe$o$j$KI=<($9$kBeBXJ8;zNs$r@_Dj$7$^$9!#(B + MIME-encoding $B$OM-8z$JId9f2=!"Nc$($P(B + x-compress + $B$G$9!#(B + String $B$O!"Fs=E0zMQId(B (") $B$G0O$_$^$9!#(B + $B$3$NJ8;zNs$O!"%/%i%$%"%s%H$,2hA|$rI=<($G$-$J$$>l9g$d(B + $B2hA|$N%m!<%I$rL58z$K$7$F$$$k>l9g$KI=<($5$l$^$9!#(B

    + +

    $BNc(B:

    +
    +    AddAltByEncoding "gzip" x-gzip
    +    
    + +
    + +

    AddAltByType + $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: AddAltByType string + MIME-type [MIME-type] ...
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k!"(B + $B%P!<%A%c%k%[%9%H!"%G%#%l%/%H%j!"(B.htaccess
    + $B>e=q$-(B: Indexes
    + $B%9%F!<%?%9(B: Base
    + $B%b%8%e!<%k(B: mod_autoindex + + +

    $B$3$l$O!"(B + FancyIndexing + $B$K$*$$$F!"%"%$%3%s$NBe$o$j$KI=<($9$kBeBXJ8;zNs$r@_Dj$7$^$9!#(B + MIME-type $B$OM-8z$J%?%$%W!"Nc$($P(B + text/html + $B$G$9!#(B + String $B$O!"Fs=E0zMQId(B (") $B$G0O$_$^$9!#(B + $B$3$NJ8;zNs$O!"%/%i%$%"%s%H$,2hA|$rI=<($G$-$J$$>l9g$d(B + $B2hA|$N%m!<%I$rL58z$K$7$F$$$k>l9g$KI=<($5$l$^$9!#(B

    + +

    $BNc(B:

    +
    +    AddAltByType "TXT" text/plain
    +    
    +
    + +

    AddDescription $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: AddDescription + "string" file|directory [file|directory] ...
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k!"(B + $B%P!<%A%c%k%[%9%H!"%G%#%l%/%H%j!"(B.htaccess
    + $B>e=q$-(B: Indexes
    + $B%9%F!<%?%9(B: Base
    + $B%b%8%e!<%k(B: mod_autoindex + +

    Index OptionsFancyIndexing + $B$K$*$$$F!"%U%!%$%k$H%G%#%l%/%H%j$KBP$7$FI=<($9$k@bL@$r@_Dj$7$^$9!#(B + file|directory $B$O@bL@$9$k%U%!%$%k$d%G%#%l%/%H%j$N%U%!%$%k3HD%;R!"(B + $B%U%!%$%kL>$N0lIt!"%G%#%l%/%H%jL>!"%o%$%k%I%+!<%II=8=!"40A4$J%U%!%$%kL>$+(B + $B%G%#%l%/%H%jL>$N$I$l$+$K$J$j$^$9!#(B + String $B$OFs=E0zMQId(B (") $B$G0O$_$^$9!#(B

    + +
    + AddDescription "The planet Mars" + /web/pics/mars.gif +
    + +

    $B@bL@NN0h$O(B 23 $B%P%$%H$NI}$G$9!#%G%#%l%/%H%j$KBP$7$F(B + IndexOptions SuppressSize + $B%*%W%7%g%s$,M-8z$K$J$C$F$$$l$P(B 7 $B%P%$%HDI2C!"(B + IndexOptions SuppressLastModified + $B%*%W%7%g%s$,M-8z$K$J$C$F$$$l$P(B 19 $B%P%$%HDI2C$5$l$^$9!#(B + $B$G$9$+$i!"%G%U%)%k%H$N@bL@%3%i%`$N:GBgI}$O(B + 49 $B%P%$%H$K$J$j$^$9!#(B

    + +
    + Apache 1.3.10 $B$+$i!"(BDescriptionWidth + IndexOptions $B%-!<%o!<%I$r;H$&$3$H$G!"$3$NI}$r(B + $BG$0U$NBg$-$5$KD4@0$9$k$3$H$,$G$-$^$9!#(B +
    + + $B7Y9p(B: +

    AddDescription + $B$GDj5A$5$l$?@bL@%F%-%9%H$O!"%?%0$dJ8;zNs$H$$$C$?(B + HTML $B%^!<%/%"%C%W$r4^$`$3$H$,$G$-$^$9!#(B + $B$b$7!"@bL@%3%i%`$NI}$K$h$C$F%?%0IU$1$5$l$?MWAG$,4]$a9~$^$l$?(B + ($BB@;z$N8l6g$N:G8e$,@Z$l$k$H$$$C$?(B) $B>l9g!"(B + $B=PNO7k2L$O!"%G%#%l%/%H%j0lMw$N;D$j$NItJ,$K1F6A$rM?$($k$G$7$g$&!#(B

    +
    + +

    AddIcon $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: AddIcon icon + name [name] ...
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k!"(B + $B%P!<%A%c%k%[%9%H!"%G%#%l%/%H%j!"(B.htaccess
    + $B>e=q$-(B: Indexes
    + $B%9%F!<%?%9(B: Base
    + $B%b%8%e!<%k(B: mod_autoindex + +

    FancyIndexing + $B$K$*$$$F!"(B + name $B$G=*$o$k%U%!%$%k$NNY$KI=<($9$k%"%$%3%s$r@_Dj$7$^$9!#(B + icon $B$O!"(B(% $B$G%(%9%1!<%W$5$l$?(B) $B%"%$%3%s$X$NAjBP(B URL + $B$+!"B>$N=q<0(B (alttext, url) $B$G$9!#(B + $B$3$3$G(B alttext + $B$O!"Hs%0%i%U%#%+%k%V%i%&%68~$1$K%"%$%3%s$KIU$1$i$l$?%F%-%9%H%?%0$G$9!#(B +

    + +

    name $B$O!"%G%#%l%/%H%j$KBP1~$9$k(B ^^DIRECTORY^^ + $B$+!"6uGr9T$KBP1~$9$k(B ^^BLANKICON^^ ($B0lMw$,@5$7$/I=<($5$l$k$?$a$K(B) $B$+!"(B + $B%U%!%$%k3HD%;R$+!"%o%$%k%I%+!<%II=8=$+!"%U%!%$%kL>$N0lIt$+(B + $B40A4$J%U%!%$%kL>$G$9!#Nc(B:

    + +
    + AddIcon (IMG,/icons/image2.gif) .gif .jpg .png
    + AddIcon /icons/dir.gif ^^DIRECTORY^^
    + AddIcon /icons/backup.gif *~
    +
    + +

    $B$b$72DG=$J$i!"(BAddIcon $B$h$j(B + AddIconByType + $B$rM%@hE*$K;H$&$Y$-$G$7$g$&!#(B

    +
    + +

    AddIconByEncoding $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: AddIconByEncoding + icon MIME-encoding [MIME-encoding] ...
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k!"(B + $B%P!<%A%c%k%[%9%H!"%G%#%l%/%H%j!"(B.htaccess
    + $B>e=q$-(B: Indexes
    + $B%9%F!<%?%9(B: Base
    + $B%b%8%e!<%k(B: mod_autoindex + +

    FancyIndexing + $B$K$*$$$F!"(BMIME-encoding $B$N%U%!%$%k$NNY$KI=<($9$k%"%$%3%s$r@_Dj$7$^$9!#(B + icon $B$O!"(B(% $B$G%(%9%1!<%W$5$l$?(B) $B%"%$%3%s$X$NAjBP(B URL + $B$+!"B>$N=q<0(B (alttext, url) $B$G$9!#(B + $B$3$3$G(B alttext + $B$O!"Hs%0%i%U%#%+%k%V%i%&%68~$1$K%"%$%3%s$KIU$1$i$l$?%F%-%9%H%?%0$G$9!#(B +

    + +

    MIME-encoding $B$O!"MW5a$5$l$?%(%s%3!<%I$K3:Ev$9$k(B + $B%o%$%k%I%+!<%II=8=$G$9!#Nc(B:

    + +
    + AddIconByEncoding /icons/compressed.gif + x-compress +
    +
    + +

    AddIconByType $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: AddIconByType icon + MIME-type [MIME-type] ...
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k!"(B + $B%P!<%A%c%k%[%9%H!"%G%#%l%/%H%j!"(B.htaccess
    + $B>e=q$-(B: Indexes
    + $B%9%F!<%?%9(B: Base
    + $B%b%8%e!<%k(B: mod_autoindex + +

    FancyIndexing + $B$K$*$$$F!"%U%!%$%k$NNY$KI=<($9$k%"%$%3%s$r@_Dj$7$^$9!#(B + icon $B$O!"(B(% $B$G%(%9%1!<%W$5$l$?(B) $B%"%$%3%s$X$NAjBP(B URL + $B$+!"B>$N=q<0(B (alttext, url) $B$G$9!#(B + $B$3$3$G(B alttext + $B$O!"Hs%0%i%U%#%+%k%V%i%&%68~$1$K%"%$%3%s$KIU$1$i$l$?%F%-%9%H%?%0$G$9!#(B +

    + +

    MIME-type $B$O!"MW5a$5$l$?%?%$%W$K3:Ev$9$k(B + $B%o%$%k%I%+!<%II=8=$G$9!#Nc(B:

    + +
    + AddIconByType (IMG,/icons/image3.gif) image/* +
    +
    + +

    DefaultIcon + $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: DefaultIcon + url
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k!"(B + $B%P!<%A%c%k%[%9%H!"%G%#%l%/%H%j!"(B.htaccess
    + $B>e=q$-(B: Indexes
    + $B%9%F!<%?%9(B: Base
    + $B%b%8%e!<%k(B: mod_autoindex + +

    DefaultIcon $B%G%#%l%/%F%#%V$O(B FancyIndexing $B$K$*$$$F!"(B + $BFCDj$N%"%$%3%s$,$J$$>l9g$N%U%!%$%k$KI=<($9$k%"%$%3%s$r@_Dj$7$^$9!#(B + url $B$O!"(B(% $B$G%(%9%1!<%W$5$l$?(B) $B%"%$%3%s$X$NAjBP(B URL + $B$G$9!#Nc(B:

    + +
    + DefaultIcon /icon/unknown.xbm +
    +
    + +

    FancyIndexing $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: FancyIndexing + on|off
    + $B%3%s%F%-%9%H(B: + $B%5!<%P@_Dj%U%!%$%k!"%P!<%A%c%k%[%9%H!"%G%#%l%/%H%j!"(B.htaccess
    + $B>e=q$-(B: Indexes
    + $B%9%F!<%?%9(B: Base
    + $B%b%8%e!<%k(B: mod_autoindex + +

    FancyIndexing $B%G%#%l%/%F%#%V$O%G%#%l%/%H%j$N(B FancyIndexing + $B%*%W%7%g%s$r@_Dj$7$^$9!#(BThe IndexOptions + directive should be used in preference.

    + +
    + 1.3.2 $B0JA0$N%P!<%8%g%s$N(B Apache $B$G$O!"(B + FancyIndexing $B5Z$S(B IndexOptions + $B%G%#%l%/%F%#%V$O8_$$$K>e=q$-$7$F$7$F$$$?$3$H$KCm0U$7$F$/$@$5$$!#(B + $BC1FH$N(B FancyIndexing $B%G%#%l%/%F%#%V$h$j$b(B + IndexOptions FancyIndexing $B$r;H$&$Y$-$G$9!#(B + Apache 1.3.2 $B$G$OC1FH(B FancyIndexing + $B%G%#%l%/%F%#%V$O8=:_$NHO0O$KBP$7$F4{$K;XDj$5$l$?(B + IndexOptions $B%G%#%l%/%F%#%V$HAH$_9g$o$5$l$^$9!#(B +
    +
    + +

    HeaderName + $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: HeaderName + filename
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k!"(B + $B%P!<%A%c%k%[%9%H!"%G%#%l%/%H%j!"(B.htaccess
    + $B>e=q$-(B: Indexes
    + $B%9%F!<%?%9(B: Base
    + $B%b%8%e!<%k(B: mod_autoindex
    + $B8_49@-(B: $B$$$/$D$+$N5!G=$O(B + 1.3.6 $B0J9_$G$N$_;HMQ2DG=(B + +

    HeaderName $B%G%#%l%/%F%#%V$O!"(B + $B%$%s%G%C%/%90lMw$N@hF,$KA^F~$9$k%U%!%$%k$NL>A0$r@_Dj$7$^$9!#(B + Filename $B$OA0$G$9!#(B

    + +

    + Filename $B$O%$%s%G%C%/%9$5$l$F$$$k%G%#%l%/%H%j$KMQ$$$i$l$?(B URI + $B$KBP$9$kAjBP(B URI $B%Q%9$H$7$F07$o$l$^$9!#(B + $B$3$l$O!"(Bfilename $B$,%9%i%C%7%e$G;O$^$k>l9g$O!"(B + DocumentRoot + $B$+$i$NAjBP%Q%9$H$J$k$H$$$&$3$H$G$9!#(B

    + +

    Filename $B$O%a%8%c!<%3%s%F%s%H%?%$%W$,(B + "text" ($BNc$($P(B$B!"(Btext/html, + text/plain $BEy$G$9!#(B) + $B$N%I%-%e%a%s%H$H$7$F2r7h$5$l$J$1$l$P$J$j$^$;$s!#$3$l$O$D$^$j!"(B + $B$b$7(B CGI $B%9%/%j%W%H$Ntext/html $B$H$7$F%^!<%/$5$l$F$$$k>l9g!"(B + filename + $B$O(B CGI $B%9%/%j%W%H$r;2>H$9$k$+$bCN$l$J$$!"(B + $B$H$$$&$3$H$r0UL#$7$^$9(B:

    + +
    +    AddType text/html .cgi
    +
    + +

    MultiViews option $B$,M-8z$K$J$C$F$$$k>l9g$O!"(B + $B%3%s%F%s%H%M%4%7%(!<%7%g%s(B + $B$,9T$J$o$l$^$9!#(B + $B$b$7(B filename $B$,(B (CGI $B%9%/%j%W%H$G$J$$(B) $B@EE*$J(B + text/html $B%I%-%e%a%s%H$G2r7h$5$l!"(B + Includes option + $B$,M-8z$K$J$C$F$$$k>l9g$O!"(B + $B%U%!%$%k$O%5!<%P%5%$%I%$%s%/%k!<%I$G=hM}$5$l$^$9(B + (mod_include + $B%I%-%e%a%s%H$r;2>H$7$F2<$5$$(B)$B!#(B

    + +

    $B$b$7(B HeaderName $B$G;XDj$5$l$?%U%!%$%k$,(B + HTML $B%I%-%e%a%s%H$N3+;OItJ,(B (<HTML>, <HEAD>, + $BEy(B) $B$r4^$s$G$$$?$i!"(B + IndexOptions + +SuppressHTMLPreamble + $B$r@_Dj$7$F!"$3$l$i$N%?%0$,7+$jJV$5$l$J$$$h$&$K$7$?$$$H;W$&$G$7$g$&!#(B

    + +
    + Apache 1.3.6 $B0JA0(B: $B%b%8%e!<%k$O:G=i$K(B + filename.html $B$r(B HTML $BJ8=q$H$7$F(B include + $B$r;n$_$^$9!#$=$l$+$i(B filename $B$r%W%l!<%s%F%-%9%H$H$7$F(B + include $B$7$h$&$H$7$^$9!#(BFilename $B$O%$%s%G%/%9$5$l$k(B + $B%G%#%l%/%H%j$+$i$N%U%!%$%k%7%9%F%`$NAjBP%Q%9$H$7$F07$o$l$^$9!#(B + SSI $B=hM}$O@dBP$K9T$J$o$l$^$;$s!#Nc(B: + +
    + HeaderName HEADER +
    + $B%G%#%l%/%H%j(B /web $B$,%$%s%G%/%9$5$l$k$H$-!"%5!<%P$O:G=i$K(B + /web/HEADER.html $B$H$$$&(B HTML + $B%U%!%$%k$rC5$78+$D$+$l$P$=$l$r(B include $B$7$^$9!#$=$l$+$i(B + /web/HEADER $B$H$$$&%W%l!<%s%F%-%9%H$N%U%!%$%k$r!"(B + $BB8:_$9$l$P(B include $B$7$^$9!#(B +
    + +

    $B;2>H(B ReadmeName$B!#(B

    +
    + +

    IndexIgnore + $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: IndexIgnore + file [file] ...
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k!"(B + $B%P!<%A%c%k%[%9%H!"%G%#%l%/%H%j!"(B.htaccess
    + $B>e=q$-(B: Indexes
    + $B%9%F!<%?%9(B: Base
    + $B%b%8%e!<%k(B: mod_autoindex + +

    IndexIgnore $B%G%#%l%/%F%#%V$O!"(B + $B%G%#%l%/%H%j$N0lMw$r9T$J$&:]$KL5;k$9$Y$-%U%!%$%k%j%9%H$KDI2C$7$^$9!#(B + file $B$O!"L5;k$9$k%U%!%$%kL>$N%U%!%$%k3HD%;R$+!"%U%!%$%kL>$N0lIt$+!"(B + $B%o%$%k%I%+!<%II=8=$+40A4$J%U%!%$%kL>$G$9!#(B + IndexIgnore $B$,J#?t$"$k>l9g$O!"L5;k$9$k%j%9%H$KDI2C$,9T$J$o$l!"(B + $BCV49$O9T$J$o$l$^$;$s!#%G%U%)%k%H$G$O%j%9%H$K$O(B `.' + $B$,4^$^$l$F$$$^$9!#Nc(B:

    + +
    + IndexIgnore README .htaccess *~ +
    +
    + +

    IndexOptions + $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: IndexOptions + option [option] ... (Apache 1.3.2 $B0JA0(B)
    + $B9=J8(B: IndexOptions + [+|-]option [[+|-]option] ... (Apache 1.3.3 + $B0J9_(B)
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k!"(B + $B%P!<%A%c%k%[%9%H!"%G%#%l%/%H%j!"(B.htaccess
    + $B>e=q$-(B: Indexes
    + $B%9%F!<%?%9(B: Base
    + $B%b%8%e!<%k(B: mod_autoindex
    + $B8_49@-(B: '+/-' $B9=J8$H(B + $BJ#?t$N(B IndexOptions $B%G%#%l%/%F%#%V$N%^!<%8$O(B + Apache 1.3.3 $B0J9_$G$N$_;HMQ2DG=!#(BFoldersFirst $B$H(B + DescriptionWidth $B%*%W%7%g%s$O(B Apache 1.3.10 $B0J9_$G$N$_(B + $B;HMQ2DG=!#(BTrackModified $B%*%W%7%g%s$O(B Apache 1.3.15 $B0J9_(B + $B$G$N$_;HMQ2DG=!#(BIgnoreCase $B%*%W%7%g%s$O(B Apache 1.3.24 + $B0J9_$G$N$_;HMQ2DG=(B + +

    IndexOptions $B$O!"%G%#%l%/%H%j%$%s%G%C%/%9$N5sF0$r;XDj$7$^$9!#(B + option $B$O + +

    +
    DescriptionWidth=[n + | *] (Apache 1.3.10 $B0J9_(B)
    + +
    DescriptionWidth + $B%-!<%o!<%I$O@bL@%3%i%`$NI}$rJ8;z?t$G;XDj$9$k$3$H$,$G$-$^$9!#(B + $B%-!<%o!<%I$NCM$,(B '*' $B$N>l9g$N%3%i%`$NI}$O!"(B + $BI=<($5$l$kCf$G:G$bD9$$%U%!%$%kL>$ND9$5$K<+F0E*$K9g$o$5$l$^$9!#(B + $B@bL@$,4]$a9~$^$l$?>l9g$K5/$3$j$&$k4m81$K$D$$$F$O(B + AddDescription + $B%;%/%7%g%s$r$*FI$_2<$5$$!#(B
    + +
    FancyIndexing
    + +
    $B>~$jIU$-%$%s%G%C%/%9$r%*%s$K$7$^$9!#(B +
    + 1.3.2 $B0JA0$N%P!<%8%g%s$N(B Apache $B$G$O!"(B + FancyIndexing $B5Z$S(B IndexOptions + $B%G%#%l%/%F%#%V$O8_$$$K>e=q$-$7$F$7$F$$$?$3$H$KCm0U$7$F$/$@$5$$!#(B + $BC1FH$N(B FancyIndexing $B%G%#%l%/%F%#%V$h$j$b(B + IndexOptions FancyIndexing $B$r;H$&$Y$-$G$9!#(B + Apache 1.3.2 $B$G$OC1FH(B FancyIndexing + $B%G%#%l%/%F%#%V$O8=:_$NHO0O$KBP$7$F4{$K;XDj$5$l$?(B + IndexOptions $B%G%#%l%/%F%#%V$HAH$_9g$o$5$l$^$9!#(B +
    +
    + +
    FoldersFirst (Apache + 1.3.10 $B0J9_(B)
    + +
    $B$3$N%*%W%7%g%s$,M-8z$K$J$k$H(B FancyIndex + $B$5$l$?%j%9%H$O(B$B>o$K(B$B%5%V%G%#%l%/%H%j$,:G=i$K!"(B + $BB3$$$FDL>o$N%U%!%$%k$,I=<($5$l$^$9!#(B + $B%j%9%H$O4pK\E*$KFs$D$NItJ,!"%U%!%$%k$H%5%V%G%#%l%/%H%j$KJ,$1$i$l!"(B + $B$=$l$>$l$,JL!9$K%=!<%H$5$l$F$^$:%5%V%G%#%l%/%H%j$+$iI=<($5$l$^$9!#(B + $B$?$H$($P!"%=!<%H$,L>A0$N9_=g$G(B FoldersFirst + $B$,M-8z$G$"$l$P!"%5%V%G%#%l%/%H%j(B Zed + $B$,%5%V%G%#%l%/%H%j(B Beta $B$h$jA0$K!"$^$?$3$l$i$O(B + $BDL>o$N%U%!%$%k(B Gamma $B$d(B Alpha + $B$h$jA0$KI=<($5$l$^$9!#(B$B$3$N%*%W%7%g%s$O(B FancyIndexing + $B$bM-8z$G$"$k>l9g$K8B$j8z2L$,$"$j$^$9!#(B
    + +
    IconHeight[=pixels] + (Apache 1.3 $B0J9_(B)
    + +
    $B$3$N%*%W%7%g%s$,!"(BIconWidth $B$H$H$b$K;H$o$l$F$$$k>l9g$O!"(B + $B%5!<%P$O%U%!%$%k%"%$%3%s$N$?$a$N(B img + $B%?%0$K(B height $B$H(B width + $BB0@-$r + +
    IconsAreLinks
    + +
    $B$3$l$O!"(BFancyIndexing $B$K$*$$$F!"(B + $B%"%$%3%s$b%U%!%$%kL>$X$N%j%s%/$N0lIt$K$7$^$9!#(B
    + +
    IconWidth[=pixels] (Apache + 1.3 $B0J9_(B)
    + +
    $B$3$N%*%W%7%g%s$,!"(BIconHeight $B$H$H$b$K;H$o$l$F$$$k>l9g$O!"(B + $B%5!<%P$O%U%!%$%k%"%$%3%s$N$?$a$N(B IMG + $B%?%0$K(B HEIGHT $B$H(B WIDTH + $BB0@-$r + +
    IgnoreCase + (Apache 1.3.24 $B0J9_(B)
    + +
    $B$3$N%*%W%7%g%s$,M-8z$G$"$k$H!"(B + $B%U%!%$%kL>$OBgJ8;z>.J8;z$r6hJL$;$:$K%=!<%H$5$l$^$9!#(B + $BNc$($P%U%!%$%kL>$,>:=g$G%=!<%H$5$l!"(BIgnoreCase + $B$,M-8z$G$"$l$P!"(BZeta $B$O(B alfa + $B$N8e$K%j%9%H$5$l$^$9(B($BCm0U(B: GAMMA $B$O>o$K(B + gamma $B$NA0$K$J$j$^$9(B)$B!#(B$B$3$N%*%W%7%g%s$O(B FancyIndexing + $B$bM-8z$G$"$k>l9g$K8B$j8z2L$,$"$j$^$9!#(B
    + +
    NameWidth=[n | *] + (Apache 1.3.2 $B0J9_(B)
    + +
    NameWidth $B%-!<%o!<%I$G%U%!%$%kL>%3%i%`$NI}$r%P%$%H?t$G(B + $B;XDj$G$-$^$9!#%-!<%o!<%I$NCM$,(B '*' $B$N>l9g$N%3%i%`$NI}$O!"(B + $BI=<($5$l$kCf$G:G$bD9$$%U%!%$%kL>$ND9$5$K<+F0E*$K9g$o$5$l$^$9!#(B +
    + +
    ScanHTMLTitles
    + +
    FancyIndexing $B$N$?$a$K!"(B + HTML $B%I%-%e%a%s%H$+$i%?%$%H%k$rAddDescription + $B$G@bL@$,M?$($i$l$F$$$J$1$l$P!"(B + httpd $B$O(B TITLE $B%?%0$NCM$rFI$`$?$a$K%I%-%e%a%s%H$rFI$_;O$a$^$9!#(B + $B$3$l$O(B CPU $B$d(B disk $B$KIi2Y$r$+$1$^$9!#(B
    + +
    SuppressColumnSorting
    + +
    $B$b$7;XDj$5$l$F$$$l$P!"(BApache $B$O(B FancyIndexing + $B$GI=<($5$l$F$$$k%G%#%l%/%H%j0lMw$G$N%3%i%`$N8+=P$7$r!"(B + $B%=!<%H$N$?$a$N%j%s%/$K$7$J$/$J$j$^$9!#(B + $B%G%U%)%k%H$N5sF0$O!"%j%s%/$H$7$^$9!#(B + $B%3%i%`$N8+=P$7$rA*$V$H%3%i%`$NCM$K=>$C$F%G%#%l%/%H%j%j%9%H$r(B + $B%=!<%H$7$^$9!#(BApache 1.3 $B0J9_$G$N$_;HMQ2DG=!#(B
    + +
    SuppressDescription
    + +
    $B$3$l$O(B FancyIndexing $B$K$*$1$k%U%!%$%k$N@bL@$r>C5n$7$^$9!#(B + $B%G%U%)%k%H$G$O!"@bL@$ODj5A$5$l$F$*$i$:!"(B + $B$3$N%*%W%7%g%s$r;H$&$HB>$N$?$a$K(B 23 + $BJ8;z$N6uGr$r2T$0$3$H$,$G$-$^$9!#(B $B%U%!%$%k$N@bL@$K4X$9$k>pJs$O!"(B + AddDescription + $B$r$4Mw2<$5$$!#$^$?!"@bL@$N%3%i%`%5%$%:$r@)8B$9$k(B + DescriptionWidth + $B%$%s%G%C%/%9%*%W%7%g%s$b$4Mw2<$5$$!#(B
    + +
    SuppressHTMLPreamble + (Apache 1.3 $B0J9_(B)
    + +
    $BDL>o!"(B + HeaderName + $B%G%#%l%/%F%#%V$G;XDj$7$?%U%!%$%k$r(B + $B%G%#%l%/%H%j$,$BEy(B) $B$N8e$K!"(B + $B%b%8%e!<%k$O%U%!%$%k$NCf?H$r%$%s%/%k!<%I$7$^$9!#(B + SuppressHTMLPreamble $B%*%W%7%g%s$O$3$N5sF0$rL58z$K$7!"(B + $B%b%8%e!<%k$,%X%C%@%U%!%$%k$NCf?H$+$iI=<($r;O$a$^$9!#(B + $B$3$N>l9g!"%X%C%@%U%!%$%k$O@5$7$$(B HTML + $BL?Na$r4^$s$G$$$J$1$l$P$J$j$^$;$s!#(B + $B%X%C%@%U%!%$%k$,B8:_$7$J$$>l9g$O!"%W%j%"%s%V%k$ODL>oDL$j(B + $B@8@.$5$l$^$9!#(B
    + +
    SuppressLastModified
    + +
    FancyIndexing $B0lMw$K$*$$$F:G=*99?7F|;~$NI=<($r>C5n$7$^$9!#(B
    + +
    SuppressSize
    + +
    FancyIndexing $B0lMw$K$*$$$F%U%!%$%k%5%$%:$NI=<($r>C5n$7$^$9!#(B
    + +
    TrackModified (Apache + 1.3.15 $B0J9_(B)
    + +
    $B$3$l$O(B HTTP $B%X%C%@Cf$K!"(B + $B%j%9%H$5$l$?%G%#%l%/%H%j$N:G=*99?7F|$d(B ETag $BCM$r4^$a$^$9!#(B + $B$3$l$O!"%*%Z%l!<%F%#%s%0%7%9%F%`$d%U%!%$%k%7%9%F%`$,(B + $BE,@Z$J(B stat() $B$NJV$jCM$rJV$9>l9g$K$N$_M-8z$G$9!#(B + $B$?$$$F$$$N(B UNIX $B%7%9%F%`!"(BOS2 $B$N(B JFS $B$d(B Win32 $B$N(B NTFS + $B%\%j%e!<%`$O$=$&$J$C$F$$$^$9!#(B + $BNc$($P!"(BOS2 $B$H(B Win32 FAT $B%\%j%e!<%`$O$=$&$G$O$"$j$^$;$s!#(B + $B$3$N5!G=$,M-8z$K$J$k$H!"%/%i%$%"%s%H$d%W%m%-%7$O(B + HEAD $B%j%/%(%9%H$r9T$J$&$3$H$K$h$C$F!"(B + $B%U%!%$%k0lMw$NJQ2=$rDI@W$9$k$3$H$,$G$-$k$h$&$K$J$j$^$9!#(B + $B$$$/$D$+$N%*%Z%l!<%F%#%s%0%7%9%F%`$O!"?75,%U%!%$%k$d(B + $B0\F0%U%!%$%k$O@5$7$/DI@W$9$k$1$l$I$b!"(B + $B%G%#%l%/%H%jCf$N%U%!%$%k$N%5%$%:$dF|IU$ODI@W$7$J$$$H$$$&$3$H$K(B + $BCm0U$7$F$/$@$5$$!#(B
    +
    + +

    $B:G6a$N(B (1.3.0 $B$h$j8e$N(B) $B%P!<%8%g%s$N(B Apache + $B$O$3$N%G%#%l%/%F%#%V$N5sF0$K=EMW$J0c$$$,$"$j$^$9!#(B

    + +
    +
    Apache 1.3.2 $B0JA0(B:
    + +
    +

    $B%G%U%)%k%H$G$O$I$N%*%W%7%g%s$bM-8z$G$O$"$j$^$;$s!#J#?t$N(B + IndexOptions $B$rE,MQ$9$k$3$H$,$G$-!"$b$C$H$b>\:Y$J$b$N$,:NMQ$5$l$^$9(B; + options $B$O%^!<%8$5$l$^$;$s!#(B + $BNc(B:

    + +
    +
    +<Directory /web/docs>
    +    IndexOptions FancyIndexing
    +</Directory>
    +<Directory /web/docs/spec>
    +    IndexOptions ScanHTMLTitles
    +</Directory>
    +
    +
    + /web/docs/spec $B$KBP$7$F(B ScanHTMLTitles + $B$@$1$,@_Dj$5$l$^$9!#(B +
    + +
    Apache 1.3.3 $B0J9_(B:
    + +
    +

    Apache 1.3.3 introduced some significant changes in the + handling of IndexOptions directives. In + particular,

    + +
      +
    • $BC10l$N%G%#%l%/%H%j$KBP$9$kJ#?t$N(B IndexOptions + $B%G%#%l%/%F%#%V$O8=:_$G$O8_$$$K%^!<%8$5$l$^$9!#(B + $B>e$NNc$N7k2L$O8=:_$O(B + IndexOptions FancyIndexing ScanHTMLTitles + $B$HF1Ey$K$J$j$^$9!#(B
    • + +
    • $BA}8:9=J8(B + ($B$9$J$o$A(B$B!"(B'+' $B$^$?$O(B '-' $B$,F,$K$D$/%-!<%o!<%I(B)
    • +
    + +

    '+' $B$^$?$O(B '-' $B$,F,$K$D$/%-!<%o!<%I$r8+$D$1$k$H!"8=:_$N(B + IndexOptions + $B$N@_Dj(B($B>e0L%G%#%l%/%H%j$+$i0z$-7Q$$$G$$$k$3$H$b$"$j$^$9(B) + $B$KBP$7$FE,MQ$7$^$9!#$7$+$7!"F,$K$D$+$J$$%-!<%o!<%I$,=hM}$5$l$k$H(B + $B$=$l$^$G$K0z$-7Q$$$@(B options $B$dA}8:$N@_Dj$r%/%j%"$7$F$7$^$$$^$9!#(B + $B0J2<$NNc$r9M$($F$/$@$5$$(B:

    + +
    + IndexOptions +ScanHTMLTitles -IconsAreLinks + FancyIndexing
    + IndexOptions +SuppressSize
    +
    +
    + +

    $B@5L#$N7k2L$O(B + IndexOptions FancyIndexing +SuppressSize + $B$HF1Ey$K$J$j$^$9!#F,$KIU$+$J$$(B FancyIndexing + $B$O$=$l0JA0$NA}8:%-!<%o!<%I$rL58z$K$7$^$9$,!"(B + $B$=$N8e$+$i:F$S@_Dj$rDI2C$7$F$$$/$3$H$,$G$-$^$9!#(B

    + +

    $B$"$k%G%#%l%/%H%j$KBP$7$F!"L5>r7o$K(B IndexOptions + $B$r@_Dj$9$k$K$O%-!<%o!<%I$NF,$K(B '+' $B5Z$S(B '-' + $B$N$I$A$i$b$D$1$J$$$3$H$K$h$j0z$-7Q$,$l$?@_Dj$r%/%j%"$7$^$9!#(B

    +
    +
    +
    + +

    IndexOrderDefault $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: IndexOrderDefault + Ascending|Descending Name|Date|Size|Description
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k!"(B + $B%P!<%A%c%k%[%9%H!"%G%#%l%/%H%j!"(B.htaccess
    + $B>e=q$-(B: Indexes
    + $B%9%F!<%?%9(B: Base
    + $B%b%8%e!<%k(B: mod_autoindex
    + $B8_49@-(B: + IndexOrderDefault $B$O(B Apache 1.3.4 $B0J9_$G$N$_;HMQ2DG=!#(B + +

    IndexOrderDefault $B%G%#%l%/%F%#%V$O(B + FancyIndexing + $B%$%s%G%C%/%9%*%W%7%g%s$HJ;$;$FMQ$$$l$^$9!#(B + $B%G%U%)%k%H$G$O!"(BFancyIndexing + $B$N%G%#%l%/%H%j0lMw$O%U%!%$%kL>$N>:=g$GI=<($5$l$^$9!#(B + IndexOrderDefault + $B$G!"=i4|>uBV$NI=<(=gHV$rJQ$($k$3$H$,$G$-$^$9!#(B

    + +

    IndexOrderDefault + $B$OFs$D$N0z?t$r$H$j$^$9!#0l$DL\$O%=!<%H$NJ}8~$r;X<($9$k(B + Ascending $B$+(B Descending $B$N$$$:$l$+$G$9!#(B + $BFs$DL\$N0z?t$O(B Name, Date, + Size $B$+(B Description + $B$N$$$:$l$+0l$D$N%-!<%o!<%I$G$"$C$F!"%W%i%$%^%j%-!<$r;XDj$7$^$9!#(B + $BFs$DL\$N%-!<$O(B$B>o$K(B$B%U%!%$%kL>$N>:=g$K$J$j$^$9!#(B

    + +

    $B$3$N%G%#%l%/%F%#%V$H(B SuppressColumnSorting + $B%$%s%G%C%/%9%*%W%7%g%s$H$rAH$_9g$o$;$k$3$H$G!"(B + $B%G%#%l%/%H%j0lMw$r$"$kFCDj$N=gHV$G$N$_I=<($9$k$h$&$K$G$-$^$9!#(B + $B$3$l$O!"(B + $B%/%i%$%"%s%H$,JL$N=gHV$G%G%#%l%/%H%j0lMw$r%j%/%(%9%H$9$k$3$H$rKI$.$^$9!#(B

    + +

    ReadmeName + $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: ReadmeName + filename
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k!"(B + $B%P!<%A%c%k%[%9%H!"%G%#%l%/%H%j!"(B.htaccess
    + $B>e=q$-(B: Indexes
    + $B%9%F!<%?%9(B: Base
    + $B%b%8%e!<%k(B: mod_autoindex
    + $B8_49@-(B: $B$$$/$D$+$N5!G=$O(B 1.3.6 $B0J9_$G$N$_(B + $B;HMQ2DG=(B + +

    ReadmeName $B%G%#%l%/%F%#%V$O!"(B + $B%$%s%G%C%/%9$N=*$o$j$KIU$12C$($i$l$k%U%!%$%k$NL>A0$r@_Dj$7$^$9!#(B + filename $B$OA^F~$9$k%U%!%$%k$NL>A0$G!"(B + $B0lMw$N9T$J$o$l$F$$$k0LCV$+$iAjBPE*$J$b$N$H$7$F2r + +

    + filename $B0z?t$O(B Apache 1.3.6 $B0JA0$G$O%U%!%$%kL>$N0lIt!"(B + $B8e$N%P!<%8%g%s$G$OAjBP(B URI $B$H$7$F07$o$l$^$9!#(B + $B$3$l$,$I$N$h$&$K=hM}$5$l$k$N$+$H$$$&$3$H$K$D$$$F$N>\:Y$O(B + HeaderName $B%G%#%l%/%F%#%V$N@bL@$K8+$D$1$i$l$^$9!#(B + $B$3$l$OF1$85!9=$r;H$$!"(BReadmeName$B$HF1;~$KJQ99$9$k$3$H$,$G$-$^$9!#(B +
    + +

    $B;2>H(B HeaderName

    + +

    +

    + + + diff --git a/htdocs/manual/mod/mod_browser.html b/htdocs/manual/mod/mod_browser.html new file mode 100644 index 00000000000..b6fd8208524 --- /dev/null +++ b/htdocs/manual/mod/mod_browser.html @@ -0,0 +1,106 @@ + + + + + + + Apache module mod_browser + + + + + + +

    Module mod_browser

    + This module is contained in the mod_browser.c + file, and is compiled in by default. It provides for setting + environment variables based on the browser. This module is part + of Apache 1.2.* only. From Apache 1.3 onwards mod_setenvif provides the + functionality of this module. + +

    Summary

    + +

    This module allows you to set environment variables based on + the name of the browser accessing your document, based on the + User-Agent header field. This is especially useful + when combined with a conditional HTML language such as XSSI or PHP, and can provide for + simple browser-based negotiation of HTML features.

    + +

    Directives

    + + +
    + +

    BrowserMatch

    + Syntax: BrowserMatch regex + attr1 attr2...
    + Context: server config
    + Status: base
    + Module: mod_browser
    + Compatibility: Apache 1.2 and + above + +

    The BrowserMatch directive defines environment variables + based on the User-Agent header. The first argument should be a + POSIX.2 extended regular expression (similar to an egrep-style + regex). The rest of the arguments give names of variables to + set. These take the form of either "varname", + "!varname" or "varname=value". In the + first form, the value will be set to "1". The second will + remove the given variable if already defined, and the third + will set the variable to the value given by value. + If a User-Agent string matches more than one entry, they will + be merged. Entries are processed in the order they appear, and + later entries can override earlier ones.

    + +

    For example:

    +
    +    BrowserMatch ^Mozilla forms jpeg=yes browser=netscape
    +    BrowserMatch "^Mozilla/[2-3]" tables agif frames javascript
    +    BrowserMatch MSIE !javascript
    +
    + +

    BrowserMatchNoCase

    + Syntax: BrowserMatchNoCase + regex attr1 attr2...
    + Context: server config
    + Status: base
    + Module: mod_browser
    + Compatibility: Apache 1.2 and + above + +

    The BrowserMatchNoCase directive is + semantically identical to the BrowserMatch directive. + However, it provides for case-insensitive matching. For + example:

    +
    +    BrowserMatchNoCase mac platform=macintosh
    +    BrowserMatchNoCase win platform=windows
    +
    + +

    +

    + + + diff --git a/htdocs/manual/mod/mod_cern_meta.html b/htdocs/manual/mod/mod_cern_meta.html new file mode 100644 index 00000000000..dd1c13eda1a --- /dev/null +++ b/htdocs/manual/mod/mod_cern_meta.html @@ -0,0 +1,135 @@ + + + + + + + Module mod_cern_meta + + + + + + +

    Apache module mod_cern_meta

    + +

    This module provides for CERN httpd metafile semantics.

    + +

    Status: Extension
    + Source File: + mod_cern_meta.c
    + Module Identifier: + cern_meta_module
    + Compatibility: Available in + Apache 1.1 and later.

    + +

    Summary

    + + Emulate the CERN HTTPD Meta file semantics. Meta files are HTTP + headers that can be output in addition to the normal range of + headers for each file accessed. They appear rather like the + Apache .asis files, and are able to provide a crude way of + influencing the Expires: header, as well as providing other + curiosities. There are many ways to manage meta information, + this one was chosen because there is already a large number of + CERN users who can exploit this module. + +

    More information on the + CERN metafile semantics is available.

    + +

    Directives

    + + +
    + +

    MetaFiles + directive

    + Syntax: MetaFiles on|off
    + Default: MetaFiles + off
    + Context:directory
    + Status: Base
    + Module: mod_cern_meta
    + Compatibility: MetaFiles is + only available in Apache 1.3 and later. + +

    Turns on/off Meta file processing on a per-directory basis. + This option was introduced in Apache 1.3.

    +
    + +

    MetaDir directive

    + Syntax: MetaDir + directory
    + Default: MetaDir + .web
    + Context: (Apache prior to 1.3) server + config
    + Context: (Apache 1.3) directory
    + Status: Base
    + Module: mod_cern_meta
    + Compatibility: MetaDir is only + available in Apache 1.1 and later. + +

    Specifies the name of the directory in which Apache can find + meta information files. The directory is usually a 'hidden' + subdirectory of the directory that contains the file being + accessed. Set to "." to look in the same directory + as the file.

    +
    + +

    MetaSuffix + directive

    + Syntax: MetaSuffix + suffix
    + Default: MetaSuffix + .meta
    + Context: (Apache prior to 1.3) server + config
    + Context: (Apache 1.3) directory
    + Status: Base
    + Module: mod_cern_meta
    + Compatibility: MetaSuffix is + only available in Apache 1.1 and later. + +

    Specifies the file name suffix for the file containing the + meta information. For example, the default values for the two + directives will cause a request to + DOCUMENT_ROOT/somedir/index.html to look in + DOCUMENT_ROOT/somedir/.web/index.html.meta and + will use its contents to generate additional MIME header + information.

    + +

    +

    + + + diff --git a/htdocs/manual/mod/mod_cgi.html.en b/htdocs/manual/mod/mod_cgi.html.en new file mode 100644 index 00000000000..d87c3675b31 --- /dev/null +++ b/htdocs/manual/mod/mod_cgi.html.en @@ -0,0 +1,218 @@ + + + + + + + Apache module mod_cgi + + + + + + +

    Module mod_cgi

    + +

    This module provides for execution of CGI scripts.

    + +

    Status: Base
    + Source File: mod_cgi.c
    + Module Identifier: + cgi_module

    + +

    Summary

    + + Any file that has the mime type + application/x-httpd-cgi or handler + cgi-script (Apache 1.1 or later) will be treated + as a CGI script, and run by the server, with its output being + returned to the client. Files acquire this type either by + having a name containing an extension defined by the AddType directive, or by being + in a ScriptAlias + directory. Files that are not in a ScriptAlias directory, + but which are of type application/x-httpd-cgi by + virtue of an AddType directive, will still not be + executed by the server unless Options ExecCGI is + enabled. See the Options directive for + more details. + +

    When the server invokes a CGI script, it will add a variable + called DOCUMENT_ROOT to the environment. This + variable will contain the value of the DocumentRoot configuration + variable.

    + +

    For an introduction to using CGI scripts with Apache, see + our tutorial on Dynamic Content + with CGI.

    + +

    Directives

    + + + +

    See also: Options, ScriptAlias, AddType and AddHandler.

    + +

    CGI Environment variables

    + The server will set the CGI environment variables as described + in the CGI + specification, with the following provisions: + +
    +
    REMOTE_HOST
    + +
    This will only be set if HostnameLookups + is set to on (it is off by default), and if a + reverse DNS lookup of the accessing host's address indeed + finds a host name.
    + +
    REMOTE_IDENT
    + +
    This will only be set if IdentityCheck is set to + on and the accessing host supports the ident + protocol. Note that the contents of this variable cannot be + relied upon because it can easily be faked, and if there is a + proxy between the client and the server, it is usually + totally useless.
    + +
    REMOTE_USER
    + +
    This will only be set if the CGI script is subject to + authentication.
    +
    + +

    CGI Debugging

    + Debugging CGI scripts has traditionally been difficult, mainly + because it has not been possible to study the output (standard + output and error) for scripts which are failing to run + properly. These directives, included in Apache 1.2 and later, + provide more detailed logging of errors when they occur. + +

    CGI Logfile Format

    + When configured, the CGI error log logs any CGI which does not + execute properly. Each CGI script which fails to operate causes + several lines of information to be logged. The first two lines + are always of the format: +
    +  %% [time] request-line
    +  %% HTTP-status CGI-script-filename
    +
    + If the error is that CGI script cannot be run, the log file + will contain an extra two lines: +
    +  %%error
    +  error-message
    +
    + Alternatively, if the error is the result of the script + returning incorrect header information (often due to a bug in + the script), the following information is logged: +
    +  %request
    +  All HTTP request headers received
    +  POST or PUT entity (if any)
    +  %response
    +  All headers output by the CGI script
    +  %stdout
    +  CGI standard output
    +  %stderr
    +  CGI standard error
    +
    + (The %stdout and %stderr parts may be missing if the script did + not output anything on standard output or standard error). +
    + +

    ScriptLog + directive

    + Syntax: ScriptLog + filename
    + Default: none
    + Context: server config
    + Status: mod_cgi + +

    The ScriptLog directive sets the CGI script error + logfile. If no ScriptLog is given, no error log is created. If + given, any CGI errors are logged into the filename given as + argument. If this is a relative file or path it is taken + relative to the server root.

    + +

    This log will be opened as the user the child processes run + as, ie. the user specified in the main User directive. This means that + either the directory the script log is in needs to be writable + by that user or the file needs to be manually created and set + to be writable by that user. If you place the script log in + your main logs directory, do NOT change the + directory permissions to make it writable by the user the child + processes run as.

    + +

    Note that script logging is meant to be a debugging feature + when writing CGI scripts, and is not meant to be activated + continuously on running servers. It is not optimized for speed + or efficiency, and may have security problems if used in a + manner other than that for which it was designed.

    +
    + +

    ScriptLogLength directive

    + Syntax: ScriptLogLength + bytes
    + Default: 10385760
    + Context: server config
    + Status: mod_cgi + +

    ScriptLogLength can be used to limit the size of + the CGI script logfile. Since the logfile logs a lot of + information per CGI error (all request headers, all script + output) it can grow to be a big file. To prevent problems due + to unbounded growth, this directive can be used to set an + maximum file-size for the CGI logfile. If the file exceeds this + size, no more information will be written to it.

    +
    + +

    ScriptLogBuffer

    + Syntax: ScriptLogBuffer + bytes
    + Default: 1024
    + Context: server config
    + Status: mod_cgi + +

    The size of any PUT or POST entity body that is logged to + the file is limited, to prevent the log file growing too big + too quickly if large bodies are being received. By default, up + to 1024 bytes are logged, but this can be changed with this + directive. +

    + + + diff --git a/htdocs/manual/mod/mod_cgi.html.html b/htdocs/manual/mod/mod_cgi.html.html new file mode 100644 index 00000000000..38797faf59c --- /dev/null +++ b/htdocs/manual/mod/mod_cgi.html.html @@ -0,0 +1,4 @@ + + + diff --git a/htdocs/manual/mod/mod_cgi.html.ja.jis b/htdocs/manual/mod/mod_cgi.html.ja.jis new file mode 100644 index 00000000000..e9b3de39352 --- /dev/null +++ b/htdocs/manual/mod/mod_cgi.html.ja.jis @@ -0,0 +1,219 @@ + + + + + + Apache module mod_cgi + + + + + + + +

    mod_cgi $B%b%8%e!<%k(B

    + +

    $B$3$N%b%8%e!<%k$O(B CGI $B%9%/%j%W%H$r + +

    $B%9%F!<%?%9(B: Base
    + $B%=!<%9%U%!%$%k(B: mod_cgi.c
    + $B%b%8%e!<%k<1JL;R(B: cgi_module +

    + +

    $B35MW(B

    + +

    Mime $B%?%$%W$,(B application/x-httpd-cgi + $B$G$"$k$+!"%O%s%I%i(B cgi-script (Apache 1.1 $B0J9_(B) + $B$,;XDj$5$l$F$$$k%U%!%$%k$O(B CGI $B%9%/%j%W%H$H$7$F07$o$l!"(B + $B%5!<%P$K$h$jAddType + $B%G%#%l%/%F%#%V$K;XDj$5$l$?(B $B3HD%;R$rL>A0$K4^$`$+!"(B + ScriptAlias + $B%G%#%l%/%H%j$KB8:_$9$k$3$H$K$h$j$3$N%?%$%W$K$J$j$^$9!#(B + ScriptAlias + $B%G%#%l%/%H%j$K$J$/!"(BAddType + $B%G%#%l%/%F%#%V$K$h$j(B application/x-httpd-cgi + $B$N%?%$%W$r;}$D%U%!%$%k$O!"(BOptions ExecCGI + $B$,;XDj$5$l$F$$$J$1$l$P%5!<%P$K$h$j\:Y$O(B Options + $B%G%#%l%/%F%#%V$r(B $B;2>H$7$F$/$@$5$$!#(B +

    + +

    $B%5!<%P$,(B CGI $B%9%/%j%W%H$rDOCUMENT_ROOT + $B$H8F$P$l$kJQ?t$r4D6-$KDI2C$7$^$9!#$3$NJQ?t$O(B + DocumentRoot + $B$NCM$rJ];}$7$^$9!#(B

    + +

    Apache $B$G(B CGI $B%9%/%j%W%H$r;HMQ$9$k$?$a$N%$%s%H%m%@%/%7%g%s$O!"(B + CGI $B$K$h$kF0E*%3%s%F%s%D(B + $B$r;2>H$7$F$/$@$5$$!#(B

    + +

    $B%G%#%l%/%F%#%V(B

    + + + +

    Options, ScriptAlias, AddType, AddHandler + $B$b;2>H$7$F$/$@$5$$!#(B

    +

    CGI $B4D6-JQ?t(B

    +

    $B%5!<%P$O(B CGI + $B5,3J(B $B$G7h$a$i$l$F$$$k(B CGI + $B4D6-JQ?t$r@_Dj$7$^$9!#0J2<$N$b$N$O!">r7oIU$-$G@_Dj$5$l$^$9!#(B

    + +
    +
    REMOTE_HOST
    + +
    HostnameLookups + $B$,(B on ($B%G%U%)%k%H$G$O(B off $B$G$9(B) + $B$G!"%"%/%;%9$7$F$$$k%[%9%H$N%"%I%l%9$N(B DNS + $B$N5U0z$-$,$r8+$D$1$?$H$-$K$N$_@_Dj$5$l$^$9!#(B
    + +
    REMOTE_IDENT
    + +
    IdentityCheck + $B$,(B on $B$K@_Dj$5$l$F$$$F!"%"%/%;%9$7$F$$$k%[%9%H$,(B + ident $B%W%m%H%3%k$r%5%]!<%H$7$F$$$k$H$-$K$N$_@_Dj$5$l$^$9!#(B + $B$3$l$O4JC1$K56$k$3$H$,$G$-!"%/%i%$%"%s%H$H%5!<%P$N4V$K(B + $B%W%m%-%7$,$"$l$P$^$C$?$/Lr$KN)$?$J$$$N$G!"(B + $B$3$NJQ?t$NCM$O?.MQ$G$-$J$$$H$$$&$3$H$KCm0U$7$F$/$@$5$$!#(B +
    + +
    REMOTE_USER
    + +
    CGI + $B%9%/%j%W%H$KG'>Z$,I,MW$J$H$-$K$N$_@_Dj$5$l$^$9!#(B
    +
    + +

    CGI $B$N%G%P%C%0(B

    +

    CGI $B%9%/%j%W%H$N%G%P%C%0$O!"@5$7$/F0:n$7$F$$$J$$%9%/%j%W%H$N=PNO(B + ($BI8=`=PNO$H%(%i!<(B) + $B$rD4$Y$k$3$H$,$G$-$J$$$?$a$K!"Fq$7$$>uBV$,B3$$$F$$$^$7$?!#(B + $B$3$l$i$N(B Apache 1.2 $B0J9_$K$"$k(B + $B%G%#%l%/%F%#%V$O$h$j>\:Y$J%(%i!<$N%m%0<}=8$rDs6!$7$^$9!#(B

    + +

    CGI $B%m%0%U%!%$%k$N=q<0(B

    +

    $B@_Dj$5$l$F$$$k$H$-$K$O!"(BCGI $B%(%i!<%m%0$OE,@Z$KF0:n$7$J$$$9$Y$F$N(B + CGI $B$r%m%0<}=8$7$^$9!#$=$l$>$l$N@5$7$/F0:n$7$J$$(B CGI + $B%9%/%j%W%H$O(B $BJ#?t$N9T$K$o$?$k>pJs$,%m%0<}=8$5$l$^$9!#:G=i$N(B + 2 $B9T$O>o$K0J2<$N=q<0$G$9(B:

    +
    +  %% [time] request-line
    +  %% HTTP-status CGI-script-filename
    +
    +

    $B%(%i!<$,!"(BCGI $B%9%/%j%W%H$,l9g$O!"(B + $B%m%0%U%!%$%k$O$5$i$K$b$&(B 2 $B9T=q$+$l$^$9(B:

    +
    +  %%error
    +  error-message
    +
    +

    $B$=$&$G$O$J$/!"%(%i!<$,@5$7$/$J$$%X%C%@>pJs$rJV$97k2L$G$"$k>l9g(B + ($B%9%/%j%W%H$N%P%0$G$"$k$3$H$,$h$/$"$j$^$9(B)$B!"(B + $B0J2<$N>pJs$,%m%0<}=8$5$l$^$9(B:

    +
    +  %request
    +  All HTTP request headers received
    +  POST or PUT entity (if any)
    +  %response
    +  All headers output by the CGI script
    +  %stdout
    +  CGI standard output
    +  %stderr
    +  CGI standard error
    +
    +

    ($B%9%/%j%W%H$,I8=`=PNO$dI8=`%(%i!<$K2?$b=PNO$7$J$+$C$?>l9g$O!"(B + %stdout $B$d(B %stderr $B$O$"$j$^$;$s(B)$B!#(B

    +
    + +

    ScriptLog + $B%G%#%l%/%F%#%V(B

    + $B9=J8(B: ScriptLog + filename
    + $B%G%U%)%k%H(B: none
    + $B%3%s%F%-%9%H(B: + $B%5!<%P@_Dj%U%!%$%k(B
    + $B%9%F!<%?%9(B: mod_cgi +

    ScriptLog $B%G%#%l%/%F%#%V$O(B CGI $B%9%/%j%W%H$N(B + $B%(%i!<%m%0%U%!%$%k$r@_Dj$7$^$9!#(BScriptLog $B$,@_Dj$5$l$F$$$J$$$H$-$O!"(B + $B%(%i!<%m%0$O:n@.$5$l$^$;$s!#@_Dj$5$l$F$$$k$H$-$O!"(BCGI + $B$N%(%i!<$O$9$Y$F0z?t$H$7$FM?$($i$l$F$$$k%U%!%$%kL>$K%m%0$5$l$^$9!#(B + $BAjBP%Q%9$G;XDj$5$l$F$$$k$H$-$O!"(B + $B%5!<%P%k!<%H$+$i$NAjBP%Q%9$H$7$F07$o$l$^$9!#(B

    + +

    $B$3$N%m%0$O;R%W%m%;%9$,User $B%G%#%l%/%F%#%V$G;XDj$5$l$?(B + $B%f!<%6$G$9!#$3$l$O!"%9%/%j%W%H%m%0$,=q$+$l$k%G%#%l%/%H%j$,$=$N%f!<%6$G(B + $B=q$-9~$_2DG=$+!"%9%/%j%W%H%U%!%$%k$,$B$7$J$$(B$B$h$&$K$7$F$/$@$5$$!#(B

    + +

    $B%9%/%j%W%H$N%m%0<}=8$O(B CGI $B%9%/%j%W%H$r=q$/$H$-$N(B + $B%G%P%C%0MQ$N5!G=$H$7$F0U?^$5$l$F$$$F!"DL>o$N%5!<%P$G(B + $B>o$K;HMQ$5$l$k$h$&$K$O0U?^$5$l$F$$$J$$$H$$$&$3$H$KCm0U$7$F$/$@$5$$!#(B + $BB.EY$d8zN($O:GE,2=$5$l$F$*$i$:!"@_7W$5$l$?0J30$NJ}K!$G;HMQ$5$l$k$H(B + $B%;%-%e%j%F%#$NLdBj$,$"$k$+$b$7$l$^$;$s!#(B

    +
    + +

    ScriptLogLength + $B%G%#%l%/%F%#%V(B

    + $B9=J8(B: ScriptLogLength + bytes
    + $B%G%U%)%k%H(B: 10385760
    + $B%3%s%F%-%9%H(B: + $B%5!<%P@_Dj%U%!%$%k(B
    + $B%9%F!<%?%9(B: mod_cgi +

    ScriptLogLength $B$O(B CGI $B%9%/%j%W%H$N%m%0%U%!%$%k(B + $B$NBg$-$5$r@)8B$9$k$?$a$K;HMQ$9$k$3$H$,$G$-$^$9!#%m%0%U%!%$%k$O(B + CGI $B$N%(%i!pJs(B ($B%j%/%(%9%H$N$9$Y$F$N%X%C%@!"(B + $B$9$Y$F$N=PNO(B)$B$r%m%0$7$^$9$N$G!"$9$0$KBg$-$J%U%!%$%k$K$J$j$^$9!#(B + $B$3$NBg$-$5$N@)8B$,$J$$$3$H$K$h$kLdBj$rKI$0$?$a$K!"(B + $B$3$N%G%#%l%/%F%#%V$r;H$C$F(B CGI $B$N%m%0%U%!%$%k$N(B + $B:GBg$N%U%!%$%k%5%$%:$r@_Dj$9$k$3$H$,$G$-$^$9!#(B + $B%U%!%$%k$,$3$NBg$-$5$rD6$($?>l9g$O!"$=$l0J>e$O=q$-9~$^$l$^$;$s!#(B

    +
    +

    ScriptLogBuffer

    + $B9=J8(B: ScriptLogBuffer + bytes
    + $B%G%U%)%k%H(B: 1024
    + $B%3%s%F%-%9%H(B: + $B%5!<%P@_Dj%U%!%$%k(B
    + $B%9%F!<%?%9(B: mod_cgi +

    $BBg$-$JK\BN$r + + + + diff --git a/htdocs/manual/mod/mod_cookies.html b/htdocs/manual/mod/mod_cookies.html new file mode 100644 index 00000000000..f5f23d59437 --- /dev/null +++ b/htdocs/manual/mod/mod_cookies.html @@ -0,0 +1,52 @@ + + + + + + + Apache module mod_cookies + + + + + + +

    Module mod_cookies

    + This module is obsolete. As of + version 1.2 of Apache, it has been replaced with mod_usertrack. + +

    This module is contained in the mod_cookies.c + file, and is not compiled in by default. It provides for + Netscape(TM) cookies. There is no documentation available for + this module.

    + + +
    + +

    CookieLog

    + + Syntax: CookieLog + filename
    + Context: server config, virtual + host
    + Status: Experimental
    + Module: mod_cookies + +

    The CookieLog directive sets the filename for logging of + cookies. The filename is relative to the ServerRoot.

    + +

    +

    + + + diff --git a/htdocs/manual/mod/mod_digest.html b/htdocs/manual/mod/mod_digest.html new file mode 100644 index 00000000000..67a4bbe6299 --- /dev/null +++ b/htdocs/manual/mod/mod_digest.html @@ -0,0 +1,124 @@ + + + + + + + Apache module mod_digest + + + + + + +

    Module mod_digest

    + +

    This module provides for user authentication using MD5 + Digest Authentication.

    + +

    Status: Extension
    + Source File: mod_digest.c
    + Module Identifier: + digest_module
    + Compatibility: Available in + Apache 1.1 and later.

    + +

    Summary

    + +

    This module implements an older version of the MD5 Digest + Authentication specification. While suitable for most modern + browsers, mod_digest is known to not work with Microsoft + Internet Explorer. Please see mod_auth_digest for a module + which implements the most recent version of the standard + and does not suffer from the same limitations as mod_digest.

    + +

    Directives

    + + + +

    Using Digest Authentication

    + +

    Using MD5 Digest authentication is very simple. Simply set + up authentication normally. However, use "AuthType Digest" and + "AuthDigestFile" instead of the normal "AuthType Basic" and + "AuthUserFile".

    + +

    As to make sure that replay is not possible across + sections of the site, or across sites (assuming a realm, + userid and password are valid in that wider context) a + secret nonce prefix can be configured with the + core directive AuthDigestRealmSeed. +

    +

    If none if configured a sensible, but not particular + secure, default is used. When used in load balancing + situations the prefix should be shared across servers. +

    +

    The experimental mod_auth_digest + module offers a number of additinal protections against replay. +

    + +

    Everything else should remain the same.

    + +

    MD5 authentication provides a more secure password system, + but only works with supporting browsers. As of this writing + (December 2003) most major browsers, including + MS Internet Explorer, + Opera, + Netscape, + Mozilla, and + Amaya, + support the Digest authentication scheme. However, of this list + MS Internet Explorer is known to be incompatable with the + older digest authentication format supported by this module. + Therefore, we do not recommend using this module on a large + Internet site. However, for personal and intra-net use, where + browser users can be controlled, it is ideal.

    + +

    See also mod_auth_digest, + which is an updated version of this module, in order to determine + whether you want to use that module instead. In either case, if + you are using one, you should not use the other, as they share + some of the same configuration directives.

    +
    + +

    AuthDigestFile directive

    + Syntax: AuthDigestFile + filename
    + Context: directory, + .htaccess
    + Override: AuthConfig
    + Status: Base
    + Module: mod_digest + +

    The AuthDigestFile directive sets the name of a textual file + containing the list of users and encoded passwords for digest + authentication. Filename is the absolute path to the + user file.

    + +

    Example

    + + AuthDigestFile /usr/local/apache/passwords/passwords.digest + +

    The digest file uses a special format. Files in this format + can be created using the "htdigest" + utility found in the support/ subdirectory of the Apache distribution.

    + + + + + diff --git a/htdocs/manual/mod/mod_dir.html.en b/htdocs/manual/mod/mod_dir.html.en new file mode 100644 index 00000000000..d1573a66746 --- /dev/null +++ b/htdocs/manual/mod/mod_dir.html.en @@ -0,0 +1,115 @@ + + + + + + + Apache module mod_dir + + + + + + +

    Module mod_dir

    + +

    This module provides for "trailing slash" redirects and + serving directory index files.

    + +

    Status: Base
    + Source File: mod_dir.c
    + Module Identifier: + dir_module

    + +

    Summary

    + The index of a directory can come from one of two sources: + +
      +
    • A file written by the user, typically called + index.html. The DirectoryIndex directive sets the + name of this file. This is controlled by + mod_dir.
    • + +
    • Otherwise, a listing generated by the server. This is + provided by mod_autoindex.
    • +
    + The two functions are separated so that you can completely + remove (or replace) automatic index generation should you want + to. + +

    A "trailing slash" redirect is issued when the server + receives a request for a URL + http://servername/foo/dirname where + dirname is a directory. Directories require a + trailing slash, so mod_dir issues a redirect to + http://servername/foo/dirname/.

    + +

    Directives

    + + +
    + +

    DirectoryIndex directive

    + + Syntax: DirectoryIndex + local-url [local-url] ...
    + Default: DirectoryIndex + index.html
    + Context: server config, virtual + host, directory, .htaccess
    + Override: Indexes
    + Status: Base
    + Module: mod_dir + +

    The DirectoryIndex directive sets the list of resources to + look for, when the client requests an index of the directory by + specifying a / at the end of the a directory name. + Local-url is the (%-encoded) URL of a document on the + server relative to the requested directory; it is usually the + name of a file in the directory. Several URLs may be given, in + which case the server will return the first one that it finds. + If none of the resources exist and the Indexes + option is set, the server will generate its own listing of the + directory.

    + +

    Example:

    + +
    + DirectoryIndex index.html +
    + then a request for http://myserver/docs/ would + return http://myserver/docs/index.html if it + exists, or would list the directory if it did not. + +

    Note that the documents do not need to be relative to the + directory;

    + +
    + DirectoryIndex index.html index.txt + /cgi-bin/index.pl +
    + would cause the CGI script /cgi-bin/index.pl to be + executed if neither index.html or + index.txt existed in a directory. + +

    +

    + + + diff --git a/htdocs/manual/mod/mod_dir.html.html b/htdocs/manual/mod/mod_dir.html.html new file mode 100644 index 00000000000..51a9afa0e2f --- /dev/null +++ b/htdocs/manual/mod/mod_dir.html.html @@ -0,0 +1,4 @@ + + + diff --git a/htdocs/manual/mod/mod_dir.html.ja.jis b/htdocs/manual/mod/mod_dir.html.ja.jis new file mode 100644 index 00000000000..2ccbeae4a35 --- /dev/null +++ b/htdocs/manual/mod/mod_dir.html.ja.jis @@ -0,0 +1,114 @@ + + + + + + Apache module mod_dir + + + + + + + +

    mod_dir $B%b%8%e!<%k(B

    + +

    $B$3$N%b%8%e!<%k$O!"%9%i%C%7%e$G=*$o$k(B URL $B$X$N%j%/%(%9%H$,$"$C$?:]$K!"(B + $B%G%#%l%/%H%j%$%s%G%C%/%9%U%!%$%k$X%j%@%$%l%/%H$7$FDs6!$7$^$9!#(B

    + +

    $B%9%F!<%?%9(B: Base
    + $B%=!<%9%U%!%$%k(B: mod_dir.c
    + $B%b%8%e!<%k<1JL;R(B: + dir_module

    + +

    $B35MW(B

    +

    $B%G%#%l%/%H%j%$%s%G%C%/%9$O!" + +

      +
    • $B0l$DL\$O!"%f!<%6$,:n@.$7$?%U%!%$%k$rMQ$$$k$b$N$G!"DL>o(B + index.html $B$H$$$&%U%!%$%kL>$r;H$$$^$9!#$3$N%U%!%$%kL>$O!"(B + DirectoryIndex $B%G%#%l%/%F%#%V$G(B + $B;XDj$9$k$3$H$,$G$-$^$9!#$3$N5!G=$O(B mod_dir + $B%b%8%e!<%k$GDs6!$5$l$^$9!#(B
    • + +
    • $B$b$&0l$D$NJ}K!$O!"(B + $B%5!<%P$K$h$C$F<+F0E*$K@8@.$5$l$k%G%#%l%/%H%j%j%9%H$rMQ$$$k>l9g$G$9!#(B + $B$3$N5!G=$O!"(Bmod_autoindex + $B%b%8%e!<%k$K$h$jDs6!$5$l$^$9!#(B
    • +
    + $B<+F0E*$J%$%s%G%C%/%9@8@.5!G=$r:o=|(B ($B$b$7$/$O8r49(B) + $B$G$-$k$h$&$K!"$3$NFs$D$N5!G=$OJ,N%$5$l$F$$$^$9!#(B + +

    $B$J$*(B http://servername/foo/dirname $B$H$$$&(B URL + $B$X$N%j%/%(%9%H$,$"$C$?:]$K!"(Bdirname + $B$H$$$&%G%#%l%/%H%j$,$"$l$P!"!V:G8e$K%9%i%C%7%e$r$D$1$?7A!W$N(B URL + $B$X$N%j%@%$%l%/%H$rAw=P$7$^$9!#(B + $B%G%#%l%/%H%j$X$N%"%/%;%9$O%9%i%C%7%e$G=*$o$C$F$$$kI,MW$,$"$j!"(B + mod_dir $B$O!"(Bhttp://servername/foo/dirname/ + $B$X$N%j%@%$%l%/%H$rAw=P$9$k$3$H$K$J$j$^$9!#(B

    + +

    $B%G%#%l%/%F%#%V(B

    + +
    + +

    DirectoryIndex + $B%G%#%l%/%F%#%V(B

    + +

    $B9=J8(B: DirectoryIndex + local-url [local-url] ...
    + $B%G%U%)%k%H(B: DirectoryIndex + index.html
    + $B%3%s%F%-%9%H(B: server config, virtual + host, directory, .htaccess
    + $B>e=q$-(B: Indexes
    + $B%9%F!<%?%9(B: Base
    + $B%b%8%e!<%k(B: mod_dir

    + +

    + $B%/%i%$%"%s%H$,!"%G%#%l%/%H%jL>$N:G8e$K!V(B/$B!W(B + $B$r;XDj$7$F%G%#%l%/%H%j%$%s%G%C%/%9$rMW5a$9$k>l9g$KC5$9%j%=!<%9$N%j%9%H$r(B + DirectoryIndex $B%G%#%l%/%F%#%V$G@_Dj$7$^$9!#(BLocal-url + $B$O!"%j%/%(%9%H$5$l$?%G%#%l%/%H%j$KBP1~$9$k!"%5!<%P>e$N%I%-%e%a%s%H$N(B + (% $B%(%s%3!<%I$5$l$?(B) URL $B$G!"IaDL$O%G%#%l%/%H%jCf$N%U%!%$%k$NL>A0$G$9!#(B + $BJ#?t$N(B URL $B$,@_Dj$5$l$?>l9g$K$O!":G=i$K8+$D$+$C$?$b$N$rJV$7$^$9!#(B + $B$=$l$i$,8+$D$+$i$:!"(BIndexes + $B%*%W%7%g%s$,%;%C%H$5$l$F$$$k>l9g!"%G%#%l%/%H%j$N%j%9%H$r@8@.$7$^$9!#(B +

    + +

    $BNc(B:

    +
    + DirectoryIndex index.html +
    + http://myserver/docs/ $B$X$N%"%/%;%9$,$"$j!"(B + http://myserver/docs/index.html + $B$,B8:_$9$l$P!"$3$N(B URL $B$,JV$5$l$^$9!#(B + $B$b$7B8:_$7$J$1$l$P!"%G%#%l%/%H%j$N%j%9%H$,JV$5$l$^$9!#(B + +

    $BCm(B: $B%I%-%e%a%s%H$OF1$8%G%#%l%/%H%jFb$KB8:_$9$kI,MW$"$j$^$;$s!#(B +

    + +
    + DirectoryIndex index.html index.txt + /cgi-bin/index.pl +
    + $B$H$7$?>l9g!"(Bindex.html $B$H(B index.txt + $B$N$I$A$i$b%G%#%l%/%H%jFb$GB8:_$7$J$$>l9g!"(BCGI $B%9%/%j%W%H(B + /cgi-bin/index.pl $B$, + + + diff --git a/htdocs/manual/mod/mod_dld.html b/htdocs/manual/mod/mod_dld.html new file mode 100644 index 00000000000..2d7f9c1ddd6 --- /dev/null +++ b/htdocs/manual/mod/mod_dld.html @@ -0,0 +1,100 @@ + + + + + + + Apache module mod_dld + + + + + + +

    Module mod_dld

    + This module is obsolete. As of + version 1.3 of Apache, it has been replaced with mod_so. This module is + contained in the mod_dld.c file, and is not + compiled in by default. It provides for loading of executable + code and modules into the server at start-up time, using the + GNU dld library. + +

    Summary

    + The optional dld module is a proof-of-concept piece of code + which loads other modules into the server as it is configuring + itself (the first time only; for now, rereading the config + files cannot affect the state of loaded modules), using the GNU + dynamic linking library, DLD. It isn't compiled into the server + by default, since not everyone has DLD, but it works when I try + it. (Famous last words.) + +

    Note that for some reason, LoadFile /lib/libc.a + seems to be required for just about everything.

    + +

    Note: that DLD needs to read the symbol table out of the + server binary when starting up; these commands will fail if the + server can't find its own binary when it starts up, or if that + binary is stripped.

    + +

    Directives

    + + +
    + +

    LoadFile

    + + Syntax: LoadFile filename + filename ...
    + Context: server config
    + Status: Experimental
    + Module: mod_dld + +

    The LoadFile directive links in the named object files or + libraries when the server is started; this is used to load + additional code which may be required for some module to work. + Filename is relative to ServerRoot.

    +
    + +

    LoadModule

    + + Syntax: LoadModule module + filename
    + Context: server config
    + Status: Experimental
    + Module: mod_dld + +

    The LoadModule directive links in the object file or library + filename and adds the module structure named + module to the list of active modules. Module + is the name of the external variable of type + module in the file. Example:

    + +
    + LoadModule ai_backcompat_module + modules/mod_ai_backcompat.o
    + LoadFile /lib/libc.a
    +
    + loads the module in the modules subdirectory of the ServerRoot. + + +

    +

    + + + diff --git a/htdocs/manual/mod/mod_env.html.en b/htdocs/manual/mod/mod_env.html.en new file mode 100644 index 00000000000..168c8f0aa0e --- /dev/null +++ b/htdocs/manual/mod/mod_env.html.en @@ -0,0 +1,132 @@ + + + + + + + Apache module mod_env + + + + + + +

    Apache module mod_env

    + +

    This module provides for modifying the environment which is + passed to CGI scripts and SSI pages.

    + +

    Status: Base
    + Source File: mod_env.c
    + Module Identifier: + env_module
    + Compatibility: Available in + Apache 1.1 and later.

    + +

    Summary

    + +

    This module allows for control of the environment that will + be provided to CGI scripts and SSI pages. Environment variables + may be passed from the shell which invoked the httpd process. + Alternatively, environment variables may be set or unset within + the configuration process.

    + +

    For additional information, we provide a document on Environment Variables in Apache.

    + +

    Directives

    + + +
    + +

    PassEnv directive

    + Syntax: PassEnv + env-variable [env-variable] ...
    + Context: server config, virtual + host, directory, .htaccess
    + Override: FileInfo
    + Status: Base
    + Module: mod_env
    + Compatibility: PassEnv is only + available in Apache 1.1 and later. Directory and .htaccess context + is available in Apache 1.3.7 and later. + +

    Specifies one or more environment variables to pass to CGI + scripts and SSI pages from the environment of the shell which + invoked the httpd process. Example:

    +
    +    PassEnv LD_LIBRARY_PATH
    +
    +
    + +

    SetEnv directive

    + Syntax: SetEnv env-variable + value
    + Context: server config, virtual + host, directory, .htaccess
    + Override: FileInfo
    + Status: Base
    + Module: mod_env
    + Compatibility: SetEnv is only + available in Apache 1.1 and later. Directory and .htaccess context + is available in Apache 1.3.7 and later. + +

    Sets an environment variable, which is then passed on to CGI + scripts and SSI pages. Example:

    +
    +    SetEnv SPECIAL_PATH /foo/bin
    +
    +
    + +

    UnsetEnv + directive

    + Syntax: UnsetEnv + env-variable [env-variable] ...
    + Context: server config, virtual + host, directory, .htaccess
    + Override: FileInfo
    + Status: Base
    + Module: mod_env
    + Compatibility: UnsetEnv is only + available in Apache 1.1 and later. Directory and .htaccess context + is available in Apache 1.3.7 and later. + +

    Removes one or more environment variables from those passed + on to CGI scripts and SSI pages. Example:

    +
    +    UnsetEnv LD_LIBRARY_PATH
    +
    + + + + diff --git a/htdocs/manual/mod/mod_env.html.html b/htdocs/manual/mod/mod_env.html.html new file mode 100644 index 00000000000..d459d62003c --- /dev/null +++ b/htdocs/manual/mod/mod_env.html.html @@ -0,0 +1,4 @@ + + + diff --git a/htdocs/manual/mod/mod_env.html.ja.jis b/htdocs/manual/mod/mod_env.html.ja.jis new file mode 100644 index 00000000000..f2db07e6236 --- /dev/null +++ b/htdocs/manual/mod/mod_env.html.ja.jis @@ -0,0 +1,132 @@ + + + + + + Apache module mod_env + + + + + + + +

    mod_env $B%b%8%e!<%k(B

    + +

    $B$3$N%b%8%e!<%k$O(B CGI $B%9%/%j%W%H5Z$S(B SSI + $B%Z!<%8$KEO$5$l$k4D6-JQ?t$rJQ99$9$k5!G=$rDs6!$7$^$9!#(B

    + +

    $B%9%F!<%?%9(B: Base
    + $B%=!<%9%U%!%$%k(B: mod_env.c
    + $B%b%8%e!<%k<1JL;R(B: + env_module
    + $B8_49@-(B: + Apache 1.1 $B0J9_$G;HMQ2DG=!#(B

    + +

    $B35MW(B

    + +

    $B$3$N%b%8%e!<%k$K$h$j(B CGI $B%9%/%j%W%H$H(B SSI + $B%Z!<%8$KE,MQ$5$l$k4D6-JQ?t$r@)8f$9$k$3$H$,$G$-$k$h$&$K$J$j$^$9!#(B + $B4D6-JQ?t$O(B httpd $B%W%m%;%9$r5/F0$7$?%7%'%k$+$iEO$5$l$^$9!#$^$?!"(B + $B@_Dj%U%!%$%k$G4D6-JQ?t$r@_Dj$7$?$j!":o=|$7$?$j$9$k$3$H$,$G$-$^$9!#(B +

    + +

    $B>\:Y$O!"(BApache + $B$N4D6-JQ?t(B$B$r;2>H$7$F$/$@$5$$!#(B

    + +

    $B%G%#%l%/%F%#%V(B

    + + +
    + +

    PassEnv $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: PassEnv + env-variable [env-variable] ...
    + $B%3%s%F%-%9%H(B:$B%5!<%P@_Dj%U%!%$%k!"(B + $B%P!<%A%c%k%[%9%H!"%G%#%l%/%H%j!"(B.htaccess
    + $B>e=q$-(B: FileInfo
    + $B%9%F!<%?%9(B: Base
    + $B%b%8%e!<%k(B: mod_env
    + $B8_49@-(B: PassEnv $B$O(B Apache 1.1 + $B0J9_$G$N$_;HMQ2DG=!#%G%#%l%/%H%j!"(B.htaccess $B$G$N;HMQ$O(B + Apache 1.3.7 $B0J9_$G;HMQ2DG=!#(B
    + +

    httpd $B%W%m%;%9$r5/F0$7$?%7%'%k$N4D6-$+$i(B CGI $B%9%/%j%W%H$H(B + SSI $B%Z!<%8$KEO$94D6-JQ?t$r0l$D0J>e;XDj$7$^$9!#Nc(B: +

    +
    +    PassEnv LD_LIBRARY_PATH
    +
    +
    + +

    SetEnv $B%G%#%l%/%F%#%V(B

    + $B9=J8(B: SetEnv variable + value
    + $B%3%s%F%-%9%H(B:$B%5!<%P@_Dj%U%!%$%k!"(B + $B%P!<%A%c%k%[%9%H!"%G%#%l%/%H%j!"(B.htaccess
    + $B>e=q$-(B: FileInfo
    + $B%9%F!<%?%9(B: Base
    + $B%b%8%e!<%k(B: mod_env
    + $B8_49@-(B: SetEnv $B$O(B Apache 1.1 + $B0J9_$G$N$_;HMQ2DG=!#%G%#%l%/%H%j!"(B.htaccess $B$G$N;HMQ$O(B + Apache 1.3.7 $B0J9_$G;HMQ2DG=!#(B
    + +

    $B4D6-JQ?t$r@_Dj$7!"$=$l$r(B CGI $B%9%/%j%W%H$H(B SSI + $B%Z!<%8$KEO$9$h$&$K$7$^$9!#Nc(B:

    +
    +    SetEnv SPECIAL_PATH /foo/bin
    +
    +
    + +

    UnsetEnv + $B%G%#%l%/%F%#%V(B

    + $B9=J8(B: UnsetEnv + env-variable [env-variable] ...
    + $B%3%s%F%-%9%H(B:$B%5!<%P@_Dj%U%!%$%k!"(B + $B%P!<%A%c%k%[%9%H!"%G%#%l%/%H%j!"(B.htaccess
    + $B>e=q$-(B: FileInfo
    + $B%9%F!<%?%9(B: Base
    + $B%b%8%e!<%k(B: mod_env
    + $B8_49@-(B: UnsetEnv $B$O(B Apache 1.1 + $B0J9_$G$N$_;HMQ2DG=!#%G%#%l%/%H%j!"(B.htaccess $B$G$N;HMQ$O(B + Apache 1.3.7 $B0J9_$G;HMQ2DG=!#(B
    + +

    CGI $B%9%/%j%W%H$H(B SSI + $B%Z!<%8$KEO$5$l$k4D6-JQ?t$+$i;XDj$5$l$?4D6-JQ?t$r +

    +    UnsetEnv LD_LIBRARY_PATH
    +
    + + + diff --git a/htdocs/manual/mod/mod_example.html b/htdocs/manual/mod/mod_example.html new file mode 100644 index 00000000000..2a3322fc822 --- /dev/null +++ b/htdocs/manual/mod/mod_example.html @@ -0,0 +1,155 @@ + + + + + + + Apache module mod_example + + + + + + +

    Module mod_example

    + +

    This module illustrates many of the aspects of the Apache 1.2 API and, when + used, demonstrates the manner in which module callbacks are + triggered by the server.

    + +

    Status: Extension
    + Source File: + mod_example.c
    + Module Identifier: + example_module
    + Compatibility: Available in + Apache 1.2 and later.

    + +

    Summary

    + +

    The files in the src/modules/example directory + under the Apache distribution directory tree are provided as an + example to those that wish to write modules that use the Apache + API.

    + +

    The main file is mod_example.c, which + illustrates all the different callback mechanisms and call + syntaxes. By no means does an add-on module need to include + routines for all of the callbacks - quite the contrary!

    + +

    The example module is an actual working module. If you link + it into your server, enable the "example-handler" handler for a + location, and then browse to that location, you will see a + display of some of the tracing the example module did as the + various callbacks were made.

    + +

    Directives

    + + + +

    Compiling the example module

    + +

    To include the example module in your server, follow the + steps below:

    + +
      +
    1. + Uncomment the "AddModule modules/example/mod_example" line + near the bottom of the src/Configuration file. + If there isn't one, add it; it should look like this: +
      +     AddModule modules/example/mod_example.o
      +   
      +
      +
    2. + +
    3. Run the src/Configure script + ("cd src; ./Configure"). This will + build the Makefile for the server itself, and update the + src/modules/Makefile for any additional modules + you have requested from beneath that subdirectory.
    4. + +
    5. Make the server (run "make" in the + src directory).
    6. +
    + +

    To add another module of your own:

    + +
      +
    1. mkdir src/modules/mymodule
    2. + +
    3. cp src/modules/example/* + src/modules/mymodule
    4. + +
    5. Modify the files in the new directory.
    6. + +
    7. Follow steps [1] through [3] above, with appropriate + changes.
    8. +
    + +

    Using the mod_example Module

    + +

    To activate the example module, include a block similar to + the following in your srm.conf file:

    +
    +   <Location /example-info>
    +       SetHandler example-handler
    +   </Location>
    + 
    +
    + +

    As an alternative, you can put the following into a .htaccess file + and then request the file "test.example" from that + location:

    +
    +   AddHandler example-handler .example
    + 
    +
    + +

    After reloading/restarting your server, you should be able + to browse to this location and see the brief display mentioned + earlier.

    +
    + +

    Example directive

    + +

    Syntax: Example
    + Default: None
    + Context: server config, virtual + host, directory, .htaccess
    + Override: Options
    + Status: Extension
    + Module: mod_example
    + Compatibility: + Example is only available in Apache 1.2 and + later.

    + +

    The Example directive just sets a demonstration + flag which the example module's content handler displays. It + takes no arguments. If you browse to an URL to which the + example content-handler applies, you will get a display of the + routines within the module and how and in what order they were + called to service the document request. The effect of this + directive one can observe under the point "Example + directive declared here: YES/NO".

    + + + + diff --git a/htdocs/manual/mod/mod_expires.html b/htdocs/manual/mod/mod_expires.html new file mode 100644 index 00000000000..ce131544c93 --- /dev/null +++ b/htdocs/manual/mod/mod_expires.html @@ -0,0 +1,254 @@ + + + + + + + Apache module mod_expires + + + + + + +

    Module mod_expires

    + +

    This module provides for the generation of + Expires HTTP headers according to user-specified + criteria.

    + +

    Status: Extension
    + Source File: + mod_expires.c
    + Module Identifier: + expires_module
    + Compatibility: Available in + Apache 1.2 and later.

    + +

    Summary

    + +

    This module controls the setting of the Expires + HTTP header in server responses. The expiration date can set to + be relative to either the time the source file was last + modified, or to the time of the client access.

    + +

    The Expires HTTP header is an instruction to + the client about the document's validity and persistence. If + cached, the document may be fetched from the cache rather than + from the source until this time has passed. After that, the + cache copy is considered "expired" and invalid, and a new copy + must be obtained from the source.

    + +

    Directives

    + + + +

    Alternate Interval + Syntax

    + +

    The ExpiresDefault and ExpiresByType directives + can also be defined in a more readable syntax of the form:

    + +
    +
    ExpiresDefault "<base> [plus] {<num> + <type>}*"
    + ExpiresByType type/encoding "<base> [plus] + {<num> <type>}*"
    +
    + +

    where <base> is one of:

    + +
      +
    • access
    • + +
    • now (equivalent to + 'access')
    • + +
    • modification
    • +
    + +

    The 'plus' keyword is optional. <num> + should be an integer value [acceptable to atoi()], + and <type> is one of:

    + +
      +
    • years
    • + +
    • months
    • + +
    • weeks
    • + +
    • days
    • + +
    • hours
    • + +
    • minutes
    • + +
    • seconds
    • +
    + +

    For example, any of the following directives can be used to + make documents expire 1 month after being accessed, by + default:

    + +
    +
    ExpiresDefault "access plus 1 month"
    + ExpiresDefault "access plus 4 weeks"
    + ExpiresDefault "access plus 30 days"
    +
    + +

    The expiry time can be fine-tuned by adding several + '<num> <type>' clauses:

    + +
    +
    ExpiresByType text/html "access plus 1 month 15 + days 2 hours"
    + ExpiresByType image/gif "modification plus 5 hours 3 + minutes"
    +
    + +

    Note that if you use a modification date based setting, the + Expires header will not be added to content + that does not come from a file on disk. This is due to the fact + that there is no modification time for such content.

    +
    + +

    ExpiresActive + directive

    + +

    Syntax: ExpiresActive + on|off
    + Context: server config, virtual + host, directory, .htaccess
    + Override: Indexes
    + Status: Extension
    + Module: mod_expires

    + +

    This directive enables or disables the generation of the + Expires header for the document realm in question. + (That is, if found in an .htaccess file, for + instance, it applies only to documents generated from that + directory.) If set to Off, no + Expires header will be generated for any document + in the realm (unless overridden at a lower level, such as an + .htaccess file overriding a server config file). + If set to On, the header will be added to + served documents according to the criteria defined by the ExpiresByType and ExpiresDefault directives + (q.v.).

    + +

    Note that this directive does not guarantee that an + Expires header will be generated. If the criteria + aren't met, no header will be sent, and the effect will be as + though this directive wasn't even specified.

    +
    + +

    ExpiresByType + directive

    + +

    Syntax: ExpiresByType + mime-type <code>seconds
    + Context: server config, virtual + host, directory, .htaccess
    + Override: Indexes
    + Status: Extension
    + Module: mod_expires

    + +

    This directive defines the value of the Expires + header generated for documents of the specified type + (e.g., text/html). The second argument + sets the number of seconds that will be added to a base time to + construct the expiration date.

    + +

    The base time is either the last modification time of the + file, or the time of the client's access to the document. Which + should be used is specified by the + <code> field; M + means that the file's last modification time should be used as + the base time, and A means the client's access + time should be used.

    + +

    The difference in effect is subtle. If M is used, + all current copies of the document in all caches will expire at + the same time, which can be good for something like a weekly + notice that's always found at the same URL. If A is + used, the date of expiration is different for each client; this + can be good for image files that don't change very often, + particularly for a set of related documents that all refer to + the same images (i.e., the images will be accessed + repeatedly within a relatively short timespan).

    + +

    Example:

    +
    +   ExpiresActive On                  # enable expirations
    +   ExpiresByType image/gif A2592000  # expire GIF images after a month
    +                                     #  in the client's cache
    +   ExpiresByType text/html M604800   # HTML documents are good for a
    +                                     #  week from the time they were
    +                                     #  changed, period
    + 
    +
    + +

    Note that this directive only has effect if + ExpiresActive On has been specified. It overrides, + for the specified MIME type only, any expiration date + set by the ExpiresDefault + directive.

    + +

    You can also specify the expiration time calculation using + an alternate syntax, described later in + this document.

    +
    + +

    ExpiresDefault + directive

    + +

    Syntax: ExpiresDefault + <code>seconds
    + Context: server config, virtual + host, directory, .htaccess
    + Override: Indexes
    + Status: Extension
    + Module: mod_expires

    + +

    This directive sets the default algorithm for calculating + the expiration time for all documents in the affected realm. It + can be overridden on a type-by-type basis by the ExpiresByType directive. See the + description of that directive for details about the syntax of + the argument, and the alternate syntax + description as well.

    + + + + diff --git a/htdocs/manual/mod/mod_headers.html b/htdocs/manual/mod/mod_headers.html new file mode 100644 index 00000000000..e8bfb9a3b1a --- /dev/null +++ b/htdocs/manual/mod/mod_headers.html @@ -0,0 +1,166 @@ + + + + + + + Apache module mod_headers + + + + + + +

    Module mod_headers

    + +

    This module provides for the customization of HTTP response + headers.

    + +

    Status: Extension
    + Source File: + mod_headers.c
    + Module Identifier: + headers_module
    + Compatibility: Available in + Apache 1.2 and later.

    + +

    Summary

    + This module provides a directive to control the sending of HTTP + headers. Headers can be merged, replaced or removed. + +

    Directives

    + + +
    + +

    Header directive

    + Syntax: Header set|append|add + header value
    + Syntax: Header unset + header
    + Context: server config, virtual + host, access.conf, .htaccess
    + Override: FileInfo
    + Status: Extension
    + Module: mod_headers + +

    This directive can replace, merge or remove HTTP response + headers during 1xx and 2xx series replies. For 3xx, 4xx and 5xx + use the ErrorHeader directive. +

    +

    + The action it performs is determined by the first + argument. This can be one of the following values:

    + +
      +
    • set
      + The response header is set, replacing any previous header + with this name
    • + +
    • append
      + The response header is appended to any existing header of + the same name. When a new value is merged onto an existing + header it is separated from the existing header with a comma. + This is the HTTP standard way of giving a header multiple + values.
    • + +
    • add
      + The response header is added to the existing set of headers, + even if this header already exists. This can result in two + (or more) headers having the same name. This can lead to + unforeseen consequences, and in general "append" should be + used instead.
    • + +
    • unset
      + The response header of this name is removed, if it exists. + If there are multiple headers of the same name, all will be + removed.
    • +
    + This argument is followed by a header name, which can include + the final colon, but it is not required. Case is ignored. For + add, append and set a value is given as the third argument. If + this value contains spaces, it should be surrounded by double + quotes. For unset, no value should be given. + +

    Order of Processing

    + The Header directive can occur almost anywhere within the + server configuration. It is valid in the main server config and + virtual host sections, inside <Directory>, + <Location> and <Files> sections, and within + .htaccess files. + +

    The Header directives are processed in the following + order:

    + +
      +
    1. main server
    2. + +
    3. virtual host
    4. + +
    5. <Directory> sections and .htaccess
    6. + +
    7. <Location>
    8. + +
    9. <Files>
    10. +
    + Order is important. These two headers have a different effect + if reversed: +
    +Header append Author "John P. Doe"
    +Header unset Author
    +
    + This way round, the Author header is not set. If reversed, the + Author header is set to "John P. Doe". + +

    The Header directives are processed just before the response + is sent by its handler. These means that some headers that are + added just before the response is sent cannot be unset or + overridden. This includes headers such as "Date" and + "Server".

    + +

    ErrorHeader directive

    + Syntax: ErrorHeader set|append|add + header value
    + Syntax: ErrorHeader unset + header
    + Context: server config, virtual + host, access.conf, .htaccess
    + Override: FileInfo
    + Status: Extension
    + Module: mod_headers + +

    This directive can replace, merge or remove HTTP response + headers during 3xx, 4xx and 5xx replies. For normal replies + use the Header directive. +

    +

    This directive is identical to the Header + directive in all other respects. Consult this directive for + more information on the syntax. +

    + +

    +

    + + + diff --git a/htdocs/manual/mod/mod_imap.html b/htdocs/manual/mod/mod_imap.html new file mode 100644 index 00000000000..31a63ed4475 --- /dev/null +++ b/htdocs/manual/mod/mod_imap.html @@ -0,0 +1,363 @@ + + + + + + + Apache module mod_imap + + + + + + +

    Module mod_imap

    + +

    This module provides for server-side imagemap + processing.

    + +

    Status: Base
    + Source File: mod_imap.c
    + Module Identifier: + imap_module
    + Compatibility: Available in + Apache 1.1 and later.

    + +

    Summary

    + +

    This module processes .map files, thereby + replacing the functionality of the imagemap CGI + program. Any directory or document type configured to use the + handler imap-file (using either AddHandler or + SetHandler) + will be processed by this module.

    + +

    The following directive will activate files ending with + .map as imagemap files:

    + +
    + AddHandler imap-file map +
    + Note that the following is still supported: + +
    + AddType application/x-httpd-imap map +
    + However, we are trying to phase out "magic MIME types" so we + are deprecating this method. + +

    Directives

    + + + +

    New Features

    + The imagemap module adds some new features that were not + possible with previously distributed imagemap programs. + +
      +
    • URL references relative to the Referer: information.
    • + +
    • Default <BASE> assignment through a new map + directive base.
    • + +
    • No need for imagemap.conf file.
    • + +
    • Point references.
    • + +
    • Configurable generation of imagemap menus.
    • +
    + +

    Imagemap File

    + The lines in the imagemap files can have one of several + formats: + +
    + directive value [x,y ...]
    + directive value "Menu text" [x,y ...]
    + directive value x,y ... "Menu text"
    +
    + The directive is one of base, + default, poly, circle, + rect, or point. The value is an + absolute or relative URL, or one of the special values listed + below. The coordinates are x,y pairs separated by + whitespace. The quoted text is used as the text of the link if + a imagemap menu is generated. Lines beginning with '#' are + comments. + +

    Imagemap File Directives

    + There are six directives allowed in the imagemap file. The + directives can come in any order, but are processed in the + order they are found in the imagemap file. + +
    +
    base Directive
    + +
    Has the effect of <BASE HREF="value">. + The non-absolute URLs of the map-file are taken relative to + this value. The base directive overrides + ImapBase as set in a .htaccess file or in the server + configuration files. In the absence of an ImapBase + configuration directive, base defaults to + http://server_name/.
    + base_uri is synonymous with base. + Note that a trailing slash on the URL is significant.
    + +
    default Directive
    + +
    The action taken if the coordinates given do not fit any + of the poly, circle or + rect directives, and there are no + point directives. Defaults to + nocontent in the absence of an ImapDefault + configuration setting, causing a status code of 204 No + Content to be returned. The client should keep the + same page displayed.
    + +
    poly Directive
    + +
    Takes three to one-hundred points, and is obeyed if the + user selected coordinates fall within the polygon defined by + these points.
    + +
    circle
    + +
    Takes the center coordinates of a circle and a point on + the circle. Is obeyed if the user selected point is with the + circle.
    + +
    rect Directive
    + +
    Takes the coordinates of two opposing corners of a + rectangle. Obeyed if the point selected is within this + rectangle.
    + +
    point Directive
    + +
    Takes a single point. The point directive closest to the + user selected point is obeyed if no other directives are + satisfied. Note that default will not be + followed if a point directive is present and + valid coordinates are given.
    +
    + +

    Values

    + The values for each of the directives can any of the following: + + +
    +
    a URL
    + +
    The URL can be relative or absolute URL. Relative URLs + can contain '..' syntax and will be resolved relative to the + base value.
    + base itself will not resolved according to the + current value. A statement base mailto: will + work properly, though.
    + +
    map
    + +
    Equivalent to the URL of the imagemap file itself. No + coordinates are sent with this, so a menu will be generated + unless ImapMenu is set to 'none'.
    + +
    menu
    + +
    Synonymous with map.
    + +
    referer
    + +
    Equivalent to the URL of the referring document. Defaults + to http://servername/ if no Referer: header was + present.
    + +
    nocontent
    + +
    Sends a status code of 204 No Content, + telling the client to keep the same page displayed. Valid for + all but base.
    + +
    error
    + +
    Fails with a 500 Server Error. Valid for all + but base, but sort of silly for anything but + default.
    +
    + +

    Coordinates

    + +
    +
    0,0 200,200
    + +
    A coordinate consists of an x and a y + value separated by a comma. The coordinates are separated + from each other by whitespace. To accommodate the way Lynx + handles imagemaps, should a user select the coordinate + 0,0, it is as if no coordinate had been + selected.
    +
    + +

    Quoted Text

    + +
    +
    "Menu Text"
    + +
    After the value or after the coordinates, the line + optionally may contain text within double quotes. This string + is used as the text for the link if a menu is + generated:
    + <a HREF="http://foo.com/">Menu + text</a>
    + If no quoted text is present, the name of the link will be + used as the text:
    + <a + HREF="http://foo.com/">http://foo.com</a>
    + If you want to use double quotes within this text, you have to + write them as &quot;.
    +
    + +

    Example Mapfile

    + +
    + #Comments are printed in a 'formatted' or + 'semiformatted' menu.
    + #And can contain html tags. <hr>
    + base referer
    + poly map "Could I have a menu, please?" 0,0 0,10 10,10 + 10,0
    + rect .. 0,0 77,27 "the directory of the referer"
    + circle http://www.inetnebr.com/lincoln/feedback/ 195,0 + 305,27
    + rect another_file "in same directory as referer" 306,0 + 419,27
    + point http://www.zyzzyva.com/ 100,100
    + point http://www.tripod.com/ 200,200
    + rect mailto:nate@tripod.com 100,150 200,0 "Bugs?"
    +
    +
    + +

    Referencing your mapfile

    + +
    + <A HREF="/maps/imagemap1.map">
    + <IMG ISMAP SRC="/images/imagemap1.gif">
    + </A>
    +
    +
    + +

    ImapMenu + directive

    + Syntax: ImapMenu + none|formatted|semiformatted|unformatted
    + Context: server config, virtual + host, directory, .htaccess
    + Override: Indexes
    + Module: mod_imap
    + Compatibility: ImapMenu is only + available in Apache 1.1 and later. + +

    The ImapMenu directive determines the action taken if an + imagemap file is called without valid coordinates.

    + +
    +
    none
    + +
    If ImapMenu is none, no menu is generated, + and the default action is performed.
    + +
    formatted
    + +
    A formatted menu is the simplest menu. + Comments in the imagemap file are ignored. A level one header + is printed, then an hrule, then the links each on a separate + line. The menu has a consistent, plain look close to that of + a directory listing.
    + +
    semiformatted
    + +
    In the semiformatted menu, comments are + printed where they occur in the imagemap file. Blank lines + are turned into HTML breaks. No header or hrule is printed, + but otherwise the menu is the same as a + formatted menu.
    + +
    unformatted
    + +
    Comments are printed, blank lines are ignored. Nothing is + printed that does not appear in the imagemap file. All breaks + and headers must be included as comments in the imagemap + file. This gives you the most flexibility over the appearance + of your menus, but requires you to treat your map files as + HTML instead of plaintext.
    +
    +
    + +

    ImapDefault + directive

    + Syntax: ImapDefault + error|nocontent|map|referer|URL
    + Context: server config, virtual + host, directory, .htaccess
    + Override: Indexes
    + Module: mod_imap
    + Compatibility: ImapDefault is + only available in Apache 1.1 and later. + +

    The ImapDefault directive sets the default + default used in the imagemap files. Its value is + overridden by a default directive within the + imagemap file. If not present, the default action + is nocontent, which means that a 204 No + Content is sent to the client. In this case, the client + should continue to display the original page.

    +
    + +

    ImapBase + directive

    + Syntax: ImapBase + map|referer|URL
    + Context: server config, virtual + host, directory, .htaccess
    + Override: Indexes
    + Module: mod_imap
    + Compatibility: ImapBase is only + available in Apache 1.1 and later. + +

    The ImapBase directive sets the default base + used in the imagemap files. Its value is overridden by a + base directive within the imagemap file. If not + present, the base defaults to + http://servername/. + +

    + + + diff --git a/htdocs/manual/mod/mod_include.html b/htdocs/manual/mod/mod_include.html new file mode 100644 index 00000000000..f9b095d1152 --- /dev/null +++ b/htdocs/manual/mod/mod_include.html @@ -0,0 +1,594 @@ + + + + + + + Apache module mod_include + + + + + + +

    Module mod_include

    + +

    This module provides for documents with Server Side Includes + (SSI).

    + +

    Status: Base
    + Source File: + mod_include.c
    + Module Identifier: + includes_module

    + +

    Summary

    + +

    This module provides a handler which will process files + before they are sent to the client. The processing is + controlled by specially formated SGML comments, referred to as + elements. These elements allow conditional text, the + inclusion other files or programs, as well as the setting and + printing of environment variables.

    + +

    For an introduction to this topic, we also provide a tutorial on Server Side + Includes.

    + +

    Directives

    + + + +

    See also: Options and AddHandler.

    + +

    Enabling Server-Side Includes

    + Any document with handler of "server-parsed" will be parsed by + this module, if the Includes option is set. If + documents containing server-side include directives are given + the extension .shtml, the following directives will make Apache + parse them and assign the resulting document the mime type of + text/html: +
    +AddType text/html .shtml
    +AddHandler server-parsed .shtml
    +
    + The following directive must be given for the directories + containing the shtml files (typically in a + <Directory> section, but this directive is + also valid .htaccess files if AllowOverride + Options is set): +
    +Options +Includes
    +
    + Alternatively the XBitHack + directive can be used to parse normal (text/html) + files, based on file permissions. + +

    For backwards compatibility, documents with mime type + text/x-server-parsed-html or + text/x-server-parsed-html3 will also be parsed + (and the resulting output given the mime type + text/html).

    + +

    Basic Elements

    + The document is parsed as an HTML document, with special + commands embedded as SGML comments. A command has the syntax: + +
    + <!--#element attribute=value + attribute=value ... --> +
    + The value will often be enclosed in double quotes; many + commands only allow a single attribute-value pair. Note that + the comment terminator (-->) should be preceded + by whitespace to ensure that it isn't considered part of an SSI + token. Note that the leading <!--# is one + token and may not contain any whitespaces.

    + +

    The allowed elements are:

    + +
    +
    config
    + +
    + This command controls various aspects of the parsing. The + valid attributes are: + +
    +
    errmsg
    + +
    The value is a message that is sent back to the + client if an error occurs whilst parsing the + document.
    + +
    sizefmt
    + +
    The value sets the format to be used which displaying + the size of a file. Valid values are bytes + for a count in bytes, or abbrev for a count + in Kb or Mb as appropriate.
    + +
    timefmt
    + +
    The value is a string to be used by the + strftime(3) library routine when printing + dates.
    +
    +
    + +
    echo
    + +
    + This command prints one of the include + variables, defined + below. If the variable is unset, it is printed as + (none). Any dates printed are subject to the + currently configured timefmt. Attributes: + +
    +
    var
    + +
    The value is the name of the variable to print.
    + +
    encoding
    + +
    Specifies how Apache should encode special characters + contained in the variable before outputting them. If set + to "none", no encoding will be done. If set to "url", + then URL encoding (also known as %-encoding; this is + appropriate for use within URLs in links, etc.) will be + performed. At the start of an echo element, + the default is set to "entity", resulting in entity + encoding (which is appropriate in the context of a + block-level HTML element, eg. a paragraph of text). This + can be changed by adding an encoding + attribute, which will remain in effect until the next + encoding attribute is encountered or the + element ends, whichever comes first. Note that the + encoding attribute must precede the + corresponding var attribute to be effective, + and that only special characters as defined in the + ISO-8859-1 character encoding will be encoded. This + encoding process may not have the desired result if a + different character encoding is in use. Apache 1.3.12 and + above; previous versions do no encoding.
    +
    +
    + +
    exec
    + +
    + The exec command executes a given shell command or CGI + script. The IncludesNOEXEC Option disables this command + completely. The valid attributes are: + +
    +
    cgi
    + +
    + The value specifies a (%-encoded) URL relative path to + the CGI script. If the path does not begin with a (/), + then it is taken to be relative to the current + document. The document referenced by this path is + invoked as a CGI script, even if the server would not + normally recognize it as such. However, the directory + containing the script must be enabled for CGI scripts + (with ScriptAlias or + the ExecCGI Option). + +

    The CGI script is given the PATH_INFO and query + string (QUERY_STRING) of the original request from the + client; these cannot be specified in the URL path. The + include variables will be available to the script in + addition to the standard CGI + environment.

    + +

    For example:

    + + <!--#exec cgi="/cgi-bin/example.cgi" --> + +

    If the script returns a Location: header instead of + output, then this will be translated into an HTML + anchor.

    + +

    The include + virtual element should be + used in preference to exec cgi. In particular, + if you need to pass additional arguments to a CGI program, + using the query string, this cannot be done with exec + cgi, but can be done with include + virtual, as shown here:

    + + <!--#include virtual="/cgi-bin/example.cgi?argument=value" --> +
    + +
    cmd
    + +
    +

    The server will execute the given string using + /bin/sh. The include variables are available + to the command, in addition to the usual set of CGI + variables.

    + +

    The use of #include + virtual is almost always + prefered to using either #exec cgi or #exec + cmd. The former (#include virtual) used the + standard Apache sub-request mechanism to include files or + scripts. It is much better tested and maintained.

    + +

    In addition, on some platforms, like Win32, and on unix + when using suexec, you cannot pass arguments to a command in + an exec directive, or otherwise include spaces in + the command. Thus, while the following will work under a + non-suexec configuration on unix, it will not produce the + desired result under Win32, or when running suexec:

    + + <!--#exec cmd="perl /path/to/perlscript arg1 arg2" --> + +
    +
    +
    + +
    fsize
    + +
    + This command prints the size of the specified file, subject + to the sizefmt format specification. + Attributes: + +
    +
    file
    + +
    The value is a path relative to the directory + containing the current document being parsed.
    + +
    virtual
    + +
    The value is a (%-encoded) URL-path relative to the + current document being parsed. If it does not begin with + a slash (/) then it is taken to be relative to the + current document.
    +
    +
    + +
    flastmod
    + +
    This command prints the last modification date of the + specified file, subject to the timefmt format + specification. The attributes are the same as for the + fsize command.
    + +
    include
    + +
    + This command inserts the text of another document or file + into the parsed file. Any included file is subject to the + usual access control. If the directory containing the + parsed file has the Option + IncludesNOEXEC set, and the including the document would + cause a program to be executed, then it will not be + included; this prevents the execution of CGI scripts. + Otherwise CGI scripts are invoked as normal using the + complete URL given in the command, including any query + string. + +

    An attribute defines the location of the document; the + inclusion is done for each attribute given to the include + command. The valid attributes are:

    + +
    +
    file
    + +
    The value is a path relative to the directory + containing the current document being parsed. It cannot + contain ../, nor can it be an absolute path. + Therefore, you cannot include files that are outside of the + document root, or above the current document in the directory + structure. + The virtual attribute should always be used + in preference to this one.
    + +
    virtual
    + +
    +

    The value is a (%-encoded) URL relative to the + current document being parsed. The URL cannot contain a + scheme or hostname, only a path and an optional query + string. If it does not begin with a slash (/) then it is + taken to be relative to the current document.

    + +

    A URL is constructed from the attribute, and the output the + server would return if the URL were accessed by the client + is included in the parsed output. Thus included files can + be nested.

    + +

    If the specified URL is a CGI program, the program will + be executed and its output inserted in place of the directive + in the parsed file. You may include a query string in a CGI + url:

    + + <!--#include virtual="/cgi-bin/example.cgi?argument=value" --> + +

    include virtual should be used in preference + to exec cgi to include the output of CGI + programs into an HTML document. +

    +
    +
    + +
    printenv
    + +
    +

    This prints out a listing of all existing variables and + their values. Starting with Apache 1.3.12, special characters + are entity encoded (see the echo element for details) + before being output. There are no attributes.

    + +

    For example:

    + +

    <!--#printenv -->

    + +

    The printenv element is available only in + Apache 1.2 and above.

    +
    +
    set
    + +
    + This sets the value of a variable. Attributes: + +
    +
    var
    + +
    The name of the variable to set.
    + +
    value
    + +
    The value to give a variable.
    +
    +

    + For example: <!--#set var="category" value="help" + -->

    + +

    The set element is available only in + Apache 1.2 and above.

    +
    +
    + +

    Include Variables

    + In addition to the variables in the standard CGI environment, + these are available for the echo command, for + if and elif, and to any program + invoked by the document. + +
    +
    DATE_GMT
    + +
    The current date in Greenwich Mean Time.
    + +
    DATE_LOCAL
    + +
    The current date in the local time zone.
    + +
    DOCUMENT_NAME
    + +
    The filename (excluding directories) of the document + requested by the user.
    + +
    DOCUMENT_URI
    + +
    The (%-decoded) URL path of the document requested by the + user. Note that in the case of nested include files, this is + not then URL for the current document.
    + +
    LAST_MODIFIED
    + +
    The last modification date of the document requested by + the user.
    + +
    USER_NAME
    + +
    Contains the owner of the file which included it.
    + +
    + +

    Variable Substitution

    + +

    Variable substitution is done within quoted strings in most + cases where they may reasonably occur as an argument to an SSI + directive. This includes the config, + exec, flastmod, fsize, + include, and set directives, as well + as the arguments to conditional operators. You can insert a + literal dollar sign into the string using backslash + quoting:

    +
    +    <!--#if expr="$a = \$test" -->
    +
    + +

    If a variable reference needs to be substituted in the + middle of a character sequence that might otherwise be + considered a valid identifier in its own right, it can be + disambiguated by enclosing the reference in braces, + à la shell substitution:

    +
    +    <!--#set var="Zed" value="${REMOTE_HOST}_${REQUEST_METHOD}" -->
    +
    + +

    This will result in the Zed variable being set + to "X_Y" if REMOTE_HOST is + "X" and REQUEST_METHOD is + "Y".

    + +

    EXAMPLE: the below example will print "in foo" if the + DOCUMENT_URI is /foo/file.html, "in bar" if it is + /bar/file.html and "in neither" otherwise:

    +
    +    <!--#if expr="\"$DOCUMENT_URI\" = \"/foo/file.html\"" -->
    +    in foo
    +    <!--#elif expr="\"$DOCUMENT_URI\" = \"/bar/file.html\"" -->
    +    in bar
    +    <!--#else -->
    +    in neither
    +    <!--#endif -->
    +
    + +

    Flow Control + Elements

    + These are available in Apache 1.2 and above. The basic flow + control elements are: +
    +    <!--#if expr="test_condition" -->
    +    <!--#elif expr="test_condition" -->
    +    <!--#else -->
    +    <!--#endif -->
    +
    + +

    The if element works like an + if statement in a programming language. The test condition is + evaluated and if the result is true, then the text until the + next elif, + else. or + endif element is included in the + output stream.

    + +

    The elif or + else statements are be used the + put text into the output stream if the original test_condition + was false. These elements are optional.

    + +

    The endif element ends the + if element and is required.

    + +

    test_condition is one of the following:

    + +
    +
    string
    + +
    true if string is not empty
    + +
    string1 = string2
    + string1 != string2
    + string1 < string2
    + string1 <= string2
    + string1 > string2
    + string1 >= string2
    + +
    Compare string1 with string 2. If string2 has the form + /string/ then it is compared as a regular + expression. Regular expressions have the same syntax as those + found in the Unix egrep command.
    + +
    ( test_condition )
    + +
    true if test_condition is true
    + +
    ! test_condition
    + +
    true if test_condition is false
    + +
    test_condition1 && + test_condition2
    + +
    true if both test_condition1 and + test_condition2 are true
    + +
    test_condition1 || test_condition2
    + +
    true if either test_condition1 or + test_condition2 is true
    +
    + +

    "=" and "!=" bind more tightly than + "&&" and "||". "!" binds + most tightly. Thus, the following are equivalent:

    +
    +    <!--#if expr="$a = test1 && $b = test2" -->
    +    <!--#if expr="($a = test1) && ($b = test2)" -->
    +
    + +

    Anything that's not recognized as a variable or an operator + is treated as a string. Strings can also be quoted: + 'string'. Unquoted strings can't contain whitespace + (blanks and tabs) because it is used to separate tokens such as + variables. If multiple strings are found in a row, they are + concatenated using blanks. So,

    +
    +     string1    string2  results in string1 string2
    +    'string1    string2' results in string1    string2
    +
    + +

    Using Server Side Includes for ErrorDocuments

    + There is a document + which describes how to use the features of mod_include to offer + internationalized customized server error documents. +
    + +

    XBitHack + directive

    + + Syntax: XBitHack + on|off|full
    + Default: XBitHack + off
    + Context: server config, virtual + host, directory, .htaccess
    + Override: Options
    + Status: Base
    + Module: mod_include + +

    The XBitHack directives controls the parsing of ordinary + html documents. This directive only affects files associated + with the MIME type text/html. XBitHack can take on + the following values:

    + +
    +
    off
    + +
    No special treatment of executable files.
    + +
    on
    + +
    Any file that has the user-execute bit set will be + treated as a server-parsed html document.
    + +
    full
    + +
    + As for on but also test the group-execute bit. + If it is set, then set the Last-modified date of the + returned file to be the last modified time of the file. If + it is not set, then no last-modified date is sent. Setting + this bit allows clients and proxies to cache the result of + the request. + +

    Note: you would not want to use this, + for example, when you #include a CGI that + produces different output on each hit (or potentially + depends on the hit).

    +
    +
    + +

    +

    + + + diff --git a/htdocs/manual/mod/mod_info.html.en b/htdocs/manual/mod/mod_info.html.en new file mode 100644 index 00000000000..d903bdb5b61 --- /dev/null +++ b/htdocs/manual/mod/mod_info.html.en @@ -0,0 +1,111 @@ + + + + + + + Apache module mod_info + + + + + + +

    Module mod_info

    + +

    This module provides a comprehensive overview of the server + configuration including all installed modules and directives in + the configuration files.

    + +

    Status: Extension
    + Source File: mod_info.c
    + Module Identifier: + info_module
    + Compatibility: Available in + Apache 1.1 and later.

    + +

    Directives

    + + + +

    Using mod_info

    + +

    To configure it, add the following to your + access.conf file.

    +
    +<Location /server-info>
    +SetHandler server-info
    +</Location>
    +
    + You may wish to add a <Limit> clause inside the location directive to limit + access to your server configuration information. + +

    Once configured, the server information is obtained by + accessing http://your.host.dom/server-info

    + +
    +

    Note that the configuration files are read by the + module at run-time, and therefore the display may + not reflect the running server's active + configuration if the files have been changed since the server + was last reloaded. Also, the configuration files must be + readable by the user as which the server is running (see the + User directive), or + else the directive settings will not be listed.

    + +

    It should also be noted that if + mod_info is compiled into the server, its + handler capability is available in all configuration + files, including per-directory files (e.g., + .htaccess). This may have security-related + ramifications for your site.

    + +

    In particular, this module can leak sensitive information + from the configuration directives of other Apache modules such as + system paths, usernames/passwords, database names, etc. Due to + the way this module works there is no way to block information + from it. Therefore, this module should ONLY be used in a controlled + environment and always with caution.

    + +
    +
    + +

    AddModuleInfo

    + Syntax: AddModuleInfo + module-name string
    + Context: server config, virtual + host
    + Status: Extension
    + Module: mod_info
    + Compatibility: Apache 1.3 and + above + +

    This allows the content of string to be shown as + HTML interpreted, Additional Information for + the module module-name. Example:

    + +
    +
    +AddModuleInfo mod_auth.c 'See <A HREF="http://www.apache.org/docs/mod/mod_auth.html">http://www.apache.org/docs/mod/mod_auth.html</A>'
    +
    +
    + + + + diff --git a/htdocs/manual/mod/mod_info.html.html b/htdocs/manual/mod/mod_info.html.html new file mode 100644 index 00000000000..237ce65b947 --- /dev/null +++ b/htdocs/manual/mod/mod_info.html.html @@ -0,0 +1,4 @@ + + + diff --git a/htdocs/manual/mod/mod_info.html.ja.jis b/htdocs/manual/mod/mod_info.html.ja.jis new file mode 100644 index 00000000000..ee7b56d7a5d --- /dev/null +++ b/htdocs/manual/mod/mod_info.html.ja.jis @@ -0,0 +1,110 @@ + + + + + + Apache module mod_info + + + + + + + +

    mod_info $B%b%8%e!<%k(B

    + +

    $B$3$N%b%8%e!<%k$O%$%s%9%H!<%k$5$l$F$$$k$9$Y$F$N%b%8%e!<%k$d!"(B + $B@_Dj%U%!%$%k$N%G%#%l%/%F%#%V$J$I!"%5!<%P$N@_Dj$NA4BNE*$J35MW$r(B + $BDs6!$7$^$9!#(B

    + +

    $B%9%F!<%?%9(B: Extension
    + $B%=!<%9%U%!%$%k(B: mod_info.c
    + $B%b%8%e!<%k<1JL;R(B: + info_module
    + $B8_49@-(B: + Apache 1.1 $B0J9_$G;HMQ2DG=!#(B

    + +

    $B%G%#%l%/%F%#%V(B

    + + + +

    mod_info $B$N;HMQK!(B

    + +

    $B@_Dj$9$k$K$O!"0J2<$r(B access.conf + $B%U%!%$%k$K2C$($^$9!#(B

    +
    +<Location /server-info>
    +SetHandler server-info
    +</Location>
    +
    + $B%5!<%P@_Dj$N>pJs$X$N%"%/%;%9$r@)8B$9$k$?$a$K!"(B + location + $B%G%#%l%/%F%#%V$NCf$K(B <Limit> + $B@a$rF~$l$k$H$h$$$+$b$7$l$^$;$s!#(B + +

    $B$$$C$?$s@_Dj$9$k$H!"(Bhttp://your.host.dom/server-info + $B$r%"%/%;%9$9$k$H%5!<%P$N>pJs$rF@$i$l$k$h$&$K$J$j$^$9!#(B

    + +
    +

    $B$3$N%b%8%e!<%k$Ol9g$K$O!"I=<($5$l$F$$$kFbMF$O$B$$$J$$(B$B$+$b$7$l$J$$$3$H$KCm0U$7$F$/$@$5$$!#(B + $B$^$?!"@_Dj%U%!%$%k$O%5!<%P$,User + $B%G%#%l%/%F%#%V$r;2>H$7$F$/$@$5$$(B)$B!#(B + $B$G$J$1$l$P!"%G%#%l%/%F%#%V$N@_Dj$OI=<($5$l$^$;$s!#(B

    +

    mod_info + $B$,%5!<%P$KAH$_9~$^$l$F$$$k>l9g$O!"%G%#%l%/%H%j(B$B$4$H(B$B$N%U%!%$%k(B + ($BNc$($P!"(B.htaccess) $B$r4^$`$9$Y$F$N@_Dj%U%!%$%k$G(B + $B%O%s%I%i$r;HMQ2DG=$G$"$k$H$$$&$3$H$K$bCm0U$7$F$/$@$5$$!#(B + $B$3$l$O!"$"$J$?$N%5%$%H$G$O%;%-%e%j%F%#$K4XO"$7$?LdBj$,$"$k$+$b$7$l$^$;$s!#(B +

    + +

    $BFC$K!"$3$N%b%8%e!<%k$O%7%9%F%`%Q%9!"%f!<%6L>(B/$B%Q%9%o!<%I!"(B + $B%G!<%?%Y!<%9L>$J$I!"B>$N(B Apache $B%b%8%e!<%k$N@_Dj%G%#%l%/%F%#%V$+$i(B + $B?5=E$K07$o$l$k$Y$->pJs$rO3$i$7$F$7$^$&2DG=@-$,$"$j$^$9!#(B + $B$3$N%b%8%e!<%k$,$=$N$h$&$KF0:n$9$k$?$a!">pJs$NN.=P$rKI$0J}K!$O$"$j$^$;$s!#(B + $B$G$9$+$i!"$3$N%b%8%e!<%k$O$-$A$s$H%"%/%;%9@)8f$5$l$?4D6-$G$N$_(B + $BCm0U$7$F;H$C$F$/$@$5$$!#(B

    + +
    +
    + +

    AddModuleInfo

    + $B9=J8(B: AddModuleInfo + module-name string
    + $B%3%s%F%-%9%H(B: + $B%5!<%P@_Dj%U%!%$%k!"%P!<%A%c%k%[%9%H(B
    + $B%9%F!<%?%9(B: Extension
    + $B%b%8%e!<%k(B: mod_info
    + $B8_49@-(B: Apache 1.3 $B0J9_!#(B + + +

    $B$3$l$O!"(Bstring $B$NFbMF$,%b%8%e!<%k(B module-name + $B$N(B$BDI2C>pJs(B $B$H$7$F(B HTML + $B$H$7$F2r + +

    +
    +AddModuleInfo mod_auth.c 'See <A HREF="http://www.apache.org/docs/mod/mod_auth.html">http://www.apache.org/docs/mod/mod_auth.html</A>'
    +
    +
    + + + diff --git a/htdocs/manual/mod/mod_isapi.html b/htdocs/manual/mod/mod_isapi.html new file mode 100644 index 00000000000..f29f6e3d49a --- /dev/null +++ b/htdocs/manual/mod/mod_isapi.html @@ -0,0 +1,335 @@ + + + + + + + Apache module mod_isapi + + + + + + +

    Module mod_isapi

    + +

    This module supports ISAPI Extensions within Apache for + Windows.

    + +

    Status: Base
    + Source File: mod_isapi.c
    + Module Identifier: + isapi_module
    + Compatibility: WIN32 only

    + +

    Summary

    + +

    This module implements the Internet Server extension API. It + allows Internet Server extensions (e.g. ISAPI .dll + modules) to be served by Apache for Windows, subject to the + noted restrictions.

    + +

    ISAPI extension modules (.dll files) are written by third + parties. The Apache Group does not author these modules, so we + provide no support for them. Please contact the ISAPI's author + directly if you are experiencing problems running their ISAPI + extention. Please do not post such problems to + Apache's lists or bug reporting pages.

    + +

    Directives

    + + + +

    Usage

    + +

    In the server configuration file, use the AddHandler + directive to associate ISAPI files with the + isapi-isa handler, and map it to the with their + file extensions. To enable any .dll file to be processed as an + ISAPI extention, edit the httpd.conf file and add the following + line:

    +
    +    AddHandler isapi-isa .dll
    +
    + +

    ISAPI extensions are governed by the same permissions and + restrictions as CGI scripts. That is, Options + ExecCGI must be set for the directory that contains the + ISAPI .dll file.

    + +

    Review the Additional Notes and the Programmer's Journal for additional details + and clarification of the specific ISAPI support offered by + mod_isapi.

    + +

    Additional Notes

    + +

    Apache's ISAPI implementation conforms to all of the ISAPI + 2.0 specification, except for the "Microsoft-specific" + extensions dealing with asynchronous I/O. Apache's I/O model + does not allow asynchronous reading and writing in a manner + that the ISAPI could access. If an ISA tries to access + unsupported features, including async I/O, a message is placed + in the error log to help with debugging. Since these messages + can become a flood, a new directive; ISAPILogNotSupported + Off, is introduced in Apache 1.3.13.

    + +

    Some servers, like Microsoft IIS, load the ISA into the + server, and keep it loaded until memory usage is too high, or + specific configuration options are used. Apache currently loads + and unloads the ISA for each request. This is inefficient, but + Apache's request model makes this method the only method that + currently works. Apache 2.0 is expected to support more + effective loading and caching methods, with more precise + control over individual ISAPI modules and directories.

    + +

    Also, remember that while Apache supports ISAPI Extensions, + it does not support ISAPI Filters. Support for + filters may be added at a later date, but no support is planned + at this time.

    + +

    Programmer's + Journal

    + +

    If you are programming Apache 1.3 mod_isapi modules, you + must limit your calls to ServerSupportFunction to the following + directives:

    + +
    +
    HSE_REQ_SEND_URL_REDIRECT_RESP
    + +
    Redirect the user to another location.
    + This must be a fully qualified URL (e.g. + http://server/location).
    + +
    HSE_REQ_SEND_URL
    + +
    Redirect the user to another location.
    + This cannot be a fully qualified URL, you are not allowed to + pass the protocol or a server name (e.g. simply + /location).
    + This redirection is handled by the server, not the + browser.
    + Warning: in their recent documentation, + Microsoft appears to have abandoned the distinction between + the two HSE_REQ_SEND_URL functions. Apache continues to treat + them as two distinct functions with different requirements + and behaviors.
    + +
    HSE_REQ_SEND_RESPONSE_HEADER
    + +
    Apache accepts a response body following the header if it + follows the blank line (two consecutive newlines) in the + headers string argument. This body cannot contain NULLs, + since the headers argument is NULL terminated.
    + +
    HSE_REQ_DONE_WITH_SESSION
    + +
    Apache considers this a no-op, since the session will be + finished when the ISAPI returns from processing.
    + +
    HSE_REQ_MAP_URL_TO_PATH
    + +
    Apache will translate a virtual name to a physical + name.
    + +
    HSE_APPEND_LOG_PARAMETER Apache 1.3.13 and + later
    + +
    + This logged message may be captured in any of the following + logs: + +
      +
    • in the \"%{isapi-parameter}n\" component in a + CustomLog directive
    • + +
    • in the %q log component with the + ISAPIAppendLogToQuery On directive
    • + +
    • in the error log with the ISAPIAppendLogToErrors On + directive
    • +
    + The first option, the %{isapi-parameter}n component, is + always available and prefered. +
    + +
    HSE_REQ_IS_KEEP_CONN Apache 1.3.13 and + later
    + +
    Will return the negotiated Keep-Alive status.
    + +
    HSE_REQ_SEND_RESPONSE_HEADER_EX Apache 1.3.13 and + later
    + +
    Will behave as documented, although the fKeepConn flag is + ignored.
    + +
    HSE_REQ_IS_CONNECTED Apache 1.3.13 and + later
    + +
    Will report false if the request has been aborted.
    +
    + +

    Apache returns FALSE to any unsupported call to + ServerSupportFunction, and sets the GetLastError value to + ERROR_INVALID_PARAMETER.

    + +

    Prior to Apache 1.3.13, ReadClient was a noop, and any + request with a request body greater than 48kb was rejected by + mod_isapi. As of Apache 1.3.13, ReadClient now retrieves the + request body exceeding the initial buffer (defined by + ISAPIReadAheadBuffer). Based on the ISAPIReadAheadBuffer + setting (number of bytes to buffer prior to calling the ISAPI + handler) shorter requests are sent complete to the extension + when it is invoked. If the request is longer, the ISAPI + extension must use ReadClient to retrieve the remaining request + body.

    + +

    WriteClient is supported, but only with the HSE_IO_SYNC flag + or no option flag (value of 0). Any other WriteClient request + will be rejected with a return value of FALSE, and a + GetLastError value of ERROR_INVALID_PARAMETER.

    + +

    GetServerVariable is supported, although extended server + variables do not exist (as defined by other servers.) All the + usual Apache CGI environment variables are available from + GetServerVariable. As of Apache 1.3.13, the ALL_HTTP and + ALL_RAW and variables are now available.

    + +

    Apache 2.0 mod_isapi may support additional features + introduced in later versions of the ISAPI specification, as + well as limited emulation of async I/O and the TransmitFile + semantics. Apache 2.0 may also support caching of ISAPI .dlls + for performance. No further enhancements to the Apache 1.3 + mod_isapi features are anticipated.

    +
    + +

    ISAPIReadAheadBuffer + directive

    + + Syntax: ISAPIReadAheadBuffer + size
    + Default: 49152
    + Context: server config
    + Override: None
    + Status: Base
    + Module: mod_isapi
    + Compatibility: Apache 1.3.13 + and later, Win32 only + +

    Defines the maximum size of the Read Ahead Buffer sent to + ISAPI extentions when they are initally invoked. All remaining + data must be retrieved using the ReadClient callback; some + ISAPI extensions may not support the ReadClient function. Refer + questions to the ISAPI extention's author.

    +
    + +

    ISAPILogNotSupported + directive

    + + Syntax: ISAPILogNotSupported + on|off
    + Default: on
    + Context: server config
    + Override: None
    + Status: Base
    + Module: mod_isapi
    + Compatibility: Apache 1.3.13 + and later, Win32 only + +

    Logs all requests for unsupported features from ISAPI + extentions in the server error log. While this should be turned + off once all desired ISAPI modules are functioning, it defaults + to on to help administrators track down problems.

    +
    + +

    ISAPIAppendLogToErrors + directive

    + + Syntax: ISAPIAppendLogToErrors + on|off
    + Default: off
    + Context: server config
    + Override: None
    + Status: Base
    + Module: mod_isapi
    + Compatibility: Apache 1.3.13 + and later, Win32 only + +

    Record HSE_APPEND_LOG_PARAMETER requests from ISAPI + extentions to the server error log.

    +
    + +

    ISAPIAppendLogToQuery + directive

    + + Syntax: ISAPIAppendLogToQuery + on|off
    + Default: off
    + Context: server config
    + Override: None
    + Status: Base
    + Module: mod_isapi
    + Compatibility: Apache 1.3.13 + and later, Win32 only + +

    Record HSE_APPEND_LOG_PARAMETER requests from ISAPI + extentions to the query field (appended to the CustomLog %q + component).

    + +

    +

    + + + diff --git a/htdocs/manual/mod/mod_log_agent.html b/htdocs/manual/mod/mod_log_agent.html new file mode 100644 index 00000000000..2e518514f70 --- /dev/null +++ b/htdocs/manual/mod/mod_log_agent.html @@ -0,0 +1,106 @@ + + + + + + + Module mod_log_agent + + + + + + +

    Module mod_log_agent

    + +

    This module provides for logging of the client user + agents.

    + +

    Status: Extension
    + Source File: + mod_log_agent.c
    + Module Identifier: + agent_log_module

    + +

    Summary

    + +

    This module is provided strictly for compatibility with NCSA + httpd, and is deprecated. We recommend you use mod_log_config instead.

    + +

    Directives

    + + + +

    See also: CustomLog and LogFormat.

    +
    + +

    AgentLog

    + + Syntax: AgentLog + file-pipe
    + Default: AgentLog + logs/agent_log
    + Context: server config, virtual + host
    + Status: Extension
    + Module: mod_log_agent + +

    The AgentLog directive sets the name of the file to which + the server will log the UserAgent header of incoming requests. + File-pipe is one of

    + +
    +
    A filename
    + +
    A filename relative to the ServerRoot.
    + +
    `|' followed by a command
    + +
    A program to receive the agent log information on its + standard input. Note the a new program will not be started + for a VirtualHost if it inherits the AgentLog from the main + server.
    +
    + Security: if a program is used, then it will + be run under the user who started httpd. This will be root if + the server was started by root; be sure that the program is + secure. + +

    Security: See the security tips document + for details on why your security could be compromised if the + directory where logfiles are stored is writable by anyone other + than the user that starts the server.

    + +

    This directive is provided for compatibility with NCSA + 1.4. The same result can be obtained by using the LogFormat and CustomLog directives as + shown in the following example:

    + +
    +    LogFormat "%{User-agent}i" agent
    +    CustomLog logs/agent_log agent
    +
    + +

    +

    + + + diff --git a/htdocs/manual/mod/mod_log_common.html b/htdocs/manual/mod/mod_log_common.html new file mode 100644 index 00000000000..e91adf7a659 --- /dev/null +++ b/htdocs/manual/mod/mod_log_common.html @@ -0,0 +1,144 @@ + + + + + + + Apache module mod_log_common + + + + + + +

    Module mod_log_common

    + This module is contained in the mod_log_common.c + file, and is compiled in by default. It provides for logging of + the requests made to the server using the Common Logfile + Format. This module has been replaced by mod_log_config in + Apache 1.2 + +

    Log file format

    + The log file contains a separate line for each request. A line + is composed of several tokens separated by spaces: + +
    + host ident authuser date request status bytes +
    + If a token does not have a value then it is represented by a + hyphen (-). The meanings and values of these tokens are as + follows: + +
    +
    host
    + +
    The fully-qualified domain name of the client, or its IP + number if the name is not available.
    + +
    ident
    + +
    If IdentityCheck is + enabled and the client machine runs identd, then this is the + identity information reported by the client.
    + +
    authuser
    + +
    If the request was for a password protected document, + then this is the userid used in the request.
    + +
    date
    + +
    + The date and time of the request, in the following format: + +
    +
    +
    + date = [day/month/year:hour:minute:second + zone]
    + day = 2*digit
    + month = 3*letter
    + year = 4*digit
    + hour = 2*digit
    + minute = 2*digit
    + second = 2*digit
    + zone = (`+' | `-') 4*digit
    +
    +
    +
    +
    + +
    request
    + +
    The request line from the client, enclosed in double + quotes (").
    + +
    status
    + +
    The three digit status code returned to the client.
    + +
    bytes
    + +
    The number of bytes in the object returned to the client, + not including any headers.
    +
    + +

    Directives

    + + +
    + +

    TransferLog

    + + Syntax: TransferLog + file-pipe
    + Default: TransferLog + logs/transfer_log
    + Context: server config, virtual + host
    + Status: Base
    + Module: mod_log_common + +

    The TransferLog directive sets the name of the file to which + the server will log the incoming requests. File-pipe + is one of

    + +
    +
    A filename
    + +
    A filename relative to the ServerRoot.
    + +
    `|' followed by a command
    + +
    A program to receive the agent log information on its + standard input. Note the a new program will not be started + for a VirtualHost if it inherits the TransferLog from the + main server. See, just as an example, cronolog.
    +
    + Security: if a program is used, then it will + be run under the user who started httpd. This will be root if + the server was started by root; be sure that the program is + secure. + +

    Security: See the security tips document + for details on why your security could be compromised if the + directory where logfiles are stored is writable by anyone other + than the user that starts the server.

    + +

    +

    + + + diff --git a/htdocs/manual/mod/mod_log_config.html.en b/htdocs/manual/mod/mod_log_config.html.en new file mode 100644 index 00000000000..f9ad2fb2dc2 --- /dev/null +++ b/htdocs/manual/mod/mod_log_config.html.en @@ -0,0 +1,407 @@ + + + + + + + Apache module mod_log_config + + + + + + +

    Module mod_log_config

    + +

    This module provides for logging of the requests made to the + server, using the Common Log Format or a user-specified + format.

    + +

    Status: Base
    + Source File: + mod_log_config.c
    + Module Identifier: + config_log_module
    + Compatibility: Was an extension + module prior to Apache 1.2.

    + +

    Summary

    + +

    This module provides for flexible logging of client + requests. Logs are written in a customizable format, and may be + written directly to a file, or to an external program. + Conditional logging is provided so that individual requests may + be included or excluded from the logs based on characteristics + of the request.

    + +

    Three directives are provided by this module: + TransferLog to create a log file, + LogFormat to set a custom format, and + CustomLog to define a log file and format in one + step. The TransferLog and CustomLog + directives can be used multiple times in each server to cause + each request to be logged to multiple files.

    + +

    See also: Apache Log Files.

    + +

    Directives

    + + + +

    Custom Log Formats

    + +

    The format argument to the LogFormat and + CustomLog directives is a string. This string is + used to log each request to the log file. It can contain literal + characters copied into the log files and the C-style control + characters "\n" and "\t" to represent new-lines and tabs. + Literal quotes and back-slashes should be escaped with + back-slashes.

    + +

    The characteristics of the request itself are logged by + placing "%" directives in the format string, which are + replaced in the log entry by the values as follows:

    +
    +%...a:          Remote IP-address
    +%...A:          Local IP-address
    +%...B:          Bytes sent, excluding HTTP headers.
    +%...b:          Bytes sent, excluding HTTP headers. In CLF format
    +        i.e. a '-' rather than a 0 when no bytes are sent.
    +%...c:          Connection status when response was completed.
    +                'X' = connection aborted before the response completed.
    +                '+' = connection may be kept alive after the response is sent.
    +                '-' = connection will be closed after the response is sent.
    +%...{FOOBAR}e:  The contents of the environment variable FOOBAR
    +%...f:          Filename
    +%...h:          Remote host
    +%...H       The request protocol
    +%...{Foobar}i:  The contents of Foobar: header line(s) in the request
    +                sent to the server.
    +%...l:          Remote logname (from identd, if supplied)
    +%...m       The request method
    +%...{Foobar}n:  The contents of note "Foobar" from another module.
    +%...{Foobar}o:  The contents of Foobar: header line(s) in the reply.
    +%...p:          The canonical Port of the server serving the request
    +%...P:          The process ID of the child that serviced the request.
    +%...q       The query string (prepended with a ? if a query string exists,
    +        otherwise an empty string)
    +%...r:          First line of request
    +%...s:          Status.  For requests that got internally redirected, this is
    +                the status of the *original* request --- %...>s for the last.
    +%...t:          Time, in common log format time format (standard english format)
    +%...{format}t:  The time, in the form given by format, which should
    +                be in strftime(3) format. (potentially localized)
    +%...T:          The time taken to serve the request, in seconds.
    +%...u:          Remote user (from auth; may be bogus if return status (%s) is 401)
    +%...U:          The URL path requested, not including any query string.
    +%...v:          The canonical ServerName of the server serving the request.
    +%...V:          The server name according to the UseCanonicalName setting.
    +
    + +

    The "..." can be nothing at all (e.g., "%h %u + %r %s %b"), or it can indicate conditions for inclusion + of the item (which will cause it to be replaced with "-" if the + condition is not met). The forms of condition are a list of + HTTP status codes, which may or may not be preceded by "!". + Thus, "%400,501{User-agent}i" logs User-agent: on 400 errors + and 501 errors (Bad Request, Not Implemented) only; + "%!200,304,302{Referer}i" logs Referer: on all requests which + did not return some sort of normal status.

    + +

    Note that in versions previous to 1.3.25 no escaping was performed + on the strings from %...r, %...i and + %...o. This was mainly to comply with the requirements of + the Common Log Format. This implied that clients could insert control + characters into the log, so you had to be quite careful when dealing + with raw log files.

    + +

    For security reasons starting with 1.3.25 non-printable and + other special characters are escaped mostly by using + \xhh sequences, where hh stands for + the hexadecimal representation of the raw byte. Exceptions from this + rule are " and \ which are escaped by prepending + a backslash, and all whitespace characters that are written in their + C-style notation (\n, \t, etc).

    + +

    Some commonly used log format strings are:

    + +
    +
    Common Log Format (CLF)
    + +
    "%h %l %u %t \"%r\" %>s %b"
    + +
    Common Log Format with Virtual Host
    + +
    "%v %h %l %u %t \"%r\" %>s %b"
    + +
    NCSA extended/combined log format
    + +
    "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" + \"%{User-agent}i\""
    + +
    Referer log format
    + +
    "%{Referer}i -> %U"
    + +
    Agent (Browser) log format
    + +
    "%{User-agent}i"
    +
    + +

    Note that the canonical ServerName and Port of the server serving the + request are used for %v and %p + respectively. This happens regardless of the UseCanonicalName setting + because otherwise log analysis programs would have to duplicate + the entire vhost matching algorithm in order to decide what + host really served the request.

    + +

    Security Considerations

    + +

    See the security tips + document for details on why your security could be compromised + if the directory where logfiles are stored is writable by + anyone other than the user that starts the server.

    + +

    Compatibility notes

    + +
      +
    • This module is based on mod_log_config distributed with + previous Apache releases, now updated to handle multiple + logs. There is now no need to rebuild Apache to change + configuration log formats.
    • + +
    • The module also implements the CookieLog + directive, used to log user-tracking information created by + mod_usertrack. The use of + CookieLog is deprecated, and a + CustomLog should be defined to log user-tracking + information instead.
    • + +
    • As of Apache 1.3.5, this module allows conditional + logging based upon the setting of environment variables. That is, you + can control whether a request should be logged or not based + upon whether an arbitrary environment variable is defined or + not. This is configurable on a per-logfile + basis.
    • + +
    • Beginning with Apache 1.3.5, the mod_log_config module + has also subsumed the RefererIgnore + functionality from mod_log_referer. The effect + of RefererIgnore can be achieved by combinations + of SetEnvIf + directives and conditional CustomLog + definitions.
    • +
    +
    + +

    CookieLog + directive

    + +

    Syntax: CookieLog + filename
    + Context: server config, virtual + host
    + Module: mod_cookies
    + Compatibility: Only available + in Apache 1.2 and above

    + +

    The CookieLog directive sets the filename for logging of + cookies. The filename is relative to the ServerRoot. This directive is + included only for compatibility with mod_cookies, and is deprecated.

    +
    + +

    CustomLog directive

    + +

    Syntax: CustomLog + file|pipe format|nickname + [env=[!]environment-variable]
    + Context: server config, virtual + host
    + Status: Base
    + Compatibility: Nickname only + available in Apache 1.3 or later. Conditional logging available + in 1.3.5 or later.
    + Module: mod_log_config

    + +

    The CustomLog directive is used to log requests + to the server. A log format is specified, and the logging can + optionally be made conditional on request characteristics using + environment variables.

    + +

    The first argument, which specifies the location to which + the logs will be written, can take one of the following two + types of values:

    + +
    +
    file
    + +
    A filename, relative to the ServerRoot.
    + +
    pipe
    + +
    The pipe character "|", followed by the path + to a program to receive the log information on its standard + input. Security: if a program is used, then + it will be run as the user who started httpd. This will be + root if the server was started by root; be sure that the + program is secure.
    +
    + +

    The second argument specifies what will be written to the + log file. It can specify either a nickname defined by + a previous LogFormat directive, or it + can be an explicit format string as described in the + log formats section.

    + +

    For example, the following two sets of directives have + exactly the same effect:

    +
    +     # CustomLog with format nickname
    +     LogFormat "%h %l %u %t \"%r\" %>s %b" common
    +     CustomLog logs/access_log common
    +
    +     # CustomLog with explicit format string
    +     CustomLog logs/access_log "%h %l %u %t \"%r\" %>s %b"
    +
    + +

    The third argument is optional and controls + whether or not to log a particular request based on the + presence or absence of a particular variable in the server + environment. If the specified environment + variable is set for the request (or is not set, in the case + of a 'env=!name' clause), then the + request will be logged.

    + +

    Environment variables can be set on a per-request + basis using the mod_setenvif + and/or mod_rewrite modules. For + example, if you want to record requests for all GIF + images on your server in a separate logfile but not in your main + log, you can use:

    +
    +    SetEnvIf Request_URI \.gif$ gif-image
    +    CustomLog gif-requests.log common env=gif-image
    +    CustomLog nongif-requests.log common env=!gif-image
    +
    +
    + +

    LogFormat + directive

    + +

    Syntax: LogFormat + format|nickname [nickname]
    + Default: LogFormat "%h %l + %u %t \"%r\" %>s %b"
    + Context: server config, virtual + host
    + Status: Base
    + Compatibility: Nickname only + available in Apache 1.3 or later
    + Module: mod_log_config

    + +

    This directive specifies the format of the access log + file.

    + +

    The LogFormat directive can take one of two + forms. In the first form, where only one argument is specified, + this directive sets the log format which will be used by logs + specified in subsequent TransferLog + directives. The single argument can specify an explicit + format as discussed in the custom log + formats section above. Alternatively, it can use a + nickname to refer to a log format defined in a + previous LogFormat directive as described + below.

    + +

    The second form of the LogFormat directive + associates an explicit format with a + nickname. This nickname can then be used in + subsequent LogFormat or CustomLog directives rather than + repeating the entire format string. A LogFormat + directive which defines a nickname does nothing + else -- that is, it only defines the + nickname, it doesn't actually apply the format and make it the + default. Therefore, it will not affect subsequent TransferLog directives.

    + +

    For example:

    + + LogFormat "%v %h %l %u %t \"%r\" %>s %b" vhost_common + +
    + +

    TransferLog + directive

    + +

    Syntax: TransferLog + file|pipe
    + Default: none
    + Context: server config, virtual + host
    + Status: Base
    + Module: mod_log_config

    + +

    This directive has exactly the same arguments and effect as + the CustomLog directive, with the + exception that it does not allow the log format to be specified + explicitly or for conditional logging of requests. Instead, the + log format is determined by the most recently specified LogFormat directive that does not define + a nickname. Common Log Format is used if no other format has + been specified.

    + +

    Example:

    +
    +   LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\""
    +   TransferLog logs/access_log
    +
    + + + + diff --git a/htdocs/manual/mod/mod_log_config.html.html b/htdocs/manual/mod/mod_log_config.html.html new file mode 100644 index 00000000000..091b838dc13 --- /dev/null +++ b/htdocs/manual/mod/mod_log_config.html.html @@ -0,0 +1,4 @@ + + + diff --git a/htdocs/manual/mod/mod_log_config.html.ja.jis b/htdocs/manual/mod/mod_log_config.html.ja.jis new file mode 100644 index 00000000000..ae4f698e0be --- /dev/null +++ b/htdocs/manual/mod/mod_log_config.html.ja.jis @@ -0,0 +1,409 @@ + + + + + Apache module mod_log_config + + + + + + +

    mod_log_config $B%b%8%e!<%k(B

    + +

    $B$3$N%b%8%e!<%k$O%5!<%P$X$N%j%/%(%9%H$r(B Common Log Format + $B$d%f!<%6$K;XDj$5$l$?=q<0$rMQ$$$F(B + $B%m%0<}=8$9$k5!G=$rDs6!$7$^$9!#(B

    + +

    $B%9%F!<%?%9(B: Base
    + $B%=!<%9%U%!%$%k(B: + mod_log_config.c
    + $B%b%8%e!<%k<1JL;R(B: + config_log_module
    + $B8_49@-(B: Apache 1.2 $B$h$jA0$O(B + extension $B%b%8%e!<%k$G$7$?!#(B

    + +

    $B35MW(B

    + +

    + $B$3$N%b%8%e!<%k$O%/%i%$%"%s%H$N%j%/%(%9%H$r=@Fp$K%m%0<}=8$9$k5!G=$r(B + $BDs6!$7$^$9!#%m%0$O%+%9%?%^%$%:2DG=$J=q<0$G=q$+$l!"%U%!%$%k$KD>@\(B + $B=q$$$?$j!"30It%W%m%0%i%`$KEO$7$?$j$9$k$3$H$,$G$-$^$9!#8D!9$N%j%/%(%9%H$r(B + $BFCD'$K1~$8$F%m%0$K=q$$$?$j=q$+$J$+$C$?$j$G$-$k$h$&$K!">r7o$K$h$k(B + $B%m%0<}=8$bDs6!$5$l$F$$$^$9!#(B

    + +

    $B$3$N%b%8%e!<%k$O;0$D$N%G%#%l%/%F%#%VDs6!$7$^$9(B: + $B%m%0%U%!%$%k$r:n@.$9$k$?$a$N(B TransferLog, + $B?7$7$$=q<0$r(B $BDj5A$9$k(B LogFormat, + $B%m%0%U%!%$%k$H(B $B=q<0$r0lEY$KDj5A$9$k(B CustomLog + $B$G$9!#(B + $B3F%j%/%(%9%H$,J#?t2s%m%0<}=8$5$l$k$h$&$K$9$k$?$a$K(B + TransferLog $B%G%#%l%/%F%#%V$H(B CustomLog + $B%G%#%l%/%F%#%V$OJ#?t2s;HMQ$9$k$3$H$,$G$-$^$9!#(B

    + +

    $B;2>H(B: Apache + $B%m%0%U%!%$%k(B$B!#(B

    + +

    $B%G%#%l%/%F%#%V(B

    + + + +

    $B%+%9%?%`%m%0=q<0(B

    + +

    LogFormat $B%G%#%l%/%F%#%V$H(B CustomLog + $B%G%#%l%/%F%#%V$N=q<0$r;XDj$9$k0z?t$OJ8;zNs$G$9!#$3$NJ8;zNs$r;H$C$F$=$l$>$l$N(B + $B%j%/%(%9%H$,%m%0%U%!%$%k$K%m%0<}=8$5$l$^$9!#$=$NJ8;zNs$K$O(B + $B%m%0%U%!%$%k$K$=$N$^$^(B + $B=q$+$l$kJ8;zNs$d!"$=$l$>$l2~9T$H%?%V$r8=$9(B C $B8@8l(B + $B7A<0$N@)8fJ8;z(B "\n" $B$H(B "\t" + $B$H$r4^$a$k$3$H$,$G$-$^$9!#$=$N$^$^=PNO$5$;$?$$0zMQId$H%P%C%/%9%i%C%7%e$O(B + $B%P%C%/%9%i%C%7%e$G%(%9%1!<%W$9$kI,MW$,$"$j$^$9!#(B

    + +

    $B%j%/%(%9%H$NFCD'$=$N$b$N$O(B "%" + $B%G%#%l%/%F%#%V$r=q<0$NJ8;zNs$K=q$/$3$H$G(B + $B%m%0<}=8$5$l$^$9!#(B"%" + $B%G%#%l%/%F%#%V$O%m%0%(%s%H%jCf$G$O0J2<$N$h$&$J(B + $BCM$GCV49$5$l$^$9(B:

    + +
    +%...a:          $B%j%b!<%H(B IP $B%"%I%l%9(B
    +%...A:          $B%m!<%+%k(B IP $B%"%I%l%9(B
    +%...B:          HTTP $B%X%C%@0J30$NAw$i$l$?%P%$%H?t(B
    +%...b:          HTTP $B%X%C%@0J30$NAw$i$l$?%P%$%H?t!#(BCLF $B=q<0!#(B
    +                $B$9$J$o$A!"(B1 $B%P%$%H$bAw$i$l$J$+$C$?$H$-$O(B 0 $B$G$O$J$/!"(B'-' $B$K$J$k(B
    +%...c:          $B1~Ez$,=*N;$7$?$H$-$N@\B3%9%F!<%?%9!#(B
    +                'X' = $B1~Ez$,=*N;$9$kA0$K@\B3$,0[>o=*N;(B
    +                '+' = $B1~Ez$,Aw$i$l$?8e$K@\B3$r;}B3$9$k$3$H$,2DG=(B
    +                '-' = $B1~Ez$,Aw$i$l$?8e$K@\B3$O@Z$i$l$k(B
    +%...{FOOBAR}e:  $B4D6-JQ?t(B FOOBAR $B$NFbMF(B
    +%...f:          $B%U%!%$%kL>(B
    +%...h:          $B%j%b!<%H%[%9%H(B
    +%...H           $B%j%/%(%9%H%W%m%H%3%k(B
    +%...{Foobar}i:  $B%5!<%P$KAw$i$l$?%j%/%(%9%H$N(B Foobar: $B%X%C%@$NFbMF(B
    +%...l:          ($B$b$7$"$l$P!"(Bidentd $B$+$i$N(B) $B%j%b!<%H%m%0L>(B
    +%...m           $B%j%/%(%9%H%a%=%C%I(B
    +%...{Foobar}n:  $BB>$N%b%8%e!<%k$+$i$N%a%b(B "Foobar" $B$NFbMF(B
    +%...{Foobar}o:  $B1~Ez$N(B Foobar: $B%X%C%@$NFbMF(B
    +%...p:          $B%j%/%(%9%H$r07$C$F$$$k%5!<%P$N@5<0$J%]!<%H(B
    +%...P:          $B%j%/%(%9%H$r07$C$?;R%W%m%;%9$N%W%m%;%9(B ID
    +%...q           $BLd$$9g$;J8;zNs(B ($BB8:_$9$k>l9g$OA0$K(B ? $B$,DI2C$5$l$k!#$=$&$G$J$$(B
    +                $B>l9g$O6uJ8;zNs(B)
    +%...r:          $B%j%/%(%9%H$N:G=i$N9T(B
    +%...s:          $B%9%F!<%?%9!#FbIt$G%j%@%$%l%/%H$5$l$?%j%/%(%9%H$O!"85!9$N(B
    +                $B%j%/%(%9%H$N%9%F!<%?%9(B --- $B:G8e$N%9%F!<%?%9$O(B %...>s
    +%...t:          $B;~9o!#(BCLF $B$N;~9o$N=q<0(B ($BI8=`$N1Q8l$N=q<0(B)
    +%...{format}t:  format $B$GM?$($i$l$?=q<0$K$h$k;~9o!#(Bformat $B$O(B strftime (3) $B$N(B
    +                $B=q<0$G$"$kI,MW$,$"$k!#(B($BCO0h2=$5$l$F$$$k2DG=@-$,$"$k(B)
    +%...T:          $B%j%/%(%9%H$r07$&$N$K$+$+$C$?;~4V!"ICC10L(B
    +%...u:          $B%j%b!<%H%f!<%6(B (auth $B$K$h$k$b$N!#%9%F!<%?%9(B (%s) $B$,(B 401 $B$N$H$-$O(B
    +                $B0UL#$,$J$$2DG=@-$,$"$k(B)
    +%...U:          $B%j%/%(%9%H$5$l$?(B URL $B%Q%9$G!"%/%(%jJ8;zNs$O4^$^$J$$(B
    +%...v:          $B%j%/%(%9%H$r07$C$F$$$k%5!<%P$N@5<0$J(B ServerName
    +%...V:          UseCanonicalName $B$N@_Dj$K$h$k%5!<%PL>(B
    +
    + +

    "..." $B$O2?$b$J$$$+(B ($BNc$($P(B$B!"(B"%h %u %r %s %b" $B$N$h$&$K(B)$B!"(B + $B$=$N9`L\$r4^$a$k$+$I$&$+$N>r7o(B ($B$b$7>r7o$K9g$o$J$+$C$?$H$-$O(B + $B$=$N9`L\$O(B "-" $B$K$J$j$^$9(B) $B$K$9$k$3$H$,$G$-$^$9!#>r7o$N7A<0$O(B + HTTP $B%9%F!<%?%9%3!<%I$N%j%9%H$G!"A0$K(B "!" $B$rIU$1$k$3$H$b$G$-$^$9!#(B + $B$G$9$+$i!"(B"%400,501{User-agent}i" $B$O(B 400 $B%(%i!<$H(B 501 $B%(%i!<(B + (Bad Request $B$H(B Not Implemented) $B$N$H$-$N$_(B User-agent: $B$r%m%0<}=8$7$^$9!#(B + "%!200,304,302{Referer}i" $B$OIaDL$N%9%F!<%?%9$r(B$BJV$5$J$+$C$?(B + $B$9$Y$F$N%j%/%(%9%H$G(B Referer: $B$r%m%0<}=8$7$^$9!#(B

    + +

    1.3.25 $B$h$jA0$N%P!<%8%g%s$G$O!"(B%...r, %...i, + %...o $B$NJ8;zNs$O(B + $B%(%9%1!<%W$5$l$F$$$J$+$C$?$3$H$K(B + $BCm0U$7$F$/$@$5$$!#$3$l$Oo$KCm0U$,I,MW$G$7$?!#(B

    + +

    $B%;%-%e%j%F%#>e$NM}M3$K$h$j(B 1.3.25 $B$h$j0u;zIT2DG=$JJ8;z$H(B + $BB>$NFCJL$JJ8;z$O!"$[$H$s$I(B \xhh $B$H$$$&(B + $BJ8;zNs$G%(%9%1!<%W$5$l$k$h$&$K$J$j$^$7$?!#$3$3$G!"(Bhh $B$O(B + $B$=$N$^$^$N%P%$%H$NCM$N(B 16 $B?J$G$NCM$G$9!#$3$N5,B'$NNc30$K$O!"(B + $B%P%C%/%9%i%C%7%e$r;H$C$F%(%9%1!<%W$5$l$k(B " $B$H(B \ $B$H!"(B + C $B7A<0$NI=5-K!$,;H$o$l$k6uGrJ8;z(B (\n, \t $B$J$I(B) $B$,(B + $B$"$j$^$9!#(B

    + +

    $B$h$/;H$o$l$k%U%)!<%^%C%HJ8;zNs$O(B:

    + +
    +
    Common Log Format (CLF)
    + +
    "%h %l %u %t \"%r\" %>s %b"
    + +
    $B%P!<%A%c%k%[%9%HIU$-(B Common Log Format
    + +
    "%v %h %l %u %t \"%r\" %>s %b"
    + +
    NCSA extended/combined $B%m%0=q<0(B
    + +
    "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" + \"%{User-agent}i\""
    + +
    Referer $B%m%0=q<0(B
    + +
    "%{Referer}i -> %U"
    + +
    Agent ($B%V%i%&%6(B) $B%m%0=q<0(B
    + +
    "%{User-agent}i"
    +
    + +

    %v $B$H(B %p $B$K$O$=$l$>$l!"(B + $B%j%/%(%9%H$r07$C$F$$$k%5!<%P$N@55,2=$5$l$?(B + ServerName $B$H(B Port $B$,;H$o$l$k$H$$$&$3$H$KCm0U$7$F$/$@$5$$!#(B + $B$3$l$O(B UseCanonicalName $B$N(B + $B@_Dj$K4X$o$i$:!">o$K$=$&$J$j$^$9!#$=$&$7$J$$$H$I$N(B + $B%[%9%H$, + +

    $B%;%-%e%j%F%#$K4X$7$F(B

    + +

    $B%m%0%U%!%$%k$,J]B8$5$l$F$$$k%G%#%l%/%H%j$,%5!<%P$r5/F0$7$?0J30$N%f!<%6$G(B + $B=q$-9~$_2DG=$J$H$-$K%;%-%e%j%F%#$NLdBj$,H/@8$9$kM}M3$N>\:Y$O(B$B%;%-%e%j%F%#$N$3$D(B + $B$r;2>H$7$F$/$@$5$$!#(B

    + +

    $B8_49@-$K4X$7$F(B

    + +
      +
    • $B$3$N%b%8%e!<%k$O0JA0$N(B Apache + $B$N%j%j!<%9$GG[I[$5$l$F$$$?(B mod_log_config + $B$r4p$K$7$F!"J#?t$N%m%0$r07$($k$h$&$K99?7$5$l$?$b$N$G$9!#(B + $B@_Dj2DG=$J%m%0$N=q<0$r;H$&$?$a$K(B Apache $B$r%S%k%I(B + $B$7D>$9I,MW$O$J$/$J$j$^$7$?!#(B
    • + +
    • $B$3$N%b%8%e!<%k$O(B mod_usertrack $B$K$h$j(B + $B:n$i$l$?%f!<%6DI@WMQ$N>pJs$N%m%0<}=8$r9T$J$&$?$a$K;H$o$l$F$$$?(B + CookieLog + $B%G%#%l%/%F%#%V$bCookieLog + $B%G%#%l%/%F%#%V$N;HMQ$OHs?d>)$G!"(B + $B%f!<%6DI@WMQ$N>pJs$b%m%0<}=8$9$k$h$&$K@_Dj$7$?(B + CustomLog $B$r;H$&$3$H$,?d>)$5$l$F$$$^$9!#(B
    • + +
    • Apache 1.3.5 $B$N;~E@$G!"$3$N%b%8%e!<%k$O(B $B4D6-JQ?t(B + $B$N@_Dj$K4p$E$$$F>r7oIU$-%m%.%s%0$,$G$-$k$h$&$K$J$j$^$7$?!#$9$J$o$A!"(B + $B%j%/%(%9%H$,%m%0<}=8$5$l$k$+$I$&$+$rG$0U$N4D6-JQ?t$,Dj5A$5$l$F$$$k$+(B + $B$I$&$+$K$h$jJQ99$9$k$3$H$,$G$-$k$H$$$&$3$H$G$9!#$3$l$O(B + $B%m%0%U%!%$%k$4$H$K@_Dj2DG=$G$9!#(B
    • + +
    • Apache 1.3.5 $B$+$i!"(Bmod_log_config $B%b%8%e!<%k$O(B mod_log_referer $B$N(B + RefererIgnore $B5!G=$b4^$`$h$&$K$J$j$^$7$?!#(B + RefererIgnore $B$N8z2L$O(B SetEnvIf + $B%G%#%l%/%F%#%V$H(B CustomLog + $B$N>r7oIU$-$N@_Dj$K$h$jC#@.$G$-$^$9!#(B
    • +
    + +
    +

    CookieLog + $B%G%#%l%/%F%#%V(B

    + +

    $B9=J8(B: CookieLog + filename
    + $B%3%s%F%-%9%H(B: + $B%5!<%P@_Dj%U%!%$%k!"%P!<%A%c%k%[%9%H(B
    + $B%b%8%e!<%k(B: mod_cookies
    + $B8_49@-(B: Apache 1.2 + $B0J9_$G$N$_;HMQ2DG=(B

    + +

    CookieLog + $B%G%#%l%/%F%#%V$O%/%C%-!<$N%m%.%s%0$N$?$a$N%U%!%$%kL>$r(B + $B@_Dj$7$^$9!#(Bfilename $B$O(B ServerRoot + $B$+$i$NAjBP%Q%9$G$9!#$3$N%G%#%l%/%F%#%V$O(B mod_cookies $B$H$N8_49@-$N$?$a$@$1$K(B + $BB8:_$7!";HMQ$O?d>)$5$l$F$$$^$;$s!#(B

    + +
    +

    CustomLog $B%G%#%l%/%F%#%V(B

    + +

    $B9=J8(B: CustomLog + file|pipe format|nickname + [env=[!]environment-variable]
    + $B%3%s%F%-%9%H(B: + $B%5!<%P@_Dj%U%!%$%k!"%P!<%A%c%k%[%9%H(B
    + $B%9%F!<%?%9(B: Base
    + $B8_49@-(B: Nickname $B$O(B Apache + 1.3 $B0J9_$G$N$_;HMQ2DG=!#(B $B>r7oIU$-%m%.%s%0$O(B 1.3.5 + $B0J9_$G;HMQ2DG=!#(B
    + $B%b%8%e!<%k(B: mod_log_config

    + +

    CustomLog $B%G%#%l%/%F%#%V$O%5!<%P$X$N%j%/%(%9%H$r(B + $B%m%0<}=8$9$k$?$a$K;H$o$l$^$9!#%m%0$N=q<0$,;XDj$5$l!"(B + $B4D6-JQ?t$r;H$C$F%m%.%s%0$,>r7o$K1~$8$F9T$J$o$l$k$h$&$K$9$k$3$H$b$G$-$^$9!#(B

    + +

    $B%m%0$,=q$+$l$k>l=j$r;XDj$9$k:G=i$N0z?t$O0J2<$NFs$D$N7A<0$NCM$r(B + $B$H$k$3$H$,$G$-$^$9(B:

    + +
    +
    file
    + +
    ServerRoot + $B$+$i$NAjBP%Q%9$GI=$5$l$k%U%!%$%kL>!#(B
    + +
    pipe
    + +
    $B%Q%$%WJ8;z(B "|" $B$H!"$=$N8e$KI8=`F~NO$+$i%m%0$N(B + $B>pJs$r$B%;%-%e%j%F%#(B: $B$b$7%W%m%0%i%`$,;HMQ$5$l$?>l9g!"(B + httpd $B$,5/F0$5$l$?%f!<%6$H$7$Fl9g$O(B root $B$K$J$j$^$9!#%W%m%0%i%`$,(B + $B0BA4$G$"$k$h$&$KN10U$7$F$/$@$5$$!#(B
    +
    + +

    $BFs$D$a$N0z?t$O%m%0%U%!%$%k$K2?$,=q$+$l$k$+$r;XDj$7$^$9!#(B + $BA0$K$"$k(B LogFormat $B%G%#%l%/%F%#%V$K$h$j(B + $BDj5A$5$l$?(B $B%K%C%/%M!<%`(B $B$+!"(B$B%m%0$N=q<0(B + $B$N$H$3$m$G@bL@$5$l$F$$$k!"L@<(E*$J(B$B%U%)!<%^%C%H(B$BJ8;zNs$N(B + $B$I$A$i$+$r;XDj$9$k$3$H$,$G$-$^$9!#(B

    + +

    $BNc$($P!"0J2<$NFs$D$N%G%#%l%/%F%#%V72$OA4$/F1$88z2L$r$b$?$i$7$^$9(B:

    + +
    +     # CustomLog with format nickname
    +     LogFormat "%h %l %u %t \"%r\" %>s %b" common
    +     CustomLog logs/access_log common
    +
    +     # CustomLog with explicit format string
    +     CustomLog logs/access_log "%h %l %u %t \"%r\" %>s %b"
    +
    + +

    $B;0$DL\$N0z?t$O>JN,2DG=$G!"%5!<%P$N4D6-$K$"$kJQ?t$,$"$k$+$J$$$+$K(B + $B1~$8$F%j%/%(%9%H$r%m%0<}=8$9$k$+$I$&$+$r@)8f$9$k$?$a$K;H$&$3$H$,$G$-$^$9!#(B + $B;XDj$5$l$?(B$B4D6-JQ?t(B$B$,%j%/%(%9%H$KBP$7$F(B + $B@_Dj$5$l$F$$$?>l9g(B ('env=!name' $BJ8$,;H$o$l$?$H$-$O(B + $B@_Dj$5$l$F$$$J$$>l9g(B)$B!"%j%/%(%9%H$,%m%0<}=8$5$l$^$9!#(B

    + +

    $B4D6-JQ?t$O(B mod_setenvif $B%b%8%e!<%k$H(B + mod_rewrite $B%b%8%e!<%k$NN>J}$b$7$/$O(B + $BJRJ}$rMQ$$$F%j%/%(%9%H$4$H$K@_Dj$9$k$3$H$,$G$-$^$9!#(B + $BNc$($P!"%5!<%P$K$"$k$9$Y$F$N(B GIF $B2hA|$X$N%j%/%(%9%H$rJL$N%m%0%U%!%$%k(B + $B$K$O5-O?$7$?$$$1$l$I!"%a%$%s%m%0$K$O5-O?$7$?$/$J$$!"$H$$$&$H$-$O(B + $B0J2<$N$b$N$r;H$&$3$H$,$G$-$^$9(B:

    + +
    +    SetEnvIf Request_URI \.gif$ gif-image
    +    CustomLog gif-requests.log common env=gif-image
    +    CustomLog nongif-requests.log common env=!gif-image
    +
    + +
    +

    LogFormat + $B%G%#%l%/%F%#%V(B

    + +

    $B9=J8(B: LogFormat + format|nickname [nickname]
    + $B%G%U%)%k%H(B: LogFormat "%h + %l %u %t \"%r\" %>s %b"
    + $B%3%s%F%-%9%H(B: + $B%5!<%P@_Dj%U%!%$%k!"%P!<%A%c%k%[%9%H(B
    + $B%9%F!<%?%9(B: Base
    + $B8_49@-(B: $B%K%C%/%M!<%`$O(B + Apache 1.3 $B0J9_$G$N$_;HMQ2DG=(B
    + $B%b%8%e!<%k(B: mod_log_config

    + +

    $B$3$N%G%#%l%/%F%#%V$O%"%/%;%9%m%0%U%!%$%k$N=q<0$r;XDj$7$^$9!#(B

    + +

    LogFormat $B%G%#%l%/%F%#%V$OFs$D$N7A<0$N$I$A$i$+$r(B + $B$H$k$3$H$,$G$-$^$9!#:G=i$N7A<0$G$O0l$D$N0z?t$N$_$,;XDj$5$l!"(B + $BB3$/(B TransferLog + $B$G;XDj$5$l$?%m%0$G;H$o$l$k%m%0$N=q<0$r@_Dj$7$^$9!#$3$NC1FH$N0z?t$G$O(B + $B>e$N(B$B%+%9%?%`%m%0=q<0(B$B$G@bL@$5$l$F$$$k$h$&$K(B + $B%U%)!<%^%C%H(B$B$rL@<(E*$K;XDj$9$k$3$H$,$G$-$^$9!#(B + $B$b$7$/$O!"2<$G@bL@$5$l$F$$$k$h$&$KA0$K(B LogFormat + $B%G%#%l%/%F%#%V$GDj5A$5$l$?%m%0$N=q<0$r(B$B%K%C%/%M!<%`(B$B$r;H$C$F(B + $B;2>H$9$k$3$H$b$G$-$^$9!#(B

    + +

    LogFormat $B%G%#%l%/%F%#%V$NFs$D$a$N7A<0$O(B + $B%U%)!<%^%C%H(B$B$K(B$B%K%C%/%M!<%`(B$B$rM?$($^$9!#(B + $B%U%)!<%^%C%HJ8;zNsA4BN$r:F$S=q$/$+$o$j$K!"(B + $B$3$N(B$B%K%C%/%M!<%`(B$B$rB3$-$N(B LogFormat $B%G%#%l%/%F%#%V$d(B + CustomLog $B%G%#%l%/%F%#%V$G;H$&$3$H$,$G$-$^$9!#(B + $B%K%C%/%M!<%`$rDj5A$9$k(B LogFormat $B%G%#%l%/%F%#%V$O(B + $BB>$K$O2?$b$7$^$;$s(B -- $B$9$J$o$A!"%K%C%/%M!<%`$rDj5A(B + $B$9$k$@$1$G!"TransferLog + $B%G%#%l%/%F%#%V$K$O1F6A$rM?$($^$;$s!#(B

    + + +

    $BNc(B:

    + + LogFormat "%v %h %l %u %t \"%r\" %>s %b" vhost_common + +
    +

    TransferLog$B%G%#%l%/%F%#%V(B

    + +

    $B9=J8(B: TransferLog + file|pipe
    + $B%G%U%)%k%H(B: none
    + $B%3%s%F%-%9%H(B: + $B%5!<%P@_Dj%U%!%$%k!"%P!<%A%c%k%[%9%H(B
    + $B%9%F!<%?%9(B: Base
    + $B%b%8%e!<%k(B: mod_log_config

    + +

    $B$3$N%G%#%l%/%F%#%V$O!"%m%0=q<0$rD>@\;XDj$G$-$J$$$3$H$H!"(B + $B>r7oIU$-%m%.%s%0$,L5$$$3$H$r=|$/$H!"(BCustomLog $B$HA4$/F1$80z?t$H8z2L$,$"$j$^$9!#(B + $BD>@\%m%0=q<0$r;XDj$9$kBe$o$j$K!"%m%0$N=q<0$O$=$3$^$G$G0lHV:G8e$K;XDj$5$l$?(B + $B%K%C%/%M!<%`$rDj5A$7$J$$(B + LogFormat $B%G%#%l%/%F%#%V(B + $B$GDj5A$5$l$?$b$N$r;H$$$^$9!#(B + $B$b$7B>$N=q<0$,A4$/;XDj$5$l$F$$$J$$$H$-$O(B Common Log Format + $B$,;H$o$l$^$9!#(B

    + +

    $BNc(B:

    + +
    +   LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\""
    +   TransferLog logs/access_log
    +
    + + + + + diff --git a/htdocs/manual/mod/mod_log_forensic.html.en b/htdocs/manual/mod/mod_log_forensic.html.en new file mode 100644 index 00000000000..88858501cd5 --- /dev/null +++ b/htdocs/manual/mod/mod_log_forensic.html.en @@ -0,0 +1,149 @@ + + + + + + Apache module mod_log_forensic + + + + + + +

    Module mod_log_forensic

    + +

    This module provides for forensic logging of the requests made to the + server

    + +

    Status: Extension
    + Source File: + mod_log_forensic.c
    + Module Identifier: + log_forensic_module
    + Compatibility: Available in + Version 1.3.30 and later.

    + +

    Summary

    + +

    This module provides for forensic logging of client + requests. Logging is done before and after processing a request, so the + forensic log contains two log lines for each request. + The forensic logger is very strict, which means:

    + +
      +
    • The format is fixed. You cannot modify the logging format at + runtime.
    • +
    • If it cannot write its data, the child process exits immediately + and may dump core (depends on your + CoreDumpDirectory + configuration).
    • +
    + +

    The check_forensic script, which can be found in the + distribution's support directory, may be helpful in evaluating the + forensic log output.

    + +

    See also: Apache Log Files.

    + +

    Directives

    + + + +

    Forensic Log Format

    + +

    Each request is logged two times. The first time before it's + processed further (that is, after receiving the headers). The second log + entry is written after the request processing at the same time + where normal logging occurs.

    + +

    In order to identify each request, a unique request ID is assigned. + This forensic ID can be cross logged in the normal transfer log using the + %{forensic-id}n format string. If you're using + mod_unique_id, its generated + ID will be used.

    + +

    The first line logs the forensic ID, the request line and all received + headers, separated by pipe characters (|). A sample line + looks like the following (all on one line):

    + +

    + +yQtJf8CoAB4AAFNXBIEAAAAA|GET /manual/de/images/down.gif + HTTP/1.1|Host:localhost%3a8080|User-Agent:Mozilla/5.0 (X11; + U; Linux i686; en-US; rv%3a1.6) Gecko/20040216 + Firefox/0.8|Accept:image/png, etc... +

    + +

    The plus character at the beginning indicates that this is first log + line of this request. The second line just contains a minus character and + the id again:

    + +

    + -yQtJf8CoAB4AAFNXBIEAAAAA +

    + +

    The check_forensic script takes as its argument the name + of the logfile. It looks for those +/- ID pairs + and complains if a request was not completed.

    + +

    Security Considerations

    + +

    See the security tips + document for details on why your security could be compromised + if the directory where logfiles are stored is writable by + anyone other than the user that starts the server.

    + +
    + +

    ForensicLog + directive

    + +

    Syntax: ForensicLog + filename|pipe
    + Context: server config, virtual + host
    + Module: mod_log_forensic
    + Compatibility: Available + in Version 1.3.30 and above

    + +

    The ForensicLog directive is used to + log requests to the server for forensic analysis. Each log entry + is assigned unique ID which can be associated with the request + using the normal CustomLog + directive. mod_log_forensic creates a token called + forensic-id, which can be added to the transfer log + using the %{forensic-id}n format string.

    + +

    The argument, which specifies the location to which + the logs will be written, can take one of the following two + types of values:

    + +
    +
    filename
    +
    A filename, relative to the ServerRoot.
    + +
    pipe
    +
    The pipe character "|", followed by the path + to a program to receive the log information on its standard + input. Security: if a program is used, then + it will be run as the user who started httpd. This will be + root if the server was started by root; be sure that the + program is secure.
    +
    + + + + + diff --git a/htdocs/manual/mod/mod_log_forensic.html.html b/htdocs/manual/mod/mod_log_forensic.html.html new file mode 100644 index 00000000000..00b1d881365 --- /dev/null +++ b/htdocs/manual/mod/mod_log_forensic.html.html @@ -0,0 +1,4 @@ + + + diff --git a/htdocs/manual/mod/mod_log_referer.html b/htdocs/manual/mod/mod_log_referer.html new file mode 100644 index 00000000000..80452414019 --- /dev/null +++ b/htdocs/manual/mod/mod_log_referer.html @@ -0,0 +1,138 @@ + + + + + + + Apache module mod_log_referer + + + + + + +

    Module mod_log_referer

    + +

    This module provides for logging of the documents which + reference documents on the server.

    + +

    Status: Extension
    + Source File: + mod_log_referer.c
    + Module Identifier: + referer_log_module

    + +

    Summary

    + +

    This module is provided strictly for compatibility with NCSA + httpd, and is deprecated. We recommend you use mod_log_config instead.

    + +

    Directives

    + + + +

    See also: CustomLog and LogFormat.

    + +

    Log file format

    + The log file contains a separate line for each refer. Each line + has the format + +
    + uri -> document +
    + where uri is the (%-escaped) URI for the document that + references the one requested by the client, and + document is the (%-decoded) local URL to the document + being referred to. +
    + +

    RefererIgnore directive

    + + Syntax: RefererIgnore + string [string] ...
    + Context: server config, virtual + host
    + Status: Extension
    + Module: mod_log_referer + +

    The RefererIgnore directive adds to the list of strings to + ignore in Referer headers. If any of the strings in the list is + contained in the Referer header, then no referrer information + will be logged for the request. Example:

    + +
    + RefererIgnore www.ncsa.uiuc.edu +
    + This avoids logging references from www.ncsa.uiuc.edu. +
    + +

    RefererLog + directive

    + + Syntax: RefererLog + file-pipe
    + Default: RefererLog + logs/referer_log
    + Context: server config, virtual + host
    + Status: Extension
    + Module: mod_log_referer + +

    The RefererLog directive sets the name of the file to which + the server will log the Referer header of incoming requests. + File-pipe is one of

    + +
    +
    A filename
    + +
    A filename relative to the ServerRoot.
    + +
    `|' followed by a command
    + +
    A program to receive the referrer log information on its + standard input. Note that a new program will not be started + for a VirtualHost if it inherits the RefererLog from the main + server.
    +
    + Security: if a program is used, then it will + be run under the user who started httpd. This will be root if + the server was started by root; be sure that the program is + secure. + +

    Security: See the security tips document + for details on why your security could be compromised if the + directory where logfiles are stored is writable by anyone other + than the user that starts the server.

    + +

    This directive is provided for compatibility with NCSA + 1.4.

    + +

    +

    + + + diff --git a/htdocs/manual/mod/mod_mime.html.en b/htdocs/manual/mod/mod_mime.html.en new file mode 100644 index 00000000000..9f232785d62 --- /dev/null +++ b/htdocs/manual/mod/mod_mime.html.en @@ -0,0 +1,675 @@ + + + + + + + Apache module mod_mime + + + + + + +

    Module mod_mime

    + +

    This module provides for determining the types of files from + the filename and for association of handlers with files.

    + +

    Status: Base
    + Source File: mod_mime.c
    + Module Identifier: + mime_module

    + +

    Summary

    + This module is used to determine various bits of "meta + information" about documents. This information relates to the + content of the document and is returned to the browser or used + in content-negotiation within the server. In addition, a + "handler" can be set for a document, which determines how the + document will be processed within the server. + +

    The directives AddCharset, AddEncoding, AddHandler, AddLanguage and AddType are all used to map file extensions + onto the meta-information for that file. Respectively they set + the character set, content-encoding, handler, content-language, + and MIME-type (content-type) of documents. The directive TypesConfig is used to specify a file + which also maps extensions onto MIME types. The directives ForceType and SetHandler are used to associated all + the files in a given location (e.g., a particular + directory) onto a particular MIME type or handler.

    + +

    Note that changing the type or encoding of a file does not + change the value of the Last-Modified header. + Thus, previously cached copies may still be used by a client or + proxy, with the previous headers.

    + +

    Directives

    + + + +

    See also: MimeMagicFile.

    + +

    Files with Multiple + Extensions

    +

    Files can have more than one extension, and the order of the + extensions is normally irrelevant. For example, if the + file welcome.html.fr maps onto content type + text/html and language French then the file + welcome.fr.html will map onto exactly the same information. + If more than one extension is given which maps onto the same + type of meta-information, then the one to the right will be + used, except for languages and content encodings. For example, if + .gif maps to the MIME-type image/gif and + .html maps to the MIME-type text/html, then the + file welcome.gif.html will be associated with the MIME-type + text/html.

    + +

    Languages and content encodings are treated accumulative, because one + can assign more than one language or encoding to a particular resource. + For example, the file welcome.html.en.de will be delivered + with Content-Language: en, de and Content-Type: + text/html.

    + +

    Care should be taken when a file with multiple extensions + gets associated with both a MIME-type and a handler. This will + usually result in the request being by the module associated + with the handler. For example, if the .imap + extension is mapped to the handler "imap-file" (from mod_imap) + and the .html extension is mapped to the MIME-type + "text/html", then the file world.imap.html will be + associated with both the "imap-file" handler and "text/html" + MIME-type. When it is processed, the "imap-file" handler will + be used, and so it will be treated as a mod_imap imagemap + file.

    +
    + +

    AddCharset + directive

    + Syntax: AddCharset charset + extension [extension] ...
    + Context: server config, virtual + host, directory, .htaccess
    + Override: FileInfo
    + Status: Base
    + Module: mod_mime
    + Compatibility: AddCharset is + only available in Apache 1.3.10 and later + +

    The AddCharset directive maps the given filename extensions + to the specified content charset. charset is the MIME + charset parameter of filenames containing extension. + This mapping is added to any already in force, overriding any + mappings that already exist for the same extension.

    + +

    Example:

    +
    +    AddLanguage ja .ja
    +    AddCharset EUC-JP .euc
    +    AddCharset ISO-2022-JP .jis
    +    AddCharset SHIFT_JIS .sjis
    +
    + +

    Then the document xxxx.ja.jis will be treated + as being a Japanese document whose charset is ISO-2022-JP (as + will the document xxxx.jis.ja). The AddCharset + directive is useful for both to inform the client about the + character encoding of the document so that the document can be + interpreted and displayed appropriately, and for content negotiation, + where the server returns one from several documents based on + the client's charset preference.

    + +

    The extension argument is case-insensitive, and can + be specified with or without a leading dot.

    + +

    See also: mod_negotiation

    +
    + +

    AddEncoding + directive

    + + Syntax: AddEncoding + MIME-enc extension [extension] ...
    + Context: server config, virtual + host, directory, .htaccess
    + Override: FileInfo
    + Status: Base
    + Module: mod_mime + +

    The AddEncoding directive maps the given filename extensions + to the specified encoding type. MIME-enc is the MIME + encoding to use for documents containing the + extension. This mapping is added to any already in + force, overriding any mappings that already exist for the same + extension. Example:

    + +
    + AddEncoding x-gzip .gz
    + AddEncoding x-compress .Z
    +
    + This will cause filenames containing the .gz extension to be + marked as encoded using the x-gzip encoding, and filenames + containing the .Z extension to be marked as encoded with + x-compress. + +

    Old clients expect x-gzip and + x-compress, however the standard dictates that + they're equivalent to gzip and + compress respectively. Apache does content + encoding comparisons by ignoring any leading x-. + When responding with an encoding Apache will use whatever form + (i.e., x-foo or foo) the + client requested. If the client didn't specifically request a + particular form Apache will use the form given by the + AddEncoding directive. To make this long story + short, you should always use x-gzip and + x-compress for these two specific encodings. More + recent encodings, such as deflate should be + specified without the x-.

    + +

    The extension argument is case-insensitive, and can + be specified with or without a leading dot.

    + +

    See also: Files with + multiple extensions

    +
    + +

    AddHandler + directive

    + Syntax: AddHandler + handler-name extension [extension] ...
    + Context: server config, virtual + host, directory, .htaccess
    + Override: FileInfo
    + Status: Base
    + Module: mod_mime
    + Compatibility: AddHandler is + only available in Apache 1.1 and later + +

    AddHandler maps the filename extensions extension + to the handler + handler-name. This mapping is added to any already in + force, overriding any mappings that already exist for the same + extension. For example, to activate CGI scripts with + the file extension ".cgi", you might use:

    +
    +    AddHandler cgi-script .cgi
    +
    + +

    Once that has been put into your srm.conf or httpd.conf + file, any file containing the ".cgi" extension + will be treated as a CGI program.

    + +

    The extension argument is case-insensitive, and can + be specified with or without a leading dot.

    + +

    See also: Files with + multiple extensions, SetHandler

    +
    + +

    AddLanguage + directive

    + + Syntax: AddLanguage + MIME-lang extension [extension] ...
    + Context: server config, virtual + host, directory, .htaccess
    + Override: FileInfo
    + Status: Base
    + Module: mod_mime + +

    The AddLanguage directive maps the given filename extension + to the specified content language. MIME-lang is the + MIME language of filenames containing extension. This + mapping is added to any already in force, overriding any + mappings that already exist for the same + extension.

    + +

    Example:

    + +
    + AddEncoding x-compress .Z
    + AddLanguage en .en
    + AddLanguage fr .fr
    +
    +
    + +

    Then the document xxxx.en.Z will be treated as + being a compressed English document (as will the document + xxxx.Z.en). Although the content language is + reported to the client, the browser is unlikely to use this + information. The AddLanguage directive is more useful for content negotiation, + where the server returns one from several documents based on + the client's language preference.

    + +

    If multiple language assignments are made for the same + extension, the last one encountered is the one that is used. + That is, for the case of:

    +
    +    AddLanguage en .en
    +    AddLanguage en-gb .en
    +    AddLanguage en-us .en
    +
    + +

    documents with the extension ".en" would be + treated as being "en-us".

    + +

    The extension argument is case-insensitive, and can + be specified with or without a leading dot.

    + +

    See also: Files with + multiple extensions, DefaultLanguage
    + See also: mod_negotiation

    +
    + +

    AddType directive

    + + Syntax: AddType MIME-type + extension [extension] ...
    + Context: server config, virtual + host, directory, .htaccess
    + Override: FileInfo
    + Status: Base
    + Module: mod_mime + +

    The AddType directive maps the given filename extensions + onto the specified content type. MIME-type is the MIME + type to use for filenames containing extension. This + mapping is added to any already in force, overriding any + mappings that already exist for the same extension. + This directive can be used to add mappings not listed in the + MIME types file (see the TypesConfig directive). + Example:

    + +
    + AddType image/gif .gif +
    + It is recommended that new MIME types be added using the + AddType directive rather than changing the TypesConfig file. + +

    Note that, unlike the NCSA httpd, this directive cannot be + used to set the type of particular files.

    + +

    The extension argument is case-insensitive, and can + be specified with or without a leading dot.

    + +

    See also: Files with + multiple extensions

    +
    + +

    DefaultLanguage directive

    + + Syntax: DefaultLanguage + MIME-lang
    + Context: server config, virtual + host, directory, .htaccess
    + Override: FileInfo
    + Status: Base
    + Module: mod_mime
    + Compatibility: DefaultLanguage + is only available in Apache 1.3.4 and later. + +

    The DefaultLanguage directive tells Apache that all files in + the directive's scope (e.g., all files covered by the + current <Directory> container) that don't + have an explicit language extension (such as .fr + or .de as configured by AddLanguage) + should be considered to be in the specified MIME-lang + language. This allows entire directories to be marked as + containing Dutch content, for instance, without having to + rename each file. Note that unlike using extensions to specify + languages, DefaultLanguage can only specify a + single language.

    + +

    For example:

    + + DefaultLanguage fr + +

    If no DefaultLanguage directive is in force, + and a file does not have any language extensions as configured + by AddLanguage, then that file will be considered + to have no language attribute.

    + +

    See also: mod_negotiation
    + See also: Files with + multiple extensions

    +
    + +

    ForceType + directive

    + Syntax: ForceType + media-type|None
    + Context: directory, + .htaccess
    + Status: Base
    + Module: mod_mime
    + Compatibility: ForceType is + only available in Apache 1.1 and later. + +

    When placed into an .htaccess file or a + <Directory> or <Location> + section, this directive forces all matching files to be served + as the content type given by media type. For example, + if you had a directory full of GIF files, but did not want to + label them all with ".gif", you might want to use:

    +
    +    ForceType image/gif
    +
    + +

    Note that this will override any filename extensions that + might determine the media type.

    + +

    You can override any ForceType setting + by using the value of none:

    + +
    +    # force all files to be image/gif:
    +    <Location /images>
    +      ForceType image/gif
    +    </Location>
    +
    +    # but normal mime-type associations here:
    +    <Location /images/mixed>
    +      ForceType none
    +    </Location>
    +
    + +

    See also: AddType

    + +
    + +

    RemoveEncoding directive

    + Syntax: RemoveEncoding + extension [extension] ...
    + Context: virtual host, directory, + .htaccess
    + Status: Base
    + Module: mod_mime
    + Compatibility: RemoveEncoding + is only available in Apache 1.3.13 and later. + +

    The RemoveEncoding directive removes any + encoding associations for files with the given extensions. This + allows .htaccess files in subdirectories to undo + any associations inherited from parent directories or the + server config files. An example of its use might be:

    + +
    +
    /foo/.htaccess:
    + +
    AddEncoding x-gzip .gz
    + AddType text/plain .asc
    + <Files *.gz.asc>
    +     RemoveEncoding + .gz
    + </Files>
    +
    + +

    This will cause foo.gz to mark as being encoded + with the gzip method, but foo.gz.asc as an + unencoded plaintext file.

    + +

    Note:RemoveEncoding directives are processed + after any AddEncoding + directives, so it is possible they + may undo the effects of the latter if both occur within the + same directory configuration.

    + +

    The extension argument is case-insensitive, and can + be specified with or without a leading dot.

    +
    + +

    RemoveHandler directive

    + Syntax: RemoveHandler + extension [extension] ...
    + Context: virtual host, directory, + .htaccess
    + Status: Base
    + Module: mod_mime
    + Compatibility: RemoveHandler is + only available in Apache 1.3.4 and later. + +

    The RemoveHandler directive removes any handler + associations for files with the given extensions. This allows + .htaccess files in subdirectories to undo any + associations inherited from parent directories or the server + config files. An example of its use might be:

    + +
    +
    /foo/.htaccess:
    + +
    AddHandler server-parsed .html
    + +
    /foo/bar/.htaccess:
    + +
    RemoveHandler .html
    +
    + +

    This has the effect of returning .html files in + the /foo/bar directory to being treated as normal + files, rather than as candidates for parsing (see the mod_include + module).

    + +

    The extension argument is case-insensitive, and can + be specified with or without a leading dot.

    +
    + +

    RemoveType + directive

    + Syntax: RemoveType + extension [extension] ...
    + Context: virtual host, directory, + .htaccess
    + Status: Base
    + Module: mod_mime
    + Compatibility: RemoveType is + only available in Apache 1.3.13 and later. + +

    The RemoveType directive removes any MIME type + associations for files with the given extensions. This allows + .htaccess files in subdirectories to undo any + associations inherited from parent directories or the server + config files. An example of its use might be:

    + +
    +
    /foo/.htaccess:
    + +
    RemoveType .cgi
    +
    + +

    This will remove any special handling of .cgi + files in the /foo/ directory and any beneath it, + causing the files to be treated as being of the default type.

    + +

    Note:RemoveType directives are processed + after any AddType directives, so it is + possible they may undo the effects of the latter if both occur + within the same directory configuration.

    + +

    The extension argument is case-insensitive, and can + be specified with or without a leading dot.

    +
    + +

    SetHandler + directive

    + Syntax: SetHandler + handler-name|None
    + Context: directory, + .htaccess
    + Status: Base
    + Module: mod_mime
    + Compatibility: SetHandler is + only available in Apache 1.1 and later. + +

    When placed into an .htaccess file or a + <Directory> or <Location> + section, this directive forces all matching files to be parsed + through the handler given by + handler-name. For example, if you had a directory you + wanted to be parsed entirely as imagemap rule files, regardless + of extension, you might put the following into an + .htaccess file in that directory:

    +
    +    SetHandler imap-file
    +
    + +

    Another example: if you wanted to have the server display a + status report whenever a URL of + http://servername/status was called, you might put + the following into access.conf: (See mod_status for more details.)

    +
    +    <Location /status>
    +    SetHandler server-status
    +    </Location>
    +
    + +

    You can override an earlier defined SetHandler + directive by using the value None.

    + +

    See also: AddHandler

    +
    + +

    TypesConfig + directive

    + + Syntax: TypesConfig + file-path
    + Default: TypesConfig + conf/mime.types
    + Context: server config
    + Status: Base
    + Module: mod_mime + +

    The TypesConfig directive sets the location of the MIME + types configuration file. Filename is relative to the + ServerRoot. This file sets + the default list of mappings from filename extensions to + content types; changing this file is not recommended. Use the + AddType directive instead. The file + contains lines in the format of the arguments to an AddType + command:

    + +
    + MIME-type extension extension ... +
    + The extensions are lower-cased. Blank lines, and lines + beginning with a hash character (`#') are ignored. + +

    +

    + + + diff --git a/htdocs/manual/mod/mod_mime.html.html b/htdocs/manual/mod/mod_mime.html.html new file mode 100644 index 00000000000..86aebbfcd8c --- /dev/null +++ b/htdocs/manual/mod/mod_mime.html.html @@ -0,0 +1,4 @@ + + + diff --git a/htdocs/manual/mod/mod_mime.html.ja.jis b/htdocs/manual/mod/mod_mime.html.ja.jis new file mode 100644 index 00000000000..0bcdf180f5a --- /dev/null +++ b/htdocs/manual/mod/mod_mime.html.ja.jis @@ -0,0 +1,677 @@ + + + + + + Apache module mod_mime + + + + + + + +

    mod_mime $B%b%8%e!<%k(B

    + +

    $B$3$N%b%8%e!<%k$O!"%U%!%$%k$N%?%$%W$r%U%!%$%kL>$+$i7hDj$9$k5!G=$H!"(B + $B%U%!%$%k$K%O%s%I%i$r4XO"IU$1$k5!G=$rDs6!$7$^$9!#(B

    + +

    $B%9%F!<%?%9(B: Base
    + $B%=!<%9%U%!%$%k(B: mod_mime.c
    + $B%b%8%e!<%k<1JL;R(B: mime_module +

    + +

    $B35MW(B

    + + $B$3$N%b%8%e!<%k$O!"%I%-%e%a%s%H$N$$$m$$$m$J!V%a%?>pJs!W(B + $B$r7hDj$9$k$?$a$K;HMQ$5$l$^$9!#$3$N>pJs$O(B + $B%I%-%e%a%s%H$N%3%s%F%s%D$K4XO"$7$F$$$k$b$N$G!"%V%i%&%6$KJV$5$l$?$j!"(B + $B%5!<%PFb$G%3%s%F%s%H%M%4%7%(!<%7%g%s$K;H$o$l$?$j$7$^$9!#(B + $B$5$i$K!"!V%O%s%I%i!W$r%I%-%e%a%s%H$KBP$7$F@_Dj$9$k$3$H$,$G$-$^$9!#(B + $B%O%s%I%i$O%5!<%PFb$G%I%-%e%a%s%H$r$I$N$h$&$K=hM}$9$k$+$r7hDj$7$^$9!#(B + +

    $B%G%#%l%/%F%#%V(B AddCharset, + AddEncoding, AddHandler, AddLanguage, AddType $B$O$9$Y$F!"(B + $B%U%!%$%k$N3HD%;R$r%a%?>pJs$K%^%C%W$9$k$?$a$K;HMQ$5$l$^$9!#(B + $B$=$l$>$l!"%I%-%e%a%s%H$NJ8;z%;%C%H(B ($BLuCm(B: charset)$B!"(Bcontent-encoding, + $B%O%s%I%i!"(Bcontent-language, MIME $B%?%$%W(B (content-type) $B$r@_Dj$7$^$9!#(B + $B%G%#%l%/%F%#%V(B TypesConfig $B$O3HD%;R$r(B + MIME $B%?%$%W$K%^%C%W$9$k%U%!%$%k$r;XDj$9$k$?$a$K;HMQ$5$l$^$9!#(B + $B%G%#%l%/%F%#%V(B ForceType $B$H(B SetHandler $B$O!"M?$($i$l$?>l=j(B + ($BNc$($P(B$B!"FCDj$N%G%#%l%/%H%j(B) $B$K$"$k$9$Y$F$N%U%!%$%k$rFCDj$N(B + MIME $B%?%$%W$d%O%s%I%i$K4XO"IU$1$k$?$a$K;HMQ$5$l$^$9!#(B

    + +

    $B%U%!%$%k$N%?%$%W$d%(%s%3!<%G%#%s%0$rJQ$($F$b(B Last-Modified + $B%X%C%@$NCM$OJQ$o$i$J$$$3$H$KCm0U$7$F$/$@$5$$!#$G$9$+$i!"(B + $B$=$l$i$rJQ99$7$?>l9g$O!"%/%i%$%"%s%H$d%W%m%-%7$G0JA0$K%-%c%C%7%e$5$l$?(B + $B%3%T!<$,$=$N$H$-$N%X%C%@$H$H$b$K;H$o$l$k2DG=@-$,$"$j$^$9!#(B

    + +

    $B%G%#%l%/%F%#%V(B

    + + + +

    $B;2>H(B: MimeMagicFile

    + +

    $BJ#?t$N3HD%;R$N$"$k%U%!%$%k(B

    + +

    $B%U%!%$%k$OJ#?t$N3HD%;R$r;}$D$3$H$,$G$-!"3HD%;R$N=gHV$O(B$BDL>o$O(B$B4X78$"$j$^$;$s!#$?$H$($P!"(Bwelcome.html.fr + $B%U%!%$%k$,%3%s%F%s%H%?%$%W$O(B text/html + $B$K!"8@8l$O%U%i%s%98l$K%^%C%W$5$l$k>l9g!"(Bwelcome.fr.html + $B$b$^$C$?$/F1$8>pJs$K%^%C%W$5$l$^$9!#(B + $BF1$8%a%?>pJs$K%^%C%W$5$l$k3HD%;R$,J#?t$"$k$H$-$K$O8@8l$H%3%s%F%s%H%(%s%3!<%G%#%s%0$r=|$$$F!"(B + $B1&B&$K$"$k$b$N$,;HMQ$5$l$^$9!#$?$H$($P!"(B".gif" $B$,(B MIME $B%?%$%W(B + image/gif $B$K%^%C%W$5$l!"(B".html" $B$,(B MIME $B%?%$%W(B text/html + $B$K%^%C%W$5$l$k>l9g$O!"%U%!%$%k(B welcome.gif.html $B$O(B + MIME $B%?%$%W(B "text/html" $B$K4XO"IU$1$i$l$^$9!#(B

    + +

    $B8@8l$H%3%s%F%s%H%(%s%3!<%G%#%s%0$O$=$l$^$G$N$b$N$KDI2C$7$F07$o$l$^$9!#(B + $B$3$l$OFCDj$N%j%=!<%9$KBP$7$F0l$D0J>e$N8@8l$d%(%s%3!<%G%#%s%0$r(B + $B3d$jEv$F$k$3$H$,$G$-$k$+$i$G$9!#Nc$($P!"%U%!%$%k(B + welcome.html.en.de $B$,(B Content-Language: en, de + $B$G(B Content-Type: text/html $B$H$$$C$?6q9g$G$9!#(B

    + +

    $BJ#?t$N3HD%;R$N$"$k%U%!%$%k$,(B MIME + $B%?%$%W$H%O%s%I%i$NN>J}$K4XO"IU$1$i$l$F$$$k$H$-$OCm0U$9$kI,MW$,$"$j$^$9!#(B + $B$=$N>l9g!"IaDL$O%j%/%(%9%H$,%O%s%I%i$K4XO"IU$1$i$l$?(B + $B%b%8%e!<%k$K$h$C$F07$o$l$k$3$H$K$J$j$^$9!#$?$H$($P!"3HD%;R(B + .imap $B$,(B (mod_imap $B$N(B) "imap-file" $B$K%^%C%W$5$l$F$$$F!"(B + .html $B$,(B MIME $B%?%$%W(B "text/html" + $B$K%^%C%W$5$l$F$$$k$H$-$O!"%U%!%$%k(B world.imap.html $B$O(B + "imap-file" $B%O%s%I%i$H(B "text/html" MIME + $B%?%$%W$K4XO"IU$1$i$l$^$9!#%U%!%$%k$,=hM}$5$l$k$H$-$O(B "imap-file" + $B%O%s%I%i$,;HMQ$5$l$^$9$N$G!"$=$N%U%!%$%k$O(B mod_imap + $B$N%$%a!<%8%^%C%W%U%!%$%k$H$7$F07$o$l$k$3$H$K$J$j$^$9!#(B

    +
    + +

    AddCharset + $B%G%#%l%/%F%#%V(B

    + $B9=J8(B: AddCharset charset + extension [extension] ...
    + $B%3%s%F%-%9%H(B: + $B%5!<%P@_Dj%U%!%$%k!"%P!<%A%c%k%[%9%H!"(B $B%G%#%l%/%H%j!"(B.htaccess
    + $B>e=q$-(B: FileInfo
    + $B%9%F!<%?%9(B: Base
    + $B%b%8%e!<%k(B: mod_mime
    + $B8_49@-(B: AddCharset $B$O(B + Apache 1.3.10 $B0J9_$G$N$_;HMQ2DG=!#(B + +

    AddCharset $B%G%#%l%/%F%#%V$O!"M?$($i$l$?3HD%;R$r;XDj$5$l$?(B + charset $B$K%^%C%W$7$^$9!#(Bcharset $B$O!"3HD%;R(B + extension $B$r4^$s$G$$$k%U%!%$%kL>$N(B MIME charset + $B%Q%i%a!<%?$G$9!#?7$7$$%^%C%T%s%0$O4{$K$"$k$b$N$KDI2C$5$l!"F1$83HD%;R(B + extension $B$N$?$a$K4{$KB8:_$9$k%^%C%T%s%0$r>e=q$-$7$^$9!#(B

    + +

    $BNc(B:

    +
    +    AddLanguage ja .ja
    +    AddCharset EUC-JP .euc
    +    AddCharset ISO-2022-JP .jis
    +    AddCharset SHIFT_JIS .sjis
    +
    + +

    $B$3$N>l9g!"%I%-%e%a%s%H(B xxxx.ja.jis $B$O(B charset $B$,(B + ISO-2022-JP $B$NF|K\8l$N%I%-%e%a%s%H$H$7$F07$o$l$^$9(B + (xxxx.jis.ja $B$bF1MM(B)$B!#(BAddCharset + $B%G%#%l%/%F%#%V$O!"%I%-%e%a%s%H$,E,@Z$K2rpJs$r%/%i%$%"%s%H$K65$($k$?$a$KLr$KN)$A$^$9!#(B + $B$^$?!"%5!<%P$,%/%i%$%"%s%H$N(B charset + $B$NM%@hEY$K4p$E$$$FJ#?t$N%I%-%e%a%s%H$NCf$+$i%I%-%e%a%s%H$rA*$V(B$B%3%s%F%s%H%M%4%7%(!<%7%g%s(B$B$N$?$a$K$bLr$KN)$A$^$9!#(B

    + +

    $B0z?t(B extension$B$OBgJ8;z>.J8;z$r6hJL$;$:!"(B + $B:G=i$N%I%C%H$O$"$C$F$b$J$/$F$b9=$$$^$;$s!#(B

    + +

    $B;2>H(B: mod_negotiation

    +
    + +

    AddEncoding $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: AddEncoding + MIME-enc extension [extension] ...
    + $B%3%s%F%-%9%H(B: + $B%5!<%P@_Dj%U%!%$%k!"%P!<%A%c%k%[%9%H!"(B $B%G%#%l%/%H%j!"(B.htaccess
    + $B>e=q$-(B: FileInfo
    + $B%9%F!<%?%9(B: Base
    + $B%b%8%e!<%k(B: mod_mime
    + +

    AddEncoding $B%G%#%l%/%F%#%V$O!"M?$($i$l$?3HD%;R$r;XDj$5$l$?(B + $B%(%s%3!<%G%#%s%0$K%^%C%W$7$^$9!#(BMIME-enc $B$O!"3HD%;R(B + extension $B$r4^$s$@%I%-%e%a%s%H$K;HMQ$9$k(B MIME + $B%(%s%3!<%G%#%s%0$G$9!#$3$N?7$7$$%^%C%T%s%0$O4{$K$"$k$b$N$KDI2C$5$l!"(B + $BF1$83HD%;R(B extension + $B$N$?$a$K4{$KB8:_$9$k%^%C%T%s%0$r>e=q$-$7$^$9!#Nc(B:

    + +
    + AddEncoding x-gzip .gz
    + AddEncoding x-compress .Z
    +
    + $B$3$l$O!"3HD%;R(B .gz $B$r4^$`%U%!%$%kL>$,(B x-gzip + $B%(%s%3!<%G%#%s%0$r;H$C$F%(%s%3!<%I$5$l$F$$$k$3$H$H!"3HD%;R(B .Z + $B$r4^$`%U%!%$%kL>$,(B x-compress + $B$G%(%s%3!<%I$5$l$F$$$k$3$H$r<($7$^$9!#(B + +

    $B8E$$%/%i%$%"%s%H$O(B x-zip $B$H(B x-compress + $B$,JV$C$F$/$k$3$H$r4|BT$7$^$9$,!"I8=`5,3J$G$O$=$l$>$l(B + gzip $B$H(B compress + $B$HEy2A$G$"$k$3$H$K$J$C$F$$$^$9!#(BApache + $B$O!"%3%s%F%s%H%(%s%3!<%G%#%s%0$NHf3S$r$9$k$H$-$K$O!"@hF,$K$"$k(B + x- $B$rL5;k$7$^$9!#(BApache + $B$,%(%s%3!<%G%#%s%0IU$-$G1~Ez$rJV$9$H$-$O!"%/%i%$%"%s%H$,MW5a$7$?7A<0(B + ($B$9$J$o$A(B$B!"(Bx-foo $B$d(B foo) + $B$r;HMQ$7$^$9!#MW$9$k$K!"$3$NFs$D$N%(%s%3!<%G%#%s%0$N>l9g$O>o$K(B + x-gzip $B$H(B x-compress + $B$r;H$&$Y$-$G$"$k!"$H$$$&$3$H$G$9!#(Bdeflate + $B$N$h$&$J$h$j?7$7$$%(%s%3!<%G%#%s%0$G$O!"(Bx- + $B$J$7$G;XDj$7$F$/$@$5$$!#(B +

    + +

    $B0z?t(B extension $B$OBgJ8;z>.J8;z$r6hJL$;$:!"(B + $B:G=i$N%I%C%H$O$"$C$F$b$J$/$F$b9=$$$^$;$s!#(B

    + +

    $B;2>H(B: $BJ#?t$N3HD%;R$N$"$k%U%!%$%k(B

    +
    + +

    AddHandler + $B%G%#%l%/%F%#%V(B

    + $B9=J8(B: AddHandler + handler-name extension [extension] ...
    + $B%3%s%F%-%9%H(B: + $B%5!<%P@_Dj%U%!%$%k!"%P!<%A%c%k%[%9%H!"%G%#%l%/%H%j!"(B.htaccess
    + $B>e=q$-(B: FileInfo
    + $B%9%F!<%?%9(B: Base
    + $B%b%8%e!<%k(B: mod_mime
    + $B8_49@-(B: AddHandler $B$O(B + Apache 1.1 $B0J9_$G$N$_;HMQ2DG=!#(B
    +

    AddHandler $B$O!"3HD%;R(B extension $B$r(B$B%O%s%I%i(B handler-name + $B$K%^%C%W$7$^$9!#$3$N?7$7$$%^%C%T%s%0$O4{$K$"$k$b$N$KDI2C$5$l!"(B + $BF1$83HD%;R(B extension + $B$N$?$a$K4{$KB8:_$9$k%^%C%T%s%0$r>e=q$-$7$^$9!#$?$H$($P!"3HD%;R(B + ".cgi" $B$G=*$o$k%U%!%$%k$r(B CGI + $B%9%/%j%W%H$H$7$F07$$$?$$$H$-$O!"0J2<$N@_Dj$r$7$^$9!#(B

    +
    +    AddHandler cgi-script .cgi
    +
    + +

    $B$3$l$r(B srm.conf $B$+(B httpd.conf $B%U%!%$%k$K5-=R$9$k$3$H$G!"3HD%;R(B + ".cgi" $B$r4^$`%U%!%$%k$O(B CGI $B%W%m%0%i%`$H$7$F07$o$l$^$9!#(B +

    + +

    $B0z?t(B extension $B$OBgJ8;z>.J8;z$r6hJL$;$:!"(B + $B:G=i$N%I%C%H$O$"$C$F$b$J$/$F$b9=$$$^$;$s!#(B

    + +

    $B;2>H(B: $BJ#?t$N3HD%;R$N$"$k%U%!%$%k(B$B!"(B + SetHandler

    +
    + +

    AddLanguage + $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: AddLanguage MIME-lang + extension [extension] ...
    + $B%3%s%F%-%9%H(B: + $B%5!<%P@_Dj%U%!%$%k!"%P!<%A%c%k%[%9%H!"%G%#%l%/%H%j!"(B.htaccess
    + $B>e=q$-(B: FileInfo
    + $B%9%F!<%?%9(B: Base
    + $B%b%8%e!<%k(B: mod_mime
    + +

    AddLanguage $B%G%#%l%/%F%#%V$O!"M?$($i$l$?3HD%;R$r;XDj$5$l$?(B + content language $B$K%^%C%W$7$^$9!#(BMIME-lang $B$O!"3HD%;R(B + extension $B$r4^$s$G$$$k%U%!%$%kL>$N(B MIME $B$K$*$1$k8@8l$G$9!#(B + $B$3$N?7$7$$%^%C%T%s%0$O4{$K$"$k$b$N$KDI2C$5$l!"F1$83HD%;R(B + extension $B$N$?$a$K4{$KB8:_$9$k%^%C%T%s%0$r>e=q$-$7$^$9!#(B +

    + +

    $BNc(B:

    + +
    + AddEncoding x-compress .Z
    + AddLanguage en .en
    + AddLanguage fr .fr
    +
    +
    + +

    $B$3$N>l9g!"(Bxxxx.en.Z $B%I%-%e%a%s%H$O(B compress + $B$5$l$?1Q8l$N%I%-%e%a%s%H$H$7$F07$o$l$^$9(B (xxxx.Z.en + $B$bF1MM(B)$B!#(Bcontent language $B$O%/%i%$%"%s%H$KDLCN$5$l$^$9$,!"(B + $B%V%i%&%6$,$3$N>pJs$r;H$&$3$H$O$*$=$i$/$"$j$^$;$s!#(BAddLanguage + $B%G%#%l%/%F%#%V$O!"%5!<%P$,%/%i%$%"%s%H$N8@8l$NM%@hEY$K4p$E$$$FJ#?t$N(B + $B%I%-%e%a%s%H$NCf$+$i%I%-%e%a%s%H$rA*$V(B$B%3%s%F%s%H%M%4%7%(!<%7%g%s(B$B$N$?$a$K$h$jLr$KN)$A$^$9!#(B

    + +

    $BJ#?t$N8@8l$,F1$83HD%;R$K3d$jEv$F$i$l$F$$$k$H$-$O!"(B + $B:G8e$N$b$N$,;HMQ$5$l$^$9!#$9$J$o$A!"l9g!"(B

    + +
    +    AddLanguage en .en
    +    AddLanguage en-gb .en
    +    AddLanguage en-us .en
    +
    + +

    $B3HD%;R(B ".en" $B$N$"$k%I%-%e%a%s%H$O(B + "en-us" $B$H$7$F07$o$l$^$9!#(B

    + +

    $B0z?t(B extension $B$OBgJ8;z>.J8;z$r6hJL$;$:!"(B + $B:G=i$N%I%C%H$O$"$C$F$b$J$/$F$b9=$$$^$;$s!#(B

    + +

    $B;2>H(B: $BJ#?t$N3HD%;R$N$"$k%U%!%$%k(B$B!"(B + DefaultLanguage
    + $B;2>H(B: mod_negotiation +

    +
    + +

    AddType $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: AddType MIME-type + extension [extension] ...
    + $B%3%s%F%-%9%H(B: + $B%5!<%P@_Dj%U%!%$%k!"%P!<%A%c%k%[%9%H!"%G%#%l%/%H%j!"(B.htaccess
    + $B>e=q$-(B: FileInfo
    + $B%9%F!<%?%9(B: Base
    + $B%b%8%e!<%k(B: mod_mime + +

    AddType $B%G%#%l%/%F%#%V$O!"(B + $BM?$($i$l$?3HD%;R$r;XDj$5$l$?%3%s%F%s%H%?%$%W$K%^%C%W$7$^$9!#(B + MIME-type $B$O3HD%;R(B extension + $B$r4^$s$@%I%-%e%a%s%H$K;HMQ$9$k(B MIME $B%?%$%W$G$9!#(B + $B$3$N?7$7$$%^%C%T%s%0$O4{$K$"$k$b$N$KDI2C$5$l!"F1$83HD%;R(B + extension $B$N$?$a$K4{$KB8:_$9$k%^%C%T%s%0$r>e=q$-$7$^$9!#(B + $B$3$N%G%#%l%/%F%#%V$O(B MIME $B%?%$%W%U%!%$%k(B (TypesConfig $B%G%#%l%/%F%#%V$r;2>H(B) + $B$K$J$$%^%C%T%s%0$rDI2C$9$k$?$a$K;HMQ$9$k$3$H$,$G$-$^$9!#Nc(B:

    + +
    + AddType image/gif .gif +
    + $B?7$7$$(B MIME $B%?%$%W$O!"(BTypesConfig + $B%U%!%$%k$rJQ99$9$k$N$G$O$J$/!"(BAddType + $B%G%#%l%/%F%#%V$r;H$C$FDI2C$9$k$3$H$,?d>)$5$l$F$$$^$9!#(B + +

    NCSA httpd $B$H$O0c$C$F!"$3$N%G%#%l%/%F%#%V$OFCDj$N%U%!%$%k$N(B + $B%?%$%W$r@_Dj$9$k$3$H$O$G$-$J$$$3$H$KCm0U$7$F$/$@$5$$!#(B

    + +

    $B0z?t(B extension $B$OBgJ8;z>.J8;z$r6hJL$;$:!"(B + $B:G=i$N%I%C%H$O$"$C$F$b$J$/$F$b9=$$$^$;$s!#(B

    + +

    $B;2>H(B: $BJ#?t$N3HD%;R$N$"$k%U%!%$%k(B

    +
    + +

    DefaultLanguage $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: DefaultLanguage MIME-lang
    + $B%3%s%F%-%9%H(B: + $B%5!<%P@_Dj%U%!%$%k!"%P!<%A%c%k%[%9%H!"%G%#%l%/%H%j!"(B.htaccess
    + $B>e=q$-(B: FileInfo
    + $B%9%F!<%?%9(B: Base
    + $B%b%8%e!<%k(B: mod_mime
    + $B8_49@-(B: DefaultLanguage $B$O(B + Apache 1.3.4 $B0J9_$G$N$_;HMQ2DG=!#(B
    + +

    DefaultLanguage $B%G%#%l%/%F%#%V$O!"(BApache + $B$,%G%#%l%/%F%#%V$N%9%3!<%W(B ($BNc$($P(B$B!"$=$N;~E@$N(B + <Directory> $B$NHO0O(B) $B$K$"$k!"L@<(E*$J8@8l3HD%;R(B + (AddLanguage $B$G@_Dj$5$l$k(B .fr $B$d(B + .de) $B$N$J$$A4$F$N%U%!%$%k$r!";XDj$5$l$?(B + MIME-lang $B8@8l$G$"$k$H$_$J$9$h$&$K$7$^$9!#(B + $B$3$l$K$h$j!"$9$Y$F$N%U%!%$%kL>$rJQ$($k$3$H$J$/!"(B + $B%G%#%l%/%H%j$,%*%i%s%@8l$N%3%s%F%s%H$r4^$s$G$$$k!"(B + $B$H$$$&$h$&$J$3$H$r;XDj$9$k$3$H$,$G$-$^$9!#(B + $B3HD%;R$r;HMQ$7$F8@8l$r;XDj$9$kJ}K!$H0c$$!"(B + DefaultLanguage + $B$O0l$D$N8@8l$7$+;XDj$G$-$J$$$3$H$KCm0U$7$F$/$@$5$$!#(B

    + +

    $BNc$($P(B:

    + + DefaultLanguage fr + +

    DefaultLanguage + $B%G%#%l%/%F%#%V$,M-8z$G$J$/!"%U%!%$%k$K(B AddLanguage + $B$G@_Dj$5$l$?8@8l$N3HD%;R$,$J$$$H$-$O!"(B + $B%U%!%$%k$K$O8@8lB0@-$,$J$$$H$_$J$5$l$^$9!#(B

    + +

    $B;2>H(B: mod_negotiation
    + $B;2>H(B: $BJ#?t$N3HD%;R$N$"$k%U%!%$%k(B

    +
    + +

    ForceType + $B%G%#%l%/%F%#%V(B

    + $B9=J8(B: ForceType + media-type|None
    + $B%3%s%F%-%9%H(B: + $B%G%#%l%/%H%j!"(B.htaccess
    + $B%9%F!<%?%9(B: Base
    + $B%b%8%e!<%k(B: mod_mime
    + $B8_49@-(B: ForceType $B$O(B + Apache 1.1 $B0J9_$G$N$_;HMQ2DG=!#(B + +

    .htaccess $B$d(B <Directory> + $B%;%/%7%g%s!"(B<Location> $B%;%/%7%g%s$K=q$+$l$?>l9g!"(B + $B$3$N%G%#%l%/%F%#%V$O$=$3$K$"$k$9$Y$F$N%U%!%$%k$,(B media type + $B$G;XDj$5$l$?%3%s%F%s%H%?%$%W$H$7$F07$o$l$k$3$H$r6/@)$7$^$9!#$?$H$($P!"(B + GIF $B%U%!%$%k$P$+$j$N%G%#%l%/%H%j$,$"$C$F!"$9$Y$F$N%U%!%$%k$r(B ".gif" + $B$G=*$o$i$;$?$/$O$J$$$H$-$K!"0J2<$N$b$N$r;HMQ$7$^$9(B:

    +
    +    ForceType image/gif
    +
    + +

    $B$3$l$O!"%a%G%#%"%?%$%W$r7hDj$9$k$+$b$7$l$J$$$9$Y$F$N3HD%;R$r(B + $B>e=q$-$9$k$3$H$KCm0U$7$F$/$@$5$$!#(B

    + +

    $BCM$r(B none $B$K@_Dj$9$k$3$H$G!"(B + $B0JA0$N(B ForceType $B$N$9$Y$F$N@_Dj$r>e=q$-$9$k$3$H$b(B + $B$G$-$^$9(B:

    + +
    +    # force all files to be image/gif:
    +    <Location /images>
    +      ForceType image/gif
    +    </Location>
    +
    +    # but normal mime-type associations here:
    +    <Location /images/mixed>
    +      ForceType none
    +    </Location>
    +
    + + +

    $B;2>H(B: AddType

    +
    + +

    RemoveEncoding $B%G%#%l%/%F%#%V(B

    + $B9=J8(B: RemoveEncoding + extension [extension] ...
    + $B%3%s%F%-%9%H(B: + $B%P!<%A%c%k%[%9%H!"%G%#%l%/%H%j!"(B.htaccess
    + $B%9%F!<%?%9(B: Base
    + $B%b%8%e!<%k(B: mod_mime
    + $B8_49@-(B: RemoveEncoding $B$O(B + Apache 1.3.13 $B0J9_$G$N$_;HMQ2DG=!#(B + +

    RemoveEncoding $B%G%#%l%/%F%#%V$O!"(B + $BM?$($i$l$?3HD%;R$K4XO"IU$1$i$l$?%(%s%3!<%G%#%s%0$rC$7$^$9!#(B + $B$3$l$K$h$j!"%5%V%G%#%l%/%H%j$K$"$k(B .htaccess + $B%U%!%$%k$,?F%G%#%l%/%H%j$d%5!<%P$N@_Dj%U%!%$%k$+$i7Q>5$7$?4XO"IU$1$r(B + $BC$9$3$H$,$G$-$^$9!#$?$H$($P(B:

    + +
    +
    /foo/.htaccess:
    + +
    AddEncoding x-gzip .gz
    + AddType text/plain .asc
    + <Files *.gz.asc>
    +     RemoveEncoding + .gz
    + </Files>
    +
    +

    $B$3$l$O!"(Bfoo.gz $B$O(B gzip + $B$G%(%s%3!<%I$5$l$F$$$k$3$H$r;XDj$7$^$9$,!"(Bfoo.gz.asc + $B$O%(%s%3!<%I$5$l$F$$$J$$%W%l!<%s%F%-%9%H$N(B + $B%U%!%$%k$G$"$k$H$$$&$3$H$r;XDj$7$^$9!#(B

    + +

    $BCm0U(B: RemoveEncoding $B$O(B + AddEncoding + $B%G%#%l%/%F%#%V$N(B$B8e(B$B$G=hM}$5$l$^$9$N$G!"(B + $BF1$8%G%#%l%/%H%j$N@_DjCf$KN>J}$,8=$l$k$H!"(B + $B8eC$5$l$k2DG=@-$,$"$j$^$9!#(B

    + +

    $B0z?t(B extension $B$OBgJ8;z>.J8;z$r6hJL$;$:!"(B + $B:G=i$N%I%C%H$O$"$C$F$b$J$/$F$b9=$$$^$;$s!#(B

    +
    + +

    RemoveHandler $B%G%#%l%/%F%#%V(B

    + $B9=J8(B: RemoveHandler + extension [extension] ...
    + $B%3%s%F%-%9%H(B: + $B%P!<%A%c%k%[%9%H!"%G%#%l%/%H%j!"(B.htaccess
    + $B%9%F!<%?%9(B: Base
    + $B%b%8%e!<%k(B: mod_mime
    + $B8_49@-(B: RemoveHandler $B$O(B + Apache 1.3.4 $B0J9_$G$N$_;HMQ2DG=!#(B + +

    RemoveHandler $B%G%#%l%/%F%#%V(B + $B$OM?$($i$l$?3HD%;R$K4XO"IU$1$i$l$?%O%s%I%i$rC$7$^$9!#(B + $B$3$l$K$h$j!"%5%V%G%#%l%/%H%j$K$"$k(B .htaccess + $B%U%!%$%k$,?F%G%#%l%/%H%j$d%5!<%P$N@_Dj%U%!%$%k(B + $B$+$i7Q>5$7$?4XO"IU$1$rC$9$3$H$,$G$-$^$9!#$?$H$($P(B:

    + +
    +
    /foo/.htaccess:
    + +
    AddHandler server-parsed .html
    + +
    /foo/bar/.htaccess:
    + +
    RemoveHandler .html
    +
    + +

    $B$3$l$O!"(B/foo/bar $B%G%#%l%/%H%j$N(B .html + $B%U%!%$%k$O(B SSI $B$G$O$J$/(B (mod_include $B%b%8%e!<%k;2>H(B)$B!"(B + $BIaDL$N%U%!%$%k$H$7$F07$o$l$k$h$&$K$9$k8z2L$,$"$j$^$9!#(B +

    + +

    $B0z?t(B extension $B$OBgJ8;z>.J8;z$r6hJL$;$:!"(B + $B:G=i$N%I%C%H$O$"$C$F$b$J$/$F$b9=$$$^$;$s!#(B

    +
    + +

    RemoveType $B%G%#%l%/%F%#%V(B

    + $B9=J8(B: RemoveType + extension [extension] ...
    + $B%3%s%F%-%9%H(B: + $B%P!<%A%c%k%[%9%H!"%G%#%l%/%H%j!"(B.htaccess
    + $B%9%F!<%?%9(B: Base
    + $B%b%8%e!<%k(B: mod_mime
    + $B8_49@-(B: RemoveType $B$O(B + Apache 1.3.13 $B0J9_$G$N$_;HMQ2DG=!#(B + +

    RemoveType $B%G%#%l%/%F%#%V$OM?$($i$l$?3HD%;R$N(B + MIME $B%?%$%W$N4XO"IU$1$rC$7$^$9!#$3$l$K$h$j!"(B + $B%5%V%G%#%l%/%H%j$K$"$k(B .htaccess + $B%U%!%$%k$,?F%G%#%l%/%H%j$d%5!<%P$N@_Dj%U%!%$%k$+$i7Q>5$7$?(B + $B4XO"IU$1$rC$9$3$H$,$G$-$^$9!#$?$H$($P(B:

    + +
    +
    /foo/.htaccess:
    + +
    RemoveType .cgi
    +
    + +

    $B$3$l$O(B /foo/ $B%G%#%l%/%H%j0J2<$N(B .cgi + $B%U%!%$%k$NFCJL$J07$$$rC$7$^$9!#%U%!%$%k$O(B$B%G%U%)%k%H%?%$%W(B$B$H$7$F07$o$l$^$9!#(B

    + +

    $BCm0U(B: RemoveType $B%G%#%l%/%F%#%V$O(B + AddType $B%G%#%l%/%F%#%V$N(B$B8e(B$B$K=hM}$5$l$^$9$N$G!"(B + $BN>J}$,F1$8%G%#%l%/%H%j$N@_DjCf$K8=$l$?>l9g!"(B + $B8eC$5$l$k2DG=@-$,$"$j$^$9!#(B

    + +

    $B0z?t(B extension $B$OBgJ8;z>.J8;z$r6hJL$;$:!"(B + $B:G=i$N%I%C%H$O$"$C$F$b$J$/$F$b9=$$$^$;$s!#(B

    +
    + +

    SetHandler + $B%G%#%l%/%F%#%V(B

    + $B9=J8(B: SetHandler + handler-name|None
    + $B%3%s%F%-%9%H(B: + $B%G%#%l%/%H%j!"(B.htaccess
    + $B%9%F!<%?%9(B: Base
    + $B%b%8%e!<%k(B: mod_mime
    + $B8_49@-(B: SetHandler $B$O(B + Apache 1.1 $B0J9_$G$N$_;HMQ2DG=!#(B + +

    .htaccess $B$d(B <Directory> + $B%;%/%7%g%s!"(B<Location> $B%;%/%7%g%s$K=q$+$l$?>l9g!"(B + $B$3$N%G%#%l%/%F%#%V$O$=$3$K$"$k$9$Y$F$N%U%!%$%k$,(B + handler-name $B$G;XDj$5$l$?(B$B%O%s%I%i(B$B$G07$o$l$k$3$H$r6/@)$7$^$9!#Nc$($P!"3HD%;R$K4X$o$i$:!"(B + $B%G%#%l%/%H%jA4BN$,%$%a!<%8%^%C%W%U%!%$%k$H$7$F2r@O$7$FM_$7$$>l9g$K$O!"(B + $B0J2<$r$=$N%G%#%l%/%H%j$N(B .htaccess + $B%U%!%$%k$K5-=R$7$^$9(B:

    +
    +    SetHandler imap-file
    +
    + +

    $BJL$NNc(B: URL http://servername/status + $B$,;XDj$5$l$?$H$-$K%5!<%P$,>uBVJs9p$r$9$k$h$&$K$7$?$$$H$-$O!"0J2<$r(B + httpd.conf $B$K5-=R$7$^$9(B: ($B>\:Y$O(B mod_status $B$r;2>H!#(B) +

    +
    +    <Location /status>
    +    SetHandler server-status
    +    </Location>
    +
    + +

    $BCM$r(B None $B$K$9$k$3$H$G!"(B + $B0JA0$N(B SetHandler $B%G%#%l%/%F%#%V$NDj5A$r>e=q$-$9$k$3$H$,(B + $B$G$-$^$9!#(B

    + +

    $B;2>H(B: AddHandler

    + +
    + +

    TypesConfig + $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: TypesConfig + filename
    + $B%G%U%)%k%H(B: TypesConfig + conf/mime.types
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k(B
    + $B%9%F!<%?%9(B: Base
    + $B%b%8%e!<%k(B: mod_mime + +

    TypesConfig $B%G%#%l%/%F%#%V$O!"(BMIME + $B%?%$%W@_Dj%U%!%$%k$N0LCV$r@_Dj$7$^$9!#(Bfilename $B$O(B + ServerRoot $B$+$i$NAjBP%Q%9$G$9!#(B + $B$3$N%U%!%$%k$O%U%!%$%k$N3HD%;R$+$i%3%s%F%s%H%?%$%W$X$N(B + $B%G%U%)%k%H$N%^%C%T%s%0$r@_Dj$7$^$9!#(B + $B$3$N%U%!%$%k$rJQ99$9$k$3$H$O?d>)$5$l$F$$$^$;$s!#Be$o$j$K(B + AddType $B%G%#%l%/%F%#%V$r;HMQ$7$F$/$@$5$$!#(B + $B%U%!%$%k$O!"(BAddType $B%3%^%s%I$N0z?t$HF1$87A<0$N9T$G9=@.$5$l$^$9!#(B

    + +
    + MIME-type extension extension ... +
    + $B3HD%;R$O>.J8;z$KJQ49$5$l$^$9!#6u9T$H%O%C%7%eJ8;z(B ('#') + $B$G;O$^$k9T$OL5;k$5$l$^$9!#(B + + + + diff --git a/htdocs/manual/mod/mod_mime_magic.html b/htdocs/manual/mod/mod_mime_magic.html new file mode 100644 index 00000000000..3a5a76befb7 --- /dev/null +++ b/htdocs/manual/mod/mod_mime_magic.html @@ -0,0 +1,326 @@ + + + + + + + Apache module mod_mime_magic + + + + +
    + [APACHE DOCUMENTATION] +
    + +

    Module mod_mime_magic

    + +

    This module provides for determining the MIME type of a file + by looking at a few bytes of its contents.

    + +

    Status: Extension
    + Source File: + mod_mime_magic.c
    + Module Identifier: + mime_magic_module

    + +

    Summary

    + +

    This module determines the MIME type of files in the same + way the Unix file(1) command works: it looks at the first few + bytes of the file. It is intended as a "second line of defense" + for cases that mod_mime can't + resolve. To assure that mod_mime gets first try at determining + a file's MIME type, be sure to list mod_mime_magic + before mod_mime in the configuration.

    + +

    This module is derived from a free version of the + file(1) command for Unix, which uses "magic + numbers" and other hints from a file's contents to figure out + what the contents are. This module is active only if the magic + file is specified by the MimeMagicFile + directive.

    + +

    Directives

    + + + +

    Format of the Magic File

    + +

    The contents of the file are plain ASCII text in 4-5 + columns. Blank lines are allowed but ignored. Commented lines + use a hash mark "#". The remaining lines are parsed for the + following columns:

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ColumnDescription
    1byte number to begin checking from
    + ">" indicates a dependency upon the previous non-">" + line
    2 + type of data to match + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    bytesingle character
    shortmachine-order 16-bit integer
    longmachine-order 32-bit integer
    stringarbitrary-length string
    datelong integer date (seconds since Unix + epoch/1970)
    beshortbig-endian 16-bit integer
    belongbig-endian 32-bit integer
    bedatebig-endian 32-bit integer date
    leshortlittle-endian 16-bit integer
    lelonglittle-endian 32-bit integer
    ledatelittle-endian 32-bit integer date
    +
    3contents of data to match
    4MIME type if matched
    5MIME encoding if matched (optional)
    + +

    For example, the following magic file lines would recognize + some audio formats.

    +
    +# Sun/NeXT audio data
    +0       string          .snd
    +>12     belong          1               audio/basic
    +>12     belong          2               audio/basic
    +>12     belong          3               audio/basic
    +>12     belong          4               audio/basic
    +>12     belong          5               audio/basic
    +>12     belong          6               audio/basic
    +>12     belong          7               audio/basic
    +>12     belong          23              audio/x-adpcm
    +
    + Or these would recognize the difference between "*.doc" files + containing Microsoft Word or FrameMaker documents. (These are + incompatible file formats which use the same file suffix.) +
    +# Frame
    +0       string          \<MakerFile     application/x-frame
    +0       string          \<MIFFile       application/x-frame
    +0       string          \<MakerDictionary       application/x-frame
    +0       string          \<MakerScreenFon        application/x-frame
    +0       string          \<MML           application/x-frame
    +0       string          \<Book          application/x-frame
    +0       string          \<Maker         application/x-frame
    +
    +# MS-Word
    +0       string          \376\067\0\043                  application/msword
    +0       string          \320\317\021\340\241\261        application/msword
    +0       string          \333\245-\0\0\0                 application/msword
    +
    + An optional MIME encoding can be included as a fifth column. + For example, this can recognize gzipped files and set the + encoding for them. +
    +# gzip (GNU zip, not to be confused with [Info-ZIP/PKWARE] zip archiver)
    +0       string          \037\213        application/octet-stream        x-gzip
    +
    + +

    Performance Issues

    + This module is not for every system. If your system is barely + keeping up with its load or if you're performing a web server + benchmark, you may not want to enable this because the + processing is not free. + +

    However, an effort was made to improve the performance of + the original file(1) code to make it fit in a busy web server. + It was designed for a server where there are thousands of users + who publish their own documents. This is probably very common + on intranets. Many times, it's helpful if the server can make + more intelligent decisions about a file's contents than the + file name allows ...even if just to reduce the "why doesn't my + page work" calls when users improperly name their own files. + You have to decide if the extra work suits your + environment.

    + +

    When compiling an Apache server, this module should be at or + near the top of the list of modules in the Configuration file. + The modules are listed in increasing priority so that will mean + this one is used only as a last resort, just like it was + designed to.

    + +

    Notes

    + The following notes apply to the mod_mime_magic module and are + included here for compliance with contributors' copyright + restrictions that require their acknowledgment. +
    +/*
    + * mod_mime_magic: MIME type lookup via file magic numbers
    + * Copyright (c) 1996-1997 Cisco Systems, Inc.
    + *
    + * This software was submitted by Cisco Systems to the Apache Group in July
    + * 1997.  Future revisions and derivatives of this source code must
    + * acknowledge Cisco Systems as the original contributor of this module.
    + * All other licensing and usage conditions are those of the Apache Group.
    + *
    + * Some of this code is derived from the free version of the file command
    + * originally posted to comp.sources.unix.  Copyright info for that program
    + * is included below as required.
    + * ---------------------------------------------------------------------------
    + * - Copyright (c) Ian F. Darwin, 1987. Written by Ian F. Darwin.
    + *
    + * This software is not subject to any license of the American Telephone and
    + * Telegraph Company or of the Regents of the University of California.
    + *
    + * Permission is granted to anyone to use this software for any purpose on any
    + * computer system, and to alter it and redistribute it freely, subject to
    + * the following restrictions:
    + *
    + * 1. The author is not responsible for the consequences of use of this
    + * software, no matter how awful, even if they arise from flaws in it.
    + *
    + * 2. The origin of this software must not be misrepresented, either by
    + * explicit claim or by omission.  Since few users ever read sources, credits
    + * must appear in the documentation.
    + *
    + * 3. Altered versions must be plainly marked as such, and must not be
    + * misrepresented as being the original software.  Since few users ever read
    + * sources, credits must appear in the documentation.
    + *
    + * 4. This notice may not be removed or altered.
    + * -------------------------------------------------------------------------
    + *
    + * For compliance with Mr Darwin's terms: this has been very significantly
    + * modified from the free "file" command.
    + * - all-in-one file for compilation convenience when moving from one
    + *   version of Apache to the next.
    + * - Memory allocation is done through the Apache API's pool structure.
    + * - All functions have had necessary Apache API request or server
    + *   structures passed to them where necessary to call other Apache API
    + *   routines.  (i.e., usually for logging, files, or memory allocation in
    + *   itself or a called function.)
    + * - struct magic has been converted from an array to a single-ended linked
    + *   list because it only grows one record at a time, it's only accessed
    + *   sequentially, and the Apache API has no equivalent of realloc().
    + * - Functions have been changed to get their parameters from the server
    + *   configuration instead of globals.  (It should be reentrant now but has
    + *   not been tested in a threaded environment.)
    + * - Places where it used to print results to stdout now saves them in a
    + *   list where they're used to set the MIME type in the Apache request
    + *   record.
    + * - Command-line flags have been removed since they will never be used here.
    + *
    + */
    +
    +
    + +

    MimeMagicFile

    + +

    Syntax: MimeMagicFile + file-path
    + Default: none
    + Context: server config, virtual + host
    + Status: Extension
    + Module: mod_mime_magic

    + +

    The MimeMagicFile directive can be used to + enable this module, the default file is distributed at + conf/magic. Non-rooted paths are relative to the + ServerRoot. Virtual hosts will use the same file as the main + server unless a more specific setting is used, in which case + the more specific setting overrides the main server's file.

    + + + diff --git a/htdocs/manual/mod/mod_mmap_static.html b/htdocs/manual/mod/mod_mmap_static.html new file mode 100644 index 00000000000..b246dbbfeb4 --- /dev/null +++ b/htdocs/manual/mod/mod_mmap_static.html @@ -0,0 +1,129 @@ + + + + + + + Apache module mod_mmap_static + + + + + + +

    Module mod_mmap_static

    + +

    This module provides mmap()ing of a statically configured + list of frequently requested but not changed files.

    + +

    Status: Experimental
    + Source File: + mod_mmap_static.c
    + Module Identifier: + mmap_static_module
    + Compatibility: Available in + Apache 1.3 and later.

    + +

    Summary

    + +

    This is an experimental module and should + be used with care. You can easily create a broken site using + this module, read this document carefully. + mod_mmap_static maps a list of statically + configured files (via MMapFile directives in the + main server configuration) into memory through the system call + mmap(). This system call is available on most + modern Unix derivates, but not on all. There are sometimes + system-specific limits on the size and number of files that can + be mmap()d, experimentation is probably the easiest way to find + out.

    + +

    This mmap()ing is done once at server start or restart, + only. So whenever one of the mapped files changes on the + filesystem you have to restart the server by at least + sending it a HUP or USR1 signal (see the Stopping and Restarting + documentation). To reiterate that point: if the files are + modified in place without restarting the server you + may end up serving requests that are completely bogus. You + should update files by unlinking the old copy and putting a new + copy in place. Most tools such as rdist and + mv do this. The reason why this modules doesn't + take care of changes to the files is that this check would need + an extra stat() every time which is a waste and + against the intent of I/O reduction.

    + +

    Directives

    + + +
    + +

    MMapFile + directive

    + +

    Syntax: MMapFile + filename [filename] ...
    + Default: None
    + Context: server-config
    + Override: Not + applicable
    + Status: Experimental
    + Module: mod_mmap_static
    + Compatibility: Only available + in Apache 1.3 or later

    + +

    The MMapFile directive maps one or more files + (given as whitespace separated arguments) into memory at server + startup time. They are automatically unmapped on a server + shutdown. When the files have changed on the filesystem at + least a HUP or USR1 signal should be send to the server to + re-mmap them.

    + +

    Be careful with the filename arguments: They have + to literally match the filesystem path Apache's URL-to-filename + translation handlers create. We cannot compare inodes or other + stuff to match paths through symbolic links etc. + because that again would cost extra stat() system + calls which is not acceptable. This module may or may not work + with filenames rewritten by mod_alias or + mod_rewrite... it is an experiment after all.

    + +

    Notice: You cannot use this for speeding up CGI programs or + other files which are served by special content handlers. It + can only be used for regular files which are usually served by + the Apache core content handler.

    + Example: +
    +  MMapFile /usr/local/apache/htdocs/index.html
    + 
    +
    + +

    Note: don't bother asking for a for a + MMapDir directive which recursively maps all the + files in a directory. Use Unix the way it was meant to be used. + For example, see the Include + directive, and consider this command:

    +
    +  find /www/htdocs -type f -print \
    +  | sed -e 's/.*/mmapfile &/' > /www/conf/mmap.conf
    + 
    +
    + + + + diff --git a/htdocs/manual/mod/mod_negotiation.html.en b/htdocs/manual/mod/mod_negotiation.html.en new file mode 100644 index 00000000000..5ba05f6cafc --- /dev/null +++ b/htdocs/manual/mod/mod_negotiation.html.en @@ -0,0 +1,220 @@ + + + + + + + Apache module mod_negotiation + + + + + + +

    Module mod_negotiation

    + +

    This module provides for content negotiation.

    + +

    Status: Base
    + Source File: + mod_negotiation.c
    + Module Identifier: + negotiation_module

    + +

    Summary

    + Content negotiation, or more accurately content selection, is + the selection of the document that best matches the clients + capabilities, from one of several available documents. There + are two implementations of this. + +
      +
    • A type map (a file with the handler + type-map) which explicitly lists the files + containing the variants.
    • + +
    • A MultiViews search (enabled by the MultiViews Option, where the server does an + implicit filename pattern match, and choose from amongst the + results.
    • +
    + +

    Directives

    + + + See also: DefaultLanguage, AddEncoding, AddLanguage, AddType, and Options. + +

    Type maps

    + A type map has the same format as RFC822 mail headers. It + contains document descriptions separated by blank lines, with + lines beginning with a hash character ('#') treated as + comments. A document description consists of several header + records; records may be continued on multiple lines if the + continuation lines start with spaces. The leading space will be + deleted and the lines concatenated. A header record consists of + a keyword name, which always ends in a colon, followed by a + value. Whitespace is allowed between the header name and value, + and between the tokens of value. The headers allowed are: + +
    +
    Content-Encoding:
    + +
    The encoding of the file. Apache only recognizes + encodings that are defined by an AddEncoding directive. + This normally includes the encodings x-compress + for compress'd files, and x-gzip for gzip'd + files. The x- prefix is ignored for encoding + comparisons.
    + +
    Content-Language:
    + +
    The language of the variant, as an Internet standard + language tag (RFC 1766). An example is en, + meaning English.
    + +
    Content-Length:
    + +
    The length of the file, in bytes. If this header is not + present, then the actual length of the file is used.
    + +
    Content-Type:
    + +
    + The MIME media type of the document, with optional + parameters. Parameters are separated from the media type + and from one another by a semi-colon, with a syntax of + name=value. Common parameters include: + +
    +
    level
    + +
    an integer specifying the version of the media type. + For text/html this defaults to 2, otherwise + 0.
    + +
    qs
    + +
    a floating-point number with a value in the range 0.0 + to 1.0, indicating the relative 'quality' of this variant + compared to the other available variants, independent of + the client's capabilities. For example, a jpeg file is + usually of higher source quality than an ascii file if it + is attempting to represent a photograph. However, if the + resource being represented is ascii art, then an ascii + file would have a higher source quality than a jpeg file. + All qs values are therefore specific to a given + resource.
    +
    + Example: + +
    + Content-Type: image/jpeg; qs=0.8 +
    +
    + +
    URI:
    + +
    The path to the file containing this variant, relative to + the map file.
    +
    + +

    MultiViews

    + A MultiViews search is enabled by the MultiViews Option. If the server receives a + request for /some/dir/foo and + /some/dir/foo does not exist, then the + server reads the directory looking for all files named + foo.*, and effectively fakes up a type map which + names all those files, assigning them the same media types and + content-encodings it would have if the client had asked for one + of them by name. It then chooses the best match to the client's + requirements, and returns that document. +
    + +

    CacheNegotiatedDocs + directive

    + Syntax: + CacheNegotiatedDocs
    + Context: server config
    + Status: Base
    + Module: mod_negotiation
    + Compatibility: + CacheNegotiatedDocs is only available in Apache 1.1 and later. + +

    If set, this directive allows content-negotiated documents + to be cached by proxy servers. This could mean that clients + behind those proxys could retrieve versions of the documents + that are not the best match for their abilities, but it will + make caching more efficient.

    + +

    This directive only applies to requests which come from + HTTP/1.0 browsers. HTTP/1.1 provides much better control over + the caching of negotiated documents, and this directive has no + effect in responses to HTTP/1.1 requests.

    +
    + +

    LanguagePriority directive

    + + Syntax: LanguagePriority + MIME-lang [MIME-lang] ...
    + Context: server config, virtual + host, directory, .htaccess
    + Override: FileInfo
    + Status: Base
    + Module: mod_negotiation + +

    The LanguagePriority sets the precedence of language + variants for the case where the client does not express a + preference, when handling a MultiViews request. The list of + MIME-lang are in order of decreasing preference. + Example:

    + +
    + LanguagePriority en fr de +
    + For a request for foo.html, where + foo.html.fr and foo.html.de both + existed, but the browser did not express a language preference, + then foo.html.fr would be returned. + +

    Note that this directive only has an effect if a 'best' + language cannot be determined by any other means. Correctly + implemented HTTP/1.1 requests will mean this directive has no + effect.

    + +

    See also: DefaultLanguage and + AddLanguage + +

    + + + diff --git a/htdocs/manual/mod/mod_negotiation.html.html b/htdocs/manual/mod/mod_negotiation.html.html new file mode 100644 index 00000000000..01594523ac9 --- /dev/null +++ b/htdocs/manual/mod/mod_negotiation.html.html @@ -0,0 +1,4 @@ + + + diff --git a/htdocs/manual/mod/mod_negotiation.html.ja.jis b/htdocs/manual/mod/mod_negotiation.html.ja.jis new file mode 100644 index 00000000000..3a0a1d71453 --- /dev/null +++ b/htdocs/manual/mod/mod_negotiation.html.ja.jis @@ -0,0 +1,218 @@ + + + + + + Apache module mod_negotiation + + + + + + + +

    mod_negotiation $B%b%8%e!<%k(B

    + +

    $B$3$N%b%8%e!<%k$O(B $B%3%s%F%s%H%M%4%7%(!<%7%g%s(B$B$rDs6!$7$^$9!#(B

    + +

    $B%9%F!<%?%9(B: Base
    + $B%=!<%9%U%!%$%k(B: + mod_negotiation.c
    + $B%b%8%e!<%k<1JL;R(B: + negotiation_module

    + +

    $B35MW(B

    + $B%3%s%F%s%H%M%4%7%(!<%7%g%s!"$h$j@53N$K$O%3%s%F%s%D$NA*Br5!G=$O!"(B + $BJ#?tMQ0U$5$l$F$$$k%I%-%e%a%s%H$+$i!"%/%i%$%"%s%H$NG=NO$K0lHV9g$C$?(B + $B%I%-%e%a%s%H$rA*Br$9$k5!G=$G$9!#$3$N +
  • $B%?%$%W%^%C%W(B (type-map + $B%O%s%I%i$G07$o$l$k%U%!%$%k(B)$B!#$3$l$O(B variants + $B$r4^$s$G$$$k%U%!%$%k$rL@<(E*$K;XDj$7$^$9!#(B
  • + +
  • MultiViews $B$NC5:w(B (MultiViews $B%*%W%7%g%s(B $B$G;HMQ$9$k$h$&$K$J$j$^$9(B)$B!#(B + $B%5!<%P$,0EL[$NFb$K%U%!%$%kL>$N%Q%?!<%s%^%C%A$r9T$J$$!"(B + $B$=$N7k2L$+$iA*Br$7$^$9!#(B
  • + + +

    $B%G%#%l%/%F%#%V(B

    + + + DefaultLanguage, + AddEncoding, + AddLanguage, + AddType, + Options + $B$b;2>H$7$F$/$@$5$$(B$B!#(B + +

    $B%?%$%W%^%C%W(B

    + + $B%?%$%W%^%C%W$O(B RFC 822 $B$N%a!<%k%X%C%@$HF1$8=q<0$G$9!#(B + $B%I%-%e%a%s%H$N5-=R$,6u9T$GJ,N%$5$l$F=q$+$l$F$$$F!"%O%C%7%eJ8;z(B + ('#') $B$G;O$^$k9T$O%3%a%s%H$H$7$F07$o$l$^$9!#(B + $B%I%-%e%a%s%H$N@bL@$OJ#?t$N%X%C%@%l%3!<%I$+$i9=@.$5$l$^$9!#(B + $B%l%3!<%I$O!"B3$-$N9T$,6uGr$G;O$^$C$F$$$k$HJ#?t$N9T$K$^$?$,$j$^$9!#(B + $B:G=i$N6uGr$,>C5n$5$l$F!"A0$N9T$H$D$J$2$F(B 1 $B9T$H$7$F07$o$l$^$9!#(B + $B%X%C%@%l%3!<%I$O%-!<%o!<%IL>$N8e$KCM$,B3$/$H$$$&7A<0$G!"(B + $B%-!<%o!<%IL>$O>o$K%3%m%s$G=*$o$j$^$9!#6uGr$O%X%C%@L>$HCM$N4V!"(B + $BCM$N%H!<%/%s$N4V$KF~$l$k$3$H$,$G$-$^$9!#(B + $B;HMQ2DG=$J%X%C%@$O0J2<$N$H$*$j$G$9(B: +
    +
    Content-Encoding:
    +
    $B%U%!%$%k$N%(%s%3!<%G%#%s%0!#(BApache $B$O(B AddEncoding + $B$GDj5A$5$l$?%(%s%3!<%G%#%s%0$@$1$rG'<1$7$^$9!#DL>o(B compress + $B$5$l$?%U%!%$%k$N$?$a$N(B x-compress $B$H(B gzip + $B$5$l$?%U%!%$%k$N$?$a$N(B x-gzip $B$r4^$_$^$9!#(B + $B%(%s%3!<%G%#%s%0$NHf3S$r$9$k$H$-$O!"@\F,<-(B x- + $B$OL5;k$5$l$^$9!#(B
    + + +
    Content-Language:
    + +
    $B%$%s%?!<%M%C%HI8=`$N8@8l%?%0(B (RFC 1766) + $B$GDj5A$5$l$F$$$k8@8l$Nen + $B$O1Q8l$rI=$7$^$9!#(B
    + +
    Content-Length:
    + +
    $B%U%!%$%k$ND9$5(B ($B%P%$%H?t(B)$B!#(B + $B$3$N%X%C%@$,$J$$>l9g!"%U%!%$%k$N + +
    Content-Type:
    + +
    $B%I%-%e%a%s%H$N(B MIME + $B%a%G%#%"%?%$%W!"%*%W%7%g%J%k$J%Q%i%a!<%?IU$-!#%Q%i%a!<%?$N9=J8$O(B + name=value + $B$G!"%a%G%#%"%?%$%W$dB>$N%Q%i%a!<%?$H$O%;%_%3%m%s$GJ,N%$5$l$^$9!#(B + $B6&DL$N%Q%i%a!<%?$O0J2<$N$H$*$j(B: + +
    +
    level
    + +
    $B%a%G%#%"%?%$%W$N%P!<%8%g%s$r<($9@0?t!#(B + text/html $B$G$O(B 2 $B$,%G%U%)%k%H$G!"$=$NB>$N>l9g$O(B + 0 $B$,%G%U%)%k%H$G$9!#(B
    + +
    qs
    + +
    $B%/%i%$%"%s%H$NG=NO$K4X78$J$/!"(Bvariant + $B$rB>$HHf3S$7$?$H$-$NAjBPE*$J!VIJ.?t!#(B + $BNc$($P!" +
    + $BNc(B: + +
    + Content-Type: image/jpeg; qs=0.8 +
    +
    + +
    URI:
    + +
    $B%^%C%W%U%!%$%k$+$iAjBP%Q%9$GI=$o$7$?!"(Bvariant + $B$N$"$k%U%!%$%k$X$N%Q%9(B
    +
    + +

    MultiViews

    + MultiViews $BC5:w$O!"(BMultiviews $B%*%W%7%g%s(B$B$K$h$jM-8z$K$J$j$^$9!#%5!<%P$,(B /some/dir/foo + $B$X$N%j%/%(%9%H$r/some/dir/foo $B$,B8:_(B + $B$7$J$$(B$B>l9g!"%5!<%P$O%G%#%l%/%H%j$rFI$s$G!"(B + foo.* $B$K$"$F$O$^$kA4$F$N%U%!%$%k$rC5$7!"(B + $B;ve$=$l$i$N%U%!%$%k$r%^%C%W$9$k%?%$%W%^%C%W$r:n$j$^$9!#(B + $B$=$N$H$-!"%a%G%#%"%?%$%W$H%3%s%F%s%H%(%s%3!<%G%#%s%0$O!"(B + $B$=$N%U%!%$%kL>$rD>@\;XDj$7$?$H$-$HF1$8$b$N$,3d$jEv$F$i$l$^$9!#(B + $B$=$l$+$i%/%i%$%"%s%H$NMW5a$K0lHV9g$&$b$N$rA*$S!"(B + $B$=$N%I%-%e%a%s%H$rJV$7$^$9!#(B +
    + +

    CacheNegotiatedDocs + $B%G%#%l%/%F%#%V(B

    + $B9=J8(B: CacheNegotiatedDocs
    + $B%3%s%F%-%9%H(B: + $B%5!<%P@_Dj%U%!%$%k(B
    + $B%9%F!<%?%9(B: Base
    + $B%b%8%e!<%k(B: + mod_negotiation
    + $B8_49@-(B: + CacheNegotiatedDocs $B$O(B Apache 1.1 $B0J9_$G$N$_;HMQ2DG=!#(B
    +

    $B$3$N%G%#%l%/%F%#%V$,@_Dj$5$l$F$$$k$H!"%3%s%F%s%H%M%4%7%(!<%7%g%s(B + $B$r$7$?7k2L$N%I%-%e%a%s%H$N%-%c%C%7%e$r5v2D$7$^$9!#(B + $B$3$l$O!"%W%m%-%7$N8e$m$K$$$k%/%i%$%"%s%H$,G=NO$K0lHV9g$C$?(B + $B%I%-%e%a%s%H$G$O$J$/!"(B + $B%-%c%C%7%e$r$h$j8z2LE*$K$9$k$b$N$rF@$k2DG=@-$,$"$k$H$$$&$3$H$G$9!#(B

    + +

    $B$3$N%G%#%l%/%F%#%V$O(B HTTP/1.0 $B%V%i%&%6$+$i$N%j%/%(%9%H(B + $B$N$_$KE,MQ$5$l$^$9!#(BHTTP/1.1 $B$O!"(B + $B8r>D$5$l$?%I%-%e%a%s%H$N%-%c%C%7%e$KBP$7$F$:$C$H$h$$@)8f$,2DG=$J$N$G!"(B + $B$3$N%G%#%l%/%F%#%V$O(B HTTP/1.1 $B$N%j%/%(%9%H$K$O1F6A$7$^$;$s!#(B

    +
    + +

    LanguagePriority $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: LanguagePriority + MIME-lang [MIME-lang] ...
    + $B%3%s%F%-%9%H(B: + $B%5!<%P@_Dj%U%!%$%k!"%P!<%A%c%k%[%9%H!"%G%#%l%/%H%j!"(B.htaccess
    + $B>e=q$-(B: FileInfo
    + $B%9%F!<%?%9(B: Base
    + $B%b%8%e!<%k(B: mod_negotiation + +

    LanguagePriority $B$O!"(BMultiViews + $B%j%/%(%9%H$r07$&$H$-$K!"%/%i%$%"%s%H$,M%@h=g0L$rDs6!$7$F$$$J$$>l9g$N(B + $B8@8l$NM%@h=g0L$r@_Dj$7$^$9!#(BMIME-lang + $B$N%j%9%H$,M%@hEY$N9_=g$KJB$S$^$9!#(B + $BNc(B:

    + +
    + LanguagePriority en fr de +
    + foo.html $B$,%j%/%(%9%H$5$l!"(Bfoo.html.fr + $B$H(B foo.html.de $B$,N>J}B8:_$7!"(B + $B%V%i%&%6$,8@8l$NM%@h=g0L$rDs6!$7$F$J$$>l9g$O(B + foo.html.fr $B$,JV$5$l$^$9!#(B + +

    $B$3$N%G%#%l%/%F%#%V$OB>$NJ}K!$G!V:GA1!W(B + $B$N8@8l$,7hDj$G$-$J$$$H$-$N$_8z2L$,$"$k$3$H$KCm0U$7$F$/$@$5$$!#(B + HTTP/1.1 $B%j%/%(%9%H$,@5$7$/l9g$K$O!"(B + $B$3$N%G%#%l%/%F%#%V$OL58z$K$J$j$^$9!#(B

    + +

    DefaultLanguage, + AddLanguage + $B$b;2>H$7$F$/$@$5$$(B$B!#(B

    + + + diff --git a/htdocs/manual/mod/mod_proxy.html b/htdocs/manual/mod/mod_proxy.html new file mode 100644 index 00000000000..70ef498e241 --- /dev/null +++ b/htdocs/manual/mod/mod_proxy.html @@ -0,0 +1,1286 @@ + + + + + + + Apache module mod_proxy + + + + + + +

    Apache module mod_proxy

    + +

    This module provides for an HTTP 1.1 + caching proxy server.

    + +

    Status: Extension
    + Source File: mod_proxy.c
    + Module Identifier: + proxy_module
    + Compatibility: Available in + Apache 1.1 and later.

    + +

    Summary

    + This module implements a proxy/cache for Apache. It implements + proxying capability for FTP, CONNECT + (for SSL), HTTP/0.9, HTTP/1.0, and + (as of Apache 1.3.23) HTTP/1.1. + The module can be configured to connect to other proxy modules + for these and other protocols. + +

    This module was experimental in Apache 1.1.x. As of Apache + 1.2, mod_proxy stability is greatly improved.

    + +

    Warning: Do not enable proxying with ProxyRequests until you have secured your server. Open proxy servers are + dangerous both to your network and to the Internet at large.

    + +

    Directives

    + + + +

    Common configuration + topics

    + + + +

    Forward and Reverse Proxies

    +

    Apache can be configured in both a forward and + reverse proxy mode.

    + +

    An ordinary forward proxy is an intermediate + server that sits between the client and the origin + server. In order to get content from the origin server, + the client sends a request to the proxy naming the origin server + as the target and the proxy then requests the content from the + origin server and returns it to the client. The client must be + specially configured to use the forward proxy to access other + sites.

    + +

    A typical usage of a forward proxy is to provide Internet + access to internal clients that are otherwise restricted by a + firewall. The forward proxy can also use caching to reduce + network usage.

    + +

    The forward proxy is activated using the ProxyRequests directive. + Because forward proxys allow clients to access arbitrary sites + through your server and to hide their true origin, it is + essential that you secure your server so + that only authorized clients can access the proxy before + activating a forward proxy.

    + +

    A reverse proxy, by contrast, appears to the + client just like an ordinary web server. No special + configuration on the client is necessary. The client makes + ordinary requests for content in the name-space of the reverse + proxy. The reverse proxy then decides where to send those + requests, and returns the content as if it was itself the + origin.

    + +

    A typical usage of a reverse proxy is to provide Internet + users access to a server that is behind a firewall. Reverse + proxies can also be used to balance load among several back-end + servers, or to provide caching for a slower back-end server. + In addition, reverse proxies can be used simply to bring + several servers into the same URL space.

    + +

    A reverse proxy is activated using the ProxyPass directive or the + [P] flag to the RewriteRule + directive. It is not necessary to turn + ProxyRequests on in + order to configure a reverse proxy.

    + +

    Basic Examples

    + +

    The examples below are only a very basic idea to help you + get started. Please read the documentation on the individual + directives.

    + +

    Forward Proxy

    + ProxyRequests On
    + ProxyVia On
    +
    + <Directory proxy:*>
    + + Order deny,allow
    + Deny from all
    + Allow from internal.example.com
    + + </Directory>
    +
    + CacheRoot "/usr/local/apache/proxy"
    + CacheSize 5
    + CacheGcInterval 4
    + CacheMaxExpire 24
    + CacheLastModifiedFactor 0.1
    + CacheDefaultExpire 1
    + NoCache a-domain.com another-domain.edu joes.garage-sale.com +

    + +

    Reverse Proxy

    + ProxyRequests Off
    +
    + ProxyPass /foo http://foo.example.com/bar
    + ProxyPassReverse /foo http://foo.example.com/bar +

    + +

    Controlling access to your + proxy

    + You can control who can access your proxy via the normal + <Directory> control block using the following example: +
    +<Directory proxy:*>
    +Order Deny,Allow
    +Deny from all
    +Allow from yournetwork.example.com
    +</Directory>
    +
    + +

    A <Files> block will also work, and is the only method + known to work for all possible URLs in Apache versions earlier + than 1.2b10.

    + +

    For more information, see mod_access.

    + +

    Strictly limiting access is essential if you are using a + forward proxy (using the ProxyRequests directive). + Otherwise, your server can be used by any client to access + arbitrary hosts while hiding his or her true identity. This is + dangerous both for your network and for the Internet at large. + When using a reverse proxy (using the ProxyPass directive with + ProxyRequests Off), access control is less critical + because clients can only contact the hosts that you have + specifically configured.

    + +

    Using Netscape hostname + shortcuts

    + There is an optional patch to the proxy module to allow + Netscape-like hostname shortcuts to be used. It's available + from the + contrib/patches/1.2 directory on the Apache + Web site. + +

    Why doesn't file type + xxx download via FTP?

    + You probably don't have that particular file type defined as + application/octet-stream in your proxy's mime.types + configuration file. A useful line can be +
    +application/octet-stream        bin dms lha lzh exe class tgz taz
    +
    + +

    How can I force an FTP ASCII + download of File xxx?

    + In the rare situation where you must download a specific file + using the FTP ASCII transfer method (while the + default transfer is in binary mode), you can + override mod_proxy's default by suffixing the request with + ;type=a to force an ASCII transfer. + (FTP Directory listings are always executed in ASCII mode, however.) + +

    How can I access + FTP files outside of my home directory?

    +

    + A FTP URI is interpreted relative to the home directory of + the user who is logging in. Alas, to reach higher directory + levels you cannot use /../, as the dots are interpreted by the + browser and not actually sent to the FTP server. To address + this problem, the so called "Squid %2f hack" was implemented in + the Apache FTP proxy; it is a solution which is also used by + other popular proxy servers like the + Squid Proxy Cache. + By prepending /%2f to the path of your request, you can make + such a proxy change the FTP starting directory to / (instead + of the home directory).
    + Example: To retrieve the file /etc/motd, + you would use the URL

    + ftp://user@host/%2f/etc/motd
    +

    + +

    How can I hide the FTP + cleartext password in my browser's URL line?

    +

    + To log in to an FTP server by username and password, Apache + uses different strategies. + In absense of a user name and password in the URL altogether, + Apache sends an anonymous login to the FTP server, i.e., +

    + user: anonymous
    + password: apache_proxy@ +
    + This works for all popular FTP servers which are configured for + anonymous access.
    + For a personal login with a specific username, you can embed + the user name into the URL, like in: + ftp://username@host/myfile. If the FTP server + asks for a password when given this username (which it should), + then Apache will reply with a [401 Authorization required] response, + which causes the Browser to pop up the username/password dialog. + Upon entering the password, the connection attempt is retried, + and if successful, the requested resource is presented. + The advantage of this procedure is that your browser does not + display the password in cleartext (which it would if you had used + ftp://username:password@host/myfile in + the first place). +
    + Note that the password which is transmitted in such a way + is not encrypted on its way. It travels between your browser and + the Apache proxy server in a base64-encoded cleartext string, and + between the Apache proxy and the FTP server as plaintext. You should + therefore think twice before accessing your FTP server via HTTP + (or before accessing your personal files via FTP at all!) When + using unsecure channels, an eavesdropper might intercept your + password on its way. +

    + + +

    Why does Apache start more + slowly when using the proxy module?

    + If you're using the ProxyBlock or + NoCache directives, hostnames' IP addresses are + looked up and cached during startup for later match test. This + may take a few seconds (or more) depending on the speed with + which the hostname lookups occur. + +

    Can I use the Apache proxy + module with my SOCKS proxy?

    + Yes. Just build Apache with the rule SOCKS4=yes in + your Configuration file, and follow the instructions + there. SOCKS5 capability can be added in a similar way (there's + no SOCKS5 rule yet), so use the + EXTRA_LDFLAGS definition, or build Apache normally + and run it with the runsocks wrapper provided with + SOCKS5, if your OS supports dynamically linked libraries. + +

    Some users have reported problems when using SOCKS version + 4.2 on Solaris. The problem was solved by upgrading to SOCKS + 4.3.

    + +

    Remember that you'll also have to grant access to your + Apache proxy machine by permitting connections on the + appropriate ports in your SOCKS daemon's configuration.

    + +

    What other functions are + useful for an intranet proxy server?

    + +

    An Apache proxy server situated in an intranet needs to + forward external requests through the company's firewall + (for this, configure the ProxyRemote + directive to forward the respective scheme to + the firewall proxy). + However, when it has to access resources within the intranet, + it can bypass the firewall when accessing hosts. The NoProxy directive is useful for specifying + which hosts belong to the intranet and should be accessed + directly.

    + +

    Users within an intranet tend to omit the local domain name + from their WWW requests, thus requesting "http://somehost/" + instead of "http://somehost.my.dom.ain/". Some commercial proxy + servers let them get away with this and simply serve the + request, implying a configured local domain. When the ProxyDomain directive is used and the + server is configured for proxy + service, Apache can return a redirect response and send the + client to the correct, fully qualified, server address. This is + the preferred method since the user's bookmark files will then + contain fully qualified hosts.

    +
    + +

    ProxyRequests directive

    + Syntax: ProxyRequests + on|off
    + Default: ProxyRequests + Off
    + Context: server config, virtual + host
    + Override: Not + applicable
    + Status: Base
    + Module: mod_proxy
    + Compatibility: ProxyRequests is + only available in Apache 1.1 and later. + +

    This allows or prevents Apache from functioning as a forward proxy + server. Setting ProxyRequests to 'off' does not disable use of + the ProxyPass directive.

    + +

    Warning: Do not enable proxying until you have + secured your server. Open proxy servers are + dangerous both to your network and to the Internet at large.

    + +
    + +

    ProxyRemote + directive

    + Syntax: ProxyRemote match + remote-server
    + Default: None
    + Context: server config, virtual + host
    + Override: Not + applicable
    + Status: Base
    + Module: mod_proxy
    + Compatibility: ProxyRemote is + only available in Apache 1.1 and later. + +

    This defines remote proxies to this proxy. match is + either the name of a URL-scheme that the remote server + supports, or a partial URL for which the remote server should + be used, or '*' to indicate the server should be contacted for + all requests. remote-server is a partial URL for the + remote server. Syntax:

    +
    +  remote-server = protocol://hostname[:port]
    +
    + protocol is the protocol that should be used to + communicate with the remote server; only "http" is supported by + this module. + +

    Example:

    +
    +  ProxyRemote http://goodguys.com/ http://mirrorguys.com:8000
    +  ProxyRemote * http://cleversite.com
    +  ProxyRemote ftp http://ftpproxy.mydomain.com:8080
    +
    + In the last example, the proxy will forward FTP requests, + encapsulated as yet another HTTP proxy request, to another + proxy which can handle them. +
    + +

    ProxyPass + directive

    + Syntax: ProxyPass path + url
    + Default: None
    + Context: server config, virtual + host
    + Override: Not + applicable
    + Status: Base
    + Module: mod_proxy
    + Compatibility: ProxyPass is + only available in Apache 1.1 and later. + +

    This directive allows remote servers to be mapped into the + space of the local server; the local server does not act as a + proxy in the conventional sense, but appears to be a mirror of + the remote server. path is the name of a local virtual + path; url is a partial URL for the remote server.

    + +

    Suppose the local server has address + http://wibble.org/; then

    +
    +   ProxyPass /mirror/foo/ http://foo.com/
    +
    +

    will cause a local request for the + <http://wibble.org/mirror/foo/bar> to be + internally converted into a proxy request to + <http://foo.com/bar>.

    + +

    Warning: The ProxyRequests directive should + usually be set off when using ProxyPass. + +


    + +

    ProxyPassReverse directive

    + Syntax: ProxyPassReverse + path url
    + Default: None
    + Context: server config, virtual + host
    + Override: Not + applicable
    + Status: Base
    + Module: mod_proxy
    + Compatibility: ProxyPassReverse + is only available in Apache 1.3b6 and later. + +

    This directive lets Apache adjust the URL in the + Location header on HTTP redirect responses. For + instance this is essential when Apache is used as a reverse + proxy to avoid by-passing the reverse proxy because of HTTP + redirects on the backend servers which stay behind the reverse + proxy.

    + +

    path is the name of a local virtual path.
    + url is a partial URL for the remote server - the same + way they are used for the ProxyPass directive.

    + +

    Example:
    + Suppose the local server has address + http://wibble.org/; then

    +
    +   ProxyPass         /mirror/foo/ http://foo.com/
    +   ProxyPassReverse  /mirror/foo/ http://foo.com/
    +
    + will not only cause a local request for the + <http://wibble.org/mirror/foo/bar> to be + internally converted into a proxy request to + <http://foo.com/bar> (the functionality + ProxyPass provides here). It also takes care of + redirects the server foo.com sends: when + http://foo.com/bar is redirected by him to + http://foo.com/quux Apache adjusts this to + http://wibble.org/mirror/foo/quux before + forwarding the HTTP redirect response to the client. + +

    Note that this ProxyPassReverse directive can + also be used in conjunction with the proxy pass-through feature + ("RewriteRule ... [P]") from mod_rewrite + because its doesn't depend on a corresponding + ProxyPass directive.

    +
    + +

    AllowCONNECT + directive

    + Syntax: AllowCONNECT + port [port] ...
    + Default: + AllowCONNECT 443 563
    + Context: server config, virtual + host
    + Override: Not + applicable
    + Status: Base
    + Module: mod_proxy
    + Compatibility: + AllowCONNECT is only available in Apache 1.3.2 and + later. + +

    The AllowCONNECT directive specifies a list of + port numbers to which the proxy CONNECT method may + connect. Today's browsers use this method when a https + connection is requested and proxy tunneling over http + is in effect.
    + By default, only the default https port (443) and the default + snews port (563) are enabled. Use the AllowCONNECT + directive to override this default and allow connections to + the listed ports only.

    +
    + +

    ProxyBlock + directive

    + Syntax: ProxyBlock + *|word|host|domain [word|host|domain] + ...
    + Default: None
    + Context: server config, virtual + host
    + Override: Not + applicable
    + Status: Base
    + Module: mod_proxy
    + Compatibility: ProxyBlock is + only available in Apache 1.2 and later. + +

    The ProxyBlock directive specifies a list of words, hosts + and/or domains, separated by spaces. HTTP, HTTPS, and FTP + document requests to sites whose names contain matched words, + hosts or domains are blocked by the proxy server. The + proxy module will also attempt to determine IP addresses of + list items which may be hostnames during startup, and cache + them for match test as well. Example:

    +
    +  ProxyBlock joes-garage.com some-host.co.uk rocky.wotsamattau.edu
    +
    + 'rocky.wotsamattau.edu' would also be matched if referenced by + IP address. + +

    Note that 'wotsamattau' would also be sufficient to match + 'wotsamattau.edu'.

    + +

    Note also that

    +
    +ProxyBlock *
    +
    + blocks connections to all sites. +
    + +

    ProxyReceiveBufferSize + directive

    + Syntax: ProxyReceiveBufferSize + bytes
    + Default: None
    + Context: server config, virtual + host
    + Override: Not + applicable
    + Status: Base
    + Module: mod_proxy
    + Compatibility: + ProxyReceiveBufferSize is only available in Apache 1.3 and + later. + +

    The ProxyReceiveBufferSize directive specifies an explicit + network buffer size for outgoing HTTP and FTP connections, for + increased throughput. It has to be greater than 512 or set to 0 + to indicate that the system's default buffer size should be + used.

    + +

    Example:

    +
    +  ProxyReceiveBufferSize 2048
    +
    +
    + +

    ProxyIOBufferSize + directive

    + Syntax: ProxyIOBufferSize + bytes
    + Default: 8192
    + Context: server config, virtual + host
    + Override: Not + applicable
    + Status: Base
    + Module: mod_proxy
    + Compatibility: + ProxyIOBufferSize is only available in Apache 1.3.24 and + later. + +

    The ProxyIOBufferSize directive specifies the number of bytes + that will be read from a remote HTTP or FTP server at one time. + This directive is different from the ProxyReceiveBufferSize + directive, which specifies the low level socket buffer size. +

    + +

    + When a response is received which fits entirely within the IO + buffer size, the remote HTTP or FTP server socket will be closed + before an attempt is made to write the response to the client. + This ensures that the remote server does not remain connected + unnecessarily while the response is delivered to a slow client. + A high value for the IO buffer decreases the load on remote HTTP + and FTP servers, at the expense of greater RAM footprint on the + proxy. +

    + +

    Example:

    +
    +  ProxyIOBufferSize 131072
    +
    +
    + +

    NoProxy directive

    + Syntax: NoProxy Domain|SubNet|IpAddr|Hostname [Domain|SubNet|IpAddr|Hostname] ...
    + Default: None
    + Context: server config, virtual + host
    + Override: Not + applicable
    + Status: Base
    + Module: mod_proxy
    + Compatibility: NoProxy is only + available in Apache 1.3 and later. + +

    This directive is only useful for Apache proxy servers + within intranets. The NoProxy directive specifies a list of + subnets, IP addresses, hosts and/or domains, separated by + spaces. A request to a host which matches one or more of these + is always served directly, without forwarding to the configured + ProxyRemote proxy server(s).

    + +

    Example:

    +
    +  ProxyRemote  *  http://firewall.mycompany.com:81
    +  NoProxy         .mycompany.com 192.168.112.0/21 
    +
    + The arguments to the NoProxy directive are one of the following + type list: + +
    + + +
    Domain
    + +
    A Domain is a partially qualified DNS domain + name, preceded by a period. It represents a list of hosts + which logically belong to the same DNS domain or zone + (i.e., the suffixes of the hostnames are all ending + in Domain).
    + Examples: .com .apache.org.
    + To distinguish Domains from Hostnames (both syntactically + and semantically; a DNS domain can have a DNS A record, + too!), Domains are always written with a leading + period.
    + Note: Domain name comparisons are done without regard to the + case, and Domains are always assumed to be anchored + in the root of the DNS tree, therefore two domains + .MyDomain.com and .mydomain.com. + (note the trailing period) are considered equal. Since a + domain comparison does not involve a DNS lookup, it is much + more efficient than subnet comparison. + +
    + +
    SubNet
    + +
    + A SubNet is a partially qualified internet address + in numeric (dotted quad) form, optionally followed by a + slash and the netmask, specified as the number of + significant bits in the SubNet. It is used to + represent a subnet of hosts which can be reached over a + common network interface. In the absence of the explicit + net mask it is assumed that omitted (or zero valued) + trailing digits specify the mask. (In this case, the + netmask can only be multiples of 8 bits wide.)
    + Examples: + +
    +
    192.168 or 192.168.0.0
    + +
    the subnet 192.168.0.0 with an implied netmask of 16 + valid bits (sometimes used in the netmask form + 255.255.0.0)
    + +
    192.168.112.0/21
    + +
    the subnet 192.168.112.0/21 with a + netmask of 21 valid bits (also used in the form + 255.255.248.0)
    +
    + As a degenerate case, a SubNet with 32 valid bits + is the equivalent to an IPAddr, while a + SubNet with zero valid bits (e.g., + 0.0.0.0/0) is the same as the constant _Default_, + matching any IP address. + +
    + +
    IPAddr
    + +
    + A IPAddr represents a fully qualified internet + address in numeric (dotted quad) form. Usually, this + address represents a host, but there need not necessarily + be a DNS domain name connected with the address.
    + Example: 192.168.123.7
    + Note: An IPAddr does not need to be resolved by + the DNS system, so it can result in more effective apache + performance. + +

    See Also: DNS Issues

    + +
    + +
    Hostname
    + +
    + A Hostname is a fully qualified DNS domain name + which can be resolved to one or more IPAddrs via the DNS domain name + service. It represents a logical host (in contrast to Domains, see above) and must be + resolvable to at least one IPAddr (or often to a list of + hosts with different IPAddr's).
    + Examples: prep.ai.mit.edu + www.apache.org.
    + Note: In many situations, it is more effective to specify + an IPAddr in place of a + Hostname since a DNS lookup can be avoided. Name + resolution in Apache can take a remarkable deal of time + when the connection to the name server uses a slow PPP + link.
    + Note: Hostname comparisons are done without + regard to the case, and Hostnames are always + assumed to be anchored in the root of the DNS tree, + therefore two hosts WWW.MyDomain.com and + www.mydomain.com. (note the trailing period) + are considered equal.
    + + +

    See Also: DNS Issues

    +
    +
    +
    + +

    ProxyDomain + directive

    + Syntax: ProxyDomain + Domain
    + Default: None
    + Context: server config, virtual + host
    + Override: Not + applicable
    + Status: Base
    + Module: mod_proxy
    + Compatibility: ProxyDomain is + only available in Apache 1.3 and later. + +

    This directive is only useful for Apache proxy servers + within intranets. The ProxyDomain directive specifies the + default domain which the apache proxy server will belong to. If + a request to a host without a domain name is encountered, a + redirection response to the same host with the configured + Domain appended will be generated.

    + +

    Example:

    +
    +  ProxyRemote  *  http://firewall.mycompany.com:81
    +  NoProxy         .mycompany.com 192.168.112.0/21 
    +  ProxyDomain     .mycompany.com
    +
    +
    + +

    ProxyVia + directive

    + Syntax: ProxyVia + on|off|full|block
    + Default: ProxyVia + off
    + Context: server config, virtual + host
    + Override: Not + applicable
    + Status: Base
    + Module: mod_proxy
    + Compatibility: ProxyVia is only + available in Apache 1.3.2 and later. + +

    This directive controls the use of the Via: + HTTP header by the proxy. Its intended use is to control the + flow of of proxy requests along a chain of proxy servers. See + RFC2068 (HTTP/1.1) for an explanation of Via: + header lines.

    + +
      +
    • If set to off, which is the default, no special + processing is performed. If a request or reply contains a + Via: header, it is passed through + unchanged.
    • + +
    • If set to on, each request and reply will get a + Via: header line added for the current + host.
    • + +
    • If set to full, each generated Via: + header line will additionally have the Apache server version + shown as a Via: comment field.
    • + +
    • If set to block, every proxy request will have + all its Via: header lines removed. No new + Via: header will be generated.
    • +
    +
    + +

    CacheForceCompletion + directive

    + Syntax: CacheForceCompletion + percentage
    + Default: 90
    + Context: server config, virtual + host
    + Override: Not + applicable
    + Status: Base
    + Module: mod_proxy
    + Compatibility: + CacheForceCompletion is only available in Apache 1.3.1 and + later. + +

    If an http transfer that is being cached is cancelled, the + proxy module will complete the transfer to cache if more than + the percentage specified has already been transferred.

    + +

    This is a percentage, and must be a number between 1 and + 100, or 0 to use the default. 100 will cause a document to be + cached only if the transfer was allowed to complete. A number + between 60 and 90 is recommended.

    +
    + +

    CacheRoot + directive

    + Syntax: CacheRoot + directory
    + Default: None
    + Context: server config, virtual + host
    + Override: Not + applicable
    + Status: Base
    + Module: mod_proxy
    + Compatibility: CacheRoot is + only available in Apache 1.1 and later. + +

    Sets the name of the directory to contain cache files; this + must be writable by the httpd server. (see the User directive).
    + Setting CacheRoot enables proxy cacheing; without + defining a CacheRoot, proxy functionality will be + available if ProxyRequests are set to + On, but no cacheing will be available.

    +
    + +

    CacheSize + directive

    + Syntax: CacheSize + kilobytes
    + Default: CacheSize + 5
    + Context: server config, virtual + host
    + Override: Not + applicable
    + Status: Base
    + Module: mod_proxy
    + Compatibility: CacheSize is + only available in Apache 1.1 and later. + +

    Sets the desired space usage of the cache, in KB (1024-byte + units). Although usage may grow above this setting, the garbage + collection will delete files until the usage is at or below + this setting.
    + Depending on the expected proxy traffic volume and + CacheGcInterval, use a value which is at least 20 + to 40 % lower than the available space.

    +
    + +

    CacheGcInterval directive

    + Syntax: CacheGcInterval + hours
    + Default: None
    + Context: server config, virtual + host
    + Override: Not + applicable
    + Status: Base
    + Module: mod_proxy
    + Compatibility: CacheGcinterval + is only available in Apache 1.1 and later. + +

    Check the cache after the specified number of + hours, and delete files if the space usage is greater + than that set by CacheSize. Note that hours accepts a + float value, you could for example use CacheGcInterval + 1.5 to check the cache every 90 minutes. (If unset, no + garbage collection will be performed, and the cache will grow + indefinitely.) Note also that the larger the + CacheGcInterval, the more extra space beyond the + configured CacheSize will be needed for the cache + between garbage collections.
    + +

    +
    + +

    CacheMaxExpire directive

    + Syntax: CacheMaxExpire + hours
    + Default: CacheMaxExpire + 24
    + Context: server config, virtual + host
    + Override: Not + applicable
    + Status: Base
    + Module: mod_proxy
    + Compatibility: CacheMaxExpire + is only available in Apache 1.1 and later. + +

    Specifies the maximum number of hours for which + cachable HTTP documents will be retained without checking the + origin server. Thus, documents will be out of date at most this + number of hours This restriction is enforced even if + an expiry date was supplied with the document.

    +
    + +

    CacheLastModifiedFactor + directive

    + Syntax: CacheLastModifiedFactor + factor
    + Default: + CacheLastModifiedFactor 0.1
    + Context: server config, virtual + host
    + Override: Not + applicable
    + Status: Base
    + Module: mod_proxy
    + Compatibility: + CacheLastModifiedFactor is only available in Apache 1.1 and + later. + +

    If the origin HTTP server did not supply an expiry date for + the document, then estimate one using the formula

    +
    +  expiry-period = time-since-last-modification * factor
    +
    + For example, if the document was last modified 10 hours ago, + and factor is 0.1, then the expiry period will be set + to 10*0.1 = 1 hour. + +

    If the expiry-period would be longer than that set by + CacheMaxExpire, then the latter takes precedence.

    +
    + +

    CacheDirLevels directive

    + Syntax: CacheDirLevels + levels
    + Default: CacheDirLevels + 3
    + Context: server config, virtual + host
    + Override: Not + applicable
    + Status: Base
    + Module: mod_proxy
    + Compatibility: CacheDirLevels + is only available in Apache 1.1 and later. + +

    CacheDirLevels sets the number of levels of + subdirectories in the cache. Cached data will be saved this + many directory levels below CacheRoot.

    +
    + +

    CacheDirLength directive

    + Syntax: CacheDirLength + length
    + Default: CacheDirLength + 1
    + Context: server config, virtual + host
    + Override: Not + applicable
    + Status: Base
    + Module: mod_proxy
    + Compatibility: CacheDirLength + is only available in Apache 1.1 and later. + +

    CacheDirLength sets the number of characters in proxy cache + subdirectory names.

    +
    + +

    CacheDefaultExpire directive

    + Syntax: CacheDefaultExpire + hours
    + Default: + CacheDefaultExpire 1
    + Context: server config, virtual + host
    + Override: Not + applicable
    + Status: Base
    + Module: mod_proxy
    + Compatibility: + CacheDefaultExpire is only available in Apache 1.1 and later. + +

    If the document is fetched via a protocol that does not + support expiry times, then use the specified number of + hours as the expiry time. CacheMaxExpire does + not override this setting.

    +
    + +

    NoCache directive

    + Syntax: NoCache + *|word|host|domain [word|host|domain] + ...
    + Default: None
    + Context: server config, virtual + host
    + Override: Not + applicable
    + Status: Base
    + Module: mod_proxy
    + Compatibility: NoCache is only + available in Apache 1.1 and later. + +

    The NoCache directive specifies a list of words, hosts + and/or domains, separated by spaces. HTTP and non-passworded + FTP documents from matched words, hosts or domains are + not cached by the proxy server. The proxy module will + also attempt to determine IP addresses of list items which may + be hostnames during startup, and cache them for match test as + well. Example:

    +
    +  NoCache joes-garage.com some-host.co.uk bullwinkle.wotsamattau.edu
    +
    + 'bullwinkle.wotsamattau.edu' would also be matched if + referenced by IP address. + +

    Note that 'wotsamattau' would also be sufficient to match + 'wotsamattau.edu'.

    + +

    Note also that

    +
    +NoCache *
    +
    + disables caching completely. + +

    +

    + + + diff --git a/htdocs/manual/mod/mod_rewrite.html.en b/htdocs/manual/mod/mod_rewrite.html.en new file mode 100644 index 00000000000..0021777ec27 --- /dev/null +++ b/htdocs/manual/mod/mod_rewrite.html.en @@ -0,0 +1,2093 @@ + + + + + + + + + + Apache module mod_rewrite + + + + +
    + + +
    + + +

    Module mod_rewrite
    + URL Rewriting Engine

    + +

    This module provides a rule-based rewriting engine to + rewrite requested URLs on the fly.

    + +

    Status: Extension
    + Source File: + mod_rewrite.c
    + Module Identifier: + rewrite_module
    + Compatibility: Available in + Apache 1.2 and later.

    +
    +
    + + +

    Summary

    + +
    +
    +
    + ``The great thing about mod_rewrite is it gives you + all the configurability and flexibility of Sendmail. + The downside to mod_rewrite is that it gives you all + the configurability and flexibility of Sendmail.'' + + +
    + -- Brian Behlendorf
    + Apache Group +
    +
    +
    +
    + +
    +
    +
    + `` Despite the tons of examples and docs, + mod_rewrite is voodoo. Damned cool voodoo, but still + voodoo. '' + +
    + -- Brian Moore
    + bem@news.cmc.net +
    +
    +
    +
    + Welcome to mod_rewrite, the Swiss Army Knife of URL + manipulation! + +

    This module uses a rule-based rewriting engine (based on a + regular-expression parser) to rewrite requested URLs on the + fly. It supports an unlimited number of rules and an + unlimited number of attached rule conditions for each rule to + provide a really flexible and powerful URL manipulation + mechanism. The URL manipulations can depend on various tests, + for instance server variables, environment variables, HTTP + headers, time stamps and even external database lookups in + various formats can be used to achieve a really granular URL + matching.

    + +

    This module operates on the full URLs (including the + path-info part) both in per-server context + (httpd.conf) and per-directory context + (.htaccess) and can even generate query-string + parts on result. The rewritten result can lead to internal + sub-processing, external request redirection or even to an + internal proxy throughput.

    + +

    But all this functionality and flexibility has its + drawback: complexity. So don't expect to understand this + entire module in just one day.

    + +

    This module was invented and originally written in April + 1996
    + and gifted exclusively to the The Apache Group in July 1997 + by

    + +
    + Ralf S. + Engelschall
    + rse@engelschall.com
    + www.engelschall.com +
    +
    + +

    Table Of Contents

    + +

    Internal Processing

    + + + +

    Configuration Directives

    + + + Miscellaneous + + +
    + +
    +

    Internal + Processing

    +
    +
    + +

    The internal processing of this module is very complex but + needs to be explained once even to the average user to avoid + common mistakes and to let you exploit its full + functionality.

    + +

    API + Phases

    + +

    First you have to understand that when Apache processes a + HTTP request it does this in phases. A hook for each of these + phases is provided by the Apache API. Mod_rewrite uses two of + these hooks: the URL-to-filename translation hook which is + used after the HTTP request has been read but before any + authorization starts and the Fixup hook which is triggered + after the authorization phases and after the per-directory + config files (.htaccess) have been read, but + before the content handler is activated.

    + +

    So, after a request comes in and Apache has determined the + corresponding server (or virtual server) the rewriting engine + starts processing of all mod_rewrite directives from the + per-server configuration in the URL-to-filename phase. A few + steps later when the final data directories are found, the + per-directory configuration directives of mod_rewrite are + triggered in the Fixup phase. In both situations mod_rewrite + rewrites URLs either to new URLs or to filenames, although + there is no obvious distinction between them. This is a usage + of the API which was not intended to be this way when the API + was designed, but as of Apache 1.x this is the only way + mod_rewrite can operate. To make this point more clear + remember the following two points:

    + +
      +
    1. Although mod_rewrite rewrites URLs to URLs, URLs to + filenames and even filenames to filenames, the API + currently provides only a URL-to-filename hook. In Apache + 2.0 the two missing hooks will be added to make the + processing more clear. But this point has no drawbacks for + the user, it is just a fact which should be remembered: + Apache does more in the URL-to-filename hook than the API + intends for it.
    2. + +
    3. + Unbelievably mod_rewrite provides URL manipulations in + per-directory context, i.e., within + .htaccess files, although these are reached + a very long time after the URLs have been translated to + filenames. It has to be this way because + .htaccess files live in the filesystem, so + processing has already reached this stage. In other + words: According to the API phases at this time it is too + late for any URL manipulations. To overcome this chicken + and egg problem mod_rewrite uses a trick: When you + manipulate a URL/filename in per-directory context + mod_rewrite first rewrites the filename back to its + corresponding URL (which is usually impossible, but see + the RewriteBase directive below for the + trick to achieve this) and then initiates a new internal + sub-request with the new URL. This restarts processing of + the API phases. + +

      Again mod_rewrite tries hard to make this complicated + step totally transparent to the user, but you should + remember here: While URL manipulations in per-server + context are really fast and efficient, per-directory + rewrites are slow and inefficient due to this chicken and + egg problem. But on the other hand this is the only way + mod_rewrite can provide (locally restricted) URL + manipulations to the average user.

      +
    4. +
    + +

    Don't forget these two points!

    + +

    Ruleset + Processing

    + Now when mod_rewrite is triggered in these two API phases, it + reads the configured rulesets from its configuration + structure (which itself was either created on startup for + per-server context or during the directory walk of the Apache + kernel for per-directory context). Then the URL rewriting + engine is started with the contained ruleset (one or more + rules together with their conditions). The operation of the + URL rewriting engine itself is exactly the same for both + configuration contexts. Only the final result processing is + different. + +

    The order of rules in the ruleset is important because the + rewriting engine processes them in a special (and not very + obvious) order. The rule is this: The rewriting engine loops + through the ruleset rule by rule (RewriteRule + directives) and when a particular rule matches it optionally + loops through existing corresponding conditions + (RewriteCond directives). For historical reasons + the conditions are given first, and so the control flow is a + little bit long-winded. See Figure 1 for more details.

    + +
    + + + + + + + + +
    [Needs graphics capability to display]
    Figure 1: The + control flow through the rewriting ruleset
    +
    + +

    As you can see, first the URL is matched against the + Pattern of each rule. When it fails mod_rewrite + immediately stops processing this rule and continues with the + next rule. If the Pattern matches, mod_rewrite looks + for corresponding rule conditions. If none are present, it + just substitutes the URL with a new value which is + constructed from the string Substitution and goes on + with its rule-looping. But if conditions exist, it starts an + inner loop for processing them in the order that they are + listed. For conditions the logic is different: we don't match + a pattern against the current URL. Instead we first create a + string TestString by expanding variables, + back-references, map lookups, etc. and then we try + to match CondPattern against it. If the pattern + doesn't match, the complete set of conditions and the + corresponding rule fails. If the pattern matches, then the + next condition is processed until no more conditions are + available. If all conditions match, processing is continued + with the substitution of the URL with + Substitution.

    + +

    Quoting Special + Characters

    + +

    As of Apache 1.3.20, special characters in + TestString and Substitution strings can be + escaped (that is, treated as normal characters without their + usual special meaning) by prefixing them with a slosh ('\') + character. In other words, you can include an actual + dollar-sign character in a Substitution string by + using '\$'; this keeps mod_rewrite from trying + to treat it as a backreference.

    + +

    Regex + Back-Reference Availability

    + One important thing here has to be remembered: Whenever you + use parentheses in Pattern or in one of the + CondPattern, back-references are internally created + which can be used with the strings $N and + %N (see below). These are available for creating + the strings Substitution and TestString. + Figure 2 shows to which locations the back-references are + transfered for expansion. + +
    + + + + + + + + +
    [Needs graphics capability to display]
    Figure 2: The + back-reference flow through a rule
    +
    + +

    We know this was a crash course on mod_rewrite's internal + processing. But you will benefit from this knowledge when + reading the following documentation of the available + directives.

    +
    + +
    +

    Configuration Directives

    +
    +
    + +

    RewriteEngine

    + Syntax: RewriteEngine + on|off
    + Default: RewriteEngine + off
    + Context: server config, + virtual host, directory, .htaccess
    + Override: FileInfo
    + Status: Extension
    + Module: mod_rewrite.c
    + Compatibility: Apache + 1.2
    + + +

    The RewriteEngine directive enables or + disables the runtime rewriting engine. If it is set to + off this module does no runtime processing at + all. It does not even update the SCRIPT_URx + environment variables.

    + +

    Use this directive to disable the module instead of + commenting out all the RewriteRule + directives!

    + +

    Note that, by default, rewrite configurations are not + inherited. This means that you need to have a + RewriteEngine on directive for each virtual host + in which you wish to use it.

    +
    + +

    RewriteOptions

    + Syntax: RewriteOptions + Option
    + Default: RewriteOptions + MaxRedirects=10
    + Context: server config, + virtual host, directory, .htaccess
    + Override: FileInfo
    + Status: Extension
    + Module: mod_rewrite.c
    + Compatibility: Apache + 1.2; MaxRedirects is available in Apache 1.3.28 and + later
    + + +

    The RewriteOptions directive sets some + special options for the current per-server or per-directory + configuration. The Option strings can be one of the + following:

    + +
    +
    inherit
    +
    This forces the current configuration to inherit the + configuration of the parent. In per-virtual-server context + this means that the maps, conditions and rules of the main + server are inherited. In per-directory context this means + that conditions and rules of the parent directory's + .htaccess configuration are inherited.
    + +
    MaxRedirects=number
    +
    In order to prevent endless loops of internal redirects + issued by per-directory RewriteRules, + mod_rewrite aborts the request after reaching a + maximum number of such redirects and responds with an 500 Internal + Server Error. If you really need more internal redirects than 10 + per request, you may increase the default to the desired value.
    +
    +
    + +

    RewriteLog

    + Syntax: RewriteLog + file-path
    + Default: None
    + Context: server config, + virtual host
    + Override: Not + applicable
    + Status: Extension
    + Module: mod_rewrite.c
    + Compatibility: Apache + 1.2
    + + +

    The RewriteLog directive sets the name of the + file to which the server logs any rewriting actions it + performs. If the name does not begin with a slash + ('/') then it is assumed to be relative to the + Server Root. The directive should occur only once + per server config.

    + + + + + +
    Note: To disable the logging of + rewriting actions it is not recommended to set + file-path to /dev/null, because + although the rewriting engine does not then output to a + logfile it still creates the logfile output internally. + This will slow down the server with no advantage + to the administrator! To disable logging either + remove or comment out the RewriteLog + directive or use RewriteLogLevel 0!
    + + + + + +
    Security: See the Apache Security + Tips document for details on why your security could + be compromised if the directory where logfiles are stored + is writable by anyone other than the user that starts the + server.
    + +

    Example:

    + +
    +
    +RewriteLog "/usr/local/var/apache/logs/rewrite.log"
    +
    +
    +
    + +

    RewriteLogLevel

    + Syntax: RewriteLogLevel + Level
    + Default: + RewriteLogLevel 0
    + Context: server config, + virtual host
    + Override: Not + applicable
    + Status: Extension
    + Module: mod_rewrite.c
    + Compatibility: Apache + 1.2
    + + +

    The RewriteLogLevel directive sets the + verbosity level of the rewriting logfile. The default level 0 + means no logging, while 9 or more means that practically all + actions are logged.

    + +

    To disable the logging of rewriting actions simply set + Level to 0. This disables all rewrite action + logs.

    + + + + + +
    Notice: Using a high value for + Level will slow down your Apache server + dramatically! Use the rewriting logfile at a + Level greater than 2 only for debugging!
    + +

    Example:

    + +
    +
    +RewriteLogLevel 3
    +
    +
    +
    + +

    RewriteLock

    + Syntax: RewriteLock + file-path
    + Default: None
    + Context: server config
    + Override: Not + applicable
    + Status: Extension
    + Module: mod_rewrite.c
    + Compatibility: Apache + 1.3
    + + +

    This directive sets the filename for a synchronization + lockfile which mod_rewrite needs to communicate with + RewriteMap programs. Set this lockfile + to a local path (not on a NFS-mounted device) when you want + to use a rewriting map-program. It is not required for other + types of rewriting maps.

    +
    + +

    RewriteMap

    + Syntax: RewriteMap + MapName MapType:MapSource
    + Default: not used per + default
    + Context: server config, + virtual host
    + Override: Not + applicable
    + Status: Extension
    + Module: mod_rewrite.c
    + Compatibility: Apache 1.2 + (partially), Apache 1.3
    + + +

    The RewriteMap directive defines a + Rewriting Map which can be used inside rule + substitution strings by the mapping-functions to + insert/substitute fields through a key lookup. The source of + this lookup can be of various types.

    + +

    The MapName is + the name of the map and will be used to specify a + mapping-function for the substitution strings of a rewriting + rule via one of the following constructs:

    + +
    + ${ MapName : + LookupKey }
    + ${ MapName : + LookupKey | DefaultValue + }
    +
    + When such a construct occurs the map MapName is + consulted and the key LookupKey is looked-up. If the + key is found, the map-function construct is substituted by + SubstValue. If the key is not found then it is + substituted by DefaultValue or by the empty string + if no DefaultValue was specified. + +

    The following combinations for MapType and + MapSource can be used:

    + +
      +
    • + Standard Plain Text
      + MapType: txt, MapSource: Unix filesystem + path to valid regular file + +

      This is the standard rewriting map feature where the + MapSource is a plain ASCII file containing + either blank lines, comment lines (starting with a '#' + character) or pairs like the following - one per + line.

      + +
      + MatchingKey + SubstValue +
      + +

      Example:

      + + + + + +
      +
      +##
      +##  map.txt -- rewriting map
      +##
      +
      +Ralf.S.Engelschall    rse   # Bastard Operator From Hell
      +Mr.Joe.Average        joe   # Mr. Average
      +
      +
      + + + + + +
      +
      +RewriteMap real-to-user txt:/path/to/file/map.txt
      +
      +
      +
    • + +
    • + Randomized Plain Text
      + MapType: rnd, MapSource: Unix filesystem + path to valid regular file + +

      This is identical to the Standard Plain Text variant + above but with a special post-processing feature: After + looking up a value it is parsed according to contained + ``|'' characters which have the meaning of + ``or''. In other words they indicate a set of + alternatives from which the actual returned value is + chosen randomly. Although this sounds crazy and useless, + it was actually designed for load balancing in a reverse + proxy situation where the looked up values are server + names. Example:

      + + + + + +
      +
      +##
      +##  map.txt -- rewriting map
      +##
      +
      +static   www1|www2|www3|www4
      +dynamic  www5|www6
      +
      +
      + + + + + +
      +
      +RewriteMap servers rnd:/path/to/file/map.txt
      +
      +
      +
    • + +
    • + Hash File
      + MapType: dbm, MapSource: Unix filesystem + path to valid regular file + +

      Here the source is a binary NDBM format file + containing the same contents as a Plain Text + format file, but in a special representation which is + optimized for really fast lookups. You can create such a + file with any NDBM tool or with the following Perl + script:

      + + + + + +
      +
      +#!/path/to/bin/perl
      +##
      +##  txt2dbm -- convert txt map to dbm format
      +##
      +
      +use NDBM_File;
      +use Fcntl;
      +
      +($txtmap, $dbmmap) = @ARGV;
      +
      +open(TXT, "<$txtmap") or die "Couldn't open $txtmap!\n";
      +tie (%DB, 'NDBM_File', $dbmmap,O_RDWR|O_TRUNC|O_CREAT, 0644) or die "Couldn't create $dbmmap!\n";
      +
      +while (<TXT>) {
      +  next if (/^\s*#/ or /^\s*$/);
      +  $DB{$1} = $2 if (/^\s*(\S+)\s+(\S+)/);
      +}
      +
      +untie %DB;
      +close(TXT);
      +
      +
      + + + + + +
      +
      +$ txt2dbm map.txt map.db
      +
      +
      +
    • + +
    • + Internal Function
      + MapType: int, MapSource: Internal Apache + function + +

      Here the source is an internal Apache function. + Currently you cannot create your own, but the following + functions already exists:

      + +
        +
      • toupper:
        + Converts the looked up key to all upper case.
      • + +
      • tolower:
        + Converts the looked up key to all lower case.
      • + +
      • escape:
        + Translates special characters in the looked up key to + hex-encodings.
      • + +
      • unescape:
        + Translates hex-encodings in the looked up key back to + special characters.
      • +
      +
    • + +
    • + External Rewriting Program
      + MapType: prg, MapSource: Unix filesystem + path to valid regular file + +

      Here the source is a program, not a map file. To + create it you can use the language of your choice, but + the result has to be a executable (i.e., either + object-code or a script with the magic cookie trick + '#!/path/to/interpreter' as the first + line).

      + +

      This program is started once at startup of the Apache + servers and then communicates with the rewriting engine + over its stdin and stdout + file-handles. For each map-function lookup it will + receive the key to lookup as a newline-terminated string + on stdin. It then has to give back the + looked-up value as a newline-terminated string on + stdout or the four-character string + ``NULL'' if it fails (i.e., there + is no corresponding value for the given key). A trivial + program which will implement a 1:1 map (i.e., + key == value) could be:

      + + + + + +
      +
      +#!/usr/bin/perl
      +$| = 1;
      +while (<STDIN>) {
      +    # ...put here any transformations or lookups...
      +    print $_;
      +}
      +
      +
      + +

      But be very careful:
      +

      + +
        +
      1. ``Keep it simple, stupid'' (KISS), because + if this program hangs it will hang the Apache server + when the rule occurs.
      2. + +
      3. Avoid one common mistake: never do buffered I/O on + stdout! This will cause a deadloop! Hence + the ``$|=1'' in the above example...
      4. + +
      5. Use the RewriteLock directive to + define a lockfile mod_rewrite can use to synchronize + the communication to the program. By default no such + synchronization takes place.
      6. +
      +
    • +
    + The RewriteMap directive can occur more than + once. For each mapping-function use one + RewriteMap directive to declare its rewriting + mapfile. While you cannot declare a map in + per-directory context it is of course possible to + use this map in per-directory context. + + + + + +
    Note: For plain text and DBM format + files the looked-up keys are cached in-core until the + mtime of the mapfile changes or the server + does a restart. This way you can have map-functions in + rules which are used for every request. + This is no problem, because the external lookup only + happens once!
    +
    + +

    RewriteBase

    + Syntax: RewriteBase + URL-path
    + Default: default is the + physical directory path
    + Context: directory, + .htaccess
    + Override: + FileInfo
    + Status: Extension
    + Module: mod_rewrite.c
    + Compatibility: Apache + 1.2
    + + +

    The RewriteBase directive explicitly sets the + base URL for per-directory rewrites. As you will see below, + RewriteRule can be used in per-directory config + files (.htaccess). There it will act locally, + i.e., the local directory prefix is stripped at this + stage of processing and your rewriting rules act only on the + remainder. At the end it is automatically added back to the + path.

    + +

    When a substitution occurs for a new URL, this module has + to re-inject the URL into the server processing. To be able + to do this it needs to know what the corresponding URL-prefix + or URL-base is. By default this prefix is the corresponding + filepath itself. But at most websites URLs are NOT + directly related to physical filename paths, so this + assumption will usually be wrong! There you have to + use the RewriteBase directive to specify the + correct URL-prefix.

    + + + + + +
    Notice: If your webserver's URLs are + not directly related to physical file + paths, you have to use RewriteBase in every + .htaccess files where you want to use + RewriteRule directives.
    + +

    Example:

    + +
    + Assume the following per-directory config file: + + + + + +
    +
    +#
    +#  /abc/def/.htaccess -- per-dir config file for directory /abc/def
    +#  Remember: /abc/def is the physical path of /xyz, i.e., the server
    +#            has a 'Alias /xyz /abc/def' directive e.g.
    +#
    +
    +RewriteEngine On
    +
    +#  let the server know that we were reached via /xyz and not
    +#  via the physical path prefix /abc/def
    +RewriteBase   /xyz
    +
    +#  now the rewriting rules
    +RewriteRule   ^oldstuff\.html$  newstuff.html
    +
    +
    + +

    In the above example, a request to + /xyz/oldstuff.html gets correctly rewritten to + the physical file /abc/def/newstuff.html.

    + + + + + +
    + Note - For Apache + hackers:
    + The following list gives detailed information about + the internal processing steps:
    +
    +Request:
    +  /xyz/oldstuff.html
    +
    +Internal Processing:
    +  /xyz/oldstuff.html     -> /abc/def/oldstuff.html  (per-server Alias)
    +  /abc/def/oldstuff.html -> /abc/def/newstuff.html  (per-dir    RewriteRule)
    +  /abc/def/newstuff.html -> /xyz/newstuff.html      (per-dir    RewriteBase)
    +  /xyz/newstuff.html     -> /abc/def/newstuff.html  (per-server Alias)
    +
    +Result:
    +  /abc/def/newstuff.html
    +
    +
    + This seems very complicated but is + the correct Apache internal processing, because the + per-directory rewriting comes too late in the + process. So, when it occurs the (rewritten) request + has to be re-injected into the Apache kernel! BUT: + While this seems like a serious overhead, it really + isn't, because this re-injection happens fully + internally to the Apache server and the same + procedure is used by many other operations inside + Apache. So, you can be sure the design and + implementation is correct. +
    +
    +
    + +

    RewriteCond

    + Syntax: RewriteCond + TestString CondPattern
    + Default: None
    + Context: server config, + virtual host, directory, .htaccess
    + Override: + FileInfo
    + Status: Extension
    + Module: mod_rewrite.c
    + Compatibility: Apache 1.2 + (partially), Apache 1.3
    + + +

    The RewriteCond directive defines a rule + condition. Precede a RewriteRule directive with + one or more RewriteCond directives. The + following rewriting rule is only used if its pattern matches + the current state of the URI and if these + additional conditions apply too.

    + +

    TestString is a string which can contains the + following expanded constructs in addition to plain text:

    + +
      +
    • + RewriteRule backreferences: These are + backreferences of the form + +
      + $N +
      + (0 <= N <= 9) which provide access to the grouped + parts (parenthesis!) of the pattern from the + corresponding RewriteRule directive (the one + following the current bunch of RewriteCond + directives). +
    • + +
    • + RewriteCond backreferences: These are + backreferences of the form + +
      + %N +
      + (1 <= N <= 9) which provide access to the grouped + parts (parentheses!) of the pattern from the last matched + RewriteCond directive in the current bunch + of conditions. +
    • + +
    • + RewriteMap expansions: These are + expansions of the form + +
      + ${mapname:key|default} +
      + See the documentation for + RewriteMap for more details. +
    • + +
    • + Server-Variables: These are variables of + the form + +
      + %{ NAME_OF_VARIABLE + } +
      + where NAME_OF_VARIABLE can be a string taken + from the following list: + + + + + + + + + + + + + + + +
      + HTTP headers: + +

      HTTP_USER_AGENT
      + HTTP_REFERER
      + HTTP_COOKIE
      + HTTP_FORWARDED
      + HTTP_HOST
      + HTTP_PROXY_CONNECTION
      + HTTP_ACCEPT
      +

      +
      + connection & request: + +

      REMOTE_ADDR
      + REMOTE_HOST
      + REMOTE_USER
      + REMOTE_IDENT
      + REQUEST_METHOD
      + SCRIPT_FILENAME
      + PATH_INFO
      + QUERY_STRING
      + AUTH_TYPE
      +

      +
      + server internals: + +

      DOCUMENT_ROOT
      + SERVER_ADMIN
      + SERVER_NAME
      + SERVER_ADDR
      + SERVER_PORT
      + SERVER_PROTOCOL
      + SERVER_SOFTWARE
      +

      +
      + system stuff: + +

      TIME_YEAR
      + TIME_MON
      + TIME_DAY
      + TIME_HOUR
      + TIME_MIN
      + TIME_SEC
      + TIME_WDAY
      + TIME
      +

      +
      + specials: + +

      API_VERSION
      + THE_REQUEST
      + REQUEST_URI
      + REQUEST_FILENAME
      + IS_SUBREQ
      +

      +
      + + + + + +
      +

      Notice: These variables all + correspond to the similarly named HTTP + MIME-headers, C variables of the Apache server or + struct tm fields of the Unix system. + Most are documented elsewhere in the Manual or in + the CGI specification. Those that are special to + mod_rewrite include:

      + +
      +
      IS_SUBREQ
      + +
      Will contain the text "true" if the request + currently being processed is a sub-request, + "false" otherwise. Sub-requests may be generated + by modules that need to resolve additional files + or URIs in order to complete their tasks.
      + +
      API_VERSION
      + +
      This is the version of the Apache module API + (the internal interface between server and + module) in the current httpd build, as defined in + include/ap_mmn.h. The module API version + corresponds to the version of Apache in use (in + the release version of Apache 1.3.14, for + instance, it is 19990320:10), but is mainly of + interest to module authors.
      + +
      THE_REQUEST
      + +
      The full HTTP request line sent by the + browser to the server (e.g., "GET + /index.html HTTP/1.1"). This does not + include any additional headers sent by the + browser.
      + +
      REQUEST_URI
      + +
      The resource requested in the HTTP request + line. (In the example above, this would be + "/index.html".)
      + +
      REQUEST_FILENAME
      + +
      The full local filesystem path to the file or + script matching the request.
      +
      +
      +
    • +
    + +

    Special Notes:

    + +
      +
    1. The variables SCRIPT_FILENAME and REQUEST_FILENAME + contain the same value, i.e., the value of the + filename field of the internal + request_rec structure of the Apache server. + The first name is just the commonly known CGI variable name + while the second is the consistent counterpart to + REQUEST_URI (which contains the value of the + uri field of request_rec).
    2. + +
    3. There is the special format: + %{ENV:variable} where variable can be + any environment variable. This is looked-up via internal + Apache structures and (if not found there) via + getenv() from the Apache server process.
    4. + +
    5. There is the special format: + %{HTTP:header} where header can be + any HTTP MIME-header name. This is looked-up from the HTTP + request. Example: %{HTTP:Proxy-Connection} is + the value of the HTTP header + ``Proxy-Connection:''.
    6. + +
    7. There is the special format + %{LA-U:variable} for look-aheads which perform + an internal (URL-based) sub-request to determine the final + value of variable. Use this when you want to use a + variable for rewriting which is actually set later in an + API phase and thus is not available at the current stage. + For instance when you want to rewrite according to the + REMOTE_USER variable from within the + per-server context (httpd.conf file) you have + to use %{LA-U:REMOTE_USER} because this + variable is set by the authorization phases which come + after the URL translation phase where mod_rewrite + operates. On the other hand, because mod_rewrite implements + its per-directory context (.htaccess file) via + the Fixup phase of the API and because the authorization + phases come before this phase, you just can use + %{REMOTE_USER} there.
    8. + +
    9. There is the special format: + %{LA-F:variable} which performs an internal + (filename-based) sub-request to determine the final value + of variable. Most of the time this is the same as + LA-U above.
    10. +
    + +

    CondPattern is the condition pattern, + i.e., a regular expression which is applied to the + current instance of the TestString, i.e., + TestString is evaluated and then matched against + CondPattern.

    + +

    Remember: CondPattern is a + standard Extended Regular Expression with some + additions:

    + +
      +
    1. You can prefix the pattern string with a + '!' character (exclamation mark) to specify a + non-matching pattern.
    2. + +
    3. + There are some special variants of CondPatterns. + Instead of real regular expression strings you can also + use one of the following: + +
        +
      • '<CondPattern' (is lexically + lower)
        + Treats the CondPattern as a plain string and + compares it lexically to TestString. True if + TestString is lexically lower than + CondPattern.
      • + +
      • '>CondPattern' (is lexically + greater)
        + Treats the CondPattern as a plain string and + compares it lexically to TestString. True if + TestString is lexically greater than + CondPattern.
      • + +
      • '=CondPattern' (is lexically + equal)
        + Treats the CondPattern as a plain string and + compares it lexically to TestString. True if + TestString is lexically equal to + CondPattern, i.e the two strings are exactly + equal (character by character). If CondPattern + is just "" (two quotation marks) this + compares TestString to the empty string.
      • + +
      • '-d' (is + directory)
        + Treats the TestString as a pathname and tests + if it exists and is a directory.
      • + +
      • '-f' (is regular + file)
        + Treats the TestString as a pathname and tests + if it exists and is a regular file.
      • + +
      • '-s' (is regular file with + size)
        + Treats the TestString as a pathname and tests + if it exists and is a regular file with size greater + than zero.
      • + +
      • '-l' (is symbolic + link)
        + Treats the TestString as a pathname and tests + if it exists and is a symbolic link.
      • + +
      • '-F' (is existing file via + subrequest)
        + Checks if TestString is a valid file and + accessible via all the server's currently-configured + access controls for that path. This uses an internal + subrequest to determine the check, so use it with care + because it decreases your servers performance!
      • + +
      • '-U' (is existing URL via + subrequest)
        + Checks if TestString is a valid URL and + accessible via all the server's currently-configured + access controls for that path. This uses an internal + subrequest to determine the check, so use it with care + because it decreases your server's performance!
      • +
      + + + + + +
      Notice: All of these tests can + also be prefixed by an exclamation mark ('!') to + negate their meaning.
      +
    4. +
    + +

    Additionally you can set special flags for + CondPattern by appending

    + +
    + [flags] +
    + as the third argument to the RewriteCond + directive. Flags is a comma-separated list of the + following flags: + +
      +
    • 'nocase|NC' + (no case)
      + This makes the test case-insensitive, i.e., there + is no difference between 'A-Z' and 'a-z' both in the + expanded TestString and the CondPattern. + This flag is effective only for comparisons between + TestString and CondPattern. It has no + effect on filesystem and subrequest checks.
    • + +
    • + 'ornext|OR' + (or next condition)
      + Use this to combine rule conditions with a local OR + instead of the implicit AND. Typical example: + +
      +
      +RewriteCond %{REMOTE_HOST}  ^host1.*  [OR]
      +RewriteCond %{REMOTE_HOST}  ^host2.*  [OR]
      +RewriteCond %{REMOTE_HOST}  ^host3.*
      +RewriteRule ...some special stuff for any of these hosts...
      +
      +
      + Without this flag you would have to write the cond/rule + three times. +
    • +
    + +

    Example:

    + +
    + To rewrite the Homepage of a site according to the + ``User-Agent:'' header of the request, you can + use the following: + +
    +
    +RewriteCond  %{HTTP_USER_AGENT}  ^Mozilla.*
    +RewriteRule  ^/$                 /homepage.max.html  [L]
    +
    +RewriteCond  %{HTTP_USER_AGENT}  ^Lynx.*
    +RewriteRule  ^/$                 /homepage.min.html  [L]
    +
    +RewriteRule  ^/$                 /homepage.std.html  [L]
    +
    +
    + Interpretation: If you use Netscape Navigator as your + browser (which identifies itself as 'Mozilla'), then you + get the max homepage, which includes Frames, etc. + If you use the Lynx browser (which is Terminal-based), then + you get the min homepage, which contains no images, no + tables, etc. If you use any other browser you get + the standard homepage. +
    +
    + +

    RewriteRule

    + Syntax: RewriteRule + Pattern Substitution
    + Default: None
    + Context: server config, + virtual host, directory, .htaccess
    + Override: + FileInfo
    + Status: Extension
    + Module: mod_rewrite.c
    + Compatibility: Apache 1.2 + (partially), Apache 1.3
    + + +

    The RewriteRule directive is the real + rewriting workhorse. The directive can occur more than once. + Each directive then defines one single rewriting rule. The + definition order of these rules is + important, because this order is used when + applying the rules at run-time.

    + +

    Pattern can + be (for Apache 1.1.x a System V8 and for Apache 1.2.x and + later a POSIX) regular + expression which gets applied to the current URL. Here + ``current'' means the value of the URL when this rule gets + applied. This may not be the originally requested URL, + because any number of rules may already + have matched and made alterations to it.

    + +

    Some hints about the syntax of regular expressions:

    + + + + + +
    +
    +Text:
    +  .           Any single character
    +  [chars]     Character class: One  of chars
    +  [^chars]    Character class: None of chars
    +  text1|text2 Alternative: text1 or text2
    +
    +Quantifiers:
    +  ?           0 or 1 of the preceding text
    +  *           0 or N of the preceding text (N > 0)
    +  +           1 or N of the preceding text (N > 1)
    +
    +Grouping:
    +  (text)      Grouping of text
    +              (either to set the borders of an alternative or
    +              for making backreferences where the Nth group can 
    +              be used on the RHS of a RewriteRule with $N)
    +
    +Anchors:
    +  ^           Start of line anchor
    +  $           End   of line anchor
    +
    +Escaping:
    +  \char       escape that particular char
    +              (for instance to specify the chars ".[]()" etc.)
    +
    +
    + +

    For more information about regular expressions either have + a look at your local regex(3) manpage or its + src/regex/regex.3 copy in the Apache 1.3 + distribution. If you are interested in more detailed + information about regular expressions and their variants + (POSIX regex, Perl regex, etc.) have a look at the + following dedicated book on this topic:

    + +
    + Mastering Regular Expressions
    + Jeffrey E.F. Friedl
    + Nutshell Handbook Series
    + O'Reilly & Associates, Inc. 1997
    + ISBN 1-56592-257-3
    +
    + +

    Additionally in mod_rewrite the NOT character + ('!') is a possible pattern prefix. This gives + you the ability to negate a pattern; to say, for instance: + ``if the current URL does NOT match this + pattern''. This can be used for exceptional cases, where + it is easier to match the negative pattern, or as a last + default rule.

    + + + + + +
    Notice: When using the NOT character + to negate a pattern you cannot have grouped wildcard + parts in the pattern. This is impossible because when the + pattern does NOT match, there are no contents for the + groups. In consequence, if negated patterns are used, you + cannot use $N in the substitution + string!
    + +

    Substitution of a + rewriting rule is the string which is substituted for (or + replaces) the original URL for which Pattern + matched. Beside plain text you can use

    + +
      +
    1. back-references $N to the RewriteRule + pattern
    2. + +
    3. back-references %N to the last matched + RewriteCond pattern
    4. + +
    5. server-variables as in rule condition test-strings + (%{VARNAME})
    6. + +
    7. mapping-function calls + (${mapname:key|default})
    8. +
    + Back-references are $N + (N=0..9) identifiers which will be replaced + by the contents of the Nth group of the + matched Pattern. The server-variables are the same + as for the TestString of a RewriteCond + directive. The mapping-functions come from the + RewriteMap directive and are explained there. + These three types of variables are expanded in the order of + the above list. + +

    As already mentioned above, all the rewriting rules are + applied to the Substitution (in the order of + definition in the config file). The URL is completely + replaced by the Substitution and the + rewriting process goes on until there are no more rules + unless explicitly terminated by a + L flag - see below.

    + +

    There is a special substitution string named + '-' which means: NO + substitution! Sounds silly? No, it is useful to + provide rewriting rules which only match + some URLs but do no substitution, e.g., in + conjunction with the C (chain) flag to be + able to have more than one pattern to be applied before a + substitution occurs.

    + +

    One more note: You can even create URLs in the + substitution string containing a query string part. Just use + a question mark inside the substitution string to indicate + that the following stuff should be re-injected into the + QUERY_STRING. When you want to erase an existing query + string, end the substitution string with just the question + mark.

    + + + + + +
    Note: There is a special feature: + When you prefix a substitution field with + http://thishost[:thisport] + then mod_rewrite automatically strips it + out. This auto-reduction on implicit external redirect + URLs is a useful and important feature when used in + combination with a mapping-function which generates the + hostname part. Have a look at the first example in the + example section below to understand this.
    + + + + + +
    Remember: An unconditional external + redirect to your own server will not work with the prefix + http://thishost because of this feature. To + achieve such a self-redirect, you have to use the + R-flag (see below).
    + +

    Additionally you can set special flags for + Substitution by appending

    + +
    + [flags] +
    + as the third argument to the RewriteRule + directive. Flags is a comma-separated list of the + following flags: + +
      +
    • + 'redirect|R + [=code]' (force redirect)
      + Prefix Substitution with + http://thishost[:thisport]/ (which makes the + new URL a URI) to force a external redirection. If no + code is given a HTTP response of 302 (MOVED + TEMPORARILY) is used. If you want to use other response + codes in the range 300-400 just specify them as a number + or use one of the following symbolic names: + temp (default), permanent, + seeother. Use it for rules which should + canonicalize the URL and give it back to the client, + e.g., translate ``/~'' into + ``/u/'' or always append a slash to + /u/user, etc.
      + + +

      Note: When you use this flag, make + sure that the substitution field is a valid URL! If not, + you are redirecting to an invalid location! And remember + that this flag itself only prefixes the URL with + http://thishost[:thisport]/, rewriting + continues. Usually you also want to stop and do the + redirection immediately. To stop the rewriting you also + have to provide the 'L' flag.

      +
    • + +
    • 'forbidden|F' (force URL + to be forbidden)
      + This forces the current URL to be forbidden, + i.e., it immediately sends back a HTTP response of + 403 (FORBIDDEN). Use this flag in conjunction with + appropriate RewriteConds to conditionally block some + URLs.
    • + +
    • 'gone|G' (force URL to be + gone)
      + This forces the current URL to be gone, i.e., it + immediately sends back a HTTP response of 410 (GONE). Use + this flag to mark pages which no longer exist as gone.
    • + +
    • + 'proxy|P' (force + proxy)
      + This flag forces the substitution part to be internally + forced as a proxy request and immediately (i.e., + rewriting rule processing stops here) put through the proxy module. You have to make + sure that the substitution string is a valid URI + (e.g., typically starting with + http://hostname) which can be + handled by the Apache proxy module. If not you get an + error from the proxy module. Use this flag to achieve a + more powerful implementation of the ProxyPass directive, + to map some remote stuff into the namespace of the local + server. + +

      Notice: To use this functionality make sure you have + the proxy module compiled into your Apache server + program. If you don't know please check whether + mod_proxy.c is part of the ``httpd + -l'' output. If yes, this functionality is + available to mod_rewrite. If not, then you first have to + rebuild the ``httpd'' program with mod_proxy + enabled.

      +
    • + +
    • 'last|L' + (last rule)
      + Stop the rewriting process here and don't apply any more + rewriting rules. This corresponds to the Perl + last command or the break command + from the C language. Use this flag to prevent the currently + rewritten URL from being rewritten further by following + rules. For example, use it to rewrite the root-path URL + ('/') to a real one, e.g., + '/e/www/'.
    • + +
    • 'next|N' + (next round)
      + Re-run the rewriting process (starting again with the + first rewriting rule). Here the URL to match is again not + the original URL but the URL from the last rewriting rule. + This corresponds to the Perl next command or + the continue command from the C language. Use + this flag to restart the rewriting process, i.e., + to immediately go to the top of the loop.
      + But be careful not to create an infinite + loop!
    • + +
    • 'chain|C' + (chained with next rule)
      + This flag chains the current rule with the next rule + (which itself can be chained with the following rule, + etc.). This has the following effect: if a rule + matches, then processing continues as usual, i.e., + the flag has no effect. If the rule does + not match, then all following chained + rules are skipped. For instance, use it to remove the + ``.www'' part inside a per-directory rule set + when you let an external redirect happen (where the + ``.www'' part should not to occur!).
    • + +
    • + 'type|T=MIME-type' + (force MIME type)
      + Force the MIME-type of the target file to be + MIME-type. For instance, this can be used to + simulate the mod_alias directive + ScriptAlias which internally forces all files + inside the mapped directory to have a MIME type of + ``application/x-httpd-cgi''.
    • + +
    • + 'nosubreq|NS' (used only if + no internal + sub-request)
      + This flag forces the rewriting engine to skip a + rewriting rule if the current request is an internal + sub-request. For instance, sub-requests occur internally + in Apache when mod_include tries to find out + information about possible directory default files + (index.xxx). On sub-requests it is not + always useful and even sometimes causes a failure to if + the complete set of rules are applied. Use this flag to + exclude some rules.
      + + +

      Use the following rule for your decision: whenever you + prefix some URLs with CGI-scripts to force them to be + processed by the CGI-script, the chance is high that you + will run into problems (or even overhead) on + sub-requests. In these cases, use this flag.

      +
    • + +
    • 'nocase|NC' + (no case)
      + This makes the Pattern case-insensitive, + i.e., there is no difference between 'A-Z' and + 'a-z' when Pattern is matched against the current + URL.
    • + +
    • 'qsappend|QSA' + (query string + append)
      + This flag forces the rewriting engine to append a query + string part in the substitution string to the existing one + instead of replacing it. Use this when you want to add more + data to the query string via a rewrite rule.
    • + +
    • + 'noescape|NE' + (no URI escaping of + output)
      + This flag keeps mod_rewrite from applying the usual URI + escaping rules to the result of a rewrite. Ordinarily, + special characters (such as '%', '$', ';', and so on) + will be escaped into their hexcode equivalents ('%25', + '%24', and '%3B', respectively); this flag prevents this + from being done. This allows percent symbols to appear in + the output, as in +
      +    RewriteRule /foo/(.*) /bar?arg=P1\%3d$1 [R,NE]
      +   
      +
      + which would turn '/foo/zed' into a safe + request for '/bar?arg=P1=zed'. + + + + + +
      Notice: The + noescape flag is only available with + Apache 1.3.20 and later versions.
      +
    • + +
    • + 'passthrough|PT' + (pass through to next + handler)
      + This flag forces the rewriting engine to set the + uri field of the internal + request_rec structure to the value of the + filename field. This flag is just a hack to + be able to post-process the output of + RewriteRule directives by + Alias, ScriptAlias, + Redirect, etc. directives from + other URI-to-filename translators. A trivial example to + show the semantics: If you want to rewrite + /abc to /def via the rewriting + engine of mod_rewrite and then + /def to /ghi with + mod_alias: +
      +    RewriteRule ^/abc(.*)  /def$1 [PT]
      +    Alias       /def       /ghi
      +   
      +
      + If you omit the PT flag then + mod_rewrite will do its job fine, + i.e., it rewrites uri=/abc/... to + filename=/def/... as a full API-compliant + URI-to-filename translator should do. Then + mod_alias comes and tries to do a + URI-to-filename transition which will not work. + +

      Note: You have to use this flag if you want to + intermix directives of different modules which contain + URL-to-filename translators. The typical example + is the use of mod_alias and + mod_rewrite..

      +
    • + +
    • 'skip|S=num' + (skip next rule(s))
      + This flag forces the rewriting engine to skip the next + num rules in sequence when the current rule + matches. Use this to make pseudo if-then-else constructs: + The last rule of the then-clause becomes + skip=N where N is the number of rules in the + else-clause. (This is not the same as the + 'chain|C' flag!)
    • + +
    • + 'env|E=VAR:VAL' + (set environment variable)
      + This forces an environment variable named VAR to + be set to the value VAL, where VAL can + contain regexp backreferences $N and + %N which will be expanded. You can use this + flag more than once to set more than one variable. The + variables can be later dereferenced in many situations, but + usually from within XSSI (via <!--#echo + var="VAR"-->) or CGI (e.g. + $ENV{'VAR'}). Additionally you can dereference + it in a following RewriteCond pattern via + %{ENV:VAR}. Use this to strip but remember + information from URLs.
    • +
    + + + + + +
    + Note: Never forget that + Pattern is applied to a complete URL in + per-server configuration files. But in + per-directory configuration files, the per-directory + prefix (which always is the same for a specific + directory!) is automatically removed for the + pattern matching and automatically added after + the substitution has been done. This feature + is essential for many sorts of rewriting, because + without this prefix stripping you have to match the + parent directory which is not always possible. + +

    There is one exception: If a substitution string + starts with ``http://'' then the directory + prefix will not be added and an + external redirect or proxy throughput (if flag + P is used!) is forced!

    +
    + + + + + +
    Note: To enable the rewriting engine + for per-directory configuration files you need to set + ``RewriteEngine On'' in these files + and ``Options + FollowSymLinks'' must be enabled. If your + administrator has disabled override of + FollowSymLinks for a user's directory, then + you cannot use the rewriting engine. This restriction is + needed for security reasons.
    + +

    Here are all possible substitution combinations and their + meanings:

    + +

    Inside per-server configuration + (httpd.conf)
    + for request ``GET + /somepath/pathinfo'':

    +

    + + + + + +
    +
    +Given Rule                                      Resulting Substitution
    +----------------------------------------------  ----------------------------------
    +^/somepath(.*) otherpath$1                      not supported, because invalid!
    +
    +^/somepath(.*) otherpath$1  [R]                 not supported, because invalid!
    +
    +^/somepath(.*) otherpath$1  [P]                 not supported, because invalid!
    +----------------------------------------------  ----------------------------------
    +^/somepath(.*) /otherpath$1                     /otherpath/pathinfo
    +
    +^/somepath(.*) /otherpath$1 [R]                 http://thishost/otherpath/pathinfo
    +                                                via external redirection
    +
    +^/somepath(.*) /otherpath$1 [P]                 not supported, because silly!
    +----------------------------------------------  ----------------------------------
    +^/somepath(.*) http://thishost/otherpath$1      /otherpath/pathinfo
    +
    +^/somepath(.*) http://thishost/otherpath$1 [R]  http://thishost/otherpath/pathinfo
    +                                                via external redirection
    +
    +^/somepath(.*) http://thishost/otherpath$1 [P]  not supported, because silly!
    +----------------------------------------------  ----------------------------------
    +^/somepath(.*) http://otherhost/otherpath$1     http://otherhost/otherpath/pathinfo
    +                                                via external redirection
    +
    +^/somepath(.*) http://otherhost/otherpath$1 [R] http://otherhost/otherpath/pathinfo
    +                                                via external redirection
    +                                                (the [R] flag is redundant)
    +
    +^/somepath(.*) http://otherhost/otherpath$1 [P] http://otherhost/otherpath/pathinfo
    +                                                via internal proxy
    +
    +
    + +

    Inside per-directory configuration for + /somepath
    + (i.e., file .htaccess in dir + /physical/path/to/somepath containing + RewriteBase /somepath)
    + for request ``GET + /somepath/localpath/pathinfo'':

    +

    + + + + + +
    +
    +Given Rule                                      Resulting Substitution
    +----------------------------------------------  ----------------------------------
    +^localpath(.*) otherpath$1                      /somepath/otherpath/pathinfo
    +
    +^localpath(.*) otherpath$1  [R]                 http://thishost/somepath/otherpath/pathinfo
    +                                                via external redirection
    +
    +^localpath(.*) otherpath$1  [P]                 not supported, because silly!
    +----------------------------------------------  ----------------------------------
    +^localpath(.*) /otherpath$1                     /otherpath/pathinfo
    +
    +^localpath(.*) /otherpath$1 [R]                 http://thishost/otherpath/pathinfo
    +                                                via external redirection
    +
    +^localpath(.*) /otherpath$1 [P]                 not supported, because silly!
    +----------------------------------------------  ----------------------------------
    +^localpath(.*) http://thishost/otherpath$1      /otherpath/pathinfo
    +
    +^localpath(.*) http://thishost/otherpath$1 [R]  http://thishost/otherpath/pathinfo
    +                                                via external redirection
    +
    +^localpath(.*) http://thishost/otherpath$1 [P]  not supported, because silly!
    +----------------------------------------------  ----------------------------------
    +^localpath(.*) http://otherhost/otherpath$1     http://otherhost/otherpath/pathinfo
    +                                                via external redirection
    +
    +^localpath(.*) http://otherhost/otherpath$1 [R] http://otherhost/otherpath/pathinfo
    +                                                via external redirection
    +                                                (the [R] flag is redundant)
    +
    +^localpath(.*) http://otherhost/otherpath$1 [P] http://otherhost/otherpath/pathinfo
    +                                                via internal proxy
    +
    +
    + +

    Example:

    + +
    + We want to rewrite URLs of the form + +
    + / Language /~ + Realname /.../ File +
    + into + +
    + /u/ Username /.../ + File . Language +
    + +

    We take the rewrite mapfile from above and save it under + /path/to/file/map.txt. Then we only have to + add the following lines to the Apache server configuration + file:

    + +
    +
    +RewriteLog   /path/to/file/rewrite.log
    +RewriteMap   real-to-user               txt:/path/to/file/map.txt
    +RewriteRule  ^/([^/]+)/~([^/]+)/(.*)$   /u/${real-to-user:$2|nobody}/$3.$1
    +
    +
    +
    +
    + +
    +

    Miscellaneous

    +
    +
    + +

    Environment + Variables

    + This module keeps track of two additional (non-standard) + CGI/SSI environment variables named SCRIPT_URL + and SCRIPT_URI. These contain the + logical Web-view to the current resource, while the + standard CGI/SSI variables SCRIPT_NAME and + SCRIPT_FILENAME contain the physical + System-view. + +

    Notice: These variables hold the URI/URL as they were + initially requested, i.e., before any + rewriting. This is important because the rewriting process is + primarily used to rewrite logical URLs to physical + pathnames.

    + +

    Example:

    + +
    +
    +SCRIPT_NAME=/sw/lib/w3s/tree/global/u/rse/.www/index.html
    +SCRIPT_FILENAME=/u/rse/.www/index.html
    +SCRIPT_URL=/u/rse/
    +SCRIPT_URI=http://en1.engelschall.com/u/rse/
    +
    +
    +
    + +

    Practical + Solutions

    + We also have an URL + Rewriting Guide available, which provides a collection of + practical solutions for URL-based problems. There you can + find real-life rulesets and additional information about + mod_rewrite. +
    + + + + + + diff --git a/htdocs/manual/mod/mod_rewrite.html.html b/htdocs/manual/mod/mod_rewrite.html.html new file mode 100644 index 00000000000..077dc923bd1 --- /dev/null +++ b/htdocs/manual/mod/mod_rewrite.html.html @@ -0,0 +1,4 @@ + + + diff --git a/htdocs/manual/mod/mod_rewrite.html.ja.jis b/htdocs/manual/mod/mod_rewrite.html.ja.jis new file mode 100644 index 00000000000..60ca78cf13c --- /dev/null +++ b/htdocs/manual/mod/mod_rewrite.html.ja.jis @@ -0,0 +1,2078 @@ + + + + + + + + + Apache module mod_rewrite + + + + + +
    + + +
    + +

    mod_rewrite $B%b%8%e!<%k(B
    + URL $B=q$-49$(%(%s%8%s(B

    + +

    $B$3$N%b%8%e!<%k$O!"MW5a$5$l$?(B URL + $B$r%j%"%k%?%$%`$G=q$-49$($k$?$a$N!"(B + $B%k!<%k%Y!<%9$N=q$-49$(%(%s%8%s$rDs6!$7$^$9!#(B +

    + +

    $B%9%F!<%?%9(B: Extension
    + $B%=!<%9%U%!%$%k(B: + mod_rewrite.c
    + $B%b%8%e!<%k<1JL;R(B: + rewrite_module
    + $B8_49@-(B: Apache 1.2 $B0J9_$G;HMQ2DG=(B

    +
    +
    + +

    $B35MW(B

    + +
    +
    +
    + `` mod_rewrite $B$N$9$P$i$7$$$H$3$m$O!"(B + Sendmail $B$N$h$&$J@_Dj@-$H=@Fp@-$rM?$($F$/$l$k$H$3$m$@$m$&!#(B + $B$^$?!"(Bmod_rewrite $B$N$h$/$J$$$H$3$m$O!"(B + Sendmail $B$N$h$&$J@_Dj@-$H=@Fp@-$rM?$($F$/$l$k$H$3$m$@$m$&!#(B'' + +
    + -- Brian Behlendorf
    + Apache Group +
    +
    +
    +
    + +
    +
    +
    + `` $BKDBg$J@_DjNc$d%I%-%e%a%s%H$,$"$k$K$b$+$+$o$i$:!"(B + mod_rewrite $B$O9uKb=Q$G$"$k!#$+$J$j%$%1$F$k$C$]$$9uKb=Q$@$,!"(B + $B$d$C$Q$j9uKb=Q$G$"$k!#(B'' + +
    + -- Brian Moore
    + bem@news.cmc.net +
    +
    +
    +
    + URL $B$rA`:n$9$k$?$a$N%9%$%9@=$N%"!<%_!<%J%$%U!"(Bmod_rewrite + $B$X$h$&$3$=(B! + +

    $B$3$N%b%8%e!<%k$O!"(B($B@55,I=8=%Q!<%5$K4p$E$/(B) + $B%k!<%k%Y!<%9$N=q$-49$(%(%s%8%s$r;H$$!"MW5a$5$l$?(B URL + $B$rE,59=q$-49$($^$9!#%5%]!<%H$9$k%k!<%k$N?t!"(B + $B$*$h$S3F%k!<%k$rE,MQ$9$k:]$N%k!<%k>r7o$N?t$K@)8B$O$J$/!"(B + $BK\Ev$K=@Fp$G$+$D6/NO$J(B URL $BA`:n%a%+%K%:%`$rDs6!$7$^$9!#$3$N(B URL + $BA`:n$K@hN)$A!"2A$r9T$&$3$H$,$G$-$^$9!#(B + $BNc$($P%5!<%PJQ?t!"4D6-JQ?t!"(BHTTP $B%X%C%@!"%?%$%`%9%?%s%W!"(B + $B$5$i$K30It%G!<%?%Y!<%9$N8!:w7k2L$^$G$rI>2A$NBP>]$H$7$F!"(B + $B3F + +

    $B$3$N%b%8%e!<%k$O!"%5!<%PC10L$N%3%s%F%-%9%H(B + (httpd.conf) $B$*$h$S%G%#%l%/%H%jC10L$N%3%s%F%-%9%H(B + (.htaccess) $B$K$*$$$F(B (PATH-INFO $BItJ,$r4^$`(B) $B%U%k(B + URL $B$KBP$9$kA`:n$r9T$$$^$9$,!"(B + $B$5$i$K7k2L$H$7$F%/%(%j! + +

    $B$?$@!"$3$l$i$9$Y$F$N5!G=$d=@Fp@-$,!"(B + $B7gE@$G$"$kJ#;($5$N85$K$b$J$C$F$$$^$9!#$J$N$G!"$3$N%b%8%e!<%k(B + $BA4BN$r0lF|DxEY$G3P$($h$&$J$I$H$O;W$o$J$$$[$&$,$$$$$G$7$g$&!#(B +

    + +

    $B$3$N%b%8%e!<%k$O(B 1996 $BG/$N(B 4 $B7n$K(B

    + +
    + Ralf S. + Engelschall
    + rse@engelschall.com
    + www.engelschall.com +
    + +

    $B$i$K$h$j9M0F$5$l$F%*%j%8%J%k$,=q$+$l!"(B
    + 1997 $BG/$N(B 7 $B7n$K!"(BThe Apache Group + $B$KBP$7$FFH@jE*$KB#Dh$5$l$^$7$?!#(B

    +
    + +

    $BL\ + +

    $BFbIt=hM}(B

    + + + +

    $B@_Dj%G%#%l%/%F%#%V(B

    + + + $B$=$NB>(B + + +
    + +
    +

    $BFbIt=hM}(B

    +
    +
    + +

    $B$3$N%b%8%e!<%k$NFbIt=hM}$O$H$F$bJ#;($G$9$,!"(B + $B$"$j$,$A$J%_%9$rHr$1!"$^$?A45!G=$r3hMQ$G$-$k$h$&$K!"(B + $BJ?6QE*%f!<%6$KBP$7$F$b0lEY$O@bL@$7$F$*$/I,MW$,$"$j$^$9!#(B +

    + +

    API $B%U%'!<%:(B

    + +

    $B$^$:$O!"(BApache $B$,(B HTTP $B%j%/%(%9%H$r=hM}$9$k:]$K!"(B + $B$3$N%b%8%e!<%k$,$3$N%U%'!<%:$G9T$&$3$H$rM}2r$7$F$*$+$J$1$l$P$J$j$^$;$s!#(B + Apache API $B$G$O!"$3$l$i$N3F%U%'!<%:$KBP$9$k%U%C%/$,Ds6!$5$l$F$$$^$9!#(B + mod_rewrite $B$O0J2<$NFs$D$N%U%C%/$r;H$$$^$9(B: HTTP + $B%j%/%(%9%H$,FI$^$l$?8e$G$+$D$9$Y$F$NG'>Z$,3+;O$5$l$kA0$K;H$o$l$k(B + URL-to-filename $BJQ49%U%C%/!"$=$7$F!"G'>Z%U%'!<%:$N8e$G(B + $B%G%#%l%/%H%j$4$H$N@_Dj%U%!%$%k(B (.htaccess) + $B$,FI$^$l$?8e!"$^$@(B content $B%O%s%I%i$,M-8z$K$J$kA0$K5/F0$5$l$k(B + Fixup $B%U%C%/$G$9!#(B +

    + +

    $B$=$7$F!"$"$k%j%/%(%9%H$,F~$C$FMh$F!"(BApache $B$,$3$l$KBP1~$9$k%5!<%P(B + ($B/$N%9%F%C%W$r7P$F:G8e$N%G!<%?%G%#%l%/%H%j$,8+$D$+$C$?;~!"(B + $B%G%#%l%/%H%j$4$H$N(B mod_rewrite $B@_Dj%G%#%l%/%F%#%V$,(B Fixup + $B%U%'!<%:$G5/F0$5$l$^$9!#(B + $B$3$N3F!9$N%?%$%_%s%0$N4V$KFC$KL@$i$+$J0c$$$O$J$$$N$G$9$,!"$=$l$G$b(B + mod_rewrite $B$O$$$:$l$N;~$K$b3F(B URL $B$r?7$7$$(B URL + $B$^$?$O%U%!%$%kL>$K=q$-49$($^$9!#$3$l$O$3$N(B API + $B$,%G%6%$%s$5$l$?;~$KA[Dj$5$l$?;H$$J}$G$O$J$$$N$G$9$,!"(BApache 1.x + $B$K$*$$$F$O$3$l$,(B mod_rewrite $B$,F0$1$kM#0l$NJ}K!$G$7$?!#(B + $B$3$NE@$r$h$j$O$C$-$j$5$;$k$?$a$K!"0J2<$N(B 2 + $BE@$K$D$$$F3P$($F$*$$$F$/$@$5$$(B:

    + +
      +
    1. mod_rewrite $B$O(B URL $B$r(B URL $B$X!"(BURL $B$r%U%!%$%kL>$X!"(B + $B$5$i$K%U%!%$%kL>$r%U%!%$%kL>$X$H=q$-49$($^$9$,!"(BAPI + $B$G$O8=:_$N$H$3$m(B URL-to-filename $B%U%C%/$N$_$rDs6!$7$F$$$^$9!#(B + Apache 2.0 $B$G$O$=$l$^$G$K$O$J$+$C$?Fs$D$N%U%C%/$,DI2C$5$l!"(B + $B=hM}$,$h$jL@3N$K$J$j$^$7$?!#(B + $B$7$+$7$3$NE@$G$O%f!<%6$K$H$C$F$NITMx1W$O$J$/!"(B + $BC1$K3P$($F$*$/$Y$-;ve$N$3$H$r9T$$$^$9!#(B
    2. + +
    3. mod_rewrite $B$G$O!"?.$8$i$l$J$$$3$H$K!"(BURL + $B$,%U%!%$%kL>$KJQ49$5$l$F$+$i$:$C$H8e$KC)$jCe$/$H$3$m$K$"$k!"(B + $B%G%#%l%/%H%j$4$H$N%3%s%F%-%9%H(B$B$9$J$o$A(B + .htaccess $B%U%!%$%k$NCf$G(B URL + $BA`:n$r9T$($k$h$&$K$J$C$F$$$9!#(B.htaccess + $B%U%!%$%k$O%U%!%$%k%7%9%F%`Cf$K$"$k$?$a$K(B + $B=hM}$NN.$l$O$9$G$K$3$NCJ3,$^$GE~C#$7$F$$$k$N$G!"(B + $B$3$N$h$&$K$J$C$F$$$k$N$G$9!#$D$^$j$3$N;~E@$G(B API + $B%U%'!<%:$K=>$($P!"$I$N(B URL + $B$rA`:n$9$k$K$b4{$KCY$-$K<:$7$F$$$k$N$G$9!#(B + $B$3$N7\$HMqLdBj$rBG3+$9$k$?$a!"(Bmod_rewrite + $B$G$O$A$g$C$H$7$?%H%j%C%/$r;H$C$F$$$^$9(B: + $B%G%#%l%/%H%j$4$H$N%3%s%F%-%9%H$G(B URL / $B%U%!%$%kL>$NA`:n$r9T$&:]!"(B + mod_rewrite $B$O$^$:%U%!%$%kL>$rBP1~$9$k(B URL $B$KLa$7(B + ($B$3$l$ODL>oIT2DG=$G$9$,!"$3$l$r2DG=$K$9$k%H%j%C%/$K$D$$$F$O(B + RewriteBase $B$r8+$F$/$@$5$$(B) $B!"$=$N?7$7$$(B URL + $B$GFbItE*$K?7$7$$%5%V%j%/%(%9%H$r@8@.$7$F$$$k$N$G$9!#$3$l$G(B + API $B%U%'!<%:=hM}$,:FEY5/F0$5$l$^$9!#(B + +

      $B$3$N$h$&$K!"(Bmod_rewrite $B$OJ#;($J%9%F%C%W$r(B + $B%f!<%6$KBP$7$FA4HL$KF)2aE*$K$7$h$&$H$,$s$P$C$F$$$^$9$,!"(B + $B$H$j$"$($:0J2<$N$3$H$O3P$($F$*$/$Y$-$G$7$g$&(B: + $B%5!<%P$4$H$N%3%s%F%-%9%H$K$*$1$k(B URL + $BA`:n$OHs>o$K9bB.$G$+$D8zN($,NI$$$N$KBP$7!"(B + $B%G%#%l%/%H%j$4$H$N=q$-49$($O!"(B + $B$3$N7\$HMq$NLdBj$N$?$aCY$$>e$KDc8zN($G$9!#$7$+$7$3$l$O!"(B + mod_rewrite $B$,$4$/J?6QE*$J%f!<%6$KDs6!$G$-$k!"(B + ($B%m!<%+%k$K@)8B$5$l$?(B) URL $BA`:n$N$?$a$NM#0l$NJ}K!$J$N$G$9!#(B +

      +
    4. +
    + +

    $B$3$l$iFs$D$NE@$rK:$l$J$$$G$/$@$5$$(B!

    + +

    $B%k!<%k%;%C%H=hM}(B

    + $B$3$l$iFs$D$N(B API $B%U%'!<%:$G(B mod_rewrite $B$,5/F0$5$l$k$H!"(B + mod_rewrite $B$O$^$:<+J,<+?H$N@_DjMQ9=B$BN(B + ($B$3$l$O5/F0;~$N%5!<%P$4$H$N%3%s%F%-%9%H$+!"(BApache + $B%+!<%M%k$,%G%#%l%/%H%j4V$rC5:w$9$kESCf$N%G%#%l%/%H%j$4$H$N(B + $B%3%s%F%-%9%H$+!"$N$$$:$l$+$K$h$j@8@.$5$l$k(B) + $B$h$j9=@.$5$l$?%k!<%k%;%C%H$rFI$_9~$_$^$9!#$=$7$F$=$NCf$KF~$C$F$$$k(B + $B%k!<%k%;%C%H(B ($B>r7o$rH<$&0l$D0J>e$N%k!<%k$N=8$^$j(B)$B$H$H$b$K(B URL + $B=q$-49$(%(%s%8%s$,3+;O$5$l$^$9!#(BURL $B=q$-49$(%(%s%8%s<+BN$O!"(B + $BAPJ}$N@_Dj%3%s%F%-%9%H$GA4$/F1$8$h$&$KF0:n$7$^$9!#(B + $B:G=*7k2L$N=hM}$,0[$J$k$@$1$G$9!#(B + +

    $B%k!<%k%;%C%HCf$N%k!<%k$N=q$-=g$O=EMW$G$9!#(B + $B$3$l$O!"=q$-49$(%(%s%8%s$O$=$l$i$rFCJL$J(B + ($B$+$D!"$"$^$jJ,$+$j$d$9$$$H$O8@$($J$$(B) $B=g=x$G=hM}$9$k$+$i$G$9!#(B + $B%k!<%k$O0J2<$N$h$&$K=hM}$5$l$^$9(B: $B=q$-49$(%(%s%8%s$O%k!<%k(B + (RewriteRule$B%G%#%l%/%F%#%V(B) $B$r0l$D$:$D$J$a$J$,$i(B + $B%k!<%k%;%C%HCf$r%k!<%W$7$^$9$,!"$"$k%k!<%k$,%^%C%A$7$?$i!"(B + $B$=$l$KBP1~$9$k>r7o(B (RewriteCond$B%G%#%l%/%F%#%V(B) + $B$,$"$k4V$=$NCf$r%k!<%W$7$^$9!#(B + $BNr;KE*$JM}M3$K$h$j$^$:>r7o$,M?$($i$l$k$?$a!"(B + $B@)8f%U%m!<$,$A$g$C$H$/$I$/$J$C$F$$$^$9!#>\:Y$O?^(B 1 + $B$r$4Mw$/$@$5$$!#(B

    + +
    + + + + + + + + +
    [$BI=<($9$k$K$O%0%i%U%#%C%/5!G=$,I,MW$G$9(B]
    $B?^(B 1: + $B=q$-49$(%k!<%k%;%C%H$K$*$1$k@)8f%U%m!<(B
    +
    + +

    $B$b$&$*J,$+$j$N$h$&$K!"$^$:(B URL $B$r3F%k!<%k$N(B Pattern + $B$KBP$7$F%^%C%A%s%0$7$^$9!#%^%C%A$7$J$$>l9g!"(Bmod_rewrite + $B$O$9$0$K$3$N%k!<%k$N=hM}$rCf;_$7$FPattern $B$K%^%C%A$9$k$H!"(Bmod_rewrite + $B$O$=$l$KBP1~$9$k>r7o$rC5$7$^$9!#$b$72?$b$J$1$l$P!"C1$K(B URL + $B$r(B Substitution $BJ8;zNs$+$i:n$i$l$??7$7$$CM$KCV49$7!"(B + $B%k!<%k$N%k!<%W$rB3$1$^$9!#2?$i$+$N>r7o$,$"$l$PFbIt%k!<%W$r3+;O$7!"(B + $B$=$l$i$N>r7o$,Ns5s$5$l$F$$$k=g$K=hM}$r7+$jJV$7$^$9!#(B + $B>r7oJ8$N>l9g$O%m%8%C%/$,0[$J$j$^$9(B: $B8=:_$N(B URL + $B$KBP$7$F$O%Q%?!<%s$N%^%C%A%s%0$r9T$$$^$;$s!#$=$NBe$o$j!"(B + $B$^$:JQ?t$rE83+$7!"8eJ};2>H$r9T$$!"(B + $B8!:w%F!<%V%k$r%^%C%T%s%0$9$k(B$B$J$I(B$B$7$F(B$B%F%9%HJ8;zNs(B + $B$r@8@.$7!"$=$l$KBP$7$F(B$B>r7o%Q%?!<%s(B$B$H$N%^%C%A%s%0$r9T$$$^$9!#(B + $B%Q%?!<%s$K%^%C%A$7$J$$>l9g!">r7o$NAH$_9g$o$;A4BN$H$=$l$KBP1~$9$k(B + $B%k!<%k$O@.N)$7$J$$$3$H$K$J$j$^$9!#%Q%?!<%s$K%^%C%A$7$?>l9g!"(B + $Br7o$,I>2A$5$l!"$=$l$,>r7o$N$"$k8B$j7+$jJV$5$l$^$9!#(B + $B$b$7$9$Y$F$N>r7o$K%^%C%A$9$l$P!"(BURL $B$O(B Substitution + $BJ8;zNs$KCV49$5$l!"=hM}$,7QB3$5$l$^$9!#(B

    + +

    $BFC

    + +

    Apache 1.3.20 $B$G$O!"(B$B%F%9%HJ8;zNs(B$B$H(B Substitution + $BJ8;zNs$NCf$NFCA0$K%P%C%/%9%i%C%7%e(B ('\') + $B$rCV$/$3$H$G%(%9%1!<%W(B ($B$9$J$o$A!"$=$l$i$N;}$DFCC$7$F!"(B + $BDL>o$NJ8;z$H$7$F07$&$3$H(B) $B$G$-$k$h$&$K$J$C$F$$$^$9!#(B + $BNc$($P!"(B$BCV49BP>](B$BJ8;zNs$NCf$G$b(B '\$' + $B$H$$$&J8;zNs$r;H$C$FK\Mh$N%I%k5-9f$rF~$l$k$3$H$,$G$-$k$o$1$G$9!#(B + $B$3$l$K$h$j!"(Bmod_rewrite + $B$,$=$l$r8eJ};2>H$H$7$F07$*$&$H$9$k$N$rKI$0$3$H$,$G$-$k$o$1$G$9!#(B +

    + +

    $B@55,I=8=$N8eJ};2>H$r;H$&(B

    + $B$3$3$G$R$H$D3P$($F$*$$$FM_$7$$$3$H$,$"$j$^$9(B: Pattern + $B$NCf$d(B CondPattern $B$N$&$A$N$I$3$+$G3g8L$r;H$($P!"J8;zNs(B + $N $B$H(B %N + $B$G;H$($k8eJ};2>H$,FbItE*$K@8@.$5$l$^$9(B ($B8e=R(B)$B!#$3$l$i$O(B + Substitution + $BJ8;zNs$d(B$B%F%9%HJ8;zNs(B$B$r@8@.$9$k$N$K;H$($^$9!#?^(B 2 + $B$G$O!"$3$N8eJ};2>H$,E>Aw$5$l$FE83+$5$l$k>l=j$K$D$$$F2r@b$7$^$9!#(B + +
    + + + + + + + + +
    [$BI=<($9$k$K$O%0%i%U%#%C%/5!G=$,I,MW$G$9(B]
    $B?^(B 2: + $B%k!<%k$rDL$7$?8eJ};2>H$NN.$l(B
    +
    + +

    $B$3$l$^$G$O(B mod_rewrite + $B$NFbIt=hM}$K4X$9$kC;4|=8Cf%3!<%9$G$7$?!#(B + $B$3$3$+$i$O;HMQ2DG=$J%G%#%l%/%F%#%V$K4X$9$k$3$H$,=q$+$l$F$$$^$9!#(B + $B$=$l$i$rFI$`$H$-$K$3$3$^$G$NCN<1$,LrN)$D$O$:$G$9!#(B

    +
    + +
    +

    $B@_Dj%G%#%l%/%F%#%V(B

    +
    +
    + +

    RewriteEngine

    + $B=q<0(B: RewriteEngine + on|off
    + $B%G%U%)%k%H(B: RewriteEngine + off
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k!"(B + $B%P!<%A%c%k%[%9%H!"%G%#%l%/%H%j!"(B.htaccess
    + $B%*!<%P!<%i%$%I(B: FileInfo
    + $B%9%F!<%?%9(B: Extension
    + $B%b%8%e!<%k(B: mod_rewrite.c
    + $B8_49@-(B: Apache + 1.2
    + +

    RewriteEngine $B%G%#%l%/%F%#%V$r;H$&$H!"(B + $Boff $B$K@_Dj$5$l$F$$$k$H!"$3$N%b%8%e!<%k$OSCRIPT_URx + $B4D6-JQ?t$N99?7$5$($b$7$J$/$J$j$^$9!#(B

    + +

    RewriteRule $B$rA4It%3%a%s%H%"%&%H$7$?$j$7$J$$$G!"(B + $B$3$N%G%#%l%/%F%#%V$r;H$C$F$/$@$5$$$M!#(B

    + +

    $B%G%U%)%k%H$G$O!"(Brewrite $B$N@_Dj$O7Q>5$5$l$J$$$N$GCm0U$7$F$/$@$5$$!#(B + $B$D$^$j!"$3$N5!G=$r;H$$$?$$$H;W$&%P!<%A%c%k%[%9%H$4$H$K(B + RewriteEngine on + $B%G%#%l%/%F%#%V$r=q$+$J$1$l$P$$$1$J$$$H$$$&$3$H$G$9!#(B

    +
    + +

    RewriteOptions

    + $B=q<0(B: RewriteOptions + $B%*%W%7%g%s(B
    + $B%G%U%)%k%H(B: RewriteOptions + MaxRedirects=10
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k!"(B + $B%P!<%A%c%k%[%9%H!"%G%#%l%/%H%j!"(B.htaccess
    + $B%*!<%P!<%i%$%I(B: FileInfo
    + $B%9%F!<%?%9(B: Extension
    + $B%b%8%e!<%k(B: mod_rewrite.c
    + $B8_49@-(B: Apache + 1.2$B!#(BMaxRedirects $B$O(B Apache 1.3.28 $B0J9_$G;HMQ2DG=(B
    + +

    RewriteOptions $B%G%#%l%/%F%#%V$O!"(B + $B8=:_$N%5!<%PC10L$b$7$/$O%G%#%l%/%H%jC10L$N@_Dj$G;HMQ$9$k!"(B + $BFCJL$J%*%W%7%g%s$r%;%C%H$7$^$9!#(B + Option $BJ8;zNs$O0J2<$N$$$:$l$+$G$9(B:

    + +
    +
    inherit
    +
    $B$3$l$O!"8=:_$N@_DjCM$r?F$N@_DjCM$+$i6/@)E*$K7Q>5$5$;$^$9!#(B + $B$3$l$K$h$j!"2>A[%5!<%PC10L$N%3%s%F%-%9%H$K$*$$$F!"(B + $B%a%$%s%5!<%P$N%^%C%W!">r7o!"%k!<%k$,7Q>5$5$l$k$3$H$K$J$j$^$9!#(B + $B$^$?!"%G%#%l%/%H%jC10L$N%3%s%F%-%9%H$G$O!"?F%G%#%l%/%H%j$N(B + .htaccess + $B@_Dj$K5-=R$5$l$F$$$k>r7o$d%k!<%k$,7Q>5$5$l$k$3$H$K$J$j$^$9!#(B
    + +
    MaxRedirects=number
    +
    $B%G%#%l%/%H%jKh$N(B RewriteOptions $B$K$h$kFbIt%j%@%$%l%/%H$N(B + $BL58B%k!<%W$rKI$0$?$a$K!"(Bmod_rewrite $B$O%j%@%$%l%/%H$N(B + $B>e8B$KC#$9$k$H%j%/%(%9%H$rCf;_$7!"(B500 Internal Server Error $B$r1~Ez$H$7$F(B + $BJV$7$^$9!#0l$D$N%j%/%(%9%H$KBP$7$FK\Ev$K(B 10 $B$r1[$($k%j%@%$%l%/%H$,I,MW$J(B + $B>l9g$O!"K>$_$NCM$^$GA}2C$5$;$k$3$H$,$G$-$^$9!#(B
    +
    +
    + +

    RewriteLog

    + $B=q<0(B: RewriteLog + file-path
    + $B%G%U%)%k%H(B: $B$J$7(B
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k!"(B + $B%P!<%A%c%k%[%9%H(B
    + $B%*!<%P!<%i%$%I(B: $BE,MQIT2D(B
    + $B%9%F!<%?%9(B: Extension
    + $B%b%8%e!<%k(B: mod_rewrite.c
    + $B8_49@-(B: Apache + 1.2
    + + $B!!(B

    RewriteLog $B%G%#%l%/%F%#%V$O!"(B + $B9T$J$o$l$?$9$Y$F$N=q$-49$(F0:n$r(B + $B%5!<%P$,%m%0$K=q$-9~$`$?$a$N(B + $B%U%!%$%kL>$r@_Dj$7$^$9!#$3$NL>A0$,%9%i%C%7%e(B + ('/') $B$G;O$^$i$J$$>l9g$O(B Server Root + $B$+$i$NAjBP%Q%9$G$"$k$H8+$J$5$l$^$9!#$3$N%G%#%l%/%F%#%V$O(B + $B%5!<%PC10L$N@_Dj$NCf$G0lEY$@$15-=R$5$l$k$Y$-$b$N$G$9!#(B

    + + + + + +
    $BCm0U(B: + $B=q$-49$(F0:n$N%m%.%s%0$rM^@)$9$k$?$a$K(B file-path $B$r(B + /dev/null $B$K$9$k$N$O$*4+$a$G$-$^$;$s!#$3$l$O!"(B + $B=q$-49$(%(%s%8%s$O$B$3$l$O4IM} + $B%m%.%s%0$rM^;_$9$k>l9g$O(B RewriteLog + $B%G%#%l%/%F%#%V$r%3%a%s%H%"%&%H$9$k$+!"(B + RewriteLogLevel 0 $B$r;H$&$h$&$K$7$F$/$@$5$$(B!
    + + + + + +
    $B%;%-%e%j%F%#(B: + $B%m%0%U%!%$%k$r3JG<$9$k%G%#%l%/%H%j$,!"(B + $B%5!<%P$r5/F0$9$k%f!<%60J30$K$b=q$-9~$_2DG=$G$"$k>l9g$K!"(B + $B$J$<%;%-%e%j%F%#$,6<$+$5$l$k$+$K$D$$$F$N>\$7$$@bL@$O!"(B + Apache $B$N%;%-%e%j%F%#$N(B + $B$3$D(B $B%I%-%e%a%s%H$r$4Mw$/$@$5$$!#(B
    + +

    $BNc(B:

    + +
    +
    +RewriteLog "/usr/local/var/apache/logs/rewrite.log"
    +
    +
    +
    + +

    RewriteLogLevel

    + $B=q<0(B: RewriteLogLevel + Level
    + $B%G%U%)%k%H(B: + RewriteLogLevel 0
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k!"(B + $B%P!<%A%c%k%[%9%H(B
    + $B%*!<%P!<%i%$%I(B: $BE,MQIT2D(B
    + $B%9%F!<%?%9(B: Extension
    + $B%b%8%e!<%k(B: mod_rewrite.c
    + $B8_49@-(B: Apache + 1.2
    + +

    RewriteLogLevel $B%G%#%l%/%F%#%V$G$O!"(B + $B=q$-49$(MQ$N%m%0%U%!%$%k$N>iD9%l%Y%k$r;XDj$7$^$9!#(B + $B%G%U%)%k%H$N%l%Y%k$O(B + 0 $B$G!"$3$l$O0l@Z%m%0$r=q$+$J$$$3$H$r0UL#$7$^$9!#0lJ}(B 9 + $B$b$7$/$O$=$l0J>e$r;XDj$9$k$H!"(B + $B;ve$[$H$s$I$9$Y$F$NF0:n$K$D$$$F%m%0$,<}=8$5$l$^$9!#(B

    + +

    $B=q$-49$($N%m%0$rLevel $B$r(B 0 + $B$K$7$^$9!#$3$l$G=q$-49$($K4X$9$k$9$Y$F$N%m%0$,L58z$H$J$j$^$9!#(B +

    + + + + + +
    $BCm0U(B: Level + $B$KBg$-$JCM$r;XDj$9$k$H!"(BApache $B%5!<%P$NF0:nB.EY$,7`E*$KDc2<$7$^$9(B! + $B=q$-49$(;~$N%m%0%U%!%$%k$G(B Level $B$K(B 2 + $B0J>e$NCM$r;XDj$9$k$N$O%G%P%C%0;~$N$_$K$7$F$*$$$F$/$@$5$$(B!
    + +

    $BNc(B:

    + +
    +
    +RewriteLogLevel 3
    +
    +
    +
    + +

    RewriteLock

    + $B=q<0(B: RewriteLock + file-path
    + $B%G%U%)%k%H(B: $B$J$7(B
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k(B
    + $B%*!<%P!<%i%$%I(B: $BE,MQIT2D(B
    + $B%9%F!<%?%9(B: Extension
    + $B%b%8%e!<%k(B: mod_rewrite.c
    + $B8_49@-(B: Apache + 1.3
    + +

    $B$3$N%G%#%l%/%F%#%V$O!"(Bmod_rewrite $B$,(B RewriteMap + $B%W%m%0%i%`(B$B$HDL?.$9$k$N$KI,MW$J!"(B + $BF14|MQ%m%C%/%U%!%$%k$NL>A0$r%;%C%H$7$^$9!#(BRewriteMap $B$G(B + $B%W%m%0%i%`$r;H$$$?$$>l9g$K$O!"$3$N%m%C%/%U%!%$%k$K(B(NFS + $B%^%&%s%H$5$l$?%G%P%$%9$G$O$J$/(B)$B%m!<%+%k%Q%9$r@_Dj$7$^$9!#(B + $B$=$l0J30$N%?%$%W$N(B RewriteMap $B$r;H$&>l9g$K$O!"(B + $B@_Dj$9$kI,MW$O$"$j$^$;$s!#(B

    +
    + +

    RewriteMap

    + $B=q<0(B: RewriteMap + MapName MapType:MapSource
    + $B%G%U%)%k%H(B:$B%G%U%)%k%H$G$O;HMQ$5$l$J$$(B +
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k!"(B + $B%P!<%A%c%k%[%9%H(B
    + $B%*!<%P!<%i%$%I(B: $BE,MQIT2D(B
    + $B%9%F!<%?%9(B: Extension
    + $B%b%8%e!<%k(B: mod_rewrite.c
    + $B8_49@-(B: Apache 1.2 + ($B0lIt$N$_(B), Apache 1.3
    + + +

    RewriteMap $B%G%#%l%/%F%#%V$O!"(B + $B%^%C%T%s%04X?t$r;H$C$F%k!<%kCV49J8;zNs$NFbIt$G;H$($k(B + $B=q$-49$(%^%C%W(B$B$rDj5A$7$^$9!#$3$l$K$h$j!"(B + $B%-!<$r8!:w$9$k:]$K!"%U%#!<%k%I$rA^F~$7$?$jCV49$7$?$j$G$-$^$9!#(B + $B8!:wBP>]$K$O$$$m$$$m$J%?%$%W$,;H$($^$9!#(B

    + +

    MapName + $B$O%^%C%W$NL>A0$G$9!#0J2<$N=q<0$N$I$A$i$+$K$h$j!"(B + $B=q$-49$(%k!<%k$NCV49J8;zNs$G;H$o$l$k(B + $B%^%C%T%s%04X?t$r;XDj$9$k$N$K;H$o$l$^$9!#(B

    + +
    + ${ MapName : + LookupKey }
    + ${ MapName : + LookupKey | DefaultValue + }
    +
    + $B$3$N$h$&$J=q<0$,8=$l$k$H!"(BMapName $B$H$$$&L>A0$N%^%C%W$NCf$N%-!<(B + LookupKey $B$,8!:w$5$l$^$9!#(B + $B%-!<$,8+$D$+$l$P!"$3$N%^%C%W4X?t$N=q<0$NItJ,$O(B SubstValue + $B$K$h$jCV49$5$l$^$9!#%-!<$,8+$D$+$i$J$$>l9g!"(B + DefaultValue $B$,$"$l$P$=$l$GCV49$5$l!"(BDefaultValue + $B$,;XDj$5$l$F$$$J$1$l$P6uJ8;zNs$KCV49$5$l$^$9!#(B + +

    $B0J2<$N$h$&$J(B MapType $B$H(B MapSource + $B$r;H$C$?AH$_9g$o$;$r;HMQ$G$-$^$9(B:

    + +
      +
    • + $BI8=`$N%W%l!<%s%F%-%9%H(B
      + MapType: txt, MapSource: + Unix $B%U%!%$%k%7%9%F%`$NM-8z$JDL>o%U%!%$%k$X$N%Q%9(B + +

      $B$3$l$OI8=`$N=q$-49$(%^%C%W5!G=$G$9!#(B + MapSource $B$O6uGr9T$d%3%a%s%H9T(B($B9TF,$,(B + '#' $BJ8;z$G;O$^$k9T(B)$B!" + +

      + MatchingKey + SubstValue +
      + +

      $BNc(B:

      + + + + + +
      +
      +##
      +##  map.txt -- rewriting map
      +##
      +
      +Ralf.S.Engelschall    rse   # Bastard Operator From Hell
      +Mr.Joe.Average        joe   # Mr. Average
      +
      +
      + + + + + +
      +
      +RewriteMap real-to-user txt:/path/to/file/map.txt
      +
      +
      +
    • + +
    • + $B%i%s%@%`$J%W%l!<%s%F%-%9%H(B
      + MapType: rnd, MapSource: + Unix $B%U%!%$%k%7%9%F%`$NM-8z$JDL>o%U%!%$%k$X$N%Q%9(B + +

      $B$3$l$OA0=R$NI8=`%W%l!<%s%F%-%9%H$H$[$\F1$8$G$9$,!"$=$l$K2C$($F(B + $B@lMQ$N8e=hM}5!G=$r;}$C$F$$$^$9(B: $BCM$r8!:w$7$?8e!"$=$NCM$O(B ``or'' + $B$N0UL#$r;}$D(B ``|'' $BJ8;z$K$7$?$,$C$F%Q!<%9$5$l$^$9!#(B + $B$D$^$j$3$l$i$OJQ498uJd$rMeNs$7$F$*$j!"(B + $B$K$J$k$h$&$J(B + $B%j%P!<%9%W%m%-%7$rMQ$$$?Ii2YJ,;6MQ$K(B + $B@_7W$5$l$F$$$^$9!#(B + $BNc$($P(B:

      + + + + + +
      +
      +##
      +##  map.txt -- rewriting map
      +##
      +
      +static   www1|www2|www3|www4
      +dynamic  www5|www6
      +
      +
      + + + + + +
      +
      +RewriteMap servers rnd:/path/to/file/map.txt
      +
      +
      +
    • + +
    • + $B%O%C%7%e%U%!%$%k(B
      + MapType: dbm, MapSource: + Unix $B%U%!%$%k%7%9%F%`$NM-8z$JDL>o%U%!%$%k$X$N%Q%9(B + +

      $B%U%!%$%k$NFbMF$N0UL#$O(B$B%W%l!<%s%F%-%9%H(B$B%U%)!<%^%C%H(B + $B$HF1$8$G$9$,!"(B + $B9bB.$J8!:w$r9T$&$?$a$K:GE,2=$,;\$5$l$?(B + NDBM $B%U%)!<%^%C%H$H$$$&%P%$%J%j%U%!%$%k(B + $B$r%=!<%9$H$7$F;H$&$3$H$b$G$-$^$9!#$3$N$h$&$J%U%!%$%k$O!"(B + NDBM $B%D!<%k$r;H$C$?$j!"0J2<$N$h$&$J(B perl + $B%9%/%j%W%H$r;H$C$F:n$k$3$H$,$G$-$^$9!#(B

      + + + + + +
      +
      +#!/path/to/bin/perl
      +##
      +##  txt2dbm -- convert txt map to dbm format
      +##
      +
      +use NDBM_File;
      +use Fcntl;
      +
      +($txtmap, $dbmmap) = @ARGV;
      +
      +open(TXT, "<$txtmap") or die "Couldn't open $txtmap!\n";
      +tie (%DB, 'NDBM_File', $dbmmap,O_RDWR|O_TRUNC|O_CREAT, 0644) or die "Couldn't create $dbmmap!\n";
      +
      +while (<TXT>) {
      +  next if (/^\s*#/ or /^\s*$/);
      +  $DB{$1} = $2 if (/^\s*(\S+)\s+(\S+)/);
      +}
      +
      +untie %DB;
      +close(TXT);
      +
      +
      + + + + + +
      +
      +$ txt2dbm map.txt map.db
      +
      +
      +
    • + +
    • + $BFbIt4X?t(B
      + MapType: int, MapSource: $BFbIt(B Apache $B4X?t(B + +

      $B%=!<%9$H$7$F!"FbIt(B Apache $B4X?t$r;H$&$3$H$b$G$-$^$9!#(B + $B8=;~E@$G$O%(%s%I%f!<%6$,<+J,MQ$KFH<+$N$b$N$r:n$k$3$H$O$G$-$^$;$s$,!"(B + $B0J2<$N$b$N$,MQ0U$5$l$F$$$^$9!#(B

      + +
        +
      • toupper:
        + $B8+$D$+$C$?%-!<$r$9$Y$FBgJ8;z$KJQ49$9$k!#(B
      • + +
      • tolower:
        + $B8+$D$+$C$?%-!<$r$9$Y$F>.J8;z$KJQ49$9$k!#(B
      • + +
      • escape:
        + $B8+$D$+$C$?%-!<$NCf$NFC + +
      • unescape:
        + $B8+$D$+$C$?%-!<$NCf$N(B 16 $B?J%(%s%3!<%G%#%s%0$rFC +
      +
    • + +
    • + $B30It$N=q$-49$(%W%m%0%i%`(B
      + MapType: prg, MapSource: + Unix $B%U%!%$%k%7%9%F%`$NM-8z$JDL>o%U%!%$%k$X$N%Q%9(B + +

      $B%=!<%9$K$O%^%C%W%U%!%$%k0J30$K%W%m%0%i%`$r;H$&$3$H$b$G$-$^$9!#(B + $B%W%m%0%i%`$O9%$-$J8@8l$rA*Br$9$k$3$H$,$G$-$^$9$,!"(B + $B:n@.$5$l$?$b$N$O$B$9$J$o$A(B$B%*%V%8%'%/%H%3!<%I!"#!/path/to/interpreter' + $B$N$h$&$J%^%8%C%/%/%C%-!<%H%j%C%/$NF~$C$?%9%/%j%W%H(B) + $B$G$J$1$l$P$J$j$^$;$s!#(B

      + +

      $B$3$N%W%m%0%i%`$O(B Apache $B%5!<%P$N5/F0;~$K0lEY$@$15/F0$5$l!"(B + stdin $B$*$h$S(B stdout + $B%U%!%$%k%O%s%I%k$rDL$7$F!"=q$-49$(%(%s%8%s$H$N$d$j$H$j$r9T$$$^$9!#(B + $B$3$N%W%m%0%i%`$O!"3F!9$N%^%C%W4X?t$N8!:w$N$?$S$K!"(B + $B8!:wBP>]$N%-!<$r!"2~9TJ8;z$G=*C<$5$l$?J8;zNs$H$7$F(B + stdin $B$+$i$B$9$J$o$A(B$B!"M?$($i$l$?%-!<$KBP1~$9$kCM$,$J$$(B)$B!"(B + 4 $BJ8;z$NJ8;zNs(B ``NULL'' $B$rJV$5$J$1$l$P$J$j$^$;$s!#(B + 1:1 $B$N%^%C%W(B($B$9$J$o$A(B$B%-!<(B == $BCM(B) + $B$r + + + + + +
      +
      +#!/usr/bin/perl
      +$| = 1;
      +while (<STDIN>) {
      +    # ...put here any transformations or lookups...
      +    print $_;
      +}
      +
      +
      + +

      $B$7$+$7!"==J,$K5$$r$D$1$F$[$7$$$3$H$,$"$j$^$9(B:
      +

      + +
        +
      1. ``Keep it simple, stupid + ($BC1=c$J$^$^$K$7$F$*$1!"GO'' (KISS) + $B$H$$$&86B'$K=>$C$F$/$@$5$$!#$b$7$3$N%W%m%0%i%`$,%O%s%0$7$F$7$^$&$H!"(B + $B$=$N%k!<%k$,8=$l$?=V4V$K(B Apache + $B%5!<%P<+BN$,%O%s%0$7$F$7$^$$$^$9!#(B
      2. + +
      3. $B$"$j$,$A$J4V0c$$$H$7$F$O(B: stdout + $B$KBP$7$F%P%C%U%!$5$l$?F~=PNO$r;H$C$F$O$J$j$^$;$s(B! + $B$3$l$r$d$k$HL58B%k!<%W$K%O%^$C$F$7$^$$$^$9(B! + $B$@$+$i>e$N%3!<%I$G$b(B ``$|=1'' + $B$H$d$C$F$k$s$G$9!D!#(B
      4. + +
      5. RewriteLock + $B%G%#%l%/%F%#%V$r;H$C$F%m%C%/%U%!%$%k$rDj5A$7!"(Bmod_rewrite + $B$,Ev3:%W%m%0%i%`$X$NDL?.$KF14|$r +
      +
    • +
    + RewriteMap $B%G%#%l%/%F%#%V$O2?EY$G$b=q$/$3$H$,$G$-$^$9!#(B + $B%^%C%T%s%04X?t$4$H$K(B RewriteMap + $B$r;H$C$F=q$-49$(MQ%^%C%W%U%!%$%k$r@k8@$7$^$9!#(B + $B%G%#%l%/%H%j$N%3%s%F%-%9%HFbIt$G%^%C%W$r(B$B@k8@$9$k(B + $B$3$H$O$G$-$^$;$s$,!"%G%#%l%/%H%j$N%3%s%F%-%9%H$G$3$N%^%C%W$r(B + $B;H$&(B$B$3$H$O$b$A$m$s2DG=$G$9!#(B + + + + + +
    $BCm0U(B: $B%W%l!<%s%F%-%9%H$H(B DBM $B%U%)!<%^%C%H(B + $B$N%U%!%$%k$K4X$7$F$O!"%^%C%W%U%!%$%k$N(B mtime + $B$,JQ99$5$l$k$+$^$?$O%5!<%P$,:F5/F0$5$l$k$^$G!"(B + $B8!:w$5$l$?%-!<$O%a%b%jFb$K%-%c%C%7%e$5$l$^$9!#(B + $B$G$9$+$i!"(B$BKh2s$N(B$B%j%/%(%9%H$G;H$o$l$k(B + $B%^%C%W4X?t$r%k!<%kFb$K=q$/$3$H$,$G$-$^$9!#(B + $B30It8!:w$O0lEY$7$+9T$o$l$J$$$N$G!"$3$l$G$bBg>fIW$J$N$G$9!#(B
    +
    + +

    RewriteBase

    + $B=q<0(B: RewriteBase + URL-path
    + $B%G%U%)%k%H(B: $B%G%U%)%k%H$OJ*M}(B + $B%G%#%l%/%H%j$N%Q%9(B
    + $B%3%s%F%-%9%H(B: $B%G%#%l%/%H%j(B, .htaccess
    + $B%*!<%P!<%i%$%I(B: + FileInfo
    + $B%9%F!<%?%9(B: Extension
    + $B%b%8%e!<%k(B: mod_rewrite.c
    + $B8_49@-(B: Apache + 1.2
    + +

    RewriteBase + $B%G%#%l%/%F%#%V$O!"%G%#%l%/%H%j$4$H$N=q$-49$($K$*$$$F%Y!<%9$H$J$k(B + URL $B$rL@<(E*$K;XDj$9$k$b$N$G$9!#0J2<$G<($9$h$&$K!"(B + RewriteRule $B$O%G%#%l%/%H%j$4$H$N@_Dj%U%!%$%k(B + (.htaccess) $B$G;H$($^$9!#(B + $B$=$3$G$O!"$3$l$O%m!<%+%k$K?6$kIq$$$^$9!#(B$B$9$J$o$A(B$B!"(B + $B$3$N=hM}CJ3,$G$O%m!<%+%k%G%#%l%/%H%j$N@\F,<-$, + +

    $B?7$7$$(B URL $B$KBP$9$kCV49$,H/@8$9$k$H!"$3$N%b%8%e!<%k$OEv3:(B URL + $B$r%5!<%P=hM}$K:FEjF~$7$J$1$l$P$J$j$^$;$s!#$3$l$r9T$&$K$O!"BP1~$9$k(B + URL $B$N@\F,<-!"$B$7$+$7$J$,$i!"$[$H$s$I$N(B Web $B%5%$%H$G$O(B URL + $B$OJ*M}E*$J%U%!%$%kL>$N%Q%9$rD>@\;X$7$F$$$k(B *$B$o$1$G$O$J$$(B* + $B$N$G!"0lHLE*$K$3$N2>Dj$O4V0c$C$F$$$k$3$H$K$J$j$^$9(B$B!#(B + $B$=$N$?$a!"(BRewriteBase $B%G%#%l%/%F%#%V$r;H$C$F@5$7$$(B + URL $B$N@\F,<-$r;XDj$7$F$d$i$J$1$l$P$J$i$J$$$N$G$9!#(B

    + + + + + +
    $BCm0U(B: $B$b$7$"$J$?$N(B Web $B%5!<%P$N(B URL + $B$,J*M}E*$J%U%!%$%k%Q%9$rD>@\;X$7$F$$$k$N$G(B$B$J$1(B$B$l$P!"(B + RewriteRule + $B%G%#%l%/%F%#%V$r;H$*$&$H$7$F$$$k%G%#%l%/%H%j$9$Y$F$K$*$$$F!"3F(B + .htaccess $B%U%!%$%k$G(B RewriteBase + $B%G%#%l%/%F%#%V$r;H$o$J$1$l$P$J$j$^$;$s!#(B
    + +

    $BNc(B:

    + +
    + $B0J2<$O!"%G%#%l%/%H%j$4$H$N@_Dj%U%!%$%k$@$H;W$C$F$/$@$5$$!'(B + + + + + +
    +
    +#
    +#  /abc/def/.htaccess -- $B%G%#%l%/%H%j(B /abc/def $B$N$?$a$N%G%#%l%/%H%jJL@_Dj%U%!%$%k(B
    +#  $B;29M!'(B/abc/def $B$O(B $B%Q%9(B /xyz $B$NJ*M}%Q%9L>$G$"$k!#(B$B$9$J$o$A(B$B%5!<%P$K$O(B
    +#       'Alias /xyz /abc/def' $B$H$$$C$?(B$B%G%#%l%/%F%#%V$N@_Dj$,$"$k!#(B
    +#
    +
    +RewriteEngine On
    +
    +#  $BJ*M}E*$J%Q%9$N@\F,<-$G$"$k(B /abc/def $B$G$J$/!"(B/xyz $B$rDL$7$F(B
    +#  $B%"%/%;%9$7$F$$$k$3$H$r%5!<%P$KCN$i$;$k!#(B
    +RewriteBase   /xyz
    +
    +#  $B$3$l$,=q$-49$(%k!<%k(B
    +RewriteRule   ^oldstuff\.html$  newstuff.html
    +
    +
    + +

    $B>e5-$NNc$G$O!"(B/xyz/oldstuff.html + $B$X$N%j%/%(%9%H$GJ*M}%U%!%$%k(B /abc/def/newstuff.html + $B$X$N@5$7$$=q$-49$(A`:n$,9T$o$l$^$9!#(B

    + + + + + +
    + Apache + $B%O%C%+!<$N$?$a$NCm
    + $B0J2<$N%j%9%H$G<($7$F$$$k$N$O!"(B + $BFbIt=hM}%9%F%C%W$K4X$9$k>\:Y>pJs$G$9(B:
    +
    +$B%j%/%(%9%H(B:
    +  /xyz/oldstuff.html
    +
    +$BFbIt=hM}!'(B
    +  /xyz/oldstuff.html     -> /abc/def/oldstuff.html  (per-server Alias)
    +  /abc/def/oldstuff.html -> /abc/def/newstuff.html  (per-dir    RewriteRule)
    +  /abc/def/newstuff.html -> /xyz/newstuff.html      (per-dir    RewriteBase)
    +  /xyz/newstuff.html     -> /abc/def/newstuff.html  (per-server Alias)
    +
    +$B=hM}7k2L!'(B
    +  /abc/def/newstuff.html
    +
    +
    + $B$3$l$OHs>o$KJ#;($K8+$($k$b$N$N!"(BApache + $B$NFbIt=hM}$K4X$9$k@5$7$$F0$-$G$9!#$J$<$J$i!"(B + $B%G%#%l%/%H%jC10L$N=q$-49$(A`:n$O=hM}$NCf$K$*$$$F(B + $BMh$k$N$,CY$9$.$k$+$i$G$9!#$=$N$?$a=q$-49$($,9T$J$o$l$k$H!"(B + ($B=q$-49$($,9T$o$l$?(B)$B%j%/%(%9%H$O(B Apache + $B%+!<%M%k$NCf$K:FEjF~$5$l$J$1$l$P$J$j$^$;$s(B! + $B$7$+$7(B: $B$3$l$O?<9o$J%*!<%P!<%X%C%I$rH<$&$h$&$K8+$($k$b$N$N!"(B + $B$NB?$/$NF0:nCf$K$bF1MM$N$3$H$,(B + $B5/$3$C$F$$$k$+$i$G$9!#$J$N$G!"(B + $B$3$N@_7W$H +
    +
    +
    + +

    RewriteCond

    + $B=q<0(B: RewriteCond + TestString CondPatter
    + $B%G%U%)%k%H(B: $B$J$7(B
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k!"(B + $B%P!<%A%c%k%[%9%H!"%G%#%l%/%H%j!"(B.htaccess
    + $B%*!<%P!<%i%$%I(B: + FileInfo
    + $B%9%F!<%?%9(B: Extension
    + $B%b%8%e!<%k(B: mod_rewrite.c
    + $B8_49@-(B: Apache 1.2 + ($BItJ,E*$K(B), Apache 1.3
    + + +

    RewriteCond $B%G%#%l%/%F%#%V$O%k!<%k>r7o$rDj5A$7$^$9!#(B + RewriteRule $B%G%#%l%/%F%#%V$NA0$K0l$D0J>e$N(B + RewriteCond $B%G%#%l%/%F%#%V$rCV$/$3$H$,$G$-$^$9!#(B + $B$=$l0J9_$N=q$-49$(%k!<%k$O!"$=$N%Q%?!<%s$,8=:_$N(B URI + $B$N>uBV$H%^%C%A$7!"(B$B$+$D(B$B$3$l$i$NDI2C>r7o$,(B + $BE,MQ$5$l$k>l9g$K$N$_;H$o$l$^$9!#(B

    + +

    TestString$B$OJ8;zNs$G$"$j!"%W%l!<%s%F%-%9%H$K2C$(!"(B + $B0J2<$N3HD%9=B$$r;}$D$3$H$,$G$-$^$9(B:

    + +
      +
    • + RewriteRule $B8eJ};2>H(B: + $B$3$N=q<0$G!"8eJ};2>H$rI=$7$^$9!#(B + +
      + $N +
      + (0 <= N <= 9) $B$3$l$O!"BP1~$9$k(B RewriteRule + $B%G%#%l%/%F%#%V(B($B8=:_$N(BRewriteCond + $B%G%#%l%/%F%#%V$N%V%m%C%/$N + +
    • + RewriteCond $B8eJ};2>H(B: + $B$3$N=q<0$G!"8eJ};2>H$rI=$7$^$9!#(B + +
      + %N +
      + (1 <= N <= 9) + $B$3$l$O!"8=:_$N>r7o%V%m%C%/$NCf$G(BRewriteCond $B%G%#%l%/%F%#%V(B + $B$K:G8e$K%^%C%A$7$?(B + ($B3g8L$G0O$s$G(B)$B%0%k!<%W2=$5$l$?%Q%?!<%s$X$N%"%/%;%9$rDs6!$7$^$9!#(B +
    • + +
    • + RewriteMap $B3HD%(B: + $B$3$N=q<0$G!"3HD%$rI=$7$^$9!#(B + +
      + ${mapname:key|default} +
      + $B>\:Y$O(B RewriteMap + $B$N%I%-%e%a%s%H(B$B$r;2>H$N$3$H!#(B +
    • + +
    • + $B%5!<%PJQ?t(B: $B0J2<$OJQ?t$rI=$7$^$9!#(B + +
      + %{ $BJQ?tL>(B + } +
      + $BJQ?tL>(B$B$O0J2<$N0lMw$K$"$kJ8;zNs$N$$$:$l$+$G$9(B: + + + + + + + + + + + + + + + +
      + HTTP $B%X%C%@(B: + +

      HTTP_USER_AGENT
      + HTTP_REFERER
      + HTTP_COOKIE
      + HTTP_FORWARDED
      + HTTP_HOST
      + HTTP_PROXY_CONNECTION
      + HTTP_ACCEPT
      +

      +
      + $B%3%M%/%7%g%s(B & $B%j%/%(%9%H(B: + +

      REMOTE_ADDR
      + REMOTE_HOST
      + REMOTE_USER
      + REMOTE_IDENT
      + REQUEST_METHOD
      + SCRIPT_FILENAME
      + PATH_INFO
      + QUERY_STRING
      + AUTH_TYPE
      +

      +
      + $B%5!<%PFbItJQ?t(B: + +

      DOCUMENT_ROOT
      + SERVER_ADMIN
      + SERVER_NAME
      + SERVER_ADDR
      + SERVER_PORT
      + SERVER_PROTOCOL
      + SERVER_SOFTWARE
      +

      +
      + $B%7%9%F%`4XO"(B: + +

      TIME_YEAR
      + TIME_MON
      + TIME_DAY
      + TIME_HOUR
      + TIME_MIN
      + TIME_SEC
      + TIME_WDAY
      + TIME
      +

      +
      + $BFC + +

      API_VERSION
      + THE_REQUEST
      + REQUEST_URI
      + REQUEST_FILENAME
      + IS_SUBREQ
      +

      +
      + + + + + +
      +

      $BCm0U(B: + $B$3$l$i$NJQ?t$O!"$9$Y$FF1MM$NL>A0$r;}$D(B HTTP MIME $B%X%C%@$d(B + Apache $B%5!<%P$N(B C $BJQ?t!"$^$?$O(B Unix $B%7%9%F%`$N(B + struct tm $B%U%#!<%k%I$KBP1~$7$^$9!#(B + $B$[$H$s$I$N$b$N$O!"%^%K%e%"%k$d(B CGI + $B;EMM$N$I$3$+$K@bL@$,$"$j$^$9!#$3$NCf$G(B mode_rewrite + $B$GFCJL$J0UL#$r;}$D$b$N$K0J2<$N$b$N$,$"$j$^$9(B:

      + +
      +
      IS_SUBREQ
      + +
      $B$3$l$O!"%5%V%j%/%(%9%H$r=hM}Cf$O(B "true" + $B$K!"$=$&$G$J$1$l$P(B "false" $B$K$J$j$^$9!#(B + $BM?$($i$l$?%?%9%/$r40N;$9$k$?$a$KDI2C$N%U%!%$%k$d(B URI + $B$r2r7h$9$kI,MW$,$"$k%b%8%e!<%k$O!"(B + $B%5%V%j%/%(%9%H$r@8@.$9$k>l9g$,$"$j$^$9!#(B
      + +
      API_VERSION
      + +
      $B$3$l$O8=:_$N(B httpd $B$N%S%k%I$K$*$1$k(B Apache + $B%b%8%e!<%k(B API($B%5!<%P$H%b%8%e!<%k4V$NFbIt%$%s%?!<%U%'!<%9(B) + $B$N%P!<%8%g%s$G$"$j!"(Binclude/ap_mmn.h $B$GDj5A$5$l$F$$$^$9!#(B + $B%b%8%e!<%k(B API $B$N%P!<%8%g%s$O;HMQ$7$F$$$k(B Apache + $B$N%P!<%8%g%s(B($BNc$($P(B Apche 1.3.14 $B$G$"$l$P(B + 19990320:10) $B$KBP1~$7$^$9$,!"(B + $B$3$l$O + +
      THE_REQUEST
      + +
      $B%V%i%&%6$+$i%5!<%P$KAw$i$l$?(B HTTP + $B%j%/%(%9%H$N40A4$J$b$N(B($BNc$($P!"(B + "GET /index.html HTTP/1.1")$B!#(B + $B$3$l$K$O!"%V%i%&%6$+$iAw$i$l$?DI2C%X%C%@$O0l@Z4^$_$^$;$s!#(B +
      + +
      REQUEST_URI
      + +
      HTTP $B%j%/%(%9%H9T$G%j%/%(%9%H$5$l$?%j%=!<%9(B + ($B>e5-$NNc$G$O(B "/index.html" $B$,$=$l$K$"$?$j$^$9(B)$B!#(B
      + +
      REQUEST_FILENAME
      + +
      $B%j%/%(%9%H$K%^%C%A$7$?%U%!%$%k$^$?$O%9%/%j%W%H$N!"(B + $B40A4$J%m!<%+%k%U%!%$%k%7%9%F%`$N%Q%9!#(B
      +
      +
      +
    • +
    + +

    $B9MN8;v9`(B:

    + +
      +
    1. SCRIPT_FILENAME $B$*$h$S(B REQUEST_FILENAME $B$K$OF1$8L>A0!"(B + $B$9$J$o$A(B$B!"(BApache $B%5!<%P$N(B request_rec + $BFbIt9=B$BN$NCf$N(B filename + $B%U%#!<%k%I$NCM$,F~$C$F$$$^$9!#A0$G$"$k$N$KBP$7!"8erequest_rec + $B%U%#!<%k%I$N(B uri $B$NCM$,F~$C$F$$$k(B)REQUEST_URI + $B$KBP1~$9$k$b$N$G$9!#(B
    2. + +
    3. $BJQ?t(B$B$KG$0U$N4D6-JQ?t$r;XDj$G$-$kFCJL$J=q<0(B + %{ENV:$BJQ?t(B} + $B$,$"$j$^$9!#$3$l$O(B Apache + $B$NFbIt9=B$BNgetenv() + $B$rDL$7$F8!:w$5$l$^$9!#(B
    4. + +
    5. + $B%X%C%@(B$B$KG$0U$N(B HTTP MIME $B%X%C%@L>$r;XDj$G$-$kFCJL$J=q<0(B + %{HTTP:$B%X%C%@(B}$B$,$"$j$^$9!#$3$l$O(B + HTTP $B%j%/%(%9%H$+$i8!:w$5$l$^$9!#(B + $BNc(B: %{HTTP:Proxy-Connection} $B$O(B HTTP $B%X%C%@$N(B + ``Proxy-Connection:'' $B$NCM$G$9!#(B
    6. + +
    7. $BA0J};2>H$r9T$J$C$FFbIt$N(B(URL $B%Y!<%9$N(B) + $B%5%V%j%/%(%9%H$r$BJQ?t(B$B$N:G=*CM$r7hDj$9$kFCJL$J=q<0(B + %{LA-U:$BJQ?t(B} $B$,$"$j$^$9!#(B + $Bl9g$K;HMQ$7$^$9!#Nc$($P!"%5!<%PC10L$N%3%s%F%-%9%H(B + (httpd.conf $B%U%!%$%k(B) $B$G(B REMOTE_USER + $BJQ?t$K$7$?$,$C$F=q$-49$($r9T$$$?$$>l9g$K$O!"(B + %{LA-U:REMOTE_USER} + $B$r;HMQ$7$J$1$l$P$J$j$^$;$s!#$J$<$J$i!"$3$NJQ?t$O(B mod_rewrite + $B$,F0:n$9$k(B URL $BJQ49%U%'!<%:$N(B$B8e(B$B$K$"$kG'>Z%U%'!<%:$G(B + $B%;%C%H$5$l$k$b$N$@$+$i$G$9!#0lJ}!"%G%#%l%/%H%jC10L$N%3%s%F%-%9%H(B + (.htaccess $B%U%!%$%k(B) $B$G$O!"(Bmod_rewrite $B$O(B API $B$N(B Fixup + $B%U%'!<%:$rDL$7$FZ%U%'!<%:$O$3$N%U%'!<%:$N(B$BA0(B$B$K9T$J$o$l$k$?$a!"(B + $B$=$3$G$OC1$K(B %{REMOTE_USER} + $B$H$9$k$3$H$,$G$-$k$^$9!#(B
    8. + +
    9. $BFbIt$N(B($B%U%!%$%kL>%Y!<%9$N(B) + $B%5%V%j%/%(%9%H$r$BJQ?t(B$B$N:G=*CM$r7hDj$9$kFCJL$J=q<0(B + %{LA-F:$BJQ?t(B} $B$,$"$j$^$9!#(B + $B$[$H$s$I$N>l9g$3$l$OA0=R$N(B LA-U $B$HF1$8$G$9!#(B
    10. +
    + +

    CondPattern $B$O!">r7o%Q%?!<%s$G!"(B + $B8=:_$N(B TestString $B$NTestString $B$OI>2A$5$l$?8e$K(B CondPattern$B$KBP$7$F(B + $B%^%C%A%s%0$,9T$J$o$l$^$9!#(B

    + +

    $BHw9M(B: CondPattern$B$O!"(B + $BI8=`$N(B$B3HD%@55,I=8=(B$B$K$$$/$D$+DI2C$r9T$C$?$b$N$G$9(B:

    + +
      +
    1. '!' $BJ8;z(B($B%(%/%9%/%i%a!<%7%g%s%^!<%/(B) + $B$r%Q%?!<%sJ8;zNs$NA0$K$D$1$k$3$H$G!"(B + $B%^%C%A(B$B$7$J$$(B$B%Q%?!<%s$r;XDj$G$-$^$9!#(B
    2. + +
    3. + CondPattern $B$N$A$g$C$H$7$?JQ +
    4. '<CondPattern' + ($B;z6g$NJB$SE*$K!"$h$j>.$5$$(B)
      + CondPattern $B$rC1$J$kJ8;zNs$H$7$F07$$!"(B + $B;z6g$NJB$S$H$7$F(B TestString $B$HHf3S$7$^$9!#(B + TestString $B$,;z6g$NJB$S$H$7$F(B + CondPattern $B$h$j>.$5$$>l9g$K??$K$J$j$^$9!#(B
    5. + +
    6. '>CondPattern' + ($B;z6g$NJB$SE*$K!"$h$jBg$-$$(B)
      + CondPattern $B$rC1$J$kJ8;zNs$H$7$F07$$!"(B + $B;z6g$NJB$S$H$7$F(B TestString $B$HHf3S$7$^$9!#(B + TestString $B$,;z6g$NJB$S$H$7$F(B + CondPattern $B$h$jBg$-$$>l9g$K??$K$J$j$^$9!#(B
    7. + +
    8. '=CondPattern' + ($B;z6g$NJB$SE*$KEy$7$$(B)
      + CondPattern $B$rC1$J$kJ8;zNs$H$7$F07$$!"(B + $B;z6g$NJB$S$H$7$F(B TestString $B$HHf3S$7$^$9!#(B + TestString $B$,;z6g$NJB$S$H$7$F(B + CondPattern $B$HEy$7$$>l9g!"$9$J$o$A!"Fs$D$NJ8;zNs$,(B + (1 $BJ8;z$:$DHf3S$7$F(B)$B@53N$KEy$7$$>l9g$K??$K$J$j$^$9!#(B + $B$b$7(B CondPattern $B$,C1$J$k(B"" + ($BFs$D$N0zMQId(B)$B$G$"$l$P!"(B + TestString $B$O6uJ8;zNs$HHf3S$5$l$^$9!#(B
    9. + +
    10. '-d' ($B%G%#%l%/%H%j(B (directory))
      + TestString $B$r%Q%9L>$H$7$F07$$!"$=$l$,B8:_$7$F!"(B + $B$+$D%G%#%l%/%H%j$G$"$l$P??!#(B
    11. + +
    12. '-f' ($BDL>o$N%U%!%$%k(B (file))
      + TestString $B$r%Q%9L>$H$7$F07$$!"$=$l$,B8:_$7$F!"(B + $B$+$DDL>o$N%U%!%$%k$G$"$l$P??!#(B
    13. + +
    14. '-s' ($BBg$-$5(B (size) + $B$N$"$kDL>o$N%U%!%$%k(B)
      + TestString $B$r%Q%9L>$H$7$F07$$!"$=$l$,B8:_$7$F!"(B + $B$+$DBg$-$5$,(B 0 $B$h$jBg$-$$DL>o%U%!%$%k$G$"$l$P??!#(B
    15. + +
    16. '-l' ($B%7%s%\%j%C%/%j%s%/(B + (symbolic link))
      + TestString $B$r%Q%9L>$H$7$F07$$!"$=$l$,B8:_$7$F!"(B + $B$+$D%7%s%\%j%C%/%j%s%/$G$"$l$P??!#(B
    17. + +
    18. '-F' ($B%5%V%j%/%(%9%H$rDL$7$?4{B8%U%!%$%k(B) +
      + TestString $B$,M-8z$J%U%!%$%k$G$"$k$3$H!"(B + $B$=$7$F$3$N%5!<%P$K$*$$$F!"8=;~E@$G@_Dj$5$l$F$$$k$9$Y$F$N(B + $B%"%/%;%9@)8f$rDL$7$F!"$=$N%Q%9L>$G%"%/%;%9$G$-$k$+$I$&$+$r(B + $B%A%'%C%/$7$^$9!#$3$l$OFbIt$N%5%V%j%/%(%9%H$r;H$C$F(B + $B%A%'%C%/$r9T$&$N$G!"Cm0U$7$F;H$o$J$$$H%5!<%P$N(B + $B%Q%U%)!<%^%s%9$rDc2<$5$;$k$3$H$K$J$j$+$M$^$;$s(B!
    19. + +
    20. '-U' ($B%5%V%j%/%(%9%H$rDL$7$?4{B8(B URL) +
      + TestString $B$,M-8z$J(B URL $B$G$"$k$3$H!"(B + $B$=$7$F$3$N%5!<%P$K$*$$$F!"8=;~E@$G@_Dj$5$l$F$$$k$9$Y$F$N(B + $B%"%/%;%9@)8f$rDL$7$F!"$=$N%Q%9L>$G%"%/%;%9$G$-$k$+$I$&$+$r(B + $B%A%'%C%/$7$^$9!#$3$l$OFbIt$N%5%V%j%/%(%9%H$r;H$C$F(B + $B%A%'%C%/$r9T$&$N$G!"Cm0U$7$F;H$o$J$$$H%5!<%P$N(B + $B%Q%U%)!<%^%s%9$rDc2<$5$;$k$3$H$K$J$j$+$M$^$;$s(B!
    21. + + + + + + +
      $BCm0U(B: $B0J>e$9$Y$F$N%F%9%H$K$D$$$F!"(B + $B%(%/%9%/%i%a!<%7%g%s%^!<%/(B ('!') $B$rA0$KCV$/$3$H$K$h$j(B + $B$=$l$i$N0UL#$rH]Dj$7$?%^%C%A%s%0$r9T$J$&$3$H$,$G$-$^$9!#(B
      + +
    + +

    $B$5$i$K!"(BRewriteCond + $B%G%#%l%/%F%#%V$X$NBh;00z?t$H$7$F(B CondPattern $B$KFCJL$J(B

    + +
    + [$B%U%i%0(B] +
    + $B$rDI2C$9$k$3$H$,$G$-$^$9(B + $B%U%i%0(B$B$O0J2<$N$b$N$r%+%s%^6h@Z$j$GJB$Y$?$b$N$G$9(B: + +
      +
    • 'nocase|NC' + (no case)
      + $B$3$l$OBgJ8;z>.J8;z$r6hJL$;$:$K%F%9%H$7$^$9!#(B$B$9$J$o$A!"(B + $BE83+$5$l$?(BTestString $B$H(B CondPattern $B$K$*$$$F!"(B + 'A-Z' $B$*$h$S(B 'a-z' $B$N4V$K$O0c$$$O$J$$$b$N$H8+$J$5$l$^$9!#(B + $B$3$N%U%i%0$O(BTestString $B$H(B CondPattern $B$N4V$N(B + $BHf3S$K$*$$$F$N$_M-8z$G$9!#%U%!%$%k%7%9%F%`>e$*$h$S%5%V%j%/%(%9%H(B + $B$N%A%'%C%/$G$O0UL#$r;}$A$^$;$s!#(B
    • + +
    • + 'ornext|OR' + (or next condition)
      + $B%k!<%k>r7o$r7k9g$9$k$K$"$?$j!"0EL[$N(B AND $B$NBe$o$j$K%m!<%+%k$N(B + OR $B$r;H$$$^$9!#E57?E*$JNc$H$7$F!"0J2<$r;2>H$7$F$/$@$5$$!'(B + +
      +
      +RewriteCond %{REMOTE_HOST}  ^host1.*  [OR]
      +RewriteCond %{REMOTE_HOST}  ^host2.*  [OR]
      +RewriteCond %{REMOTE_HOST}  ^host3.*
      +RewriteRule ...$B$3$l$i$N%[%9%H$K4X$9$kFCJL$J=hM}(B
      +
      +
      + $B$3$N%U%i%0$r;H$o$J$$>l9g$O!">r7o(B/$B%k!<%k$r(B + 3 $B2s=q$/$3$H$K$J$C$F$7$^$$$^$9!#(B +
    • +
    + +

    $B;HMQNc(B:

    + +
    + $B%j%/%(%9%H$NCf$N(B ``User-Agent:'' $B%X%C%@$K=>$C$F(B + $B%5%$%H$N%[!<%`%Z!<%8$N=q$-49$($r9T$J$&$K$O!"0J2<$N$h$&$K$7$^$9!'(B + +
    +
    +RewriteCond  %{HTTP_USER_AGENT}  ^Mozilla.*
    +RewriteRule  ^/$                 /homepage.max.html  [L]
    +
    +RewriteCond  %{HTTP_USER_AGENT}  ^Lynx.*
    +RewriteRule  ^/$                 /homepage.min.html  [L]
    +
    +RewriteRule  ^/$                 /homepage.std.html  [L]
    +
    +
    + $B2r>h$C$F$$$k(B) + $B%M%C%H%9%1!<%W%J%S%2!<%?$r;H$&>l9g!"%U%l!<%`(B$B$J$I(B$B$r4^$`(B + max $B$N%[!<%`%Z!<%8$r8+$k$3$H$K$J$j$^$9!#(B($BCl9g$O!"2hA|$d%F!<%V%k(B$B$J$I(B$B$r4^$^$J$$(B + min $B$N%[!<%`%Z!<%8$,I=<($5$l$^$9!#$=$l0J30$N%V%i%&%6$N>l9g$OI8=`(B + (std) $B$N%Z!<%8$,I=<($5$l$^$9!#(B +
    +
    + +

    RewriteRule

    + $B=q<0(B: RewriteRule + Pattern Substitution
    + $B%G%U%)%k%H(B: $B$J$7(B
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k!"(B + $B%P!<%A%c%k%[%9%H!"%G%#%l%/%H%j!"(B.htaccess
    + $B%*!<%P!<%i%$%I(B: + FileInfo
    + $B%9%F!<%?%9(B: Extension
    + $B%b%8%e!<%k(B: mod_rewrite.c
    + $B8_49@-(B: Apache 1.2 + (partially), Apache 1.3
    + +

    RewriteRule + $B%G%#%l%/%F%#%V$O!"$BDj5A$9$k=g=x(B$B$O=EMW$G$9!#(B + $B$J$<$J$i!" + +

    Pattern $B$O8=:_$N(B + URL $B$KE,MQ$5$l$k(B (Apache 1.1.x $B$G$O(B System V8$B!"(BApache 1.2.x + $B0J9_$G$O(B POSIX $B$N(B)$B@55,I=8=(B$B$G$9!#(B + $B$3$3$G!V8=:_$N!W$H8@$C$F$$$k$N$O!"%k!<%k$,E,MQ$5$l$k:]$N(B URL + $B$NCM$N$3$H$G$9!#$3$l$O%j%/%(%9%H$5$l$?%*%j%8%J%k$N(B URL + $B$G$"$k$H$O8B$j$^$;$s!#4{$K?tB?$/$N%k!<%k$,%^%C%A$7$F!"(B + $B$=$l$r=q$-49$($?8e$+$b$7$l$J$$$+$i$G$9!#(B

    + +

    $B@55,I=8=$NJ8K!$K4X$9$k%R%s%H(B:

    + + + + + +
    +
    +$B%F%-%9%H(B: 
    +  .           $BG$0U$N0lJ8;z(B
    +  [chars]     $BJ8;z%/%i%9(B: $B$$$:$l$+$NJ8;z(B
    +  [^chars]    $BJ8;z%/%i%9(B: $B$3$l$i0J30$NJ8;z(B
    +  text1|text2 $BA*Br;h(B: text1 $B$^$?$O(B text2
    +
    +$BJ8;z?t;XDj(B:
    +  ?           $BD>A0$NJ8;z$N(B 0 $B2s$^$?$O(B 1 $B2s$N7+$jJV$7(B
    +  *           $BD>A0$NJ8;z$N(B 0 $B2s0J>e$N7+$jJV$7(B
    +  +           $BD>A0$NJ8;z$N(B 1 $B2s0J>e$N7+$jJV$7(B
    +
    +$B%0%k!<%T%s%0(B:
    +  (text)      $B%F%-%9%H$N%0%k!<%T%s%0(B
    +              ($BA*Br;h$N6-3&$rL@<($9$k!"H$r:n@.$9$k$?$a$K;H$&!#(B
    +               N$BHVL\$N%0%k!<%W$O!"(BRewriteRule $B$N1&B&$NI=8=$G(B$N$B$H$7$F;2>H$9$k$3$H$,2DG=!#!K(B
    +
    +$BJ8;z0LCV$N;XDj(B:
    +  ^           $B9TF,(B
    +  $           $B9TKv(B
    +
    +$B%(%9%1!<%W(B:
    +  \char       $BFCC$9(B)$B$9$k(B
    +              ($BNc$($P(B ".[]()" $B$J$I(B)
    +
    +
    + +

    $B@55,I=8=$K4X$9$k>pJs$O!"%m!<%+%k$N(B regex(3) man $B%Z!<%8$+$^$?$O(B + Apache 1.3 $B$NG[I[J*$K4^$^$l$k(Bsrc/regex/regex.3 + $B$r;2>H$7$F$/$@$5$$!#$b$7@55,I=8=$d$=$NJQ$B$J$I(B)$B$K6=L#$,$"$l$P!"0J2<$N@lLg=q$r$4Mw2<$5$$(B:

    + +
    + Mastering Regular Expressions
    + Jeffrey E.F. Friedl
    + Nutshell Handbook Series
    + O'Reilly & Associates, Inc. 1997
    + ISBN 1-56592-257-3
    +
    + +

    ($BLuCm(B: $BBh(B2$BHG$NF|K\8lHG(B)

    + +
    + $B>\@b(B $B@55,I=8=(B $BBh(B2$BHG(B
    + Jeffrey E. F. Friedl $BCx(B
    + $BEDOB(B $B>!(B $BLu(B
    + $B%*%i%$%j! + ISBN 4-87311-130-7
    +
    + +

    $B$5$i$K!"(Bmod_rewrite $B$G$O%Q%?!<%s$NA0$K(B NOT $BJ8;z(B('!') + $B$,;H$($^$9!#$3$l$G8eB3$N%Q%?!<%s$rH]Dj$9$k$3$H$,$G$-$^$9!#(B + $BNc$($F$$$&$J$i$P!"(B``$B$b$78=:_$N(B URL + $B$,$3$N%Q%?!<%s$K%^%C%A(B$B$7$J$1$l$P(B'' + $B$H$$$&$3$H$G$9!#$3$l$O!"H?BP$N%Q%?!<%s$rI=$9J}$,4JC1$@$C$?$j!"(B + $B:G8e$N%G%U%)%k%H%k!<%k$H$9$k$J$I!"(B + $BNc30E*$J%1!<%9$rI=8=$9$k$N$K$b;H$($^$9!#(B

    + + + + + +
    $BCm0U(B: NOT + $BJ8;z$r;H$C$F%Q%?!<%s$rH]Dj$9$k>l9g$O%Q%?!<%sCf$K(B + $B%0%k!<%W2=$5$l$?%o%$%k%I%+!<%IItJ,$rF~$l$k$3$H$O$G$-$^$;$s!#(B + $B$3$l$O!"%Q%?!<%s$,%^%C%A(B *$B$7$J$$(B* $B$H$-!"(B + $B%0%k!<%W$NCf?H$O6u$K$J$C$F$7$^$&$+$i$G$9!#$=$N7k2L!"(B + $BH]Dj$5$l$?%Q%?!<%s$r;H$&>l9g$O!"CV$-49$(J8;zNs$NCf$G(B + $N $B$O;H$($^$;$s(B!
    + +

    $B=q$-49$(%k!<%k$N(B Substitution $B$O!"(BPattern$B$,(B + $B%^%C%A$7$?>l9g$K%*%j%8%J%k$N(B URL $B$+$iCV$-49$($i$l$kJ8;zNs$G$9!#(B + $B%W%l!<%s%F%-%9%H$NB>$K0J2<$N$b$N$,;H$($^$9!#(B

    + +
      +
    1. RewriteRule $B%Q%?!<%s$X$N8eJ};2>H(B $N
    2. + +
    3. $B:G8e$K%^%C%A$7$?(B RewriteCond $B%Q%?!<%s$X$N8eJ};2>H(B + %N
    4. + +
    5. $B%k!<%k>r7o$N%F%9%HJ8;zNs$HF1MM$N%5!<%PJQ?t(B + (%{$BJQ?tL>(B})
    6. + +
    7. $B%^%C%T%s%04X?t(B $B$N8F$S=P$7(B + (${mapname:key|default})
    8. +
    + $B8eJ};2>H$O(B $N(N=0..9) + $B<1JL;R$GI=$7$^$9!#$3$l$O!"%^%C%A$7$?(B Pattern $B$N%0%k!<%W$NCf$G!"(B + N $BHVL\$N$b$N$NFbMF$KCV$-49$($i$l$^$9!#%5!<%PJQ?t$O(B + RewriteCond $B%G%#%l%/%F%#%V$N(B TestString $B$HF1$8$G$9!#(B + $B%^%C%T%s%04X?t$O(B RewriteMap $B%G%#%l%/%F%#%V$+$iMh$?$b$N$G!"(B + $B$=$3$G@bL@$7$F$$$^$9!#$3$l$i(B 3 $B%?%$%W$NJQ?t$O!">e5-$N=g=x$GE83+$5$l$^$9!#(B + +

    $BA0=R$N$h$&$K!"$9$Y$F$N=q$-49$(%k!<%k$,(B Substitution $B$KBP$7$F(B + ($B@_Dj%U%!%$%k$KDj5A$7$F$"$k=g$K(B)$BE,MQ$5$l$^$9!#(BURL + $B$O(B Substitution $B$K$h$C$F(B$B40A4$KCV$-49$($i$l(B$B!"(B + $B=q$-49$(=hM}$O(B L $B%U%i%0(B -- $B8e=R(B -- + $B$K$h$C$FL@<(E*$K=*C<$5$l$F$$$J$$8B$j!"(B + $B%k!<%k$,$J$/$J$k$^$GB3$1$i$l$^$9!#(B

    + +

    '-' $B$H8F$P$l$kFC$BCV496X;_(B! $B$N0UL#$G$9!#JQ$G$7$g(B? + $B$$$$$(!"$3$l$O(B URL $B$N%^%C%A%s%0(B$B$@$1(B$B$r9T$J$$!"(B + $BCV49$r9T$J$o$J$$$H$$$&5!G=$rDs6!$7$F$/$l$k$b$N$G$9!#(B + $B$9$J$o$A(B$B!"(BC (chain) + $B%U%i%0$H$J$$$C$7$g$K;H$&$3$H$K$h$C$F!"(B + $BCV49$,9T$J$o$l$kA0$KJ#?t$N%Q%?!<%s$rE,MQ$9$k$3$H$,$G$-$^$9!#(B

    + +

    $B$b$&$R$H$DCm0U;v9`(B: $B%/%(%j!C5n$7$?$$>l9g$O!"(B + $BCV49J8;zNs$r%/%(%9%A%g%s%^!<%/$@$1$G=*$o$i$;$k$h$&$K$7$^$9!#(B

    + + + + + +
    $BCm0U(B: $BFChttp://thishost[:thisport] + $B$rCV$/$H!"(Bmod_rewrite + $B$O<+F0E*$K$3$l$r=|5n$7$^$9!#$3$N0EL[$N30It%j%@%$%l%/%H(B URL + $B$K$*$1$k<+F0JQ495!G=$O!"%[%9%HL>ItJ,$r@8@.$9$k(B + $B%^%C%T%s%04X?t$HF1;~$K;H$&>l9g$KJXMx$+$D=EMW$J$b$N$G$9!#(B + $B$3$l$rM}2r$9$k$K$O!"0J2<$N%5%s%W%k$N>O$N:G=i$NNc$r8+$F$/$@$5$$!#(B +
    + + + + + +
    $BHw9M(B: $B$3$N5!G=$N1F6A$G!"(B + http://thishost $B@\F,<-$NIU$$$?(B + $B<+J,<+?H$N%5!<%P$X$NL5>r7o$N30It%j%@%$%l%/%7%g%s$O!"(B + $BF0:n$7$^$;$s!#(B + $B$3$N$h$&$J<+8J%j%@%$%l%/%H$r9T$&$K$O!"(BR + $B%U%i%0$r;H$&I,MW$,$"$j$^$9(B($B8e=R(B)$B!#(B
    + +

    RewriteRule $B%G%#%l%/%F%#%V$NBh;00z?t$H$7$F!"(B + Pattern $B$KBP$7$F>e5-0J30$K$b0J2<$N$h$&$J(B

    + +
    + [$B%U%i%0(B] +
    + $B$r$D$1$k$3$H$,$G$-$^$9!#(B + $B%U%i%0(B$B$O0J2<$N$b$N$r%+%s%^$G6h@Z$C$F;XDj$7$^$9(B: + +
      +
    • + 'redirect|R + [=code]' ($B6/@)(B redirect)
      + + Substitution $B$NA0$K(B ($B?7$7$$(B URL $B$r(B URI $B$K$9$k(B) + http://thishost[:thisport]/ + $B$r$D$1$k$3$H$K$h$j6/@)E*$J30It%j%@%$%l%/%7%g%s$r9T$J$$$^$9!#(B + code $B$,;XDj$5$l$J$$>l9g!"(BHTTP $B%l%9%]%s%9$N(B 302 + (MOVED TEMPORARILY) $B$,;H$o$l$^$9!#(B300 $B$+$i(B 400 + $B$^$G$NB>$N%l%9%]%s%9%3!<%I$rJV$7$?$$>l9g$O!"(B + $BD>@\$=$NHV9f$r;XDj$9$k$+!"%7%s%\%kL>(B temp + ($B%G%U%)%k%H(B), permanent, seeother + $B$N$$$:$l$+$r;H$$$^$9!#(B$BNc$($P(B$B!"(B``/~'' + $B$r(B ``/u/'' $B$KJQ49$7$?$j!">o$K(B /u/ + user $B$K%9%i%C%7%e$rDI2C$9$k$J$I$N!"%/%i%$%"%s%H$K(B $B@55,2=(B + $B$5$l$?(B URL $B$rJV$9%k!<%k$K;H$&$3$H$,$G$-$^$9!#(B
      + +

      $BCm0U(B: + $B$3$N%U%i%0$r;H$&>l9g$O!"CV49%U%#!<%k%I$,M-8z$J(B URL + $B$G$"$k$3$H$r3NG'$7$F$/$@$5$$!#$b$7$=$&$G$J$$>l9g!"(B + $BL58z$J>l=j$K%j%@%$%l%/%H$7$F$$$k$3$H$K$J$C$F$7$^$$$^$9!#(B + $B$5$i$K!"$3$N%U%i%0$O!"(BURL $B$NA0$K(B + http://thishost[:thisport]/ + $B$rIU2C$9$k$@$1$G!"$=$N8e$b=q$-49$(=hM}$OB3$/$3$H$r(B + $BM}2r$7$F$*$$$F$/$@$5$$!#(B + $BDL>o$O$=$3$G=q$-49$($r$d$a$FB(;~$K%j%@%$%l%/%H$9$k$3$H$,K>$_$NF0:n(B + $B$G$7$g$&!#(B + $B=q$-49$($r=*N;$9$k$K$O!"(B + 'L' $B%U%i%0$b$$$C$7$g$K;XDj$7$J$1$l$P$J$j$^$;$s!#(B

      +
    • + +
    • 'forbidden|F' (URL $B$r6/@)E*$K(B + forbidden($B6X;_(B)$B$K$9$k(B)
      + $B$3$l$O8=:_$N(B URL $B$r6/@)E*$K%"%/%;%96X;_$K$7$^$9!#(B + $B$9$J$o$A(B$B!"B(;~$K(B HTTP $B%l%9%]%s%9$N(B 403 (FORBIDDEN) + $B$rJV$7$^$9!#$3$N%U%i%0$OE,@Z$J(B RewriteCond + $B$H$$$C$7$g$K;H$C$F!"FCDj$N(B URL $B$KBP$9$k>r7o%V%m%C%/$r9T$J$&$?$a$K(B + $B;H$$$^$9!#(B
    • + +
    • 'gone|G' (URL $B$r6/@)E*$K(B + gone($B>C5n:Q$_(B)$B$K$9$k(B)
      + $B$3$l$O8=:_$N(B URL $B$r6/@)E*$K>C5n:Q$_(B(gone)$B$K$7$^$9!#(B + $B$9$J$o$A(B$B!"B(;~$K(B HTTP $B%l%9%]%s%9$N(B 410 (GONE) + $B$rJV$7$^$9!#$3$N%U%i%0$O$b$O$dB8:_$7$J$$%Z!<%8$r(B + $B>C5n:Q$_$H$7$F%^!<%/$9$k$?$a$K;H$$$^$9!#(B
    • + +
    • + 'proxy|P' ($B6/@)(B + proxy)
      + $B$3$N%U%i%0$O!"CV49BP>]It$rFbItE*$J%W%m%-%7%j%/%(%9%H(B + $B$H$_$J$7!"$=$N>l$G(B($B$9$J$o$A(B$B!"(B + $B$3$3$G=q$-49$(%k!<%k$rDd;_$7$F(B)$B%W%m%-%7%b%8%e!<%k$r(B$BDL$7$F=PNO$7$^$9!#(B + $BCV49BP>]J8;zNs$O(B($BNc$($P(B$B!"IaDL$O(B http:// + hostname$B$G;O$^$k$h$&$J(B)$B!"(BApache + $B%W%m%-%7%b%8%e!<%k$G07$($kM-8z$J(B URI $B$G$J$1$l$P$J$j$^$;$s!#(B + $B$=$&$G$J$1$l$P!"%W%m%-%7%b%8%e!<%k$+$i%(%i!<$,Js9p$5$l$^$9!#(B + $B$3$N%U%i%0$r;H$&$3$H$G$h$j6/NO$J(B ProxyPass + $B%G%#%l%/%F%#%V$NA06u4V$K%^%C%W$9$k$3$H$,$G$-$^$9!#(B + +

      $BCm0U(B: $B$3$N5!G=$r;H$&$K$"$?$C$F$O!"$4<+J,$N(B Apache $B%5!<%P$K(B + $B%W%m%-%7%b%8%e!<%k$,AH$_9~$^$l$F$$$k$3$H$r(B + $B3NG'$7$F$/$@$5$$!#3NG'J}K!$,$o$+$i$J$$>l9g$O!"(B``httpd + -l'' $B$N=PNO$NCf$K(B mod_proxy.c + $B$,$"$k$+$I$&$+$rD4$Y$F$_$^$7$g$&!#$b$7$"$l$P!"(B + mod_rewrite $B$N$3$N5!G=$r;H$($^$9!#$b$7$J$1$l$P!"(Bmod_proxy + $B$rM-8z$K$7$F(B ``httpd'' + $B%W%m%0%i%`$r:F9=C[$9$kI,MW$,$"$j$^$9!#(B

      +
    • + +
    • 'last|L' + (last($B:G8e$N(B)$B%k!<%k(B)
      + $B$3$3$G=q$-49$(=hM}$rCf;_$7!"(B + $B$=$l0J>e$N=q$-49$(%k!<%k$rE,MQ$7$J$$$h$&$K$7$^$9!#$3$l$O(B Perl + $B$N(B last $B%3%^%s%I$d(B C $B8@8l$N(B break + $B%3%^%s%I$KBP1~$9$k$b$N$G$9!#$3$N%U%i%0$r;H$&$3$H$G!"(B + $B8=:_$N=q$-49$(8e$N(B URL $B$,8eB3$N%k!<%k$K$h$C$F(B + $B$=$l0J>e=q$-49$($i$l$k$3$H$rKI;_$7$^$9!#(B + $BNc$($P!"$3$l$r;H$C$F%k!<%H%Q%9$N(B URL ('/') + $B$r$BNc$($P(B '/e/www/' + $B$K=q$-49$($^$9!#(B
    • + +
    • 'next|N' + (next($B + $B=q$-49$(=hM}$r(B($B0lHV:G=i$N=q$-49$(%k!<%k$+$i(B)$B:Fnext $B%3%^%s%I$d(B C $B8@8l$N(B continue + $B%3%^%s%I$KBP1~$9$k$b$N$G$9!#(B + $B=q$-49$(=hM}$r:F5/F0$7$?$$$H$-(B + $B$9$J$o$A!"(B$B%k!<%W$N@hF,$KLa$j$?$$$H$-(B
      $B$K(B + $B$3$N%3%^%s%I$r;H$C$F$/$@$5$$!#(B + $B$?$@$7!"L58B%k!<%W$r:n$i$J$$$h$&$KN10U$7$F$/$@$5$$(B! +
    • + +
    • 'chain|C' + ($Bchained ($B%A%'%$%s(B))
      + $B$3$N%U%i%0$r;XDj$9$k$H!"8=:_$N%k!<%k$Oo$I$*$j9T$o$l$^$9!#(B + $B$9$J$o$A(B$B%U%i%0$O2?$N1F6A$bM?$($^$;$s!#%k!<%k$,%^%C%A(B + $B$7$J$$(B$B>l9g!"8eB3$N$9$Y$F$N%k!<%k$O%9%-%C%W$5$l$^$9!#(B + $BNc$($P(B (.www $BItJ,$,9T$J$o$l$k$Y$-$G$J$$(B) + $B30It%j%@%$%l%/%H$rH/@8$5$;$?;~$K!"(B + $B%G%#%l%/%H%j$4$H$N%k!<%k%;%C%H$NCf$+$i(B ``.www'' + $B$NItJ,$r + +
    • + 'type|T=MIME-type' + (MIME type $B$N6/@);XDj(B)
      + $B%?!<%2%C%H%U%!%$%k$N(B MIME $B%?%$%W$r6/@)E*$K(B MIME-type + $B$K$7$^$9!#Nc$($P$3$l$r;H$C$F!"(Bmod_alias + $B$N%G%#%l%/%F%#%V$G$"$k(B ScriptAlias + $B$r%7%_%e%l!<%H$9$k$3$H$,$G$-$^$9!#$3$l$O!"(B + $B%^%C%T%s%0$5$l$?%G%#%l%/%H%j$NCf$K$"$k$9$Y$F$N%U%!%$%k$N(B MIME + $B%?%$%W$r!"FbItE*$K(B``application/x-httpd-cgi'' + $B$K6/@)%;%C%H$9$k$b$N$G$9!#(B
    • + +
    • + 'nosubreq|NS' (no + sub-request, + $BFbIt$N(B + $B%5%V%j%/%(%9%H$,$J$$(B + $B$H$-$N$_;H$o$l$k(B)
      + $B$3$N%U%i%0$r;H$&$H!"%/%(%9%H$,FbIt$N%5%V%j%/%(%9%H$G$"$k>l9g$K!"(B + $B=q$-49$(%(%s%8%s$,=q$-49$(%k!<%k$r%9%-%C%W$9$k$h$&$K$7$^$9!#(B + $B%5%V%j%/%(%9%H$O!"Nc$($P!"(Bmod_include + $B$,%G%#%l%/%H%j$N%G%U%)%k%H$N8uJd$H$J$k%U%!%$%k$N>pJs(B + (index.xxx) $B$r8!:w$7$h$&$H$9$k:]$K!"(BApache + $B$NCf$GFbItE*$KH/@8$7$^$9!#(B + $B%5%V%j%/%(%9%H$K$*$$$F$O=q$-49$(A`:n$O>o$KM-MQ$G$"$k$H$O8B$i$:!"(B + $B$9$Y$F$N%k!<%k$,E,MQ$5$l$F$7$^$&$HLdBj$r5/$3$7$F$7$^$&>l9g$b$"$j$^$9!#(B + $B$=$N$h$&$J%k!<%k$O$3$N%U%i%0$r;H$C$F=|30$7$^$9!#(B
      + +

      $B0J2<$N%k!<%k$r;H$C$F!"$3$N%U%i%0$r;H$&$+$I$&$+7h$a$F$/$@$5$$(B: + CGI $B%9%/%j%W%H$N@hF,$K$J$s$i$+$N(B URL $B$rIU2C$7$F!"$=$l$r(B CGI + $B%9%/%j%W%H$G=hM}$5$;$h$&$H$9$k>l9g!"%5%V%j%/%(%9%H$N:]$KLdBj$,(B + $B5/$3$C$?$j(B ($B%*!<%P!<%X%C%I$,$+$+$C$?$j(B) $B$9$k2DG=@-$,9b$/$J$j$^$9!#(B + $B$3$N$h$&$J%1!<%9$G$O!"$3$N%U%i%0$r;H$C$F$/$@$5$$!#(B

      +
    • + +
    • 'nocase|NC' + (no case)
      + $B$3$l$O(B$B%Q%?!<%s(B$B$K$D$$$FBgJ8;z>.J8;z$r6hJL$7$J$$$h$&$K$7$^$9!#(B + $B$9$J$o$A(B$B!"(B$B%Q%?!<%s(B$B$,8=:_$N(B URL $B$H%^%C%A$5$l$k:]!"(B + 'A-Z' $B$H(B 'a-z' $B$O6hJL$5$l$^$;$s!#(B
    • + +
    • 'qsappend|QSA' + (query string + append)
      + $B$3$N%U%i%0$O!"4{B8$N$b$N$rCV$-49$($k$N$G$O$J$/!"CV49J8;zNs$N(B + $B%/%(%j!l9g$K$3$N%U%i%0$r;H$$$^$9!#(B
    • + +
    • + 'noescape|NE' + (no URI escaping of + output)
      + $B$3$N%U%i%0$O!"(Bmod_rewrite $B$,=q$-49$(7k2L$KBP$7$FDL>o9T$J$o$l$k(B + URL $B%(%9%1!<%W%k!<%k$rE,MQ$7$J$$$h$&$K$7$^$9!#DL>o$O(B ('%', + '$', ';' $B$H$$$C$?(B) $BFC + RewriteRule /foo/(.*) /bar?arg=P1\%3d$1 [R,NE] + + + $B$3$NNc$G$O!"(B'/foo/zed' $B$,0BA4$J%j%/%(%9%H$G$"$k(B + '/bar?arg=P1=zed' $B$KJQ99$5$l$^$9!#(B + + + + + +
      $BCm0U(B: + noescape $B%U%i%0$O(B Apache 1.3.20 + $B0J9_$G$N$_M-8z$G$9!#(B
      +
    • + +
    • + 'passthrough|PT' + (pass through to next + handler)
      + $B$3$N%U%i%0$O!"FbIt$N(B request_rec $B9=B$BN$N(B + uri $B%U%#!<%k%I$K(B filename + $B%U%#!<%k%I$NCM$r%;%C%H$9$k$h$&$K!"=q$-49$(%(%s%8%s$K;X<($7$^$9!#(B + $B$3$N%U%i%0$OC1$K!"(BRewriteRule + $B%G%#%l%/%F%#%V$N=PNO$KBP$7$F!"B>$N(B URI + $B$+$i%U%!%$%kL>$X$NJQ49=hM}$r9T$&(B Alias, + ScriptAlias, Redirect + $B$H$$$C$?(B$B%G%#%l%/%F%#%V$K$h$k8e=hM}$rF~$l$k$?$a$N>.5;$G$9!#(B + $B0UL#$r<($9$?$a$NC1=c$JNc(B: mod_rewrite + $B$N=q$-49$(%(%s%8%s$G(B /abc $B$+$i(B /def + $B$X$NJQ49$r9T$J$$!"$5$i$K(B mod_alias $B$G(B + /def $B$+$i(B /ghi + $B$K=q$-49$($k$K$O!"0J2<$N$h$&$K$7$^$9(B: +
      +    RewriteRule ^/abc(.*)  /def$1 [PT]
      +    Alias       /def       /ghi
      +   
      +
      + $B$b$7(B PT $B%U%i%0$r;XDj$9$k$N$rK:$l$F$7$^$C$?>l9g!"(B + mod_rewrite $B$O$A$c$s$H$=$N;E;v$r9T$J$$$^$9!#(B + $B$9$J$o$A(B$B!"40A4$J(B API $B$K=`5r$7$?(B URI-to-filename + $BJQ49%k!<%A%s$,9T$&$Y$-!"(Buri=/abc/... $B$r(B + filename=/def/... $B$K=q$-49$(!"$r9T$J$$$^$9!#$=$N8e(B + mod_alias $B$,5/F0$5$l!"(BURI-to-filename + $BJQ49$r;n$_$^$9$,!"$3$l$OF0:n$7$^$;$s(B $B!#(B + +

      $BCm0U(B: URL-to-filename + $BJQ49$r4^$`0[$J$C$?%b%8%e!<%k$N%G%#%l%/%F%#%V$r:.MQ$7$?$$>l9g$K$O!"(B + $B$3$N%U%i%0$r;XDj$9$kI,MW$,$"$j$^$9!#(B$BE57?E*$JNc$H$7$F$O!"(B + mod_alias $B$H(B mod_rewrite + $B$NF1;~;HMQ$G$9!#(B

      +
    • + +
    • 'skip|S=num' + (skip next rule(s))
      + $B$3$N%U%i%0$O=q$-49$(%(%s%8%s$KBP$7!"8=:_$N%k!<%k$,%^%C%A$7$?$i!"(B + $Bnum $B8D$N%k!<%k$r%9%-%C%W$9$k$h$&;X<($7$^$9!#$3$l$r(B + $B;H$C$F!"5<;wE*$K(B if-then-else $B9=B$$r:n$k$3$H$,$G$-$^$9(B: then-$B6g(B + $B$N:G=*%k!<%k$O(B skip=N $B$H$J$j$^$9!#$3$3$G(B N $B$O(B + else-$B6g(B $B$KF~$l$k%k!<%k$N?t$G$9!#(B($B$3$l$O(B 'chain|C' $B%U%i%0$H$O(B + $B0[$J$j$^$9(B!)$B!#(B
    • + +
    • + 'env|E=VAR:VAL' + (set environment variable)
      + $B$3$l$O(B VAR $B$H$$$&L>A0$N4D6-JQ?t$NCM$r(B VAL + $B$K$9$k$h$&;X<($7$^$9!#$3$3$G(B VAL + $B$K$O!"@55,I=8=$N8eJ};2>H$H$7$FE83+$5$l$k(B $N $B$H(B + %N $B$r=q$/$3$H$,$G$-$^$9!#(B + $B$3$N%U%i%0$rJ#?t;H$C$F!"J#?t$NJQ?t$rDj5A$9$k$3$H$b$G$-$^$9!#(B + $B$3$NJQ?t$OB?$/$N>l9g!"DL>o8e$+$i(B XSSI (<!--#echo + var="VAR"--> $B$rDL$7$F(B) $B$^$?$O(B CGI ($BNc$($P(B + $ENV{'VAR'}) $B$N$h$&$K!";2>H$5$l$^$9!#$5$i$K!"(B + RewriteCond $B%Q%?!<%s(B %{ENV:VAR} + $B$rDL$7$F;2>H$9$k$3$H$b$G$-$^$9!#$3$l$r;H$C$F(B URL + $B$+$i$N>pJs$r@Z$j +
    + + + + + +
    + $BCm0U(B: + $B%5!<%PC10L$N@_Dj%U%!%$%k$NCf$G$O!"(BPattern $B$O40A4$J(B + URL $B$KE,MQ$5$l$k$3$H$rK:$l$J$$$G$/$@$5$$!#(B + $B$7$+$7$J$,$i!"%G%#%l%/%H%jC10L$N@_Dj%U%!%$%k$NCf$G$O!"(B + $B%Q%?!<%s%^%C%A%s%0$N$?$a$K%G%#%l%/%H%jC10L$N@\F,<-(B + ($B$3$l$OFCDj$N%G%#%l%/%H%j$G$O>o$KF1$8$b$N$G$9(B!) $B$,<+F0E*$K(B + $B$B!"CV49$,=*$o$C$?8e$K<+F0E*$K(B$BIU2C(B + $B$5$l$^$9!#(B$B$3$N5!9=$O!"$5$^$6$^$Jo$KB8:_$9$k$H$O8B$i$J$$?F%G%#%l%/%H%j$H$N(B + $B%^%C%A%s%0$r9T$J$o$J$1$l$P$J$i$J$/$J$k$+$i$G$9!#(B + +

    $B$R$H$DNc30$,$"$j$^$9(B: $BCV49J8;zNs$,(B ``http://'' + $B$G;O$^$C$F$$$k>l9g!"%G%#%l%/%H%j@\F,<-$OIU2C(B$B$5$l$:(B + $B!"30It%j%@%$%l%/%H$^$?$O(B (P $B%U%i%0$,(B + $B;H$o$l$F$$$l$P(B!) $B%W%m%-%7=hM}$,6/@)E*$K9T$J$o$l$^$9!#(B

    +
    + + + + + +
    $BCm0U(B: $B%G%#%l%/%H%jC10L$N@_Dj%U%!%$%k(B + $B$K$*$1$k=q$-49$(%(%s%8%s$rM-8z$K$9$k>l9g!"$3$l$i$N%U%!%$%k$K(B + ``RewriteEngine On'' $B$r%;%C%H$7!"(B$B$+$D(B + ``Options FollowSymLinks'' $B$rM-8z$K(B + $B$7$J$1$l$P$J$j$^$;$s!#$"$J$?$N$H$3$m$N4IM}FollowSymLinks $B$N%*!<%P!<%i%$%I(B + $B$r6X;_$7$F$$$?>l9g!"=q$-49$(%(%s%8%s$r;H$&$3$H$O$G$-$^$;$s!#(B + $B$3$N@)8B$,I,MW$J$N$O!"%;%-%e%j%F%#4XO"$NM}M3$K$h$j$^$9!#(B
    + +

    $B0J2<$KM-8z$JCV49$NAH9g$;$H!"$=$l$i$N0UL#$r<($7$^$9(B:

    + +

    $B%j%/%(%9%H(B ``GET /somepath/pathinfo'' + $B$,9T$J$o$l$?>l9g$N!"(B
    + $B%5!<%PC10L$N@_Dj(B (httpd.conf) $B$NFbIt(B:

    +

    + + + + + +
    +
    +$BM?$($i$l$?%k!<%k(B                                      $BCV497k2L(B
    +----------------------------------------------  ----------------------------------
    +^/somepath(.*) otherpath$1                      $BL58z$J$N$G%5%]!<%H$7$J$$(B
    +
    +^/somepath(.*) otherpath$1  [R]                 $BL58z$J$N$G%5%]!<%H$7$J$$(B
    +
    +^/somepath(.*) otherpath$1  [P]                 $BL58z$J$N$G%5%]!<%H$7$J$$(B
    +----------------------------------------------  ----------------------------------
    +^/somepath(.*) /otherpath$1                     /otherpath/pathinfo
    +
    +^/somepath(.*) /otherpath$1 [R]                 $B30It%j%@%$%l%/%7%g%s7PM3$G(B
    +                                                http://thishost/otherpath/pathinfo
    +
    +^/somepath(.*) /otherpath$1 [P]                 $BL50UL#$J$N$G%5%]!<%H$7$J$$(B
    +----------------------------------------------  ----------------------------------
    +^/somepath(.*) http://thishost/otherpath$1      /otherpath/pathinfo
    +
    +^/somepath(.*) http://thishost/otherpath$1 [R]  $B30It%j%@%$%l%/%7%g%s7PM3$G(B
    +                                                http://thishost/otherpath/pathinfo
    +
    +^/somepath(.*) http://thishost/otherpath$1 [P]  $BL50UL#$J$N$G%5%]!<%H$7$J$$(B
    +----------------------------------------------  ----------------------------------
    +^/somepath(.*) http://otherhost/otherpath$1     $B30It%j%@%$%l%/%7%g%s7PM3$G(B
    +                                                http://otherhost/otherpath/pathinfo
    +
    +^/somepath(.*) http://otherhost/otherpath$1 [R] $B30It%j%@%$%l%/%7%g%s7PM3$G(B
    +                                                http://otherhost/otherpath/pathinfo
    +                                                ([R] $B%U%i%0$O>iD9(B)
    +
    +^/somepath(.*) http://otherhost/otherpath$1 [P] $BFbIt%W%m%-%77PM3$G(B
    +                                                http://otherhost/otherpath/pathinfo
    +
    +
    + +

    $B%j%/%(%9%H(B ``GET /somepath/localpath/pathinfo'' + $B$,9T$J$o$l$?>l9g$N!"(B
    + /somepath $B$K4X$9$k%G%#%l%/%H%jC10L$N@_Dj$NFbIt(B:
    + ($BNc$($P(B$B!"(B + /physical/path/to/somepath $B%G%#%l%/%H%j$K$"$C$F!"(B
    + RewriteBase /somepath $B$N5-=R$,$"$k(B + .htaccess $B%U%!%$%k(B):

    +

    + + + + + +
    +
    +$BM?$($i$l$?%k!<%k(B                                      $BCV497k2L(B
    +----------------------------------------------  ----------------------------------
    +^localpath(.*) otherpath$1                      /somepath/otherpath/pathinfo
    +
    +^localpath(.*) otherpath$1  [R]                 $B30It%j%@%$%l%/%7%g%s7PM3$G(B
    +                                                http://thishost/somepath/otherpath/pathinfo
    +
    +^localpath(.*) otherpath$1  [P]                 $BL50UL#$J$N$G%5%]!<%H$7$J$$(B
    +----------------------------------------------  ----------------------------------
    +^localpath(.*) /otherpath$1                     /otherpath/pathinfo
    +
    +^localpath(.*) /otherpath$1 [R]                 $B30It%j%@%$%l%/%7%g%s7PM3$G(B
    +                                                http://thishost/otherpath/pathinfo
    +
    +^localpath(.*) /otherpath$1 [P]                 $BL50UL#$J$N$G%5%]!<%H$7$J$$(B
    +----------------------------------------------  ----------------------------------
    +^localpath(.*) http://thishost/otherpath$1      /otherpath/pathinfo
    +
    +^localpath(.*) http://thishost/otherpath$1 [R]  $B30It%j%@%$%l%/%7%g%s7PM3$G(B
    +                                                http://thishost/otherpath/pathinfo
    +
    +^localpath(.*) http://thishost/otherpath$1 [P]  $BL50UL#$J$N$G%5%]!<%H$7$J$$(B
    +----------------------------------------------  ----------------------------------
    +^localpath(.*) http://otherhost/otherpath$1     $B30It%j%@%$%l%/%7%g%s7PM3$G(B
    +                                                http://otherhost/otherpath/pathinfo
    +
    +^localpath(.*) http://otherhost/otherpath$1 [R] $B30It%j%@%$%l%/%7%g%s7PM3$G(B
    +                                                http://otherhost/otherpath/pathinfo
    +                                                ([R] $B%U%i%0$O>iD9(B)
    +
    +^localpath(.*) http://otherhost/otherpath$1 [P] $BFbIt%W%m%-%77PM3$G(B
    +                                                http://otherhost/otherpath/pathinfo
    +
    +
    + +

    $BNc(B:

    + +
    + $B$3$3$G$O!"(B +
    + / Language /~ + Realname /.../ File +
    + + $B$H$$$&=q<0$N(B URL $B$r(B + +
    + /u/ Username /.../ + File . Language +
    + + $B$K=q$-49$($?$$$b$N$H$7$^$9!#(B + +

    $BA0=R$N%^%C%W%U%!%$%k$r(B /path/to/file/map.txt + $B$H$$$&L>A0$GJ]B8$7$F$*$-$^$9!#$=$N8e!"(BApache $B%5!<%P@_Dj(B + $B%U%!%$%k$K0J2<$N9T$rDI2C$9$k$@$1$G$9(B:

    + +
    +
    +RewriteLog   /path/to/file/rewrite.log
    +RewriteMap   real-to-user               txt:/path/to/file/map.txt
    +RewriteRule  ^/([^/]+)/~([^/]+)/(.*)$   /u/${real-to-user:$2|nobody}/$3.$1
    +
    +
    +
    +
    + +
    +

    $B$=$NB>$N>pJs(B

    +
    +
    + +

    $B4D6-JQ?t(B

    + $B$3$N%b%8%e!<%k$O!"(BSCRIPT_URL $B$H(B + SCRIPT_URI $B$H$$$&Fs$D$N(B ($BHsI8=`$N(B) CGI/SSI + $B4D6-JQ?t$r@_Dj$7$^$9!#$3$l$i$NCf$K$O8=:_$N%j%=!<%9$X$N(B$BO@M}E*$J(B + Web $B%S%e!<$,F~$C$F$$$^$9!#0lJ}!"I8=`$N(B CGI/SSI $BJQ?t$G$"$k(B + SCRIPT_NAME $B$H(B SCRIPT_FILENAME + $B$K$O!"(B$BJ*M}E*$J(B$B%7%9%F%`%S%e!<$,F~$C$F$$$^$9!#(B + +

    $BCm0U(B: $B$3$l$i$NJQ?t$NCf$K$O!"(B$B:G=i$K%j%/%(%9%H$r + $B$9$J$o$A(B$B!"=q$-49$($,9T$o$l$k(B$BA0$N(B URI/URL + $B$,J];}$5$l$F$$$^$9!#(BURL $B=q$-49$(=hM}$O!"O@M}E*$J(B URL + $B$rJ*M}E*$J%Q%9L>$K=q$-49$($k$?$a$K;H$o$l$k$3$H$,B?$$$?$a!"(B + $B$3$NE@$O=EMW$G$9!#(B

    + +

    $BNc(B:

    + +
    +
    +SCRIPT_NAME=/sw/lib/w3s/tree/global/u/rse/.www/index.html
    +SCRIPT_FILENAME=/u/rse/.www/index.html
    +SCRIPT_URL=/u/rse/
    +SCRIPT_URI=http://en1.engelschall.com/u/rse/
    +
    +
    +
    + +

    $B

    + $B$3$NJ8=q0J30$K$b!"(BURL + Rewriting Guide $B$H$$$&J8=q$,$"$j$^$9!#$3$NCf$K$O!"(BURL + $B%Y!<%9$NLdBj$K$D$$$F!"pJs$r8+$k$3$H$,$G$-$k$G$7$g$&!#(B +
    + + + + + diff --git a/htdocs/manual/mod/mod_setenvif.html.en b/htdocs/manual/mod/mod_setenvif.html.en new file mode 100644 index 00000000000..48e946181b6 --- /dev/null +++ b/htdocs/manual/mod/mod_setenvif.html.en @@ -0,0 +1,324 @@ + + + + + + + Apache module mod_setenvif + + + + + + +

    Module mod_setenvif

    + +

    This module provides the ability to set environment + variables based upon attributes of the request.

    + +

    Status: Base
    + Source File: + mod_setenvif.c
    + Module Identifier: + setenvif_module
    + Compatibility: Available in + Apache 1.3 and later.

    + +

    Summary

    + +

    The mod_setenvif module allows you to set + environment variables according to whether different aspects of + the request match regular + expressions you specify. These environment variables can be + used by other parts of the server to make decisions about + actions to be taken.

    + +

    The directives are considered in the order they appear in + the configuration files. So more complex sequences can be used, + such as this example, which sets netscape if the + browser is mozilla but not MSIE.

    + +
    +
    +  BrowserMatch ^Mozilla netscape
    +  BrowserMatch MSIE !netscape
    + 
    +
    +
    + +

    For additional information, we provide a document on Environment Variables in Apache.

    + +

    Directives

    + + +
    + + +

    BrowserMatch + directive

    + +

    Syntax: BrowserMatch regex + env-variable[=value] + [env-variable[=value]] ...
    + Default: none
    + Context: server config, virtual + host, directory, .htaccess
    + Override: FileInfo
    + Status: Base
    + Module: mod_setenvif
    + Compatibility: Apache 1.2 and + above (in Apache 1.2 this directive was found in the + now-obsolete mod_browser module); use in .htaccess files only + supported with 1.3.13 and later

    + +

    The BrowserMatch directive defines environment variables + based on the User-Agent HTTP request header field. + The first argument should be a POSIX.2 extended regular + expression (similar to an egrep-style regex). The + rest of the arguments give the names of variables to set, and + optionally values to which they should be set. These take the + form of

    + +
      +
    1. varname, or
    2. + +
    3. !varname, or
    4. + +
    5. varname=value
    6. +
    + +

    In the first form, the value will be set to "1". The second + will remove the given variable if already defined, and the + third will set the variable to the value given by + value. If a User-Agent + string matches more than one entry, they will be merged. + Entries are processed in the order in which they appear, and + later entries can override earlier ones.

    + +

    For example:

    +
    +    BrowserMatch ^Mozilla forms jpeg=yes browser=netscape
    +    BrowserMatch "^Mozilla/[2-3]" tables agif frames javascript
    +    BrowserMatch MSIE !javascript
    + 
    +
    + +

    Note that the regular expression string is + case-sensitive. For case-INsensitive matching, + see the BrowserMatchNoCase + directive.

    + +

    The BrowserMatch and + BrowserMatchNoCase directives are special cases of + the SetEnvIf and SetEnvIfNoCase + directives. The following two lines have the same effect:

    +
    +   BrowserMatchNoCase Robot is_a_robot
    +   SetEnvIfNoCase User-Agent Robot is_a_robot
    + 
    +
    +
    + + +

    BrowserMatchNoCase directive

    + +

    Syntax: BrowserMatchNoCase + regex env-variable[=value] + [env-variable[=value]] ...
    + Default: none
    + Context: server config, virtual + host, directory, .htaccess
    + Override: FileInfo
    + Status: Base
    + Module: mod_setenvif
    + Compatibility: Apache 1.2 and + above (in Apache 1.2 this directive was found in the + now-obsolete mod_browser module)

    + +

    The BrowserMatchNoCase directive is + semantically identical to the BrowserMatch directive. + However, it provides for case-insensitive matching. For + example:

    +
    +    BrowserMatchNoCase mac platform=macintosh
    +    BrowserMatchNoCase win platform=windows
    + 
    +
    + +

    The BrowserMatch and + BrowserMatchNoCase directives are special cases of + the SetEnvIf and SetEnvIfNoCase + directives. The following two lines have the same effect:

    +
    +   BrowserMatchNoCase Robot is_a_robot
    +   SetEnvIfNoCase User-Agent Robot is_a_robot
    + 
    +
    +
    + + +

    SetEnvIf + directive

    + +

    Syntax: SetEnvIf attribute + regex env-variable[=value] + [env-variable[=value]] ...
    + Default: none
    + Context: server config, virtual + host, directory, .htaccess
    + Override: FileInfo
    + Status: Base
    + Module: mod_setenvif
    + Compatibility: Apache 1.3 and + above; the Request_Protocol keyword and environment-variable + matching are only available with 1.3.7 and later; use in + .htaccess files only supported with 1.3.13 and later

    + +

    The SetEnvIf directive defines environment + variables based on attributes of the request. These attributes + can be the values of various HTTP request header fields (see RFC2616 + for more information about these), or of other aspects of the + request, including the following:

    + +
      +
    • Remote_Host - the hostname (if available) of + the client making the request
    • + +
    • Remote_Addr - the IP address of the client + making the request
    • + +
    • Request_Method - the name of the method + being used (GET, POST, et + cetera)
    • + +
    • Request_Protocol - the name and version of + the protocol with which the request was made (e.g., + "HTTP/0.9", "HTTP/1.1", etc.)
    • + +
    • Request_URI - the portion of the URL + following the scheme and host portion
    • +
    + +

    Some of the more commonly used request header field names + include Host, User-Agent, and + Referer.

    + +

    If the attribute name doesn't match any of the + special keywords, nor any of the request's header field names, + it is tested as the name of an environment variable in the list + of those associated with the request. This allows + SetEnvIf directives to test against the result of + prior matches.

    + +
    + Only those environment variables defined by earlier + SetEnvIf[NoCase] directives are available for + testing in this manner. 'Earlier' means that they were + defined at a broader scope (such as server-wide) or + previously in the current directive's scope. +
    + +

    Example:

    +
    +   SetEnvIf Request_URI "\.gif$" object_is_image=gif
    +   SetEnvIf Request_URI "\.jpg$" object_is_image=jpg
    +   SetEnvIf Request_URI "\.xbm$" object_is_image=xbm
    +        :
    +   SetEnvIf Referer www\.mydomain\.com intra_site_referral
    +        :
    +   SetEnvIf object_is_image xbm XBIT_PROCESSING=1
    + 
    +
    + +

    The first three will set the environment variable + object_is_image if the request was for an image + file, and the fourth sets intra_site_referral if + the referring page was somewhere on the + www.mydomain.com Web site.

    +
    + + +

    SetEnvIfNoCase + directive

    + +

    Syntax: SetEnvIfNoCase + attribute regex env-variable[=value] + [env-variable[=value]] ...
    + Default: none
    + Context: server config, virtual + host, directory, .htaccess
    + Override: FileInfo
    + Status: Base
    + Module: mod_setenvif
    + Compatibility: Apache 1.3 and + above; the Request_Protocol keyword and environment-variable + matching are only available with 1.3.7 and later; use in + .htaccess files only supported with 1.3.13 and later

    + +

    The SetEnvIfNoCase is semantically identical to + the SetEnvIf directive, + and differs only in that the regular expression matching is + performed in a case-insensitive manner. For example:

    +
    +   SetEnvIfNoCase Host Apache\.Org site=apache
    + 
    +
    + +

    This will cause the site environment variable + to be set to "apache" if the HTTP request header + field Host: was included and contained + Apache.Org, apache.org, or any other + combination.

    + + + + diff --git a/htdocs/manual/mod/mod_setenvif.html.html b/htdocs/manual/mod/mod_setenvif.html.html new file mode 100644 index 00000000000..13a22a04e48 --- /dev/null +++ b/htdocs/manual/mod/mod_setenvif.html.html @@ -0,0 +1,4 @@ + + + diff --git a/htdocs/manual/mod/mod_setenvif.html.ja.jis b/htdocs/manual/mod/mod_setenvif.html.ja.jis new file mode 100644 index 00000000000..a7a6615b06b --- /dev/null +++ b/htdocs/manual/mod/mod_setenvif.html.ja.jis @@ -0,0 +1,323 @@ + + + + + + Apache module mod_setenvif + + + + + + + +

    mod_setenvif $B%b%8%e!<%k(B

    + +

    $B$3$N%b%8%e!<%k$O!"(B + $B%j%/%(%9%H$NB0@-$K4p$E$$$F4D6-JQ?t$r@_Dj$9$k5!G=$rDs6!$7$^$9!#(B

    + +

    $B%9%F!<%?%9(B: Base
    + $B%=!<%9%U%!%$%k(B: + mod_setenvif.c
    + $B%b%8%e!<%k<1JL;R(B: + setenvif_module
    + $B8_49@-(B: + Apache 1.3 $B0J9_$G;HMQ2DG=!#(B

    + +

    $B35MW(B

    + +

    mod_setenvif + $B%b%8%e!<%k$O!"%j%/%(%9%H$N$"$kB&LL$,;XDj$5$l$?(B$B@55,I=8=(B$B$K9g$&$+$I$&$+$K$h$C$F4D6-JQ?t$r@_Dj$9$k5!G=$rDs6!$7$^$9!#(B + $B$3$l$i$N4D6-JQ?t$r;HMQ$7$F!"%5!<%P$NB>$NItJ,$,$I$N$h$&$JF0:n$r$9$k$+$r(B + $B7hDj$9$k$3$H$,$G$-$^$9!#(B

    + +

    $B$3$N%b%8%e!<%k$,Ds6!$9$k%G%#%l%/%F%#%V$O!"(B + $B@_Dj%U%!%$%k$K8=$l$k=gHV$KE,MQ$5$l$^$9!#(B + $B$=$l$r;H$C$F!"netscape $B$r@_Dj$7$^$9!#(B

    +
    +
    +  BrowserMatch ^Mozilla netscape
    +  BrowserMatch MSIE !netscape
    + 
    +
    +
    + +

    $B>\:Y$O!"(BApache + $B$N4D6-JQ?t(B$B$r;2>H$7$F$/$@$5$$!#(B

    + +

    $B%G%#%l%/%F%#%V(B

    + + +
    + + +

    BrowserMatch + $B%G%#%l%/%F%#%V(B

    + +

    $B9=J8(B: BrowserMatch regex + env-variable[=value] + [env-variable[=value]] ...
    + $B%G%U%)%k%H(B: None
    + $B%3%s%F%-%9%H(B: + $B%5!<%P@_Dj%U%!%$%k!"%P!<%A%c%k%[%9%H!"%G%#%l%/%H%j!"(B.htaccess
    + $B>e=q$-(B: FileInfo
    + $B%9%F!<%?%9(B: Base
    + $B%b%8%e!<%k(B: mod_setenvif
    + $B8_49@-(B: Apache 1.2 $B0J>e(B + ($B$3$N%G%#%l%/%F%#%V$O(B Apache 1.2 $B$G$O!":#$G$O(B obsolete $B$K$J$C$F$$$k(B + mod_browser $B%b%8%e!<%k$K$"$j$^$7$?(B)$B!#(B.htaccess $B%U%!%$%k$G$N;HMQ$O(B + 1.3.13 $B0J9_$G$N$_%5%]!<%H!#(B

    + +

    BrowserMatch $B%G%#%l%/%F%#%V$O!"(BHTTP $B%j%/%(%9%H$N(B + User-Agent + $B%X%C%@%U%#!<%k%I$K4p$E$$$F4D6-JQ?t$r@_Dj$7$^$9!#:G=i$N0z?t$O(B + POSIX.2 $B3HD%@55,I=8=(B (egrep + $B7A<0$N@55,I=8=$H;w$?$b$N(B) $B$G$9!#(B + $B;D$j$N0z?t$O!"@_Dj$r$9$kJQ?tL>$H$=$NCM$G!"8eJN,2DG=$G$9!#(B + $B$3$l$i$O0J2<$N7A<0$K$J$j$^$9!#(B

    + +
      +
    1. varname, or
    2. + +
    3. !varname, or
    4. + +
    5. varname=value
    6. +
    + +

    $B:G=i$N7A<0$G$O!"CM$O(B "1" $B$K@_Dj$5$l$^$9!#(B + 2 $BHVL\$OJQ?t$,4{$KDj5A$5$l$F$$$?>l9g!"$=$l$r:o=|$7$^$9!#(B + 3 $BHVL\$OJQ?t$NCM$r(B value $B$K@_Dj$7$^$9!#(B + User-Agent + $B%U%#!<%k%I$NJ8;zNs$,J#?t$N%(%s%H%j$K%^%C%A$7$?>l9g$O!"(B + $B$=$N7k2L$,$^$H$a$i$l$^$9!#(B + $B%(%s%H%j$O8=$l$?=g$K=hM}$5$l!"8e$N%(%s%H%j$,A0$N$b$N$r>e=q$-$7$^$9!#(B +

    +

    $BNc(B:

    +
    +    BrowserMatch ^Mozilla forms jpeg=yes browser=netscape
    +    BrowserMatch "^Mozilla/[2-3]" tables agif frames javascript
    +    BrowserMatch MSIE !javascript
    +
    +
    + +

    $B@55,I=8=$NJ8;zNs$O(B$BBgJ8;z>.J8;z$r6hJL$9$k(B$B$3$H$KCm0U$7$F$/$@$5$$!#BgJ8;z>.J8;z$r6hJL$7$J$$%^%C%A$O(BBrowserMatchNoCase$B%G%#%l%/%F%#%V$r;2>H$7$F$/$@$5$$!#(B +

    +

    BrowserMatch $B%G%#%l%/%F%#%V$H(B + BrowserMatchNoCase $B%G%#%l%/%F%#%V$O(B + SetEnvIf $B%G%#%l%/%F%#%V(B + SetEnvIfNoCase + $B%G%#%l%/%F%#%V$NFCJL$J%1!<%9$G$9!#0J2<$N(B 2 $B9T$OF1$88z2L$K$J$j$^$9(B: +

    +
    +   BrowserMatchNoCase Robot is_a_robot
    +   SetEnvIfNoCase User-Agent Robot is_a_robot
    +
    +
    +
    + + +

    BrowserMatchNoCase $B%G%#%l%/%F%#%V(B

    + +

    $B9=J8(B: BrowserMatchNoCase + regex env-variable[=value] + [env-variable[=value]] ...
    + $B%G%U%)%k%H(B: none
    + $B%3%s%F%-%9%H(B: + $B%5!<%P@_Dj%U%!%$%k!"%P!<%A%c%k%[%9%H!"%G%#%l%/%H%j!"(B.htaccess
    + $B>e=q$-(B: FileInfo
    + $B%9%F!<%?%9(B: Base
    + $B%b%8%e!<%k(B: mod_setenvif
    + $B8_49@-(B: Apache 1.2 $B0J>e(B + ($B$3$N%G%#%l%/%F%#%V$O(B Apache 1.2 $B$G$O!":#$G$O(B obsolete $B$K$J$C$F$$$k(B + mod_browser $B%b%8%e!<%k$K$"$j$^$7$?(B)$B!#(B.htaccess $B%U%!%$%k$G$N;HMQ$O(B + 1.3.13 $B0J9_$G$N$_%5%]!<%H!#(B

    +

    BrowserMatchNoCase + $B%G%#%l%/%F%#%V$O!"0UL#E*$K$O(B BrowserMatch + $B%G%#%l%/%F%#%V$H$[$H$s$IF1$8$G$9!#(B + $B0c$&E@$O!"BgJ8;z>.J8;z$r6hJL$7$J$$$G%^%C%A$r9T$J$&$3$H$G$9!#Nc(B:

    +
    +    BrowserMatchNoCase mac platform=macintosh
    +    BrowserMatchNoCase win platform=windows
    +
    +
    +

    BrowserMatch $B%G%#%l%/%F%#%V$H(B + BrowserMatchNoCase $B%G%#%l%/%F%#%V$O(B SetEnvIf $B%G%#%l%/%F%#%V$H(B SetEnvIfNoCase + $B%G%#%l%/%F%#%V$NFCJL$J%1!<%9$G$9!#0J2<$N(B + 2 $B9T$OF1$88z2L$K$J$j$^$9(B:

    +
    +   BrowserMatchNoCase Robot is_a_robot
    +   SetEnvIfNoCase User-Agent Robot is_a_robot
    +
    +
    +
    + + +

    SetEnvIf + $B%G%#%l%/%F%#%V(B

    + +

    $B9=J8(B: SetEnvIf attribute + regex env-variable[=value] + [env-variable[=value]] ...
    + $B%G%U%)%k%H(B: none
    + $B%3%s%F%-%9%H(B: + $B%5!<%P@_Dj%U%!%$%k!"%P!<%A%c%k%[%9%H!"%G%#%l%/%H%j!"(B.htaccess
    + $B>e=q$-(B: FileInfo
    + $B%9%F!<%?%9(B: Base
    + $B%b%8%e!<%k(B: mod_setenvif
    + $B8_49@-(B: Apache 1.3 $B0J>e!#(B + Request_Protocol $B%-!<%o!<%I$H4D6-JQ?t$N%^%C%A$O(B 1.3.7 + $B0J9_$G$N$_;HMQ2DG=!#(B.htaccess $B%U%!%$%k$G$N;HMQ$O(B + 1.3.13 $B0J9_$G$N$_%5%]!<%H!#(B

    + +

    SetEnvIf + $B%G%#%l%/%F%#%V$O!"%j%/%(%9%H$NB0@-$K4p$E$$$F4D6-JQ?t$rDj5A$7$^$9!#(B + $B$3$l$i$NB0@-$O!"(BHTTP $B%j%/%(%9%H$N$$$m$$$m$J%X%C%@%U%#!<%k%I(B + ($B>\$7$$>pJs$O(B RFC + 2616 $B$r;2>H$7$F$/$@$5$$(B) + $B$+!"0J2<$N$h$&$J!"%j%/%(%9%H$NB>$NB&LL$G$"$k$3$H$,$G$-$^$9!#(B

    + +
      +
    • Remote_Host - + $B%j%/%(%9%H$r9T$J$C$F$$$k%/%i%$%"%s%H$N%[%9%HL>(B ($B$b$7$"$l$P(B)
    • + +
    • Remote_Addr - + $B%j%/%(%9%H$r9T$J$C$F$$$k%/%i%$%"%s%H$N(B IP $B%"%I%l%9(B
    • + +
    • Request_Method - + $B;HMQ$5$l$F$$$k%a%=%C%IL>(B (GET, POST + $B$J$I(B)
    • + +
    • Request_Protocol - + $B%j%/%(%9%H$,9T$J$o$l$?%W%m%H%3%k$NL>A0$H%P!<%8%g%s(B + ($BNc$($P(B$B!"(B"HTTP/0.9", "HTTP/1.1" $B$J$I!#(B)
    • + +
    • Request_URI - + URL $B$N%9%-!<%`$H%[%9%H$N8e$NItJ,(B
    • +
    + +

    $B$h$/;H$o$l$k%j%/%(%9%H$N%X%C%@%U%#!<%k%I$K$O(B + Host, User-Agent, Referer + $B$,$"$j$^$9!#(B

    + +

    $BB0@-L>(B attribute + $B$,FCJL$J%-!<%o!<%I$d%j%/%(%9%H$N%X%C%@%U%#!<%k%IL>$K%^%C%A$7$J$$$H$-$O!"(B + $B%j%/%(%9%H$K4XO"IU$1$i$l$?%j%9%H$K$"$k4D6-JQ?t$NL>A0$H$7$F;n$5$l$^$9!#(B + $B$3$l$K$h$j!"(BSetEnvIf + $B%G%#%l%/%F%#%V$,A0$N%^%C%A$N7k2L$r;HMQ$9$k$3$H$,$G$-$k$h$&$K$J$j$^$9!#(B +

    + +
    + $BA0$N(B SetEnvIf[NoCase] + $B$GDj5A$5$l$?4D6-JQ?t$N$_$r$3$NJ}K!$GD4$Y$k$3$H$,$G$-$^$9!#(B + $B!VA0!W$H$$$&$N$O(B ($B%5!<%PA4BN!"$N$h$&$J(B) + $B$h$j9-$$%9%3!<%W$GDj5A$5$l$?$+!"(B + $B8=%G%#%l%/%F%#%V$N%9%3!<%W$NCf$NA0$NJ}$GDj5A$5$l$?$H$$$&0UL#$G$9!#(B + +
    +

    $BNc(B:

    +
    +   SetEnvIf Request_URI "\.gif$" object_is_image=gif
    +   SetEnvIf Request_URI "\.jpg$" object_is_image=jpg
    +   SetEnvIf Request_URI "\.xbm$" object_is_image=xbm
    +        :
    +   SetEnvIf Referer www\.mydomain\.com intra_site_referral
    +        :
    +   SetEnvIf object_is_image xbm XBIT_PROCESSING=1
    +
    +
    + +

    $B@hF,$N;0$D$O%j%/%(%9%H$,2hA|%U%!%$%k$N$H$-$K!"4D6-JQ?t(B + object_is_image $B$r@_Dj$7$^$9!#(B + 4 $BHVL\$O;2>H85$N%Z!<%8$,(B www.mydomain.com + $B%&%'%V%5%$%H$N$I$3$+$K$"$k>l9g$K(B intra_site_referral + $B$r@_Dj$7$^$9!#(B

    +
    + + +

    SetEnvIfNoCase + $B%G%#%l%/%F%#%V(B

    + +

    $B9=J8(B: SetEnvIfNoCase + attribute regex env-variable[=value] + [env-variable[=value]] ...
    + $B%G%U%)%k%H(B: none
    + $B%3%s%F%-%9%H(B: + $B%5!<%P@_Dj%U%!%$%k!"%P!<%A%c%k%[%9%H!"%G%#%l%/%H%j!"(B.htaccess
    + $B>e=q$-(B: FileInfo
    + $B%9%F!<%?%9(B: Base
    + $B%b%8%e!<%k(B: mod_setenvif
    + $B8_49@-(B: Apache 1.3 $B0J>e!#(B + Request_Protocol $B%-!<%o!<%I$H4D6-JQ?t$N%^%C%A$O(B 1.3.7 + $B0J9_$G$N$_;HMQ2DG=!#(B.htaccess $B%U%!%$%k$G$N;HMQ$O(B + 1.3.13 $B0J9_$G$N$_%5%]!<%H!#(B

    + +

    SetEnvIfNoCase $B$O!"0UL#E*$K$O(B SetEnvIf $B$H$[$H$s$IF1$8$G$9!#(B + $B0c$$$O@55,I=8=$N%^%C%A$,BgJ8;z>.J8;z$r6hJL$7$J$$$G9T$J$o$l$k$3$H$G$9!#(B + $BNc$($P(B:

    + +
    +   SetEnvIfNoCase Host Apache\.Org site=apache
    +
    + +

    $B$3$l$O!"(BHTTP $B%j%/%(%9%H$N(B Host: + $B%X%C%@%U%#!<%k%I$,$"$j!"$=$NCM$,(B + Apache.org, apache.org + $B$d$=$NB>$NBgJ8;z>.J8;z$NAH$_9g$o$;$G$"$C$?$H$-$K!"4D6-JQ?t(B + site $B$r(B "apache" $B$K@_Dj$7$^$9!#(B

    + + + diff --git a/htdocs/manual/mod/mod_so.html.en b/htdocs/manual/mod/mod_so.html.en new file mode 100644 index 00000000000..3146ace97af --- /dev/null +++ b/htdocs/manual/mod/mod_so.html.en @@ -0,0 +1,191 @@ + + + + + + + Apache module mod_so + + + + + + +

    Module mod_so

    + +

    This module provides for loading of executable code and + modules into the server at start-up or restart time.

    + +

    Status: Base (Windows); + Experimental (Unix)
    + Source File: mod_so.c
    + Module Identifier: + so_module
    + Compatibility: Available in + Apache 1.3 and later.

    + +

    Summary

    + +

    This is an experimental module. On selected operating + systems it can be used to load modules into Apache at runtime + via the Dynamic Shared Object (DSO) + mechanism, rather than requiring a recompilation.

    + +

    On Unix, the loaded code typically comes from shared object + files (usually with .so extension), whilst on + Windows this module loads DLL files. This module + is only available in Apache 1.3 and up.

    + +

    In previous releases, the functionality of this module was + provided for Unix by mod_dld, and for Windows by mod_dll. On + Windows, mod_dll was used in beta release 1.3b1 through 1.3b5. + mod_so combines these two modules into a single module for all + operating systems.

    + +

    Directives

    + + + +

    Creating DLL Modules for + Windows

    + +

    The Apache module API is unchanged between the Unix and + Windows versions. Many modules will run on Windows with no or + little change from Unix, although others rely on aspects of the + Unix architecture which are not present in Windows, and will + not work.

    + +

    When a module does work, it can be added to the server in + one of two ways. As with Unix, it can be compiled into the + server. Because Apache for Windows does not have the + Configure program of Apache for Unix, the module's + source file must be added to the ApacheCore project file, and + its symbols must be added to the + os\win32\modules.c file.

    + +

    The second way is to compile the module as a DLL, a shared + library that can be loaded into the server at runtime, using + the LoadModule + directive. These module DLLs can be distributed and run on any + Apache for Windows installation, without recompilation of the + server.

    + +

    To create a module DLL, a small change is necessary to the + module's source file: The module record must be exported from + the DLL (which will be created later; see below). To do this, + add the MODULE_VAR_EXPORT (defined in the Apache + header files) to your module's module record definition. For + example, if your module has:

    +
    +    module foo_module;
    +
    + +

    Replace the above with:

    +
    +    module MODULE_VAR_EXPORT foo_module;
    +
    + +

    Note that this will only be activated on Windows, so the + module can continue to be used, unchanged, with Unix if needed. + Also, if you are familiar with .DEF files, you can + export the module record with that method instead.

    + +

    Now, create a DLL containing your module. You will need to + link this against the ApacheCore.lib export library that is + created when the ApacheCore.dll shared library is compiled. You + may also have to change the compiler settings to ensure that + the Apache header files are correctly located.

    + +

    This should create a DLL version of your module. Now simply + place it in the modules directory of your server + root, and use the LoadModule directive to load + it.

    +
    + +

    LoadFile + directive

    + + Syntax: LoadFile + filename [filename] ...
    + Context: server config
    + Status: Base
    + Module: mod_so + +

    The LoadFile directive links in the named object files or + libraries when the server is started or restarted; this is used + to load additional code which may be required for some module + to work. Filename is either an absolute path or + relative to ServerRoot.

    + +

    For example:

    + LoadFile libexec/libxmlparse.so + +
    + +

    LoadModule + directive

    + + Syntax: LoadModule module + filename
    + Context: server config
    + Status: Base
    + Module: mod_so + +

    The LoadModule directive links in the object file or library + filename and adds the module structure named + module to the list of active modules. Module + is the name of the external variable of type + module in the file, and is listed as the Module Identifier + in the module documentation. Example (Unix, and for Windows as + of Apache 1.3.15):

    + +
    + LoadModule status_module modules/mod_status.so +
    + +

    Example (Windows prior to Apache 1.3.15, and some 3rd party + modules):

    + +
    + LoadModule foo_module modules/ApacheModuleFoo.dll
    +
    +
    + +

    Note that all modules bundled with the Apache Win32 + binary distribution were renamed as of Apache version + 1.3.15.

    + +

    Win32 Apache modules are often distributed with the old + style names, or even a name such as libfoo.dll. Whatever the + name of the module, the LoadModule directive requires the exact + filename, no assumption is made about the filename + extension.

    + +

    See also: AddModule and ClearModuleList

    + + + + + diff --git a/htdocs/manual/mod/mod_so.html.html b/htdocs/manual/mod/mod_so.html.html new file mode 100644 index 00000000000..509309177ae --- /dev/null +++ b/htdocs/manual/mod/mod_so.html.html @@ -0,0 +1,4 @@ + + + diff --git a/htdocs/manual/mod/mod_so.html.ja.jis b/htdocs/manual/mod/mod_so.html.ja.jis new file mode 100644 index 00000000000..f929fbe791f --- /dev/null +++ b/htdocs/manual/mod/mod_so.html.ja.jis @@ -0,0 +1,191 @@ + + + + + + Apache module mod_so + + + + + + + +

    mod_so $B%b%8%e!<%k(B

    + +

    $B$3$N%b%8%e!<%k$O!"%5!<%P$N5/F0;~$d:F5/F0;~$K + +

    $B%9%F!<%?%9(B: + Base (Windows); Experimental (Unix)
    + $B%=!<%9%U%!%$%k(B: mod_so.c
    + $B%b%8%e!<%k<1JL;R(B: + so_module
    + $B8_49@-(B: + Apache 1.3 $B0J9_$G;HMQ2DG=!#(B

    + +

    $B35MW(B

    + +

    $B$3$l$ODynamic Shared Object + (DSO) $B5!9=$K$h$j!" +

    Unix $B>e$G$O!"FI$_9~$^$l$k%3!<%I$ODL>o$O%7%'%"!<%I%*%V%8%'%/%H%U%!%$%k(B + ($BIaDL(B .so $B$H$$$&3HD%;R$,IU$$$F$$$^$9(B) $B$+$i$G$9!#(B + $B0lJ}!"(BWindows $B>e$G$O$3$N%b%8%e!<%k$O(B DLL + $B%U%!%$%k$rFI$_9~$_$^$9!#$3$N%b%8%e!<%k$O(B + Apache 1.3 $B0J9_$N$_$G;HMQ2DG=$G$9!#(B

    +

    $B0JA0$N%j%j!<%9$G$O!"$3$N%b%8%e!<%k$N5!G=$O(B Unix $B$G$O(B mod_dld$B!"(B + Windows $B$G$O(B mod_dll $B$K$h$jDs6!$5$l$F$$$^$7$?!#(BWindows $B$G$O!"(B + mod_dll $B$O(B 1.3b1 $B$+$i(B 1.3b5 $B$^$G$N%Y!<%?%j%j!<%9$G;HMQ$5$l$F$$$^$7$?!#(B + mod_so $B$O$9$Y$F$N%*%Z%l!<%F%#%s%0%7%9%F%`MQ$K!"(B + $B$3$NFs$D$N%b%8%e!<%k$r0l$D$N%b%8%e!<%k$K$^$H$a$?$b$N$G$9!#(B

    + +

    $B%G%#%l%/%F%#%V(B

    + + + +

    Windows $BMQ$N(B DLL + $B%b%8%e!<%k$r:n@.$9$k(B

    + +

    Apache $B$N%b%8%e!<%k(B API $B$O(B UNIX $B$H(B Windows $B$H$GJQ99$5$l$F$$$^$;$s!#(B + $BB?$/$N%b%8%e!<%k$OA4$/JQ99$J$7!"$b$7$/$O4JC1$JJQ99$K$h$j(B Windows + $B$G + +

    $B%b%8%e!<%k$,Configure + $B%W%m%0%i%`$,$"$j$^$;$s$N$G!"%b%8%e!<%k$N%=!<%9%U%!%$%k$r(B + ApacheCore $B%W%m%8%'%/%H%U%!%$%k$KDI2C$7!"%7%s%\%k$r(B + os\win32\modules.c $B%U%!%$%k$KDI2C$9$kI,MW$,$"$j$^$9!#(B

    + +

    $BFs$DL\$O%b%8%e!<%k$r(B DLL $B$H$7$F%3%s%Q%$%k$9$kJ}K!$G$9!#(B + DLL $B$O%7%'%"!<%I%i%$%V%i%j$G!"LoadModule + $B%G%#%l%/%F%#%V$K$h$j%5!<%P$KFI$_9~$`$3$H$,$G$-$^$9!#$3$l$i$N%b%8%e!<%k(B + DLL $B$OG[I[$9$k$3$H$,2DG=$G!"%5!<%P$r:F%3%s%Q%$%k$9$k$3$H$J$/!"(BWindows + $BMQ$N(B Apache $B$N$9$Y$F$N%$%s%9%H!<%k$G + +

    $B%b%8%e!<%k(B DLL $B$r:n@.$9$k$?$a$K$O!"(B + $B%b%8%e!<%k$N:n@.$K>.$5$JJQ99$r9T$J$&I,MW$,$"$j$^$9!#(B + $B$D$^$j!"%b%8%e!<%k$N%l%3!<%I$,(B DLL ($B$3$l$O8e$G:n@.$5$l$^$9!#(B + $B0J2<$r;2>H$7$F$/$@$5$$(B) $B$+$i%(%/%9%]!<%H$5$l$J$1$l$P$J$j$^$;$s!#(B + $B$3$l$r9T$J$&$K$O!"(BMODULE_VAR_EXPORT (Apache + $B$N%X%C%@%U%!%$%k$GDj5A$5$l$F$$$^$9(B) $B$r%b%8%e!<%k$N%b%8%e!<%k%l%3!<%I(B + $BDj5A$NItJ,$KDI2C$7$F$/$@$5$$!#$?$H$($P!"%b%8%e!<%k$K(B

    +
    +    module foo_module;
    +
    + +

    $B$,$"$k$H$9$k$H!"$=$l$r +

    +    module MODULE_VAR_EXPORT foo_module;
    +
    + +

    $B$b$7(B Unix $B>e$G$3$N%b%8%e!<%k$r;HMQ$7$?$/$J$C$F$b!"(B + $BJQ99L5$7$G;H$$B3$1$i$l$k$h$&$K!"$3$N%^%/%m$O(B Windows + $B>e$G$N$_8zNO$r;}$D$H$$$&$3$H$KCm0U$7$F$/$@$5$$!#(B.DEF + $B%U%!%$%k$NJ}$rNI$/CN$C$F$$$k$H$$$&>l9g$O!"(B + $BBe$o$j$K$=$l$r;H$C$F%b%8%e!<%k%l%3!<%I$r(B + $B%(%/%9%]!<%H$9$k$3$H$b$G$-$^$9!#(B

    +

    $B$3$3$G!"$"$J$?$N%b%8%e!<%k$N(B DLL $B$r:n@.$7$F$/$@$5$$!#$3$l$r!"(B + ApacheCore.dll $B%7%'%"!<%I%i%$%V%i%j$,%3%s%Q%$%k$5$l$?$H$-$K:n@.$5$l$?(B + ApacheCore.lib $B%(%/%9%]!<%H%i%$%V%i%j$H%j%s%/$7$F$/$@$5$$!#$3$N;~$K!"(B + Apache $B$N%X%C%@%U%!%$%k$,@5$7$$0LCV$K$"$k$h$&$K!"(B + $B%3%s%Q%$%i$N@_Dj$rJQ$($kI,MW$,$"$k$+$b$7$l$^$;$s!#(B

    + +

    $B$3$l$G(B DLL $BHG$N%b%8%e!<%k$,:n@.$5$l$F$$$k$O$:$G$9!#(B + $B$5$"!"%5!<%P%k!<%H$N(B modules + $B%G%#%l%/%H%j$K%b%8%e!<%k$rCV$$$F!"(BLoadModule + $B%G%#%l%/%F%#%V$r;H$C$FFI$_9~$s$G$/$@$5$$!#(B

    +
    + +

    LoadFile + $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: LoadFile + filename [filename] ...
    + $B%3%s%F%-%9%H(B: $B%5!<%P@_Dj%U%!%$%k(B
    + $B%9%F!<%?%9(B: Base
    + $B%b%8%e!<%k(B: mod_so + +

    LoadFile $B%G%#%l%/%F%#%V$O!"%5!<%P$,5/F0$5$l$?$H$-$d:F5/F0$5$l$?$H$-$K!"(B + $B;XDj$5$l$?%*%V%8%'%/%H%U%!%$%k$d%i%$%V%i%j$r%j%s%/$7$^$9!#(B + $B$3$l$O%b%8%e!<%k$,F0:n$9$k$?$a$KI,MW$K$J$k$+$b$7$l$J$$DI2C$N(B + $B%3!<%I$rFI$_9~$`$?$a$K;HMQ$5$l$^$9!#(BFilename $B$O@dBP%Q%9$+!"(BServerRoot $B$+$i$NAjBP%Q%9$G$9!#(B

    + +

    $BNc(B:

    + LoadFile libexec/libxmlparse.so + +
    + +

    LoadModule + $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: LoadModule module + filename
    + $B%3%s%F%-%9%H(B:$B%5!<%P@_Dj%U%!%$%k(B
    + $B%9%F!<%?%9(B: Base
    + $B%b%8%e!<%k(B: mod_so + +

    LoadModule $B%G%#%l%/%F%#%V$O(B filename + $B$H$$$&%*%V%8%'%/%H%U%!%$%k$*$h$S%i%$%V%i%j$r%j%s%/$7!"(Bmodule + $B$H$$$&L>A0$N%b%8%e!<%k$N9=B$$r%"%/%F%#%V$J%b%8%e!<%k$N%j%9%H$KDI2C$7$^$9!#(B + Module $B$O%U%!%$%kCf$N(B module + $B7?$N30ItJQ?t$NL>A0$G!"%b%8%e!<%k$N%I%-%e%a%s%H$K(B + $B%b%8%e!<%k<1JL;R(B$B$H$7$F=q$+$l$F$$$k$b$N$G$9!#Nc(B + (Unix $B$H(B Apache 1.3.15 $B0J9_$N(B Windows):

    + +
    + LoadModule status_module modules/mod_status.so +
    + +

    $BNc(B (Apache 1.3.15 $B0JA0$N(B + Windows, $B%5!<%I%Q!<%F%#%b%8%e!<%k$N0lIt(B):

    + +
    + LoadModule foo_module modules/ApacheModuleFoo.dll
    +
    +
    + +

    Apache 1.3.15 $B$N;~E@$G(B Apache Win32 $B%P%$%J%jG[I[$KIUB0$7$F$$$k(B + $B$9$Y$F$N%b%8%e!<%k$NL>A0$,JQ99$5$l$?$3$H$KCm0U$7$F$/$@$5$$(B$B!#(B +

    + +

    Win32 Apache $B%b%8%e!<%k$O$7$P$7$P8E$$7A<0$NL>A0$GG[I[$5$l$k$3$H$,$"$j!"(B + libfoo.dll $B$N$h$&$JL>A0$GG[I[$5$l$?$j$9$k$3$H$5$($"$j$^$9!#(B + $B%b%8%e!<%k$NL>A0$K4X78$J$/!"(BLoadModule + $B%G%#%l%/%F%#%V$O@53N$J%U%!%$%kL>$rMW5a$7$^$9!#(B + $B%U%!%$%kL>$N3HD%;R$K4X$7$F$O2?$N2>Dj$b9T$J$$$^$;$s!#(B

    + + +

    $B;2>H(B: AddModule $B$H(B ClearModuleList

    + + + diff --git a/htdocs/manual/mod/mod_speling.html.en b/htdocs/manual/mod/mod_speling.html.en new file mode 100644 index 00000000000..772c0ef5451 --- /dev/null +++ b/htdocs/manual/mod/mod_speling.html.en @@ -0,0 +1,123 @@ + + + + + + + Apache module mod_speling + + + + + + +

    Module mod_speling

    + +

    This module attempts to correct misspellings of URLs that + users might have entered, by ignoring capitalization and by + allowing up to one misspelling.

    + +

    Status: Extension
    + Source File: + mod_speling.c
    + Module Identifier: + speling_module
    + Compatibility: Available in + Apache 1.3 and later. Available as an External module in Apache + 1.1 and later.

    + +

    Summary

    + +

    Requests to documents sometimes cannot be served by the core + apache server because the request was misspelled or + miscapitalized. This module addresses this problem by trying to + find a matching document, even after all other modules gave up. + It does its work by comparing each document name in the + requested directory against the requested document name + without regard to case, and allowing + up to one misspelling (character insertion / + omission / transposition or wrong character). A list is built + with all document names which were matched using this + strategy.

    + +

    If, after scanning the directory,

    + +
      +
    • no matching document was found, Apache will proceed as + usual and return a "document not found" error.
    • + +
    • only one document is found that "almost" matches the + request, then it is returned in the form of a redirection + response.
    • + +
    • more than one document with a close match was found, then + the list of the matches is returned to the client, and the + client can select the correct candidate.
    • +
    + +

    Directives

    + + +
    + + +

    CheckSpelling directive

    + + Syntax: CheckSpelling + on|off
    + Default: CheckSpelling + Off
    + Context: server config, virtual + host, directory, .htaccess
    + Override: Options
    + Status: Base
    + Module: mod_speling
    + Compatibility: CheckSpelling + was available as a separately available module for Apache 1.1, + but was limited to miscapitalizations. As of Apache 1.3, it is + part of the Apache distribution. Prior to Apache 1.3.2, the + CheckSpelling directive was only available in the + "server" and "virtual host" contexts. + +

    This directive enables or disables the spelling module. When + enabled, keep in mind that

    + +
      +
    • the directory scan which is necessary for the spelling + correction will have an impact on the server's performance + when many spelling corrections have to be performed at the + same time.
    • + +
    • the document trees should not contain sensitive files + which could be matched inadvertently by a spelling + "correction".
    • + +
    • the module is unable to correct misspelled user names (as + in http://my.host/~apahce/), just file names or + directory names.
    • + +
    • spelling corrections apply strictly to existing files, so + a request for the <Location /status> may + get incorrectly treated as the negotiated file + "/stats.html".
    • +
    + + + + diff --git a/htdocs/manual/mod/mod_speling.html.html b/htdocs/manual/mod/mod_speling.html.html new file mode 100644 index 00000000000..d225b4ba792 --- /dev/null +++ b/htdocs/manual/mod/mod_speling.html.html @@ -0,0 +1,4 @@ + + + diff --git a/htdocs/manual/mod/mod_speling.html.ja.jis b/htdocs/manual/mod/mod_speling.html.ja.jis new file mode 100644 index 00000000000..731599cbef0 --- /dev/null +++ b/htdocs/manual/mod/mod_speling.html.ja.jis @@ -0,0 +1,123 @@ + + + + + + Apache module mod_speling + + + + + + + +

    mod_speling $B%b%8%e!<%k(B

    + +

    $B$3$N%b%8%e!<%k$OBgJ8;z>.J8;z$N0c$$$rL5;k$7$?$j!"(B + $B0lJ8;z0J2<$NDV$j$N4V0c$$$rL5;k$9$k$3$H$G(B + URL $B$NDV$j$N4V0c$$$N=$@5$r;n$_$^$9!#(B

    + +

    $B%9%F!<%?%9(B: Extension
    + $B%=!<%9%U%!%$%k(B: + mod_speling.c
    + $B%b%8%e!<%k<1JL;R(B: + speling_module
    + $B8_49@-(B: Apache 1.3 + $B0J9_$G;HMQ2DG=!#(BApache 1.1 $B0J9_$G$O30It%b%8%e!<%k$H$7$F;HMQ2DG=!#(B +

    + +

    $B35MW(B

    + +

    $B%j%/%(%9%H$NDV$j$,4V0c$C$F$$$?$j!"(B + $BBgJ8;z>.J8;z$,0c$C$F$$$?$j$9$k$?$a$K!"(BApache $B$N%3%"%5!<%P$,(B + $B%I%-%e%a%s%H$X$N%j%/%(%9%H$X$N1~Ez$r@5$7$/Ds6!$G$-$J$$$3$H$,$"$j$^$9!#(B + $B$3$N%b%8%e!<%k$O!"B>$N$9$Y$F$N%b%8%e!<%k$,$"$-$i$a$?8e$G$"$C$?$H$7$F$b!"(B + $B%j%/%(%9%H$K9g$&%I%-%e%a%s%H$r8+$D$1$h$&$H$9$k$3$H$K$h$j$3$NLdBj$N(B + $B2r7h$r;n$_$^$9!#$3$N%b%8%e!<%k$O%j%/%(%9%H$5$l$?%G%#%l%/%H%j$K$"$k(B + $B$=$l$>$l$N%I%-%e%a%s%H$NL>A0$H!"%j%/%(%9%H$5$l$?%I%-%e%a%s%H$NL>A0$H$r(B + $BBgJ8;z>.J8;z$N6hJL$rL5;k$7(B$B!"(B + $B0lJ8;z$^$G$NDV$j$N4V0c$$(B + ($BJ8;z$NA^F~(B/$B>JN,(B/$BNY9g$&J8;z$NCV49!"4V0c$C$?J8;z(B) + $B$r5v2D$7$FHf3S$9$k$3$H$K$h$j!"L\E*$rC#@.$7$h$&$H$7$^$9!#(B + $B$3$NJ}K!$G%j%/%(%9%H$K9g$&%I%-%e%a%s%H$N0lMw$,:n@.$5$l$^$9!#(B

    + +

    $B%G%#%l%/%H%j$r%9%-%c%s$7$?8e$K!"(B

    + +
      +
    • $BE,@Z$J%I%-%e%a%s%H$,8+$D$+$i$J$+$C$?>l9g!"(B + Apache $B$O$$$D$b$HF1$8$h$&$K=hM}$r$7!"(B + $B!V%I%-%e%a%s%H$,8+$D$+$i$J$$!W$H$$$&%(%i!<$rJV$7$^$9!#(B
    • + +
    • $B%j%/%(%9%H$K!V$[$H$s$I!W9g$&%I%-%e%a%s%H$,0l$D$@$18+$D$+$C$?>l9g!"(B + $B$=$l$,%j%@%$%l%/%H1~Ez$H$7$FJV$5$l$^$9!#(B
    • + +
    • $B$h$/;w$?%I%-%e%a%s%H$,J#?t8+$D$+$C$?>l9g!"(B + $B$=$N%j%9%H$,%/%i%$%"%s%H$KJV$5$l!"(B + $B%/%i%$%"%s%H$,@5$7$$8uJd$rA*Br$G$-$k$h$&$K$7$^$9!#(B
    • +
    + +

    $B%G%#%l%/%F%#%V(B

    + + +
    + + +

    CheckSpelling $B%G%#%l%/%F%#%V(B

    + + $B9=J8(B: CheckSpelling on|off
    + $B%G%U%)%k%H(B: CheckSpelling + Off
    + $B%3%s%F%-%9%H(B: + $B%5!<%P@_Dj%U%!%$%k!"%P!<%A%c%k%[%9%H!"%G%#%l%/%H%j!"(B.htaccess
    + $B>e=q$-(B: Options
    + $B%9%F!<%?%9(B: Base
    + $B%b%8%e!<%k(B: mod_speling
    + $B8_49@-(B: CheckSpelling $B$O(B + Apache 1.1 $B$G$O30It$N%b%8%e!<%k$H$7$F;HMQ2DG=$G$7$?$,!"(B + $BBgJ8;z>.J8;z$N0c$$$r=$@5$9$k5!G=$N$_$G$7$?!#(BApache 1.3 $B$G$O(B + Apache $B$NG[I[$N0lIt$K$J$C$F$$$^$9!#(BApache 1.3.2 $B0JA0$G$O!"(B + CheckSpelling $B%G%#%l%/%F%#%V$O(B "$B%5!<%P(B" $B$H(B + "$B%P!<%A%c%k%[%9%H(B" $B$N%3%s%F%-%9%H$N$_$G;HMQ2DG=$G$7$?!#(B + + +

    $B$3$N%G%#%l%/%F%#%V$ODV$jMQ$N%b%8%e!<%k$r;HMQ$9$k$+$I$&$+$r(B + $B7h$a$^$9!#;HMQ;~$K$O!"0J2<$N$3$H$r3P$($F$*$$$F$/$@$5$$(B

    + +
      +
    • $BF1;~$K$?$/$5$s$NDV$j$ND{@5$r9T$J$o$J$1$l$P$J$i$J$$$H$-$O!"(B + $B$=$N$?$a$K9T$J$o$l$k%G%#%l%/%H%j$N%9%-%c%s$,(B + $B%5!<%P$N@-G=$K1F6A$rM?$($^$9!#(B
    • + +
    • $B%I%-%e%a%s%H$NCf$KDV$j$N!VD{@5!W$K$h$j(B + $B0U?^$;$:9g$C$F$7$^$&$h$&$J=EMW$J%U%!%$%k$,$J$$$h$&$K$7$F$/$@$5$$!#(B +
    • + +
    • $B%b%8%e!<%k$O%f!<%6L>$NDV$j$N4V0c$$(B + (http://my.host/~apahce/ $B$N$h$&$K(B) + $B$rD{@5$9$k$3$H$O$G$-$^$;$s!#(B + $BD{@5$G$-$k$N$O%U%!%$%kL>$H%G%#%l%/%H%jL>$@$1$G$9!#(B
    • + +
    • $BDV$j$ND{@5$OB8:_$9$k%U%!%$%k$K87L)$KE,MQ$5$l$^$9$N$G!"(B + <Location /status> + $B$O%M%4%7%(!<%7%g%s$N7k2L$N%U%!%$%k(B "/stats.html" + $B$H$7$F4V0c$C$F07$o$l$k$+$b$7$l$^$;$s!#(B
    • +
    + + + diff --git a/htdocs/manual/mod/mod_status.html b/htdocs/manual/mod/mod_status.html new file mode 100644 index 00000000000..6725452222c --- /dev/null +++ b/htdocs/manual/mod/mod_status.html @@ -0,0 +1,158 @@ + + + + + + + Apache module mod_status + + + + + + +

    Module mod_status

    + +

    This module provides information on server activity and + performance.

    + +

    Status: Base
    + Source File: mod_status.c
    + Module Identifier: + status_module
    + Compatibility: Available in + Apache 1.1 and later.

    + +

    Summary

    + +

    The Status module allows a server administrator to find out + how well their server is performing. A HTML page is presented + that gives the current server statistics in an easily readable + form. If required this page can be made to automatically + refresh (given a compatible browser). Another page gives a + simple machine-readable list of the current server state.

    + +

    The details given are:

    + +
      +
    • The number of children serving requests
    • + +
    • The number of idle children
    • + +
    • The status of each child, the number of requests that + child has performed and the total number of bytes served by + the child (*)
    • + +
    • A total number of accesses and byte count served (*)
    • + +
    • The time the server was started/restarted and the time it + has been running for
    • + +
    • Averages giving the number of requests per second, the + number of bytes served per second and the average number of + bytes per request (*)
    • + +
    • The current percentage CPU used by each child and in + total by Apache (*)
    • + +
    • The current hosts and requests being processed (*)
    • +
    + +

    Details marked "(*)" are only available with + ExtendedStatus On.

    + +

    Directives

    + + + +

    Enabling Status Support

    + To enable status reports only for browsers from the foo.com + domain add this code to your httpd.conf + configuration file +
    +    <Location /server-status>
    +    SetHandler server-status
    +
    +    Order Deny,Allow
    +    Deny from all
    +    Allow from .foo.com
    +    </Location>
    +
    + +

    You can now access server statistics by using a Web browser + to access the page + http://your.server.name/server-status

    + +

    Alternatively, if you have lynx installed, you can + also get a server statics report from the command line by running + the command apachectl status, or, for the extended + status report, apachectl fullstatus. See the apachectl documentation for + additional details.

    + +

    Note that mod_status will only work when you are running + Apache in standalone mode + and not inetd mode.

    + +

    Automatic Updates

    + You can get the status page to update itself automatically if + you have a browser that supports "refresh". Access the page + http://your.server.name/server-status?refresh=N to + refresh the page every N seconds. + +

    Machine Readable Status File

    + A machine-readable version of the status file is available by + accessing the page + http://your.server.name/server-status?auto. This + is useful when automatically run, see the Perl program in the + /support directory of Apache, + log_server_status. + +
    + It should be noted that if mod_status is + compiled into the server, its handler capability is available + in all configuration files, including + per-directory files (e.g., + .htaccess). This may have security-related + ramifications for your site. +
    +
    + +

    ExtendedStatus + directive

    + + Syntax: ExtendedStatus + On|Off
    + Default: ExtendedStatus + Off
    + Context: server config
    + Status: Base
    + Module: mod_status
    + Compatibility: ExtendedStatus + is only available in Apache 1.3.2 and later. + +

    This directive controls whether the server keeps track of + extended status information for each request. This is only + useful if the status module is enabled on the server.

    + +

    This setting applies to the entire server, and cannot be + enabled or disabled on a virtualhost-by-virtualhost basis.

    + + + + + diff --git a/htdocs/manual/mod/mod_unique_id.html.en b/htdocs/manual/mod/mod_unique_id.html.en new file mode 100644 index 00000000000..d3ab32c83f4 --- /dev/null +++ b/htdocs/manual/mod/mod_unique_id.html.en @@ -0,0 +1,206 @@ + + + + + + + Apache module mod_unique_id + + + + + + +

    Module mod_unique_id

    + +

    This module provides an environment variable with a unique + identifier for each request.

    + +

    Status: Extension
    + Source File: + mod_unique_id.c
    + Module Identifier: + unique_id_module
    + Compatibility: Available in + Apache 1.3 and later.

    + +

    Summary

    + +

    This module provides a magic token for each request which is + guaranteed to be unique across "all" requests under very + specific conditions. The unique identifier is even unique + across multiple machines in a properly configured cluster of + machines. The environment variable UNIQUE_ID is + set to the identifier for each request. Unique identifiers are + useful for various reasons which are beyond the scope of this + document.

    + +

    Directives

    + +

    This module has no directives.

    + +

    Theory

    + +

    First a brief recap of how the Apache server works on Unix + machines. On Unix machines, Apache creates several children, + the children process requests one at a time. Each child can + serve multiple requests in its lifetime. For the purpose of + this discussion, the children don't share any data with each + other. We'll refer to the children as httpd processes.

    + +

    Your website has one or more machines under your + administrative control, together we'll call them a cluster of + machines. Each machine can possibly run multiple instances of + Apache. All of these collectively are considered "the + universe", and with certain assumptions we'll show that in this + universe we can generate unique identifiers for each request, + without extensive communication between machines in the + cluster.

    + +

    The machines in your cluster should satisfy these + requirements. (Even if you have only one machine you should + synchronize its clock with NTP.)

    + +
      +
    • The machines' times are synchronized via NTP or other + network time protocol.
    • + +
    • The machines' hostnames all differ, such that the module + can do a hostname lookup on the hostname and receive a + different IP address for each machine in the cluster.
    • +
    + +

    As far as operating system assumptions go, we assume that + pids (process ids) fit in 32-bits. If the operating system uses + more than 32-bits for a pid, the fix is trivial but must be + performed in the code.

    + +

    Given those assumptions, at a single point in time we can + identify any httpd process on any machine in the cluster from + all other httpd processes. The machine's IP address and the pid + of the httpd process are sufficient to do this. So in order to + generate unique identifiers for requests we need only + distinguish between different points in time.

    + +

    To distinguish time we will use a Unix timestamp (seconds + since January 1, 1970 UTC), and a 16-bit counter. The timestamp + has only one second granularity, so the counter is used to + represent up to 65536 values during a single second. The + quadruple ( ip_addr, pid, time_stamp, counter ) is + sufficient to enumerate 65536 requests per second per httpd + process. There are issues however with pid reuse over time, and + the counter is used to alleviate this issue.

    + +

    When an httpd child is created, the counter is initialized + with ( current microseconds divided by 10 ) modulo 65536 (this + formula was chosen to eliminate some variance problems with the + low order bits of the microsecond timers on some systems). When + a unique identifier is generated, the time stamp used is the + time the request arrived at the web server. The counter is + incremented every time an identifier is generated (and allowed + to roll over).

    + +

    The kernel generates a pid for each process as it forks the + process, and pids are allowed to roll over (they're 16-bits on + many Unixes, but newer systems have expanded to 32-bits). So + over time the same pid will be reused. However unless it is + reused within the same second, it does not destroy the + uniqueness of our quadruple. That is, we assume the system does + not spawn 65536 processes in a one second interval (it may even + be 32768 processes on some Unixes, but even this isn't likely + to happen).

    + +

    Suppose that time repeats itself for some reason. That is, + suppose that the system's clock is screwed up and it revisits a + past time (or it is too far forward, is reset correctly, and + then revisits the future time). In this case we can easily show + that we can get pid and time stamp reuse. The choice of + initializer for the counter is intended to help defeat this. + Note that we really want a random number to initialize the + counter, but there aren't any readily available numbers on most + systems (i.e., you can't use rand() because you need + to seed the generator, and can't seed it with the time because + time, at least at one second resolution, has repeated itself). + This is not a perfect defense.

    + +

    How good a defense is it? Suppose that one of your machines + serves at most 500 requests per second (which is a very + reasonable upper bound at this writing, because systems + generally do more than just shovel out static files). To do + that it will require a number of children which depends on how + many concurrent clients you have. But we'll be pessimistic and + suppose that a single child is able to serve 500 requests per + second. There are 1000 possible starting counter values such + that two sequences of 500 requests overlap. So there is a 1.5% + chance that if time (at one second resolution) repeats itself + this child will repeat a counter value, and uniqueness will be + broken. This was a very pessimistic example, and with real + world values it's even less likely to occur. If your system is + such that it's still likely to occur, then perhaps you should + make the counter 32 bits (by editing the code).

    + +

    You may be concerned about the clock being "set back" during + summer daylight savings. However this isn't an issue because + the times used here are UTC, which "always" go forward. Note + that x86 based Unixes may need proper configuration for this to + be true -- they should be configured to assume that the + motherboard clock is on UTC and compensate appropriately. But + even still, if you're running NTP then your UTC time will be + correct very shortly after reboot.

    + +

    The UNIQUE_ID environment variable is + constructed by encoding the 112-bit (32-bit IP address, 32 bit + pid, 32 bit time stamp, 16 bit counter) quadruple using the + alphabet [A-Za-z0-9@-] in a manner similar to MIME + base64 encoding, producing 19 characters. The MIME base64 + alphabet is actually [A-Za-z0-9+/] however + + and / need to be specially encoded + in URLs, which makes them less desirable. All values are + encoded in network byte ordering so that the encoding is + comparable across architectures of different byte ordering. The + actual ordering of the encoding is: time stamp, IP address, + pid, counter. This ordering has a purpose, but it should be + emphasized that applications should not dissect the encoding. + Applications should treat the entire encoded + UNIQUE_ID as an opaque token, which can be + compared against other UNIQUE_IDs for equality + only.

    + +

    The ordering was chosen such that it's possible to change + the encoding in the future without worrying about collision + with an existing database of UNIQUE_IDs. The new + encodings should also keep the time stamp as the first element, + and can otherwise use the same alphabet and bit length. Since + the time stamps are essentially an increasing sequence, it's + sufficient to have a flag second in which all machines + in the cluster stop serving and request, and stop using the old + encoding format. Afterwards they can resume requests and begin + issuing the new encodings.

    + +

    This is a relatively portable solution. It is extended to + multithreaded systems like Windows NT, which add the thread-id + to the ID, producing a 144-bit (including 32-bit tid) quadruple + that generates a 24 character UNIQUE_ID value. The identifiers + generated have essentially an infinite life-time because future + identifiers can be made longer as required. Essentially no + communication is required between machines in the cluster (only + NTP synchronization is required, which is low overhead), and no + communication between httpd processes is required (the + communication is implicit in the pid value assigned by the + kernel). In very specific situations the identifier can be + shortened, but more information needs to be assumed (for + example the 32-bit IP address is overkill for any site, but + there is no portable shorter replacement for it). This module + may be extended to include an entire IPv6 address, but that is + overkill for nearly all server configurations. + +

    + + + diff --git a/htdocs/manual/mod/mod_unique_id.html.html b/htdocs/manual/mod/mod_unique_id.html.html new file mode 100644 index 00000000000..609eab006c2 --- /dev/null +++ b/htdocs/manual/mod/mod_unique_id.html.html @@ -0,0 +1,4 @@ + + + diff --git a/htdocs/manual/mod/mod_unique_id.html.ja.jis b/htdocs/manual/mod/mod_unique_id.html.ja.jis new file mode 100644 index 00000000000..4cc22e1af3c --- /dev/null +++ b/htdocs/manual/mod/mod_unique_id.html.ja.jis @@ -0,0 +1,203 @@ + + + + + + Apache module mod_unique_id + + + + + + + +

    mod_unique_id $B%b%8%e!<%k(B

    + +

    $B$3$N%b%8%e!<%k$O!"$=$l$>$l$N%j%/%(%9%H$KBP$7$F(B + $B0l0U$J<1JL;R$r;}$D4D6-JQ?t$rDs6!$7$^$9!#(B

    + +

    $B%9%F!<%?%9(B: Extension
    + $B%=!<%9%U%!%$%k(B: + mod_unique_id.c
    + $B%b%8%e!<%k<1JL;R(B: + unique_id_module
    + $B8_49@-(B: Apache 1.3 + $B0J9_$G;HMQ2DG=!#(B

    + +

    $B35MW(B

    + +

    $B$3$N%b%8%e!<%k$OHs>o$K@)8B$5$l$?>r7o2<$G!"(B + $B$=$l$>$l$N%j%/%(%9%H$K!V$9$Y$F!W$N%j%/%(%9%H$KBP$7$F(B + $B0l0U$K7h$^$k$3$H$,J]>Z$5$l$F$$$kKbK!$N%H!<%/%s$rDs6!$7$^$9!#(B + $B$3$N0l0U$J<1JL;R$O!"E,@Z$K@_Dj$5$l$?%/%i%9%?$G$OJ#?t$N(B + $B%^%7%s$N4V$G$5$($b0l0U$K$J$j$^$9!#$=$l$>$l$N%j%/%(%9%H$KBP$7$F4D6-JQ?t(B + UNIQUE_ID $B$K<1JL;R$,@_Dj$5$l$^$9!#(B + $B0l0U$J<1JL;R$,JXMx$JM}M3$O$$$m$$$m$"$j$^$9$,!"(B + $B$3$N%I%-%e%a%s%H$NL\E*$+$i$O30$l$k$?$a!"$3$3$G$O@bL@$7$^$;$s!#(B

    + +

    $B%G%#%l%/%F%#%V(B

    + +

    $B$3$N%b%8%e!<%k$K$O%G%#%l%/%F%#%V$O$"$j$^$;$s!#(B

    + +

    $BM}O@(B

    + +

    $B$^$:$O$8$a$K!"(BApache $B%5!<%P$,(B Unix + $B%^%7%s$G$I$N$h$&$KF0:n$r$9$k$+$r4JC1$K@bL@$7$^$9!#(B + Unix $B%^%7%s$G$O(B Apache $B$O$$$/$D$+$N;R%W%m%;%9$r:n@.$7!"(B + $B$=$N;R%W%m%;%9$,0l$D$:$D%j%/%(%9%H$r=hM}$7$^$9!#$=$l$>$l$N;R%W%m%;%9$O!"(B + $B@8B84|4VCf$KJ#?t$N%j%/%(%9%H$r07$&$3$H$,$G$-$^$9!#(B + $B$3$N5DO@$G$O;R%W%m%;%94V$G$O0l@Z%G!<%?$r6&M-$7$J$$$3$H$K$7$^$9!#(B + $B0J8e!"$3$N;R%W%m%;%9$N$3$H$r(B httpd $B%W%m%;%9$H8F$S$^$9!#(B

    + +

    $B$"$J$?$N%&%'%V%5%$%H$K$O$"$J$?$,4IM}$9$k$$$/$D$+$N%^%7%s$,$"$k$H$7$^$9!#(B + $B$=$l$i$r$^$H$a$F%/%i%9%?$H8F$V$3$H$K$7$^$9!#$=$l$>$l$N%^%7%s$OJ#?t$N(B + Apache $B$rDj$N2<$G!"%/%i%9%?$N%^%7%s4V$,$?$/$5$sDL?.$r$9$k$3$H$J$/!"(B + $B$3$N1'Ch$NCf$G$=$l$>$l$N%j%/%(%9%H$K0l0U$J<1JL;R$r@8@.$G$-$k$3$H$r<($7$^$9!#(B +

    + +

    $B%/%i%9%?$K$"$k%^%7%s$O0J2<$NMW5a$rK~$?$5$J$1$l$P$J$j$^$;$s!#(B + ($B%^%7%s$,0l$D$@$1$@$H$7$F$b!"(BNTP $B$G;~7W$r9g$o$;$kJ}$,NI$$$G$9!#(B)

    + +
      +
    • NTP $B$dB>$N%M%C%H%o!<%/>e$G;~4V$r9g$o$;$k%W%m%H%3%k$K$h$C$F(B + $B3F%^%7%s$N;~4V$NF14|$, + +
    • $B%b%8%e!<%k$,%[%9%HL>$r0z$$$F0c$&(B IP + $B%"%I%l%9$r$l$N%^%7%s$N%[%9%HL>$,0c$&$3$H!#(B
    • +
    + +

    $B%*%Z%l!<%F%#%s%0%7%9%F%`$K$*$$$F$O!"(Bpid ($B%W%m%;%9(B ID) $B$,(B + 32 $B%S%C%H$NHO0OFb$G$"$k$3$H$r2>Dj$7$^$9!#%*%Z%l!<%F%#%s%0%7%9%F%`$N(B + pid $B$,(B 32 $B%S%C%H$rD6$($k>l9g$O!"4JC1$J=$@5$G$O$"$j$^$9$,!"(B + $B%3!<%I$rJQ99$9$kI,MW$,$"$j$^$9!#(B

    + +

    $B$3$l$i$N2>Dj$,K~$?$5$l$F$$$k$H!"$"$k;~E@$K$*$$$F!"(B + $B%/%i%9%?Fb$N$I$N%^%7%s$N$I$N(B httpd + $B%W%m%;%9$G$b!"0l0U$KF1Dj$9$k$3$H$,$G$-$^$9!#$3$l$O%^%7%s$N(B IP + $B%"%I%l%9$H(B httpd $B%W%m%;%9$N(B pid $B$G==J,$K9T$J$&$3$H$,$G$-$^$9!#(B + $B$G$9$+$i!"%j%/%(%9%H$K0l0U$J<1JL;R$r@8@.$9$k$?$a$K$O!"(B + $B;~9o$r6hJL$9$kI,MW$,$"$k$@$1$G$9!#(B

    + +

    $B;~9o$r6hJL$9$k$?$a$K!"(BUnix $B$N%?%$%`%9%?%s%W(B (UTC $B$N(B 1970 $BG/(B + 1 $B7n(B 1 $BF|$+$i$NIC?t(B) $B$H!"(B16 $B%S%C%H$N%+%&%s%?$r;H$$$^$9!#(B + $B%?%$%`%9%?%s%W$NN3EY$O0lIC$G$9$N$G!"0lIC4V$N(B 65536 + $B$^$G$NCM$rI=8=$9$k$?$a$K%+%&%s%?$r;HMQ$7$^$9!#;M$D$NCM(B + ( ip_addr, pid, time_stamp, counter ) $B$G3F(B httpd + $B%W%m%;%9$G0lIC$N4V$K(B 65536 $B%j%/%(%9%H$r?t$($"$2$k$3$H$,$G$-$^$9!#(B + $B;~4V$,7P$D$H(B pid $B$,:FMxMQ$5$l$k$H$$$&LdBj$,$"$j$^$9$,!"(B + $B$3$NLdBj$r2r7h$9$k$?$a$K%+%&%s%?$,;HMQ$5$l$^$9!#(B

    + +

    httpd $B$N;R%W%m%;%9$,:n@.$5$l$k$H!"%+%&%s%?$O(B + ($B$=$N;~E@$N%^%$%/%mIC(B $B!`(B 10) modulo 65536 $B$G=i4|2=$5$l$^$9(B + ($B$3$N<0$O$$$/$D$+$N%7%9%F%`$K$"$k!"%^%$%/%mIC$N(B + $B%?%$%^$N2<0L%S%C%H$,0[$J$k$H$$$&LdBj$r2r7h$9$k$?$a$KA*$P$l$^$7$?(B)$B!#(B + $B0l0U$J<1JL;R$,@8@.$5$l$?$H$-!";HMQ$5$l$k%?%$%`%9%?%s%W$O(B + $B%&%'%V%5!<%P$K%j%/%(%9%H$,E~Ce$7$?;~9o$K$J$j$^$9!#(B + $B%+%&%s%?$O<1JL;R$,@8@.$5$l$k$?$S$KA}2C$7$^$9(B + ($B$"$U$l$?>l9g$O(B 0 $B$KLa$j$^$9(B)$B!#(B

    + +

    $B%+!<%M%k$O%W%m%;%9$r%U%)!<%/$9$k$H!"$=$l$>$l$N%W%m%;%9$N$?$a$K(B + pid $B$r@8@.$7$^$9!#(Bpid $B$O7+$jJV$5$l$k$3$H$,5v2D$5$l$F$$$^$9(B + (pid $B$NCM$OB?$/$N(B Unix $B$G$O(B 16 $B%S%C%H$G$9$,!"?7$7$$%7%9%F%`$G$O(B + 32 $B%S%C%H$K3HD%$5$l$F$$$^$9(B)$B!#(B + $B$G$9$+$i!"$"$kDxEY$N;~4V$,7P2a$9$k$HF1$8(B pid $B$,:F$S;HMQ$5$l$^$9!#(B + $B$7$+$7!"0lICFb$K:F;HMQ$5$l$J$1$l$P!"(B + $B;M$D$NCM$N0l0U@-$OJ]$?$l$^$9!#$D$^$j!"2f!9$O%7%9%F%`$,0lIC4V(B + $B$K(B 65536 $B8D$N%W%m%;%9$r5/F0$7$J$$$H2>Dj$7$F$$$^$9(B ($B$$$/$D$+$N(B Unix + $B$G$O(B 32768 $B%W%m%;%9$G$9$,!"$=$l$G$9$i$[$H$s$I$"$jF@$J$$$G$7$g$&(B)$B!#(B

    + +

    $B2?$i$+$NM}M3$G!"F1$8;~9o$,7+$jJV$5$l$?$H$7$^$7$g$&!#(B + $B$D$^$j!"%7%9%F%`$N;~7W$,68$C$F$$$F!"$b$&0lEY2a5n$N;~9o$K$J$C$F$7$^$C$?(B + ($B$b$7$/$O?J$_$9$.$F$$$?$H$-$K!"(B + $B@5$7$$;~9o$KLa$7$?$?$a$K:F$S>-Mh$N;~9o$K$J$C$F$7$^$C$?(B) $B$H$7$^$9!#(B + $B$3$N>l9g!"(Bpid $B$H%?%$%`%9%?%s%W$,:F;HMQ$5$l$k$3$H$,4JC1$K<($5$l$^$9!#(B + $B%+%&%s%?=i4|2=MQ$N4X?t$O!"$3$NLdBj$N2sHr$r$B$9$J$o$A(B$B!"(Brand ()$B$O;H$($^$;$s!#(Brand () $B$K$O(B seed + $B$rM?$($kI,MW$,$"$j!"(Bseed $B$K$O;~9o$r;H$($^$;$s!#0lICC10L$G$O!"(B + $B$=$N;~9o$O$9$G$K7+$jJV$5$l$F$$$k$+$i$G$9(B)$B!#(B + $B$3$l$O!"40`z$JBP:v$G$O$"$j$^$;$s!#(B

    + +

    $B$3$NBP:v$O$I$N$/$i$$8z2L$,$"$k$G$7$g$&$+(B? + $B$3$3$G$O!"%^%7%s72$NCf$N0l$D$O:GBg$G0lIC$K(B 500 + $B%j%/%(%9%H$r07$&$H2>Dj$7$^$9(B ($B$3$l$r=q$$$F$$$k;~E@$G$OBEEv$J>e8B$G$9!#(B + $BDL>o%7%9%F%`$,$9$k$3$H$O@EE*$J%U%!%$%k$ro$KHa4QE*$JNc$G!" + +

    $B%5%^!<%?%$%`$K$h$j;~7W$,!VLa$5$l$k!W$3$H$r5$$K$7$F$$$k?M$,(B + $B$$$k$+$b$7$l$^$;$s!#$3$3$G;HMQ$5$l$k;~4V$O(B UTC $B$G$"$j!"(B + $B$=$l$O!V>o$K!W?J$`$N$G$3$3$G$OLdBj$K$J$j$^$;$s!#(Bx86 $B>e$N(B Unix + $B$O$3$N>r7o$rK~$?$9$?$a$KE,@Z$J@_Dj$,I,MW$+$b$7$l$J$$$3$H$K(B + $BCm0U$7$F$/$@$5$$!#%^%6!<%\!<%I$N;~7W$O(B UTC $B$K$J$C$F$$$F!"(B + $BB>$N;~4V$O$=$3$+$iE,@Z$KJd@5$5$l$k$3$H$r2>Dj$G$-$k$h$&$K(B + $B@_Dj$5$l$J$1$l$P$J$j$^$;$s!#$=$N$h$&$J>l9g$G$5$(!"(BNTP + $B$r;H$C$F$$$k$J$i$P%j%V!<%H8e$K$9$0@5$7$$(B UTC $B$N;~4V$K$J$k$G$7$g$&!#(B

    + +

    UNIQUE_ID $B4D6-JQ?t$O(B 112 $B%S%C%H(B (32 $B%S%C%H(B IP + $B%"%I%l%9!"(B32 $B%S%C%H(B pid, 32 $B%S%C%H%?%$%`%9%?%s%W!"(B16 + $B%S%C%H%+%&%s%?$N;M$D$NAH(B) $B$r%"%k%U%!%Y%C%H(B [A-Za-z0-9@-] + $B$rMQ$$$F(B MIME $B$N(B base64 $BId9f2=$HF1MM$NJ}K!$K$h$jId9f2=$7!"(B19 + $B$NJ8;z$r@8@.$9$k$3$H$K$h$j:n@.$5$l$^$9!#(BMIME $B$N(B base64 + $B$N%"%k%U%!%Y%C%H$O[A-Za-z0-9+/] $B$G$9$,!"(B + + $B$H(B / $B$H$O(B URL + $B$G$OFCJL$JId9f2=$,I,MW$J$N$G!"$"$^$jK>$^$7$/$"$j$^$;$s!#(B + $BA4$F$NCM$O%M%C%H%o!<%/%P%$%H%*!<%@$GId9f2=$5$l$^$9$N$G!"(B + $BId9f$O0c$C$?%P%$%H%*!<%@$N%"!<%-%F%/%A%c4V$GHf3S2DG=$G$9!#(B + $BUNIQUE_ID + $BA4BN$rF)2aE*$J%H!<%/%s$H$7$F07$&$Y$-$G$9!#(B + UNIQUE_ID $B$OB>$N(B UNIQUE_ID + $B$H$NEy2A@-$rD4$Y$k$?$a$@$1$K$N$_;HMQ$G$-$^$9!#(B

    + +

    $B$3$N=gHV$O>-Mh!"4{B8$N(B UNIQUE_ID + $B$N%G!<%?%Y!<%9$H$N>WFM$r?4G[$9$k$3$H$J$/Id9f$rJQ99$9$k$3$H$,(B + $B2DG=$K$J$k$h$&$KA*Br$7$F$$$^$9!#(B + $B?7$7$$Id9f$O%?%$%`%9%?%s%W$r:G=i$NMWAG$H$7$F;D$9$N$,K>$^$7$/!"(B + $B$=$l0J30$OF1$8%"%k%U%!%Y%C%H$H%S%C%HD9$r;H$&$3$H$,$G$-$^$9!#(B + $B%?%$%`%9%?%s%W$OK\$B%U%i%0IC(B$B$,$"$l$P==J,$G$9!#(B + $B$=$N8e$O!"%j%/%(%9%H$r:F3+$7!"(B + $B?7$7$$Id9f$rH/9T$9$k$3$H$,$G$-$k$h$&$K$J$j$^$9!#(B

    + +

    $B2f!9$O$3$l$,!"(B + $B$3$NLdBj$K$*$1$kHf3SE*0\?"@-$N9b$$2r7hK!$@$H9M$($F$$$^$9!#(B + Windows NT $B$N$h$&$K!"%9%l%C%I(Bid $B$r(B ID $B$KDI2C$7$F!"(B24 $BJ8;z$N(B + UNIQUE_ID $B$N(B 4 $BG\$K$"$?$k(B 144-bit (32 $B%S%C%H$N(B tid $B$r4^$`(B) $B$N(B ID + $B$r:n$j=P$9$h$&$J%^%k%A%9%l%C%I%7%9%F%`MQ$K3HD%$9$k$3$H$,$G$-$^$9!#(B + $B>-Mh$N(B ID $B$OI,MW$K1~$8$FD9$/$9$k$3$H$,$G$-$^$9$N$G!"@8@.$5$l$?(B ID + $B$Oe!"L58B$KM-8z$G$9!#$^$?!"%/%i%9%?$N%^%7%s4V$NDL?.$b;veI,MW$J$/(B + (NTP $B$K$h$kF14|$N$_$,I,MW$G!"$3$l$O%*!<%P%X%C%I$O$"$^$j$"$j$^$;$s(B)$B!"(Bhttpd + $B%W%m%;%94V$NDL?.$bI,MW$"$j$^$;$s(B ($BDL?.$O%+!<%M%k$K$h$j3d$jEv$F$i$l$?(B + pid $B$NCM$K$h$j0EL[$NFb$K9T$J$o$F$$$^$9(B)$B!#(B + $B$5$i$K8B$i$l$?>u672<$G$O!"(BID $B$O$5$i$KC;$/$9$k$3$H$,$G$-$^$9$,!"(B + $B$h$jB?$/$N>pJs$r2>Dj$9$kI,MW$,$G$F$-$^$9(B ($BNc$($P!"(B32 $B%S%C%H(B + IP $B%"%I%l%9$O$I$N%5%$%H$K$*$$$F$b2a>j$J>pJs$G$9$,!"(B + $B$=$l$NBe$o$j$K$J$k0\?"@-$N$"$k$b$N$O$"$j$^$;$s(B)$B!#(B + $B$3$N%b%8%e!<%k$O!"(BIPv6 $B%"%I%l%9A4BN$r4^$`$h$&$K$b3HD%$G$-$^$9$,!"(B + $B$[$H$s$I$9$Y$F$N%5!<%P!<$K$H$C$F$O2a>j$J>pJs$G$9!#(B

    + + + diff --git a/htdocs/manual/mod/mod_userdir.html.en b/htdocs/manual/mod/mod_userdir.html.en new file mode 100644 index 00000000000..73f286b72d0 --- /dev/null +++ b/htdocs/manual/mod/mod_userdir.html.en @@ -0,0 +1,140 @@ + + + + + + + Apache module mod_userdir + + + + + + +

    Module mod_userdir

    + +

    This module provides for user-specific directories.

    + +

    Status: Base
    + Source File: + mod_userdir.c
    + Module Identifier: + userdir_module

    + +

    Directives

    + + +
    + +

    UserDir directive

    + + Syntax: UserDir + directory-filename
    + Default: UserDir + public_html
    + Context: server config, virtual + host
    + Status: Base
    + Module: mod_userdir
    + Compatibility: All forms except + the UserDir public_html form are only available in + Apache 1.1 or above. Use of the enabled keyword, + or disabled with a list of usernames, is only + available in Apache 1.3 and above. + +

    The UserDir directive sets the real directory in a user's + home directory to use when a request for a document for a user + is received. Directory-filename is one of the + following:

    + +
      +
    • The name of a directory or a pattern such as those shown + below.
    • + +
    • The keyword disabled. This turns off + all username-to-directory translations except those + explicitly named with the enabled keyword (see + below).
    • + +
    • The keyword disabled followed by a + space-delimited list of usernames. Usernames that appear in + such a list will never have directory translation + performed, even if they appear in an enabled + clause.
    • + +
    • The keyword enabled followed by a + space-delimited list of usernames. These usernames will have + directory translation performed even if a global disable is + in effect, but not if they also appear in a + disabled clause.
    • +
    + +

    If neither the enabled nor the + disabled keywords appear in the + Userdir directive, the argument is treated as a + filename pattern, and is used to turn the name into a directory + specification. A request for + http://www.foo.com/~bob/one/two.html will be + translated to:

    +
    +UserDir public_html     -> ~bob/public_html/one/two.html
    +UserDir /usr/web        -> /usr/web/bob/one/two.html
    +UserDir /home/*/www     -> /home/bob/www/one/two.html
    +
    + +

    The following directives will send redirects to the + client:

    +
    +UserDir http://www.foo.com/users -> http://www.foo.com/users/bob/one/two.html
    +UserDir http://www.foo.com/*/usr -> http://www.foo.com/bob/usr/one/two.html
    +UserDir http://www.foo.com/~*/   -> http://www.foo.com/~bob/one/two.html
    +
    + +
    + Be careful when using this directive; for instance, + "UserDir ./" would map + "/~root" to "/" - which is probably + undesirable. If you are running Apache 1.3 or above, it is + strongly recommended that your configuration include a + "UserDir disabled root" declaration. + See also the <Directory> directive + and the Security + Tips page for more information. +
    + +

    Additional examples:

    + +

    To allow a few users to have UserDir directories, but +not anyone else, use the following:

    + +
    +UserDir disabled
    +UserDir enabled user1 user2 user3
    +
    + +

    To allow most users to have UserDir directories, but +deny this to a few, use the following:

    + +
    +UserDir enabled
    +UserDir disabled user4 user5 user6
    +
    + + + + + diff --git a/htdocs/manual/mod/mod_userdir.html.html b/htdocs/manual/mod/mod_userdir.html.html new file mode 100644 index 00000000000..9f07c498d38 --- /dev/null +++ b/htdocs/manual/mod/mod_userdir.html.html @@ -0,0 +1,4 @@ + + + diff --git a/htdocs/manual/mod/mod_userdir.html.ja.jis b/htdocs/manual/mod/mod_userdir.html.ja.jis new file mode 100644 index 00000000000..80db90122d4 --- /dev/null +++ b/htdocs/manual/mod/mod_userdir.html.ja.jis @@ -0,0 +1,139 @@ + + + + + + + Apache module mod_userdir + + + + + + + +

    mod_userdir $B%b%8%e!<%k(B

    + +

    $B$3$N%b%8%e!<%k$O!"%f!<%6$N%[!<%`%G%#%l%/%H%j$K%"%/%;%9$9$k5!G=$rDs6!$7$^$9(B

    + +

    $B%9%F!<%?%9(B: Base
    + $B%=!<%9%U%!%$%k(B: + mod_userdir.c
    + $B%b%8%e!<%k<1JL;R(B: + userdir_module

    + +

    $B%G%#%l%/%F%#%V(B

    + + +
    + +

    UserDir $B%G%#%l%/%F%#%V(B

    + + Syntax: UserDir + directory-filename
    + Default: UserDir + public_html
    + Context: $B%5!<%P@_Dj%U%!%$%k!"(B $B%P!<%A%c%k%[%9%H(B
    + Status: Base
    + Module: mod_userdir
    + Compatibility: UserDir public_html + $B$H$$$C$?7A<00J30$O!"(BApache 1.1 $B0J9_$G$N$_M-8z$G$9!#(B + enabled $B$d(B disabled $B$H$$$&%-!<%o!<%I$N5-=R5Z$S!"(B + $B%f!<%6L>$NNs5s$K4X$7$F$O!"(BApache 1.3 $B0J9_$G$N$_BP1~$7$F$$$^$9!#(B + +

    UserDir $B%G%#%l%/%F%#%V$O!"(B + $B%f!<%6$N%I%-%e%a%s%H$KBP$9$kMW5a$,$"$C$?:]$K;HMQ$9$k!"(B + $B%f!<%6$N%[!<%`%G%#%l%/%H%j$NCf$NA0$r;XDj$7$^$9!#(B + directory-filename $B$K$O!"0J2<$N$I$l$+$r;XDj$7$^$9!#(B

    + +
      +
    • $B%G%#%l%/%H%jL>$+!"0J2<$K=R$Y$k7A<0$N%Q%?!<%s!#(B
    • + +
    • disabled $B$H$$$&%-!<%o!<%I!#(B
      + $B$3$N@_Dj$O!"(Benabled $B%-!<%o!<%I(B ($B0J2<;2>H(B) + $B$K$*$$$F;XDj$5$l$?%f!<%60J30!"(B + $B$9$Y$F(B$B$N%f!<%6L>$r%G%#%l%/%H%j$KJQ49$7$J$$$h$&$K$7$^$9!#(B
    • + +
    • disabled $B$H$$$&%-!<%o!<%I$H!"(B + $B$=$N8e$K%9%Z!<%96h@Z$j$G%f!<%6L>$rNs5s!#(B
      + $B;XDj$5$l$?%f!<%6$O!"(Benabled + $B$K$*$$$F5-=R$,$5$l$F$$$?$H$7$F$b!"(B + $B%G%#%l%/%H%j$X$NJQ49$,(B$B$5$l$J$/(B$B$J$j$^$9!#(B
    • + +
    • enabled + $B$H$$$&%-!<%o!<%I$H!"%9%Z!<%96h@Z$j$G%f!<%6L>$rNs5s(B
      + $B;XDj$5$l$?%f!<%6$O!"JQ49$,$5$l$J$$$h$&$K@_Dj$5$l$F$$$?$H$7$F$b!"(B + $B%G%#%l%/%H%j$X$NJQ49$r9T$$$^$9!#(B + $B$?$@$7!"(Bdisabled + $B$K$*$$$FL@5-$5$l$F$$$k>l9g$K$O!"JQ49$,$J$5$l$^$;$s!#(B
    • +
    + +

    enabled $B$d(B disabled + $B$H$$$C$?%-!<%o!<%I$G$J$$>l9g$K$O!"(B + $B%U%!%$%kL>$N%Q%?!<%s$H$7$F07$o$l!"(B + $BL>A0$+$i%G%#%l%/%H%j$X$NJQ49$r;XDj$9$k$3$H$,$G$-$^$9!#(B + http://www.foo.com/~bob/one/two.html $B$X$N(B URL + $B$N>l9g$NJQ49$K$D$$$F8+$F$_$^$9!#(B

    + +
    +UserDir public_html     -> ~bob/public_html/one/two.html
    +UserDir /usr/web        -> /usr/web/bob/one/two.html
    +UserDir /home/*/www     -> /home/bob/www/one/two.html
    +
    + +

    $B0J2<$N$h$&$K%G%#%l%/%F%#%V$r@_Dj$9$k$H!"(B + $B%/%i%$%"%s%H$X$O%j%@%$%l%/%H$,Aw=P$5$l$^$9!#(B

    +
    +UserDir http://www.foo.com/users -> http://www.foo.com/users/bob/one/two.html
    +UserDir http://www.foo.com/*/usr -> http://www.foo.com/bob/usr/one/two.html
    +UserDir http://www.foo.com/~*/   -> http://www.foo.com/~bob/one/two.html
    +
    + +
    + + $B$3$N%G%#%l%/%F%#%V$rMxMQ$9$k:]!"(B"UserDir ./" + $B$H$$$C$?@_Dj$r$9$k$H!"(B"/~root" $B$O(B "/" + $B$K%^%C%T%s%0$5$l$k$3$H$K5$$r$D$1$F$/$@$5$$!#(B + $B$3$l$OHs>o$KK>$^$7$/$"$j$^$;$s!#(B + Apache 1.3 $B0J9_$rMxMQ$7$F$$$k$N$G$"$l$P!"(B"UserDir disabled root" + $B$H$$$&5-=R$r@_Dj%U%!%$%kCf$K4^$a$k$3$H$r6/$/?d>)$7$^$9!#(B + <Directory> $B%G%#%l%/%F%#%V$d!"(B + $B%;%-%e%j%F%#$K4X$9$k3P=q(B + $B$b;2>H$7$F$/$@$5$$!#(B +
    + +

    $B$=$NB>$N@_DjNc(B:

    + +

    $B>.?t$N%f!<%6$K$O(B UserDir +$B%G%#%l%/%H%j$rMxMQ$5$;$k$b$N$N!";D$j$N%f!<%6$K$O$5$;$?$/$J$$>l9g(B:

    + +
    +UserDir disabled
    +UserDir enabled user1 user2 user3
    +
    + +

    $BBgItJ,$N%f!<%6$K$O(B UserDir +$B%G%#%l%/%H%j$rMxMQ$5$;!"0lIt$N%f!<%6$N$_L58z$K$9$k>l9g(B:

    + +
    +UserDir enabled
    +UserDir disabled user4 user5 user6
    +
    + + + + diff --git a/htdocs/manual/mod/mod_usertrack.html b/htdocs/manual/mod/mod_usertrack.html new file mode 100644 index 00000000000..9283f535dbf --- /dev/null +++ b/htdocs/manual/mod/mod_usertrack.html @@ -0,0 +1,296 @@ + + + + + + + Apache module mod_usertrack + + + + + + +

    Module mod_usertrack

    + +

    This module uses cookies to provide for a + clickstream log of user activity on a site.

    + +

    Status: Extension
    + Source File: + mod_usertrack.c
    + Module Identifier: + usertrack_module
    + Compatibility: Known as + mod_cookies prior to Apache 1.3.

    + +

    Summary

    + +

    Previous releases of Apache have included a module which + generates a 'clickstream' log of user activity on a site using + cookies. This was called the "cookies" module, mod_cookies. In + Apache 1.2 and later this module has been renamed the "user + tracking" module, mod_usertrack. This module has been + simplified and new directives added.

    + +

    Directives

    + + + +

    Logging

    + +

    Previously, the cookies module (now the user tracking + module) did its own logging, using the CookieLog + directive. In this release, this module does no logging at all. + Instead, a configurable log format file should be used to log + user click-streams. This is possible because the logging module + now allows multiple log files. + The cookie itself is logged by using the text + %{cookie}n in the log file format. For example:

    +
    +CustomLog logs/clickstream "%{cookie}n %r %t"
    +
    + For backward compatibility the configurable log module + implements the old CookieLog directive, but this + should be upgraded to the above CustomLog directive. + +

    2-digit or 4-digit dates for cookies?

    + (the following is from message + <022701bda43d$9d32bbb0$1201a8c0@christian.office.sane.com> + in the new-httpd archives) +
    +From: "Christian Allen" <christian@sane.com>
    +Subject: Re: Apache Y2K bug in mod_usertrack.c
    +Date: Tue, 30 Jun 1998 11:41:56 -0400
    +
    +Did some work with cookies and dug up some info that might be useful.
    +
    +True, Netscape claims that the correct format NOW is four digit dates, and
    +four digit dates do in fact work... for Netscape 4.x (Communicator), that
    +is.  However, 3.x and below do NOT accept them.  It seems that Netscape
    +originally had a 2-digit standard, and then with all of the Y2K hype and
    +probably a few complaints, changed to a four digit date for Communicator.
    +Fortunately, 4.x also understands the 2-digit format, and so the best way to
    +ensure that your expiration date is legible to the client's browser is to
    +use 2-digit dates.
    +
    +However, this does not limit expiration dates to the year 2000; if you use
    +an expiration year of "13", for example, it is interpreted as 2013, NOT
    +1913!  In fact, you can use an expiration year of up to "37", and it will be
    +understood as "2037" by both MSIE and Netscape versions 3.x and up (not sure
    +about versions previous to those).  Not sure why Netscape used that
    +particular year as its cut-off point, but my guess is that it was in respect
    +to UNIX's 2038 problem.  Netscape/MSIE 4.x seem to be able to understand
    +2-digit years beyond that, at least until "50" for sure (I think they
    +understand up until about "70", but not for sure).
    +
    +Summary:  Mozilla 3.x and up understands two digit dates up until "37"
    +(2037).  Mozilla 4.x understands up until at least "50" (2050) in 2-digit
    +form, but also understands 4-digit years, which can probably reach up until
    +9999.  Your best bet for sending a long-life cookie is to send it for some
    +time late in the year "37".
    +
    +
    + +

    CookieDomain + directive

    + Syntax: CookieDomain domain
    + Context: server config, virtual host, + directory, .htaccess
    + Status: optional
    + Module: mod_usertrack Compatibility: Apache 1.3.21 + and later + +

    This directive controls the setting of the domain to which + the tracking cookie applies. If not present, no domain is + included in the cookie header field.

    + +

    The domain string must begin with a dot, and + must include at least one embedded dot. That is, + ".foo.com" is legal, but "foo.bar.com" and ".com" are not.

    +
    + +

    CookieExpires directive

    + Syntax: CookieExpires + expiry-period
    + Context: 1.3.20 and + earlier: server config, virtual host; 1.3.21 and + later: server config, virtual host, directory, + .htaccess
    + Status: optional
    + Module: mod_usertrack + +

    When used, this directive sets an expiry time on the cookie + generated by the usertrack module. The expiry-period + can be given either as a number of seconds, or in the format + such as "2 weeks 3 days 7 hours". Valid denominations are: + years, months, weeks, hours, minutes and seconds. If the expiry + time is in any format other than one number indicating the + number of seconds, it must be enclosed by double quotes.

    + +

    If this directive is not used, cookies last only for the + current browser session.

    +
    + +

    CookieFormat directive

    + Syntax: CookieFormat + Normal | Compact
    + Context: server config, virtual host, directory, + .htaccess
    + Status: optional
    + Module: mod_usertrack Compatibility: Apache 1.3.28 + and later + +

    When used, this directive determines whether the cookie + used for user tracking is created using the default ("normal") + format (eg: decimal values for items like the PID) or + using a more compact format (eg: hexidecimal values).

    + +
    + +

    CookieName + directive

    + Syntax: CookieName + token
    + Default: Apache
    + Context: server config, virtual + host, directory, .htaccess
    + Status: optional
    + Module: mod_usertrack
    + Compatibility: Apache 1.3.7 and + later + +

    This directive allows you to change the name of the cookie + this module uses for its tracking purposes. By default the + cookie is named "Apache".

    + +

    You must specify a valid cookie name; results are + unpredictable if you use a name containing unusual characters. + Valid characters include A-Z, a-z, 0-9, "_", and "-".

    +
    + +

    CookiePrefix directive

    + Syntax: CookiePrefix + "string"
    + Context: server config, virtual host, directory, + .htaccess
    + Status: optional
    + Module: mod_usertrack Compatibility: Apache 1.3.28 + and later + +

    When used, this directive allows for the "string" + to be prepended to the user tracking cookie. Care must be + taken not to prepend a string that would result in a bogus + cookie.

    + +
    + +

    CookieStyle + directive

    + Syntax: CookieStyle + Netscape|Cookie|Cookie2|RFC2109|RFC2965
    + Context: server config, virtual host, + directory, .htaccess
    + Status: optional
    + Module: mod_usertrack + +

    This directive controls the format of the cookie header + field. The three formats allowed are:

    + +
      +
    • Netscape, which is the original but now deprecated + syntax. This is the default, and the syntax Apache has + historically used.
    • + +
    • Cookie or RFC2109, which is the syntax that + superseded the Netscape syntax.
    • + +
    • Cookie2 or RFC2965, which is the most + current cookie syntax.
    • +
    + +

    Not all clients can understand all of these formats. but you + should use the newest one that is generally acceptable to your + users' browsers.

    +
    + +

    CookieTracking directive

    + Syntax: CookieTracking + on|off
    + Context: server config, virtual + host, directory, .htaccess
    + Override: FileInfo
    + Status: optional
    + Module: mod_usertrack + +

    When the user track module is compiled in, and + "CookieTracking on" is set, Apache will start sending a + user-tracking cookie for all new requests. This directive can + be used to turn this behavior on or off on a per-server or + per-directory basis. By default, compiling mod_usertrack will + not activate cookies. +

    + + + diff --git a/htdocs/manual/mod/mod_vhost_alias.html b/htdocs/manual/mod/mod_vhost_alias.html new file mode 100644 index 00000000000..94559e65d3a --- /dev/null +++ b/htdocs/manual/mod/mod_vhost_alias.html @@ -0,0 +1,325 @@ + + + + + + + Apache module mod_vhost_alias + + + + + + +

    Module mod_vhost_alias

    + +

    This module provides support for dynamically configured mass virtual + hosting.

    + +

    Status: Extension
    + Source File: + mod_vhost_alias.c
    + Module Identifier: + vhost_alias_module
    + Compatibility: Available in + Apache 1.3.7 and later.

    + +

    Summary

    + +

    This module creates dynamically configured virtual hosts, by + allowing the IP address and/or the Host: header of + the HTTP request to be used as part of the pathname to + determine what files to serve. This allows for easy use of a + huge number of virtual hosts with similar configurations.

    + +

    Directives

    + + + +

    See also: UseCanonicalName.

    + +

    Directory Name Interpolation

    + +

    All the directives in this module interpolate a string into + a pathname. The interpolated string (henceforth called the + "name") may be either the server name (see the UseCanonicalName + directive for details on how this is determined) or the IP + address of the virtual host on the server in dotted-quad + format. The interpolation is controlled by specifiers inspired + by printf which have a number of formats:

    + +
    +
    %%
    + +
    insert a %
    + +
    %p
    + +
    insert the port number of the virtual host
    + +
    %N.M
    + +
    insert (part of) the name
    +
    + +

    N and M are used to specify + substrings of the name. N selects from the + dot-separated components of the name, and M + selects characters within whatever N has selected. + M is optional and defaults to zero if it isn't + present; the dot must be present if and only if M + is present. The interpretation is as follows:

    + +
    +
    0
    + +
    the whole name
    + +
    1
    + +
    the first part
    + +
    2
    + +
    the second part
    + +
    -1
    + +
    the last part
    + +
    -2
    + +
    the penultimate part
    + +
    2+
    + +
    the second and all subsequent parts
    + +
    -2+
    + +
    the penultimate and all preceding parts
    + +
    1+ and -1+
    + +
    the same as 0
    +
    + +

    If N or M is greater than the + number of parts available a single underscore is + interpolated.

    + +

    Examples

    + +

    For simple name-based virtual hosts you might use the + following directives in your server configuration file:

    +
    +    UseCanonicalName    Off
    +    VirtualDocumentRoot /usr/local/apache/vhosts/%0
    +
    + +

    A request for + http://www.example.com/directory/file.html will be + satisfied by the file + /usr/local/apache/vhosts/www.example.com/directory/file.html.

    + +

    For a very large number of virtual hosts it is a good idea + to arrange the files to reduce the size of the + vhosts directory. To do this you might use the + following in your configuration file:

    +
    +    UseCanonicalName    Off
    +    VirtualDocumentRoot /usr/local/apache/vhosts/%3+/%2.1/%2.2/%2.3/%2
    +
    + A request for + http://www.example.isp.com/directory/file.html + will be satisfied by the file + /usr/local/apache/vhosts/isp.com/e/x/a/example/directory/file.html. + A more even spread of files can be achieved by hashing from the + end of the name, for example: +
    +    VirtualDocumentRoot /usr/local/apache/vhosts/%3+/%2.-1/%2.-2/%2.-3/%2
    +
    + The example request would come from + /usr/local/apache/vhosts/isp.com/e/l/p/example/directory/file.html. + Alternatively you might use: +
    +    VirtualDocumentRoot /usr/local/apache/vhosts/%3+/%2.1/%2.2/%2.3/%2.4+
    +
    + +

    The example request would come from + /usr/local/apache/vhosts/isp.com/e/x/a/mple/directory/file.html.

    + +

    For IP-based virtual hosting you might use the following in + your configuration file:

    +
    +    UseCanonicalName DNS
    +    VirtualDocumentRootIP   /usr/local/apache/vhosts/%1/%2/%3/%4/docs
    +    VirtualScriptAliasIP    /usr/local/apache/vhosts/%1/%2/%3/%4/cgi-bin
    +
    + +

    A request for + http://www.example.isp.com/directory/file.html + would be satisfied by the file + /usr/local/apache/vhosts/10/20/30/40/docs/directory/file.html + if the IP address of www.example.com were + 10.20.30.40. A request for + http://www.example.isp.com/cgi-bin/script.pl would + be satisfied by executing the program + /usr/local/apache/vhosts/10/20/30/40/cgi-bin/script.pl.

    + +

    If you want to include the . character in a + VirtualDocumentRoot directive, but it clashes with + a % directive, you can work around the problem in + the following way:

    +
    +    VirtualDocumentRoot /usr/local/apache/vhosts/%2.0.%3.0
    +
    + +

    A request for + http://www.example.isp.com/directory/file.html + will be satisfied by the file + /usr/local/apache/vhosts/example.isp/directory/file.html.

    + +

    The LogFormat + directives %V and %A are useful + in conjunction with this module.

    +
    + +

    VirtualDocumentRoot + directive

    + +

    Syntax: VirtualDocumentRoot + interpolated-directory
    + Default: None
    + Context: server config, virtual + host
    + Status: Extension
    + Module: mod_vhost_alias
    + Compatibility: + VirtualDocumentRoot is only available in 1.3.7 and later.

    + +

    The VirtualDocumentRoot directive allows you to + determine where Apache will find your documents based on the + value of the server name. The result of expanding + interpolated-directory is used as the root of the + document tree in a similar manner to the DocumentRoot + directive's argument. If interpolated-directory is + none then VirtualDocumentRoot is + turned off. This directive cannot be used in the same context + as VirtualDocumentRootIP.

    +
    + +

    VirtualDocumentRootIP + directive

    + +

    Syntax: VirtualDocumentRootIP + interpolated-directory
    + Default: None
    + Context: server config, virtual + host
    + Status: Extension
    + Module: mod_vhost_alias
    + Compatibility: + VirtualDocumentRootIP is only available in 1.3.7 and later.

    + +

    The VirtualDocumentRootIP directive is like the + VirtualDocumentRoot + directive, except that it uses the IP address of the server end + of the connection instead of the server name.

    +
    + +

    VirtualScriptAlias directive

    + +

    Syntax: VirtualScriptAlias + interpolated-directory
    + Default: None
    + Context: server config, virtual + host
    + Status: Extension
    + Module: mod_vhost_alias
    + Compatibility: + VirtualScriptAlias is only available in 1.3.7 and later.

    + +

    The VirtualScriptAlias directive allows you to + determine where Apache will find CGI scripts in a similar + manner to VirtualDocumentRoot + does for other documents. It matches requests for URIs starting + /cgi-bin/, much like ScriptAlias + /cgi-bin/ would.

    +
    + +

    VirtualScriptAliasIP + directive

    + +

    Syntax: VirtualScriptAliasIP + interpolated-directory
    + Default: None
    + Context: server config, virtual + host
    + Status: Extension
    + Module: mod_vhost_alias
    + Compatibility: + VirtualScriptAliasIP is only available in 1.3.7 and later.

    + +

    The VirtualScriptAliasIP directive is like the + VirtualScriptAlias + directive, except that it uses the IP address of the server end + of the connection instead of the server name.

    + + + + diff --git a/htdocs/manual/mod/module-dict.html.en b/htdocs/manual/mod/module-dict.html.en new file mode 100644 index 00000000000..151105d0741 --- /dev/null +++ b/htdocs/manual/mod/module-dict.html.en @@ -0,0 +1,115 @@ + + + + + + + Definitions of terms used to describe Apache + modules + + + + + + +

    Terms Used to Describe Apache Modules

    + +

    Each Apache module is described using a common format that + looks like this:

    + +
    +
    Status: + status
    + Source + File: source-file
    + Module + Identifier: module-identifier
    + Compatibility: + compatibility notes
    +
    + +

    Each of the attributes, complete with values where possible, + are described in this document.

    + +

    Module Terms

    + + +
    + +

    Status

    + +

    This indicates how tightly bound into the Apache Web server + the module is; in other words, you may need to recompile the + server in order to gain access to the module and its + functionality. Possible values for this attribute are:

    + +
    +
    Base
    + +
    A module labeled as having "Base" status is compiled and + loaded into the server by default, and is therefore normally + available unless you have taken steps to remove the module + from your configuration.
    + +
    Extension
    + +
    A module with "Extension" status is not normally compiled + and loaded into the server. To enable the module and its + functionality, you may need to change the server build + configuration files and re-compile Apache.
    + +
    Experimental
    + +
    "Experimental" status indicates that the module is + available as part of the Apache kit, but you are on your own + if you try to use it. The module is being documented for + completeness, and is not necessarily supported.
    + +
    External
    + +
    Modules which are not included with the base Apache + distribution ("third-party modules") may use the "External" + status. We are not responsible, nor do we support such + modules.
    +
    +
    + +

    Source File

    + +

    This quite simply lists the name of the source file which + contains the code for the module. This is also the name used by + the <IfModule> + directive.

    +
    + +

    Module + Identifier

    + +

    This is a string which identifies the module for use in the + LoadModule directive when + dynamically loading modules. In particular, it is the name of + the external variable of type module in the source file.

    +
    + +

    Compatibility

    + +

    If the module was not part of the original Apache version 1 + distribution, the version in which it was introduced should be + listed here.

    + + + + diff --git a/htdocs/manual/mod/module-dict.html.html b/htdocs/manual/mod/module-dict.html.html new file mode 100644 index 00000000000..7a1ff898cee --- /dev/null +++ b/htdocs/manual/mod/module-dict.html.html @@ -0,0 +1,4 @@ + + + diff --git a/htdocs/manual/mod/module-dict.html.ja.jis b/htdocs/manual/mod/module-dict.html.ja.jis new file mode 100644 index 00000000000..2ba6fd6ecba --- /dev/null +++ b/htdocs/manual/mod/module-dict.html.ja.jis @@ -0,0 +1,114 @@ + + + + + + Apache $B%b%8%e!<%k$N2r@b$G;HMQ$9$kMQ8l(B + + + + + + + + +

    Apache $B%b%8%e!<%k$N2r@b$G;HMQ$9$kMQ8l(B

    + +

    Apache $B%b%8%e!<%k$K$D$$$F$N2r@b$O!"(B + $B$$$:$l$b0J2<$N6&DL$N=q<0$G5-=R$5$l$F$$$^$9(B:

    + +
    +
    $B%9%F!<%?%9(B: + status
    + $B%=!<%9%U%!%$%k(B: + source-file
    + $B%b%8%e!<%k<1JL;R(B: + module-identifier
    + $B8_49@-(B: + compatibility notes
    +
    +

    $B$3$N%I%-%e%a%s%H$G$O$=$l$>$l$NB0@-$r@bL@$7$F$$$^$9!#(B + $B + +

    $B%b%8%e!<%k$NMQ8l(B

    + + +
    + +

    $B%9%F!<%?%9(B

    + +

    $B$3$l$O!"$=$N%b%8%e!<%k$,(B Apache + $B%&%'%V%5!<%P$K$I$l$/$i$$L)@\$KAH$_9~$^$l$F$$$k$+$r<($7$^$9!#(B + $B8@$$49$($l$P!"%b%8%e!<%k$rAH$_9~$_!"$=$N5!G=$rMxMQ$9$k$?$a$K!"(B + $B%5!<%P$r:F%3%s%Q%$%k$9$kI,MW$,$"$k$+$b$7$l$J$$$H$$$&$3$H$r<($7$^$9!#(B + $B$3$NB0@-$, +

    +
    Base
    + +
    $B%9%F!<%?%9$,(B "Base" + $B$N%b%8%e!<%k$O!"%G%U%)%k%H$G%3%s%Q%$%k$5$l$F!"$o$6$o$6@_Dj$+$i(B + $B%b%8%e!<%k$r:o=|$7$F$$$J$$8B$j!"DL>o$OMxMQ2DG=$G$9!#(B +
    + +
    Extension
    + +
    $B%9%F!<%?%9$,(B "Extension" $B$N%b%8%e!<%k$O!"(B + $B%G%U%)%k%H$G$O%3%s%Q%$%k$5$l$:!"%5!<%P$K$bFI$_9~$^$l$^$;$s!#(B + $B$=$N%b%8%e!<%k$H$=$N5!G=$rM-8z$K$9$k$K$O!"(B + $B%5!<%P$r%S%k%I$9$k$?$a$N@_Dj$rJQ99$7$F!"(BApache + $B$r:F%3%s%Q%$%k$9$kI,MW$,$"$j$^$9!#(B
    +
    Experimental
    + +
    $B%9%F!<%?%9$,(B "Experimental" $B$N%b%8%e!<%k$O!"(B + Apache $BG[I[J*$KF1:-$5$l$F$$$^$9$,!"(B + $B;HMQ$9$k>l9g$O<+8J@UG$$G9T$J$&I,MW$,$"$j$^$9!#(B + $B$=$N%b%8%e!<%k$O!"%I%-%e%a%s%H$b40@.$K8~$1$F:n@.Cf$G$9$7!"(B + $B%5%]!<%H$5$l$k$F$$$k$H$O8B$j$^$;$s!#(B
    +
    External
    + +
    $B%9%F!<%?%9$,(B "External" $B$N%b%8%e!<%k$O!"4pK\(B Apache + $BG[I[$KF1:-$5$l$^$;$s(B ("$B%5!<%I%Q!<%F%#!<%b%8%e!<%k(B")$B!#(B + $B$=$N$?$a!"2f!9$K@UG$$O$"$j$^$;$s$7!"(B + $B$=$N%b%8%e!<%k$N%5%]!<%H$b$7$F$$$^$;$s!#(B
    +
    +
    + +

    $B%=!<%9%U%!%$%k(B

    + +

    $B$3$l$OC1=c$K!"(B + $B$=$N%b%8%e!<%k$KI,MW$J%3!<%I$r4^$`%=!<%9%U%!%$%k$NL>A0$rNs5s$7$?$b$N$G$9!#(B + $B$3$l$O!"(B<IfModule> + $B%G%#%l%/%F%#%V$G;HMQ$5$l$kL>A0$G$b$"$j$^$9!#(B +

    +
    + +

    $B%b%8%e!<%k<1JL;R(B

    + +

    $B$3$NJ8;zNs$O!"%b%8%e!<%k$NF0E*FI$_9~$_$r9T$J$&$H$-$K;HMQ$9$k(B LoadModule + $B%G%#%l%/%F%#%V$K$*$$$F;HMQ$5$l$k%b%8%e!<%k$N<1JL;R$G$9!#(B + $B>\$7$/=q$/$H!"%=!<%9%U%!%$%kFb$N(B module $B%?%$%W$N30ItJQ?t$NL>A0$G$9!#(B +

    +
    + +

    $B8_49@-(B

    + +

    $B$"$k%b%8%e!<%k$,(B Apache $B%P!<%8%g%s(B 1 + $B$NG[I[$K4^$^$l$F$$$J$+$C$?>l9g!"(B + $B$=$N%b%8%e!<%k$,F3F~$5$l$?%P!<%8%g%s$,$3$3$K=q$+$l$F$$$^$9!#(B

    + + + diff --git a/htdocs/manual/mpeix.html b/htdocs/manual/mpeix.html new file mode 100644 index 00000000000..14d7a58549b --- /dev/null +++ b/htdocs/manual/mpeix.html @@ -0,0 +1,420 @@ + + + + + + + + + + Using Apache with HP MPE/iX + + + + + + +
    +

    Using Apache With HP MPE/iX

    +
    + This document explains how to compile, install, configure and + run Apache 1.3 under HP MPE/iX. + +

    The bug reporting page and new-httpd mailing list are NOT + provided to answer questions about configuration or running + Apache. Before you submit a bug report or request, first + consult this document, the Frequently + Asked Questions page and the other relevant documentation + topics. If you still have a question or problem, post it to the + comp.sys.hp.mpe newsgroup or + the associated HP3000-L + mailing list, where many Apache users and several + contributors are more than willing to answer new and obscure + questions about using Apache on MPE/iX.

    + +

    + groups.google.com's newsgroup archive offers easy browsing + of previous questions. Searching the newsgroup archives, you + will usually find your question was already asked and answered + by other users!

    +
    + + +
    + +

    Requirements

    + Apache 1.3 requires MPE/iX 6.0 or greater.  It will NOT + run on earlier releases of MPE/iX.  The following MPE/iX + patches (or their superseding descendants) are relevant to + Apache: + +
      +
    • MPE/iX 6.0:
    • + +
    • +
        +
      • MPEKXT3B - fixes an MPE bug that results in transient + "permission denied" errors being returned by the server + to the browser.
      • + +
      • MPELX36A - enhances the kill() function so that MPE + users with SM capability can send signals to Apache for + shutdown, restart, etc.
      • + +
      • MPELX44C - fixes an MPE bug that prevents DSO modules + from being dynamically loaded.
      • + +
      • MPELX51C - enhances the kill() function so that + Apache can use it when the Apache parent UID is different + from the Apache children UID (strongly recommended).
      • + +
      • NSTxxxxx - the latest network transport patch should + always be installed when using TCP/IP applications such + as Apache.
      • +
      +
    • + +
    • MPE/iX 6.5:
    • + +
    • +
        +
      • MPELX44D - fixes an MPE bug that prevents DSO modules + from being dynamically loaded.
      • + +
      • MPELX51D - enhances the kill() function so that + Apache can use it when the Apache parent UID is different + from the Apache children UID (strongly recommended).
      • + +
      • NSTxxxxx - the latest network transport patch should + always be installed when using TCP/IP applications such + as Apache.
      • +
      +
    • +
    +
    + +

    Implementation + Considerations

    + While MPE has a very good POSIX implementation that enables + fairly simple porting of Unix applications such as Apache, + there are some Unix concepts which just don't exist or aren't + fully implemented in MPE, and so this may force some + functionality changes in the package being ported. + +

    Significant MPE vs. Unix OS differences

    + +
      +
    • MPE lacks the concept of a Unix UID=0 root user with + special privileges.  Where Unix functions require a user + to be executing as root, MPE requires the user to be + executing in priv mode, so the program file must be linked + with PM (Priv Mode) capability, and the Unix function calls + must be bracketed by GETPRIVMODE() and GETUSERMODE() + calls.  The following Unix functions used by Apache are + affected:
    • + +
    • +
        +
      • bind() for ports less than 1024
      • + +
      • setgid()
      • + +
      • setuid()
      • +
      +
    • + +
    • MPE's support for UIDs and GIDs is more limited than + Unix.  Every MPE account maps to a unique GID.  + Each MPE account can contain multiple MPE users, and every + MPE user maps to a unique UID (UID 0 is not supported).  + The current UID for a process must correspond to an MPE user + within the MPE account that corresponds to the current GID of + the process.
    • + +
    • MPE child processes cannot survive the death of their + parent.  When the parent terminates, any remaining + children will be killed.
    • + +
    • MPE doesn't initialize the envp parameter when invoking + the main() of a new process.  Use the global variable + environ instead of envp.
    • + +
    • MPE link() exists, but always returns EIMPL.  Use + rename() or symlinks instead of hard links.
    • + +
    • MPE doesn't allow the @ character in filenames.
    • + +
    • MPE lacks support for TCP_NODELAY, but that's the default + anyway.
    • + +
    • MPE lacks support for SO_KEEPALIVE.
    • + +
    • MPE lacks support for process groups.
    • + +
    • MPE inetd only passes stdin (and NOT stdout) to the + invoked service.  But you can write to stdin just + fine.
    • +
    + +

    Major Apache functionality issues

    + +
      +
    • Beginning with HP-supported Apache 1.3.9 and HP WebWise + MPE/iX Secure Web Server A.01.00 (based on Apache 1.3.9), the + User and Group directives in httpd.conf are now + unconditionally executed as corresponding setuid()/setgid() + calls.  Previously this was only done if HTTPD was being + run as MANAGER.SYS.  This functionality change was + submitted back to the 1.3.13-dev source tree at + www.apache.org.  The Apache for Unix behavior is to only + honor User and Group if running as root.
    • + +
    • Beginning with HP-supported Apache 1.3.9 and HP WebWise + MPE/iX Secure Web Server A.01.00 (based on Apache 1.3.9), the + SVIPC shared memory macros SHM_R and SHM_W have been modified + from their traditional owner-only-read and owner-only-write + values to be owner-and-group-read and owner-and-group-write + on MPE/iX in order to allow increased parent/child + flexibility in spite of MPE's limited POSIX UID/GID + support.  This functionality change was submitted back + to the 1.3.13-dev source tree at www.apache.org.  The + Apache for Unix behavior uses the traditional owner-only + values of SHM_R and SHM_W.
    • +
    + +

    Minor Apache functionality issues

    + +
      +
    • Apache for Unix must be run as root to bind to TCP ports + 1-1023. Apache for MPE must call GETPRIVMODE() to bind to TCP + ports 1-1023; PM is not used for ports greater than 1023. The + standard web server HTTP port is 80.
    • + +
    • Apache for Unix in standalone mode will detach itself and + run in the background as a system-type process. Apache for + MPE in standalone mode cannot detach itself and run in the + background because MPE POSIX doesn't allow this (the detached + child would be killed when the parent terminated).  + Therefore you must use an MPE batch job to run Apache in + standalone mode.
    • + +
    • Apache for Unix uses process groups to manage child + processes. Apache for MPE cannot use process groups because + MPE POSIX doesn't support this. The implications of this are + unknown.
    • + +
    • Apache for Unix uses the setsockopt() option TCP_NODELAY. + Apache for MPE does not, because MPE doesn't support it. But + TCP_NODELAY is the default MPE behavior anyway.
    • + +
    • Apache for Unix uses the setsockopt() option + SO_KEEPALIVE.  Apache for MPE does not, because MPE + doesn't support it.
    • + +
    • Apache for Unix under inetd reads from the socket via + stdin and writes via stdout. Apache for MPE under inetd reads + *AND* writes the socket via stdin. I consider MPE 5.5 inetd + to be broken and poorly documented, so I submitted SR + 5003355016 to address this. If HP ever alters the MPE inetd + to pass the socket the way HPUX inetd does (not likely in the + grand scheme of things), the existing Apache for MPE code + will break.
    • + +
    • Apache for Unix will use the @ character in proxy cache + filenames, but since @ is illegal in MPE filenames, Apache + for MPE uses the % character instead.
    • +
    +
    + +

    Binary + Distributions

    + HP ships a fully supported Apache binary distribution with the + Fundamental Operating System (FOS) in MPE/iX 6.5 and + later.  This distribution can be found in the APACHE + account. + +

    HP supplies fully supported Apache binary distributions for + MPE/iX 6.0 or later available for downloading from http://jazz.external.hp.com/src/apache/.

    + +

    Mark Bixby supplies Apache binary distributions for MPE/iX + available for downloading from http://www.bixby.org/mark/apacheix.html.  + Binaries from bixby.org are NOT supported by HP.  HP only + supports binaries distributed by HP.

    + +

    All of the binary distributions mentioned above may possibly + include functionality that hasn't yet been submitted back to + the Apache Software Foundation (though submitting back is the + intended goal).  Please read the documentation that comes + with these binaries in order to determine functionality + differences (if any) compared to the latest sources available + from the ASF.

    + +

    If you will be using one of these binary distributions, + please stop reading this document and start reading the + specific distribution documentation for installation + details.

    +
    + +

    Create the + Accounting Structure

    + Apache can be installed under the account of your choice.  + For the purposes of this document, the APACHE account will be + used: + +
      +
    1. :HELLO MANAGER.SYS
    2. + +
    3. :NEWACCT APACHE,MGR
    4. + +
    5. :ALTACCT + APACHE;PASS=xxxxxxxx;CAP=AM,AL,ND,SF,BA,IA,PM,PH
    6. + +
    7. :ALTGROUP + PUB.APACHE;CAP=BA,IA,PM,PH;ACCESS=(R,L,X:AC;W,A,S:AL)
    8. + +
    9. :ALTUSER + MGR.APACHE;CAP=AM,AL,ND,SF,BA,IA,PM,PH;HOME=PUB
    10. + +
    11. :NEWUSER + SERVER.APACHE
    12. + +
    13. :ALTUSER + SERVER.APACHE;CAP=ND,SF,BA,IA,PH;HOME=PUB
    14. +
    + +

    Downloading Apache

    + Use your web browser to download the Apache source tarball from + http://www.apache.org/dist/httpd/.  + Then ftp upload the tarball to your e3000 as show below: +
    +C:\Temp>ftp 3000.host.name
    +Connected to 3000.host.name.
    +220 HP ARPA FTP Server [A0009H09] (C) Hewlett-Packard Co. 1990
    +User (3000.host.name:(none)): MGR.APACHE
    +331 Password required for MGR.APACHE.  Syntax: acctpass
    +Password:xxxxxxxx
    +230 User logged on
    +ftp> quote type L 8
    +200 Type set to L (byte size 8).
    +ftp> put apache_v.u.ff.tar.Z /tmp/apache.tar.Z
    +200 PORT command ok.
    +150 File: /tmp/apache.tar.Z opened; data connection will be opened
    +226 Transfer complete.
    +ftp: 2685572 bytes sent in 2.75Seconds 976.57Kbytes/sec.
    +ftp> quit
    +221 Server is closing command connection
    +
    + Unpack the tarball: + +
      +
    1. :HELLO MGR.APACHE
    2. + +
    3. :XEQ SH.HPBIN.SYS -L
    4. + +
    5. $ mkdir src
    6. + +
    7. $ chmod 700 src
    8. + +
    9. $ cd src
    10. + +
    11. $ tar xvfopz /tmp/apache.tar.Z
    12. +
    + +

    Compiling Apache

    + It is STRONGLY recommended to use gcc instead of the HP C/iX + compiler.  You can obtain gcc from http://jazz.external.hp.com/src/gnu/gnuframe.html. + + +
      +
    1. $ cd apache_v.uu.ff
    2. + +
    3. $ ./configure --prefix=/APACHE/PUB + --enable-module=xxx --enable-module=yyy ...etc...
    4. + +
    5. $ make
    6. +
    + +

    Installing Apache

    + +
      +
    1. $ make install
    2. + +
    3. $ cd /APACHE/PUB
    4. + +
    5. $ mv bin/httpd HTTPD
    6. + +
    7. $ ln -s HTTPD bin/httpd
    8. + +
    9. $ callci "xeq linkedit.pub.sys 'altprog + HTTPD;cap=ia,ba,ph,pm'"
    10. +
    + +

    Configuring Apache

    + Edit /APACHE/PUB/conf/httpd.conf and customize as needed for + your environment.  Be sure to make the following mandatory + changes: + +
      +
    • User SERVER.APACHE
    • + +
    • Group APACHE
    • +
    + +

    Running Apache

    + Simply create and :STREAM the following standalone server job + in order to start Apache: +
    +!JOB JHTTPD,MGR.APACHE;OUTCLASS=,2
    +!XEQ SH.HPBIN.SYS "-c 'umask 007; ./HTTPD -f /APACHE/PUB/conf/httpd.conf'"
    +!eoj
    +
    + +

    Controlling Apache

    + Log on as MGR.APACHE (or MANAGER.SYS or any other SM user if + you've installed MPELX36A on 6.0) in order to shutdown or + restart Apache via the use of signals. + +

    To shut down Apache from the POSIX shell:

    +
    +$ kill `cat /APACHE/PUB/logs/httpd.pid`
    +
    + To shut down Apache from the CI: +
    +:XEQ SH.HPBIN.SYS '-c "kill `cat /APACHE/PUB/logs/httpd.pid`"'
    +
    + + + + diff --git a/htdocs/manual/multilogs.html b/htdocs/manual/multilogs.html new file mode 100644 index 00000000000..7f3c33486ae --- /dev/null +++ b/htdocs/manual/multilogs.html @@ -0,0 +1,113 @@ + + + + + + + Apache Multiple Log Files + + + + + + +

    Multiple Log Files

    + It is now possible to specify multiple log files, each with a + fully customizable format. This is compatible with existing + configurations. Multiple log files are implemented as part of + the mod_log_config module + which as of Apache 1.2 is the default log module. +
    + +

    Using Multiple Log Files

    + Multiple log files be created with either the + TransferLog or CustomLog directive. + These directives can be repeated to create more than one log + file (in previous releases, only one logfile could be given per + server configuration). The TransferLog directive + creates a log file in the standard "common log format", + although this can be customized with LogFormat. + The syntax of these two directives is the same as for the + config log module in previous Apache releases. + +

    The real power of multiple log files come from the ability + to create log files in different formats. For example, as well + as a CLF transfer log, the server could log the user agent of + each client, or the referrer information, or any other aspect + of the request, such as the language preferences of the + user.

    + +

    The new CustomLog directive takes both a + filename to log to, and a log file format.

    +
    + Syntax: CustomLog filename + "format"
    + Context: server config, virtual + host
    + Status: base
    + Module: mod_log_config + +

    The first argument is the filename to log to. This is used + exactly like the argument to TransferLog, that is, + it is either a file as a full path or relative to the current + server root, or |programname. Be aware that anyone who can + write to the directory where a log file is written can gain + access to the uid that starts the server. See the security tips document for + details.

    + +

    The format argument specifies a format for each line of the + log file. The options available for the format are exactly the + same as for the argument of the LogFormat + directive. If the format includes any spaces (which it will do + in almost all cases) it should be enclosed in double + quotes.

    + +

    Use with Virtual Hosts

    + If a <VirtualHost> section does not contain any + TransferLog or CustomLog directives, + the logs defined for the main server will be used. If it does + contain one or more of these directives, requests serviced by + this virtual host will only be logged in the log files defined + within its definition, not in any of the main server's log + files. See the examples below. +
    + +

    Examples

    + To create a normal (CLF) format log file in logs/access_log, + and a log of user agents: +
    +TransferLog logs/access_log
    +CustomLog   logs/agents     "%{user-agent}i"
    +
    + To define a CLF transfer log and a referrer log which log all + accesses to both the main server and a virtual host: +
    +TransferLog logs/access_log
    +CustomLog   logs/referer    "%{referer}i"
    +
    +<VirtualHost>
    +  DocumentRoot   /whatever
    +  ServerName     my.virtual.host
    +</VirtualHost>
    +
    + Since no TransferLog or CustomLog directives appear inside the + <VirtualHost> section, any requests for this virtual host + will be logged in the main server's log files. If however the + directive +
    +TransferLog logs/vhost_access_log
    +
    + was added inside the virtual host definition, then accesses to + this virtual host will be logged in vhost_access_log file (in + common log format), and not in logs/access_log or + logs/referer. + + + diff --git a/htdocs/manual/netware.html b/htdocs/manual/netware.html new file mode 100644 index 00000000000..2822d3a5ea5 --- /dev/null +++ b/htdocs/manual/netware.html @@ -0,0 +1,402 @@ + + + + + + + Using Apache with Novell NetWare + + + + +
    + [APACHE DOCUMENTATION] + +

    Apache HTTP Server Version 1.3

    +
    + +

    Using Apache With Novell NetWare

    + +

    This document explains how to install, configure and run + Apache 1.3 under Novell NetWare 5.x and above. If you find any bugs, + or wish to contribute in other ways, please + use our bug reporting + page.

    + +

    The bug reporting page and new-httpd mailing list are not + provided to answer questions about configuration or running Apache. + Before you submit a bug report or request, first consult this document, the + Frequently Asked Questions page and the other + relevant documentation topics. If you still have a question or problem, + post it to the + novell.devsup.webserver newsgroup, where many + Apache users are more than willing to answer new + and obscure questions about using Apache on NetWare.

    + + Most of this document assumes that you are installing Apache + from a binary distribution. If you want to compile Apache + yourself (possibly to help with development, or to track down + bugs), see the section on Compiling Apache for + NetWare below. +
    + + +
    + +

    Requirements

    + Apache 1.3 is designed to run on NetWare 5.x and above and is + installed by default on all NetWare 6 servers. + +

    If running on NetWare 5.0 you must install Service + Pack 5 or above.

    + +

    If running on NetWare 5.1 you must install Service + Pack 1 or above.

    + +

    NetWare service packs are available here.

    + +

    Downloading Apache for NetWare

    + +

    Information on the latest version of Apache can be found on + the Apache web server at http://www.apache.org/. This + will list the current release, any more recent alpha or + beta-test releases, together with details of mirror web and + anonymous ftp sites.

    + +

    Installing Apache for + NetWare

    + There is no Apache install program for NetWare currently. You + will need to compile apache and copy the files over to the + server manually. An install program will be posted at a later + date. If you are running NetWare 6, Apache for NetWare has been + installed by default. + +

    Follow these steps to install Apache on NetWare from the + binary download (assuming you will install to sys:/apache):

    + +
      +
    • Unzip the binary download file to the root of the SYS: + volume (may be installed to any volume)
    • + +
    • Edit the httpd.conf file setting ServerRoot and + ServerName to reflect your correct server settings
    • + +
    • Add SYS:/APACHE to the search path. EXAMPLE: SEARCH ADD + SYS:\APACHE
    • +
    + +

    Follow these steps to install Apache on NetWare manually + from your own build source (assuming you will install to + sys:/apache):

    + +
      +
    • Create a directory called Apache on a + NetWare volume
    • + +
    • Copy Apache.nlm, Apachec.nlm, htdigest.nlm, htpasswd.nlm, + xmlparse.nlm, and xmltok.nlm to sys:/apache
    • + +
    • Create a directory under SYS:/APACHE called CONF
    • + +
    • Copy all the *.CONF-DIST-NW files to the SYS:/APACHE/CONF + directory and rename them all as *.CONF files
    • + +
    • Copy the MIME.TYPES and magic files to SYS:/APACHE/CONF + directory
    • + +
    • Copy all files and subdirectories in \apache-1.3\icons to + SYS:/APACHE/ICONS
    • + +
    • Create the directory SYS:/APACHE/LOGS on the server
    • + +
    • Create the directory SYS:/APACHE/CGI-BIN on the + server
    • + +
    • Create the directory SYS:/APACHE/MODULES and copy all nlm + modules built into the modules directory
    • + +
    • Edit the HTTPD.CONF file setting ServerRoot and + ServerName to reflect your correct server settings
    • + +
    • Add SYS:/APACHE to the search path. EXAMPLE: SEARCH ADD + SYS:\APACHE
    • +
    + +

    Apache may be installed to other volumes besides the default + sys volume.

    + +

    Running Apache for NetWare

    + To start Apache just type apache at the + console. This will load apache in the OS address space. If you + prefer to load Apache in a protected address space you may + specify the address space with the load statement as follows: +
    +    load address space = apache apache
    +
    + +

    This will load Apache into an address space called apache. + Running multiple instances of Apache concurrently on NetWare is + possible by loading each instance into its own protected + address space.

    + +

    After starting Apache it will be listening to port 80 + (unless you changed the Port, Listen + or BindAddress directives in the configuration + files). To connect to the server and access the default page, + launch a browser and enter the server's name or address. This + should respond with a welcome page, and a link to the Apache + manual. If nothing happens or you get an error, look in the + error_log file in the logs + directory.

    + +

    Once your basic installation is working, you should + configure it properly by editing the files in the + conf directory.

    + +

    To unload Apache running in the OS address space just type + the following at the console:

    +
    +    unload apache
    +
    + If apache is running in a protected address space specify the + address space in the unload statement: +
    +    unload address space = apache apache
    +
    + +

    When working with Apache it is important to know how it will + find the configuration files. You can specify a configuration + file on the command line in two ways:

    + +
      +
    • -f specifies a path to a particular configuration + file
    • +
    +
    +    apache -f "vol:/my server/conf/my.conf"
    +
    +
    +    apache -f test/test.conf
    +
    + In these cases, the proper ServerRoot should be set in the + configuration file. + +

    If you don't specify a configuration file name with -f, + Apache will use the file name compiled into the server, usually + "conf/httpd.conf". Invoking Apache with the -V switch will + display this value labeled as SERVER_CONFIG_FILE. Apache will + then determine its ServerRoot by trying the following, in this + order:

    + +
      +
    • A ServerRoot directive via a -C switch.
    • + +
    • The -d switch on the command line.
    • + +
    • Current working directory
    • + +
    • The server root compiled into the server.
    • +
    + +

    The server root compiled into the server is usually + "sys:/apache". invoking apache with the -V switch will display + this value labeled as HTTPD_ROOT.

    + +

    Configuring Apache for + NetWare

    + Apache is configured by files in the conf + directory. These are the same as files used to configure the + Unix version, but there are a few different directives for + Apache on NetWare. See the Apache + documentation for all the available directives. + +

    The main differences in Apache for NetWare are:

    + +
      +
    • +

      Because Apache for NetWare is multithreaded, it does not + use a separate process for each request, as Apache does + with Unix. Instead there are only threads running: a parent + thread, and a child which handles the requests. Within the + child each request is handled by a separate thread.

      + +

      So the "process"-management directives are + different:

      + +

      MaxRequestsPerChild + - Like the Unix directive, this controls how many requests + a process will serve before exiting. However, unlike Unix, + a process serves all the requests at once, not just one, so + if this is set, it is recommended that a very high number + is used. The recommended default, MaxRequestsPerChild + 0, does not cause the process to ever exit.

      + +

      ThreadsPerChild - + This directive is new, and tells the server how many + threads it should use. This is the maximum number of + connections the server can handle at once; be sure and set + this number high enough for your site if you get a lot of + hits. The recommended default is ThreadsPerChild + 50.

      + ThreadStackSize + - This directive tells the server what size of stack to use + for the individual threads. The recommended default is + ThreadStackSize 65536. +

      LogRotateDaily - This directive allows all custom logs to be rotated + on a daily basis.  The file name of each log will contain the date + and time that the log was created.  The default for this directive + is "Off".

      +

      LogRotateInterval - This directive allows all custom logs to be + rotated on a specified interval.  The file name of each log will + contain the date and time that the log was created.  The interval + is specified as N minutes.  The default is no interval or + "0".

      +

        +

    • + +
    • +

      The directives that accept filenames as arguments now + must use NetWare filenames instead of Unix ones. However, + because Apache uses Unix-style names internally, you must + use forward slashes, not backslashes. Volumes can be used; + if omitted, the drive with the Apache executable will be + assumed.

      +
    • + +
    • +

      Apache for NetWare has the ability to load modules at + runtime, without recompiling the server. If Apache is + compiled normally, it will install a number of optional + modules in the \Apache\modules directory. To + activate these, or other modules, the new LoadModule directive + must be used. For example, to active the status module, use + the following (in addition to the status-activating + directives in access.conf):

      +
      +    LoadModule status_module modules/status
      +
      + +

      Information on creating loadable + modules is also available.

      +
    • +
    + +

    Compiling Apache for NetWare

    +

    Requirements:

    + The following development tools are required to build Apache + 1.3 for NetWare:
    + + +

    Building Apache using the NetWare makefiles:

    +
      +
    • + Set the following environment variables: +
        +
      • + set METROWERKS=<Base location of the MW CodeWarrior + tools> +
      • +
      • + set NWSDKDIR=c:\Novell\NDK\nwsdk - Location of the NetWare CLib SDK +
      • +
      • + set LDAPSDK=c:\Novell\NDK\cldapsdk - Location of the NetWare LDAP SDK +
      • +
      • + set AP_WORK=<Base location of the apache-1.3 source + files> +
      • +
      • + set GNUTOOLS=<Location of the AWK, SED and GMAKE + utilities> +
      • +
      +
    • + Unpack the Apache source code distribution into an + appropriate directory. +
    • +
    • + Change directory to \apache-1.3 and build Apache by envoking + the gmake -f nwgnumakefile command. You can create a + distribution directory by adding the install + parameter to the command. +
    • +
    + +

    Other Environment Variables:

    +
      +
    • + set DEBUG=1 – Builds debug versions + of all of the binaries and copies them to a \debug destination + directory. +
    • +
    • + set MULTIPROC=1 – Builds multi-processor aware versions + of all of the binaries. +
    • +
    + +

    Additional make options:

    +
      +
    • + gmake -f nwgnumakefile – Builds release versions of all + of the binaries and copies them to a \release destination + directory. +
    • +
    • + gmake -f nwgnumakefile install – Creates a complete + Apache distribution with binaries, docs and additional support + files in a \dist\apache directory. +
    • +
    • + gmake -f nwgnumakefile clean – Cleans all object files + and binaries from the \release or \debug build areas depending on + whether DEBUG has been defined. +
    • +
    + +
    +

    Apache HTTP Server Version 1.3

    + Index + + + diff --git a/htdocs/manual/new_features_1_0.html b/htdocs/manual/new_features_1_0.html new file mode 100644 index 00000000000..54d8fedb277 --- /dev/null +++ b/htdocs/manual/new_features_1_0.html @@ -0,0 +1,134 @@ + + + + + + + Apache extra features + + + + + + +

    Overview of new features

    + +

    New Features with Apache 1.0

    + +

    New features with this release, as extensions of the Apache + functionality (see also more detailed CHANGES + file) in the source directory. Because the core code has + changed so significantly, there are certain liberties that + earlier versions of Apache (and the NCSA daemon) took that + Apache 1.0 is pickier about - please check the compatibility notes if you + have any problems.

    + +
      +
    • + API for server extensions --- see below for a brief sermon + on philosophy, or see src/API.html for an actual + overview. Most server functionality (including includes, + CGI, and most forms of access control) are actually + implemented as API-conformant modules; you can also do + other neat stuff (we've included a sample module, for + instance, which one of us is using to track click-trails + using the + Netscape cookie mechanism, for visitors who come in + through Netscape clients). Modules can also be loaded + dynamically using GNU DLD. + +

      The API is not yet quite stable (see src/TODO for some + possible changes), but anything done now will be easily + adapted for future versions --- after all, we have more + modules to adapt than you do.

      +
    • + +
    • New Process Model - much + less forking, no fixed number of children. We found that + many people were using values for "MaxServers" either too + high or too low, and were hanging themselves on it. The model + we adopted is still based on long-lived minimal-forking + processes, but instead of specifying one number of persistent + processes, the web-master specifies a maximum and minimum + number of processes to be "spare" - every couple of seconds + the parent checks the actual number of spare servers and + adjusts accordingly. This should keep the number of servers + concurrently running relatively low while still ensuring + minimal forking.
    • + +
    • <VirtualHost> (the configuration + directive for multiple-homed servers) is more general + now. Just about any srm.conf or httpd.conf command can go in + a <Virtualhost> section, with the following specific + exceptions: ServerType, UserId, GroupId, StartServers, + MaxRequestsPerChild, BindAddress, PidFile, TypesConfig, + ServerRoot.
    • + +
    • Support for content + negotiation of languages through MultiViews (*.fr, *.de, + *.en suffixes), via the new AddLanguage and LanguagePriority + commands (code written by Florent Guillaume, + guillaum@clipper.ens.fr).
    • + +
    • Significant internal cleanups and rearrangements. The two + externally visible consequences of this are that just about + all of the unchecked fixed limits are gone, and that the + server is somewhat pickier about config file syntax (noting + and complaining about extraneous command arguments or other + stuff at the end of command lines).
    • + +
    • XBITHACK is a run-time option, and can be selectively + enabled per directory --- the -DXBITHACK compile-time option + just changes the default. The command which configures it is + "XBitHack", which is allowed everywhere "Options" is; this + takes an argument --- "XBitHack Off" turns it off; "XBitHack + On" gets you the NCSA -DXBITHACK behavior; and "XBitHack + Full" gets you the Apache GXBIT stuff on top of that. + (-DXBITHACK makes "Full" the default; otherwise, it defaults + "Off").
    • + +
    • TransferLog can specify a program which gets the log + entries piped to it, a la 'TransferLog "| + /var/www/my-perl-script -arg valu"' --- this should give the + same SIGTERM/pause/SIGKILL treatment to the logging process + on server restarts that a CGI script gets on an aborted + request. NB the server is counting on the logging process to + work, and will probably hang or worse if it dies.
    • + +
    • Configurable logging + module --- this is a replacement for the standard + plane-jane Common Log Format code, which supports a LogFormat + directive which allows you to control the formatting of + entries in the TransferLog, and add some new items if you + like (in particular, Referer and User-Agent). + EXPERIMENTAL.
    • +
    +
    + +

    Other features of Apache

    + + + + + + diff --git a/htdocs/manual/new_features_1_1.html b/htdocs/manual/new_features_1_1.html new file mode 100644 index 00000000000..240558c7642 --- /dev/null +++ b/htdocs/manual/new_features_1_1.html @@ -0,0 +1,243 @@ + + + + + + + New features with Apache 1.1 + + + + + + +

    Overview of new features

    + +

    API Changes

    + A few changes to the Apache API were made for 1.1. It is + possible that some third-party modules will no longer work with + 1.1, though we have made every effort to provide + backwards-compatibility. If you encounter a module that does + not work with 1.1, please let us know. + + +

    New Features with Apache 1.1

    + +

    New features with this release, as extensions of the Apache + functionality (see also more detailed CHANGES file + in the source directory.) Because the core code has changed so + significantly, there are certain liberties that earlier + versions of Apache (and the NCSA daemon) took that recent + Apache versions are pickier about - please check the compatibility notes if you + have any problems.

    +
    + +

    In addition to a number of bug fixes and internal + performance enhancements, Apache 1.1 has the + following specific new user features:

    + +
      +
    • Support for Keep-Alive + Persistent Connections
      + Apache now has (optional) support for persistent + connections, as defined by the HTTP/1.1 draft. This protocol, + supported by a number of current HTTP servers and browsers + (including Netscape Navigator 2.0) has been shown to increase + speed of document transfer by up to 50% in certain + cases.
    • + +
    • New non-IP + Intensive-VirtualHost Support
      + Apache's support for virtual hosts has been enhanced to be + able to use information sent by some new Web browsers to + determine the server being accessed, without requiring an + additional IP address for each host.
    • + +
    • Listen to Multiple Addresses + and Ports
      + Using the new Listen directive, Apache can + listen to more than one port and IP address, using the same + configuration set.
    • + +
    • Status + Module
      + Apache now contains a module that gives the web-master + accurate, up-to-date information about the server's status + and its resource consumption. It also gives the current state + of each server process including the current URL being + processed. For an example, check out the status of the + www.apache.org server.
    • + +
    • Server Information + Module This module gives a plethora of + information about the other modules installed, their + directives, and their configurations. It is extremely helpful + in debugging configuration problems. For an example, check + out information + about the www.apache.org server.
    • + +
    • Experimental Caching + Proxy Server
      + Apache can now act as an HTTP proxy server, allowing clients + behind firewalls to use the server to access the outside + world. In addition, it can cache documents it proxies, + speeding up access to frequently requested documents.
    • + +
    • URL-based Access + Protection
      + In addition to access checking and authorization by filename + (with <Directory>), + the new <Location> directive allows + protection by URL.
    • + +
    • Filetype-based + Script "Actions"
      + You can now run CGI scripts whenever a file of a certain + type is requested. This makes it much easier to execute + scripts that process files. In addition, you can use the new + Script directive to + enable scripts for files called with HTTP methods Apache does + not natively support.
    • + +
    • New "Handler" + Directives
      + The new AddHandler and SetHandler + directive allows "handlers" to be defined for filename + extensions or directories. These handlers, which can either + be built into Apache or added with the Action directive, extend + Apache's range of usability, and almost entirely remove the + "magic" media types.
    • + +
    • Customizable CGI + Environment Variables
      + New PassEnv and SetEnv directives + allow you to modify the environment variables passed to CGI + scripts.
    • + +
    • CERN Metafile + Support
      + Now emulates the CERN httpd's support for metafiles + containing additional HTTP headers to be supplied with a + document.
    • + +
    • Improved Imagemap + Support
      + The internal imagemap handling code has been rewritten and + reorganized, adding new handling of default, base and + relative URLs, and support for creating non-graphical menus + for use with clients that do not support imagemaps.
    • + +
    • Improved UserDir + Directive
      + Now supports the ability to point user's files (as specified + by URLs beginning with the "~" character) at + directories other than those specified by the Unix password + file.
    • + +
    • Minimal DNS Now Runtime Option
      + New HostnameLookups server configuration + directive can be used to turn On or + Off DNS lookups. This supersedes the + -DMINIMAL_DNS compile-time configuration option. This option + can be set per-directory.
    • + +
    • IdentityCheck Now Per-Directory + Option
      + The IdentityCheck directive, which controls the + use of ident to check the remote user name, can now be set + per directory. The ident support is also RFC + 1413-compliant.
    • + +
    • Redirect Now Usable in .htaccess + Files
      + The Redirect + directive can now be used in .htaccess files + when the FileInfo directive has been set on. + This allows users to redirect parts of their directories + without requiring CGI scripts
    • + +
    • ErrorDocument Now Usable in + .htaccess Files
      + The ErrorDocument + directive can now be used in .htaccess files + when the FileInfo directive has been set on. + This allows users to have different error messages for + different sections of a site.
    • + +
    • ForceType Directive
      + This new directive, in <Directory> + sections or .htaccess files, allows you to override the + filename extensions and force a single content type. + (e.g., ForceType + application/octet-stream)
    • + +
    • File Owner Available to Included CGI + Scripts
      + Server-side includes that call CGI scripts will now set a + USER_NAME environment variable that contains the + owner of the file which included it.
    • + +
    • Improved Icons
      + Thanks to Kevin Hughes, + Apache's nifty color GIF icons for directory listings have + been updated. In addition, the Powered by Apache + (apache_pb.gif) logo has been included.
    • +
    +
    + +

    New Authentication Modules

    + +

    Note: These modules are not compiled into + the server by default, as they require special support on the + host system. They must be enabled specifically in the + Configuration file.

    + +
      +
    • Anonymous HTTP + Logins
      + New options allow you to allow, using Basic HTTP + Authentication, anonymous logins, like those of FTP. This + allows you to collect email addresses of people accessing + your site.
    • + +
    • Support for Digest + Authentication
      + Apache now supports digest authentication using RSA MD5 + encryption. When used with a supporting web browser, this + provides a more secure alternative to Basic + authentication.
    • + +
    • Support for Unix + DB Authentication - + mod_auth_db.c
      + In addition to DBM + support, Apache now contains optional support for Berkeley DB + databases.
    • + +
    • mSQL Database Authentication - + mod_auth_msql.html
      + Support for the use of mSQL databases for user + authentication via HTTP is now supported.
    • +
    +
    + +

    OS/2 Support

    + +

    Apache now includes support for OS/2, thanks to Softlink + Services.

    + + + + diff --git a/htdocs/manual/new_features_1_2.html b/htdocs/manual/new_features_1_2.html new file mode 100644 index 00000000000..dae0f84a85a --- /dev/null +++ b/htdocs/manual/new_features_1_2.html @@ -0,0 +1,237 @@ + + + + + + + New features with Apache 1.2 + + + + + + +

    Overview of new features

    + +

    API Changes

    + +

    Some non-compatible changes were made to the Apache API in + order to deal with HTTP/1.1 compatibility. It is possible that + some modules will no longer work (specifically, those that + process input using the POST or PUT methods). If you encounter + a module that does not work, please contact the author. A programmer's note on the + subject is available.

    + +

    New Features with Apache 1.2

    + +

    New features with this release, as extensions of the Apache + functionality. Because the core code has changed so + significantly, there are certain liberties that earlier + versions of Apache (and the NCSA daemon) took that recent + Apache versions are pickier about - please check the compatibility notes if you + have any problems.

    +
    + +

    In addition to a number of bug fixes and internal + performance enhancements, Apache 1.2 has the + following specific new user features:

    + +
      + + +
    • HTTP/1.1 + Compliance [Documentation to be written]
      + Aside from the optional proxy module (which operates as + HTTP/1.0), Apache is conditionally compliant with the + HTTP/1.1 proposed standard, as approved by the IESG and the + IETF HTTP + working group. HTTP/1.1 provides a much-improved + protocol, and should allow for greater performance and + efficiency when transferring files. Apache does, however, + still work great with HTTP/1.0 browsers. We are very close to + being unconditionally compliant; if you note any deviance + from the proposed standard, please report it as a bug.
    • + +
    • eXtended Server + Side Includes (XSSI)
      + A new set of server-side include directives allows the user + to better create WWW pages. This includes number of powerful + new features, such as the ability to set variables and use + conditional HTML.
    • + +
    • File-based and + Regex-enabled Directive Sections
      + The new <Files> + section allows directives to be enabled based on full + filename, not just directory and URL. In addition, + <Files> sections can appear in + .htaccess files. <Files>, + along with <Directory> + and <Location>, + can also now be based on regular expressions, not just simple + prefix matching.
    • + +
    • Browser-based + Environment Variables
      + Environment variables can now be set based on the + User-Agent string of the browser. Combined with + XSSI, this allows you to + write browser-based conditional HTML documents.
    • + +
    • SetUID CGI + Execution
      + Apache now supports the execution of CGI scripts as users + other than the server user. A number of security checks are + built in to try and make this as safe as possible.
    • + +
    • URL Rewriting + Module
      + The optional mod_rewrite module is now + included. This module can provide powerful URL mapping, using + regular expressions. There's nothing this module can't + do!
    • + +
    • Enhanced, + Configurable Logging
      + The optional mod_log_config included with + earlier versions of Apache is now standard, and has been + enhanced to allow logging of much more detail about the + transaction, and can be used to open more than one log file at once + (each of which can have a different log format). If you have + Apache write any logs to a directory which is writable by + anyone other than the user that starts the server, see the security tips document to + be sure you aren't putting the security of your server at + risk.
    • + +
    • User Tracking + (Cookies) Revisions
      + The mod_cookies included with previous versions + of Apache has been renamed mod_usertrack, to + more accurately reflect its function (some people + inadvertently thought it enabled cookie support in Apache, + which is not true - Apache supports the use of cookies + directly). It is also now possible to disable the generation + of cookies, even when the cookie module is compiled in. Also, + an expiry time can be set on the cookies.
    • + +
    • <VirtualHost> + Enhancements
      + The <VirtualHost> directive can now take more than one + IP address or hostname. This lets a single vhost handles + requests for multiple IPs or hostnames. Also the special + section <VirtualHost _default_> can be used to handle + requests normally left for the main server + configuration.
    • + +
    • CGI + Debugging Environment
      + ScriptLog allows you to now set up a log that + records all input and output to failed CGI scripts. This + includes environment variables, input headers, POST data, + output, and more. This makes CGI scripts much easier to + debug.
    • + +
    • Resource Limits + for CGI Scripts
      + New directives allow the limiting of resources used by CGI + scripts (e.g., max CPU time). This is helpful in + preventing 'runaway' CGI processes.
    • + +
    • Redirect Directive + Can Return Alternate Status
      + The Redirect directive can return permanent or temporary + redirects, "Gone" or "See Other" HTTP status. For + NCSA-compatibility, RedirectTemp and RedirectPermanent are + also implemented.
    • + +
    • Simplified + Compilation
      + The process of configuring Apache for compilation has been + simplified.
    • + +
    • Add or Remove + Options
      + The Options directive can now add or remove + options from those currently in force, rather than always + replacing them.
    • + +
    • Command-line + Help
      + The -h command-line option now lists all the + available directives.
    • + +
    • Optional Headers + Module to Set or Remove HTTP Headers
      + The optional mod_headers module can be used to + set custom headers in the HTTP response. It can append to + existing headers, replace them, or remove headers from the + response.
    • + +
    • Conditional + Config Directives
      + A new <IfModule> section allows + directives to be enabled only if a given module is loaded + into the server.
    • + +
    • NCSA Satisfy + authentication directive now implemented
      + Satisfy allows for more flexible access control + configurations.
    • + +
    • Better NCSA Compatibility
      + Apache directives are now more compatible with NCSA 1.5 to + make moving between servers easier. In particular, Apache now + implements the Satisfy, MaxKeepAliveRequests, + RedirectPermanent + and RedirectTemp, + directives, and the following directives are now + syntax-compatible with NCSA: AuthUserFile, AuthGroupFile, AuthDigestFile, + KeepAlive and KeepAliveTimeout.
    • + +
    • + Optional proxy + module
      + An improved FTP, HTTP, and CONNECT mode SSL proxy is + included with Apache 1.2. Some of the changes visible to + users: + +
      +
      +
      +
      - Improved FTP proxy supporting PASV mode
      + +
      - ProxyBlock directive for excluding sites to + proxy
      + +
      - NoCache * directive for disabling proxy + caching
      + +
      - Numerous bug fixes
      +
      +
      +
      +
    • +
    + + + + diff --git a/htdocs/manual/new_features_1_3.html.en b/htdocs/manual/new_features_1_3.html.en new file mode 100644 index 00000000000..60f298e2fa5 --- /dev/null +++ b/htdocs/manual/new_features_1_3.html.en @@ -0,0 +1,890 @@ + + + + + + + New features with Apache 1.3 + + + + + + +

    Overview of New Features in Apache 1.3

    + +

    New features with this release, as extensions of the Apache + functionality. Because the core code has changed so + significantly, there are certain liberties that earlier + versions of Apache (and the NCSA daemon) took that recent + Apache versions are pickier about - please check the compatibility notes if you + have any problems.

    + +

    If you're upgrading from Apache 1.2, you may wish to read + the upgrade notes.

    + +

    Enhancements: Core | Performance | Configuration | Modules | + API | Misc

    +
    + +

    Core Enhancements:

    + +
    +
    Dynamic Shared Object (DSO) + support
    + +
    Apache modules may now be loaded at runtime; this means + that modules can be loaded into the server process space only + when necessary, thus overall memory usage by Apache will be + significantly reduced. DSO currently is supported on FreeBSD, + OpenBSD, NetBSD, Linux, Solaris, SunOS, Digital UNIX, IRIX, + HP/UX, UnixWare, NetWare, AIX, ReliantUnix and generic SVR4 + platforms.
    + +
    Support for Windows + NT/95
    + +
    Apache now supports the Windows NT and Windows 2000 + operating systems. While Apache may run on Windows 95, 98, or + ME, these consumer products are never recommended for + production environments, and their use remains experimental. + All versions of Apache running on Windows prior to 1.3.15 + should be considered beta quality releases.
    + +
    Support for + Cygwin
    + +
    Apache now supports the Cygwin platform for the Windows + NT and Windows 2000 operating systems. The Cygwin versions + should be considered as stable and reliable as the Windows native counterpart.
    + +
    Support for NetWare + 5.x
    + +
    Apache now supports NetWare 5.x and above + operating systems.
    + +
    Re-organized + Sources
    + +
    The source files for Apache have been re-organized. The + main difference for Apache users is that the "Module" lines + in Configuration have been replaced with + "AddModule" with a slightly different syntax. For module + authors there are some changes designed to make it easier for + users to add their module.
    + +
    Reliable Piped Logs
    + +
    On almost all Unix architectures Apache now implements + "reliable" piped logs in mod_log_config. Where + reliable means that if the logging child dies for whatever + reason, Apache will recover and respawn it without having to + restart the entire server. Furthermore if the logging child + becomes "stuck" and isn't reading its pipe frequently enough + Apache will also restart it. This opens up more opportunities + for log rotation, hit filtering, real-time splitting of + multiple vhosts into separate logs, and asynchronous DNS + resolving on the fly.
    +
    +
    + +

    Performance + Improvements

    + +
      +
    • IP-based virtual hosts are looked up via hash table.
    • + +
    • <Directory> parsing speedups.
    • + +
    • The critical path for static requests has fewer system + calls. This generally helps all requests. (45 syscalls for a + static request in 1.2 versus 22 in 1.3 in a well tuned + configuration).
    • + +
    • ProxyReceiveBufferSize + directive gives mod_proxy's outgoing connections + larger network buffers, for increased throughput.
    • + +
    • The low level I/O routines use writev (where + available) to issue multiple writes with a single system + call. They also avoid copying memory into buffers as much as + possible. The result is less CPU time spent on transferring + large files.
    • + +
    • Static requests are served using mmap, which + means bytes are only copied from the disk buffer to the + network buffer directly by the kernel. The program never + copies bytes around, which reduces CPU time. (Only where + available/tested.)
    • + +
    • When presented with a load spike, the server quickly + adapts by spawning children at faster rates.
    • + +
    • The code which dispatches modules was optimized to avoid + repeatedly skipping over modules that don't implement certain + phases of the API. (This skipping showed up as 5% of the CPU + time on profiles of a server with the default module + mix.)
    • + +
    • Revamp of the Unix scoreboard management code so that + less time is spent counting children in various states. + Previously a scan was performed for each hit, now it is + performed only once per second. This should be noticeable on + servers running with hundreds of children and high + loads.
    • + +
    • New serialization choices improve performance on Linux, + and IRIX.
    • + +
    • mod_log_config can + be compile-time configured to buffer writes.
    • + +
    • Replaced strncpy() with + ap_cpystrn(), a routine which doesn't have to + zero-fill the entire result. This has dramatic effects on + mod_include speed.
    • + +
    • Additions to the internal "table" API (used for keeping + lists of key/value string pairs) provide for up to 20% + performance improvement in many situations.
    • +
    + +

    See the new performance + documentation for more information.

    +
    + +

    Configuration + Enhancements

    + +
    +
    Unified Server Configuration Files
    + +
    (Apache 1.3.4) The contents of the three server + configuration files (httpd.conf, + srm.conf, and access.conf) have + been merged into a single httpd.conf file. The + srm.conf and access.conf files are + now empty except for comments directing the Webmaster to look + in httpd.conf. In addition, the merged + httpd.conf file has been restructured to allow + directives to appear in a hopefully more intuitive and + meaningful order.
    + +
    Continuation Lines in config files
    + +
    Directive lines in the server configuration files may now + be split onto multiple lines by using the canonical Unix + continuation mechanism, namely a '\' as the last non-blank + character on the line to indicate that the next line should + be concatenated.
    + +
    Apache Autoconf-style Interface + (APACI)
    + +
    Until Apache 1.3 there was no real out-of-the-box + batch-capable build and installation procedure for the + complete Apache package. This is now provided by a top-level + configure script and a corresponding top-level + Makefile.tmpl file. The goal is to provide a GNU + Autoconf-style frontend which is capable to both drive the + old src/Configure stuff in batch and + additionally installs the package with a GNU-conforming + directory layout. Any options from the old configuration + scheme are available plus a lot of new options for flexibly + customizing Apache.
    + Note: The default installation layout has + changed for Apache 1.3.4. See the files + README.configure and INSTALL for + more information.
    + +
    APache eXtenSion (APXS) support + tool
    + +
    Now that Apache provides full support for loading modules + under runtime from dynamic shared object (DSO) files, a new + support tool apxs was created which provides + off-source building, installing and activating of those + DSO-based modules. It completely hides the platform-dependent + DSO-build commands from the user and provides an easy way to + build modules outside the Apache source tree. To achieve this + APACI installs the Apache C header files together with the + apxs tool.
    + +
    Default Apache + directory path changed to + /usr/local/apache/
    +
    + +
    The default directory for the Apache ServerRoot changed + from the NCSA-compatible /usr/local/etc/httpd/ + to /usr/local/apache/. This change covers only + the default setting (and the documentation); it is of course + possible to override it using the -d + ServerRoot and -f httpd.conf switches + when starting apache.
    + +
    Improved HTTP/1.1-style Virtual + Hosts
    + +
    The new NameVirtualHost + directive is used to list IP address:port pairs on which + HTTP/1.1-style virtual hosting occurs. This is vhosting based + on the Host: header from the client. Previously + this address was implicitly the same as the "main address" of + the machine, and this caused no end of problems for users, + and was not powerful enough. Please see the Apache Virtual Host documentation for + further details on configuration.
    + +
    Include directive
    + +
    The Include + directive includes other config files immediately at that + point in parsing.
    + +
    -S command line option for debugging vhost + setup
    + +
    If Apache is invoked with the -S command + line option it will dump out information regarding how it + parsed the VirtualHost sections. This is useful + for folks trying to debug their virtual host + configuration.
    + +
    Control of HTTP methods
    + +
    <LimitExcept> + and </LimitExcept> are used to enclose a group of + access control directives which will then apply to any HTTP + access method not listed in the arguments; i.e., it is the + opposite of a <Limit> section and can be used to + control both standard and nonstandard/unrecognized + methods.
    +
    +
    + +

    Module Enhancements

    + +
    +
    Improved + mod_negotiation
    +
    + +
    The optional content negotiation (MultiViews) module has + been completely overhauled for Apache 1.3.4, incorporating + the latest HTTP/1.1 revisions and the experimental + Transparent Content Negotion features of RFC 2295 and RFC + 2296.
    + +
    NEW - Spelling + correction module
    +
    + +
    This optional module corrects frequently occurring + spelling and capitalization errors in document names + requested from the server.
    + +
    NEW - Conditional + setting of environment variables
    +
    + +
    The addition of SetEnvIf + and SetEnvIfNoCase. + These allow you to set environment variables for server and + CGI use based upon attributes of the request.
    + +
    NEW - "Magic" + MIME-typing
    + +
    The optional mod_mime_magic has been added. + It uses "magic numbers" and other hints from a file's + contents to figure out what the contents are. It then uses + this information to set the file's media type, if it cannot + be determined by the file's extension.
    + +
    NEW - Unique + Request Identifiers
    + +
    mod_unique_id can be + included to generate a unique identifier that distinguishes a + hit from every other hit. ("Unique" has some restrictions on + it.) The identifier is available in the environment variable + UNIQUE_ID.
    + +
    mod_proxy enhancements:
    + +
    +
      +
    • Easier and safer authentication for ftp proxy logins: + When no ftp user name and/or password is specified in the + URL, but the destination ftp server requires one, Apache + now returns a "[401] Authorization Required" status. This + status code usually makes the client browser pop up an + "Enter user name and password" dialog, and the request is + retried with the given user authentification. That is + slightly more secure than specifying the authentication + information as part of the request URL, where it could be + logged in plaintext by older proxy servers.
    • + +
    • The new AllowCONNECT directive allows + configuration of the port numbers to which the proxy + CONNECT method may connect. That allows proxying to + https://some.server:8443/ which resulted in an error + message prior to Apache version 1.3.2.
    • + +
    • The proxy now supports the HTTP/1.1 "Via:" header as + specified in RFC2068. The new ProxyVia + directive allows switching "Via:" support off or on, or + suppressing outgoing "Via:" header lines altogether for + privacy reasons.
    • + +
    • The "Max-Forwards:" TRACE header specified in + HTTP/1.1 is now supported. With it, you can trace the + path of a request along a chain of proxies (if they, too, + support it).
    • + +
    • NoProxy + and ProxyDomain + directives added to proxy, useful for intranets.
    • + +
    • New ProxyPassReverse + directive. It lets Apache adjust the URL in the + Location header on HTTP redirect responses.
    • + +
    • Easier navigation in ftp server directory trees.
    • +
    +
    + +
    Enhanced + mod_include string + comparisons
    +
    + +
    The string-based server-side include (SSI) flow-control + directives now include comparison for less-than (<), + less-than-or-equal (<=), greater-than (>), and + greater-than-or-equal (>=). Previously comparisons could + only be made for equality or inequality.
    + +
    ServerRoot relative auth filenames
    + +
    Auth filenames for the various authentication modules are + now treated as relative to the ServerRoot if they are not + full paths.
    + +
    Enhancements to + directory indexing:
    + +
    +
      +
    • Code split:The mod_dir + module has been split in two, with mod_dir handling directory + index files, and mod_autoindex creating + directory listings. Thus allowing folks to remove the + indexing function from critical servers.
    • + +
    • Sortable: Clicking on a column title + will now sort the listing in order by the values in that + column. This feature can be disabled using the + SuppressColumnSorting IndexOptions + keyword.
    • + +
    • + SuppressHTMLPreamble + can be used if your README.html file includes its own + HTML header.
    • + +
    • The IndexOptions + directive now allows the use of incremental prefixes (+/- + to add/remove the respective keyword feature, as was + already possible for the Options directive) to + its keyword arguments. Multiple IndexOptions directives + applying to the same directory will now be merged.
    • + +
    • + IconHeight and + IconWidth let you set height + and width attributes to the <IMG> tag + in directory listings.
    • + +
    • The new + NameWidth keyword to the IndexOptions + directive lets you set the number of columns for "fancy" + directory listings. If set to an '*' asterisk, the + name width will be adjusted automatically.
    • + +
    • The FancyIndexing + directive now correctly has the same impact as + IndexOptions FancyIndexing without + replacing the effect of any existing + IndexOptions directive.
    • + +
    • Starting with 1.3.15, the server will satisfy + directory requests with the cache controls ETag and + LastModified, if IndexOptions includes the TrackModified + directive. The server will not need to generate the + listing if the client determines the request has not + changed, improving performance. Due to its experimental + nature, this feature is not enabled by default.
    • +
    +
    + +
    Less Buffering of CGI Script Output
    + +
    In previous versions of Apache, the output from CGI + scripts would be internally buffered by the server, and + wouldn't be forwarded to the client until either the buffers + were full or the CGI script completed. As of Apache 1.3, the + buffer to the client is flushed any time it contains + something and the server is waiting for more information from + the script. This allows CGI script to provide partial status + reports during long processing operations.
    + +
    Regular Expression + support for Alias and + Redirect
    + +
    New AliasMatch, + ScriptAliasMatch, + and RedirectMatch + directives allow for the use of regular expression matching. + Additionally, new <DirectoryMatch>, + <LocationMatch>, + and <FilesMatch> + sections provide a new syntax for regular expression + sectioning.
    + +
    AddModuleInfo + directive added to mod_info
    + +
    Allows additional information to be listed along with a + specified module.
    + +
    Absence of any TransferLog disables + logging
    + +
    If no TransferLog + directive is given then no log is written. This supports + co-existence with other logging modules.
    + +
    Ability to name logging formats
    + +
    The LogFormat + directive has been enhanced to allow you to give nicknames to + specific logging formats. You can then use these nicknames in + other LogFormat and CustomLog + directives, rather than having to spell out the complete log + format string each time.
    + +
    Conditional logging
    + +
    mod_log_config + now supports logging based upon environment variables. + mod_log_referer and mod_log_agent are now deprecated.
    + +
    mod_cern_meta configurable + per-directory
    + +
    mod_cern_meta is now + configurable on a per-directory basis.
    + +
    New map types for RewriteMap + directive
    + +
    The new map types `Randomized Plain Text' and `Internal + Function' were added to the RewriteMap directive + of mod_rewrite. They provide two new features: First, you now + can randomly choose a sub-value from a value which was + looked-up in a rewriting map (which is useful when choosing + between backend servers in a Reverse Proxy situation). + Second, you now can translate URL parts to fixed (upper or + lower) case (which is useful when doing mass virtual hosting + by the help of mod_rewrite).
    + +
    CIDR and Netmask access control
    + +
    mod_access directives + now support CIDR (Classless Inter-Domain Routing) style + prefixes, and netmasks for greater control over IP access + lists.
    +
    +
    + +

    API Additions and Changes

    + +

    For all those module writers and code hackers:

    + +
    +
    child_init
    + +
    A new phase for Apache's API is called once per + "heavy-weight process," before any requests are handled. This + allows the module to set up anything that need to be done + once per processes. For example, connections to + databases.
    + +
    child_exit
    + +
    A new phase called once per "heavy-weight process," when + it is terminating. Note that it can't be called in some fatal + cases (such as segfaults and kill -9). The + child_init and child_exit functions + are passed a pool whose lifetime is the same as the lifetime + of the child (modulo completely fatal events in which Apache + has no hope of recovering). In contrast, the module + init function is passed a pool whose lifetime + ends when the parent exits or restarts.
    + +
    child_terminate
    + +
    Used in the child to indicate the child should exit after + finishing the current request.
    + +
    register_other_child
    + +
    See http_main.h. This is used in the parent + to register a child for monitoring. The parent will report + status to a supplied callback function. This allows modules + to create their own children which are monitored along with + the httpd children.
    + +
    piped_log
    + +
    See http_log.h. This API provides the common + code for implementing piped logs. In particular it implements + a reliable piped log on architectures supporting it + (i.e., Unix at the moment).
    + +
    scoreboard format changed
    + +
    The scoreboard format is quite different. It is + considered a "private" interface in general, so it's only + mentioned here as an FYI.
    + +
    set_last_modified split into + three
    + +
    The old function set_last_modified performed + multiple jobs including the setting of the + Last-Modified header, the ETag + header, and processing conditional requests (such as IMS). + These functions have been split into three functions: + set_last_modified, set_etag, and + meets_conditions. The field mtime + has been added to request_rec to facilitate + meets_conditions.
    + +
    New error logging function: + ap_log_error
    + +
    All old logging functions are deprecated, we are in the + process of replacing them with a single function called + ap_log_error. This is still a work in + progress.
    + +
    set_file_slot for config + parsing
    + +
    The set_file_slot routine provides a + standard routine that prepends ServerRoot to non-absolute + paths.
    + +
    post_read_request module + API
    + +
    This request phase occurs immediately after reading the + request (headers), and immediately after creating an internal + redirect. It is most useful for setting environment variables + to affect future phases.
    + +
    psocket, and + popendir
    + +
    The psocket and pclosesocket + functions allow for race-condition free socket creation with + resource tracking. Similarly popendir and + pclosedir protect directory reading.
    + +
    is_initial_req
    + +
    Test if the request is the initial request + (i.e., the one coming from the client).
    + +
    kill_only_once
    + +
    An option to ap_spawn_child functions which + prevents Apache from aggressively trying to kill off the + child.
    + +
    alloc debugging code
    + +
    Defining ALLOC_DEBUG provides a rudimentary + memory debugger which can be used on live servers with low + impact -- it sets all allocated and freed memory bytes to + 0xa5. Defining ALLOC_USE_MALLOC will cause the + alloc code to use malloc() and + free() for each object. This is far more + expensive and should only be used for testing with tools such + as Electric Fence and Purify. See main/alloc.c + for more details.
    + +
    ap_cpystrn
    + +
    The new strncpy "lookalike", with slightly + different semantics is much faster than strncpy + because it doesn't have to zero-fill the entire buffer.
    + +
    table_addn, table_setn, + table_mergen
    + +
    These new functions do not call + pstrdup on their arguments. This provides for + big speedups. There is also some debugging support to ensure + code uses them properly. See src/CHANGES for + more information.
    + +
    construct_url
    + +
    The function prototype for this changed from taking a + server_rec * to taking a request_rec + *.
    + +
    get_server_name, + get_server_port
    + +
    These are wrappers which deal with the UseCanonicalName + directive when retrieving the server name and port for a + request.
    + +
    Change to prototype for + ap_bspawn_child and + ap_call_exec
    + +
    Added a child_info * to spawn + function (as passed to ap_bspawn_child) and to + ap_call_exec to allow children to work correctly + on Win32. We also cleaned up the nomenclature a bit, + replacing spawn_child_err with simply + ap_spawn_child and + spawn_child_err_buff with simply + ap_bspawn_child.
    + +
    + ap_add_version_component()
    + +
    This API function allows for modules to add their own + additional server tokens which are printed on the on the + Server: header line. Previous 1.3beta versions + had used a SERVER_SUBVERSION compile-time + #define to perform this function. Whether the + tokens are actually displayed is controlled by the new + ServerTokens directive.
    +
    +
    + +

    Miscellaneous + Enhancements

    + +
    +
    Port to EBCDIC mainframe + machine running BS2000/OSD
    + +
    As a premiere, this version of Apache comes with a beta + version of a port to a mainframe machine which uses the + EBCDIC character set as its native codeset (It is the SIEMENS + family of mainframes running the BS2000/OSD operating system + on a IBM/390 compatible processor. This mainframe OS nowadays + features a SVR4-like POSIX subsystem).
    + +
    AccessFileName + Enhancement
    + +
    The AccessFileName directive can now take + more than one filename. This lets sites serving pages from + network file systems and more than one Apache web server, + configure access based on the server through which shared + pages are being served.
    + +
    HostnameLookups now defaults to + "Off"
    + +
    The HostnameLookups + directive now defaults to "Off". This means that, unless + explicitly turned on, the server will not resolve IP + addresses into names. This was done to spare the Internet + from unnecessary DNS traffic.
    + +
    Double-Reverse DNS enforced
    + +
    The HostnameLookups + directive now supports double-reverse DNS. (Known as + PARANOID in the terminology of tcp_wrappers.) An IP + address passes a double-reverse DNS test if the forward map + of the reverse map includes the original IP. Regardless of + the HostnameLookups setting, mod_access access lists using + DNS names require all names to pass a + double-reverse DNS test. (Prior versions of Apache required a + compile-time switch to enable double-reverse DNS.)
    + +
    LogLevel and syslog support
    + +
    Apache now has configurable error logging + levels and supports error logging via + syslogd(8).
    + +
    Detaching from stdin/out/err
    + +
    On boot Apache will now detach from stdin, stdout, and + stderr. It does not detach from stderr until it has + successfully read the config files. So you will see errors in + the config file. This should make it easier to start Apache + via rsh or crontab.
    + +
    Year-2000 + Improvements
    + +
    The default timefmt string used by mod_include has + been modified to display the year using four digits rather + than the two-digit format used previously. The mod_autoindex + module has also been modified to display years using four + digits in FancyIndexed directory listings.
    + +
    Common routines Moving to a Separate + Library
    + +
    There are a number of functions and routines that have + been developed for the Apache project that supplement or + supersede library routines that differ from one operating + system to another. While most of these are used only by the + Apache server itself, some are referenced by supporting + applications (such as htdigest), and these other + applications would fail to build because the routines were + built only into the server. These routines are now being + migrated to a separate subdirectory and library so they can + be used by other applications than just the server. See the + src/ap/ subdirectory.
    + +
    New ServerSignature + directive
    + +
    This directive optionally adds a line containing the + server version and virtual host name to server-generated + pages (error documents, ftp directory listings, mod_info + output etc.). This makes it easier for users to tell + which server produced the error message, especially in a + proxy chain (often found in intranet environments).
    + +
    New UseCanonicalName + directive
    + +
    This directive gives control over how Apache creates + self-referential URLs. Previously Apache would always use the + ServerName and Port directives to construct a + "canonical" name for the server. With UseCanonicalName + off Apache will use the hostname and port supplied by + the client, if available.
    + +
    SERVER_VERSION definition + abstracted, and server build date added
    + +
    In earlier versions, the Apache server version was + available to modules through the #defined value + for SERVER_VERSION. In order to keep this value + consistent when modules and the core server are compiled at + different times, this information is now available through + the core API routine ap_get_server_version(). + The use of the SERVER_VERSION symbol is + deprecated. Also, ap_get_server_built() returns + a string representing the time the core server was + linked.
    + +
    Including + the operating system in the server + identity
    +
    + +
    A new directive, ServerTokens, allows the + Webmaster to change the value of the Server + response header field which is sent back to clients. The + ServerTokens directive controls whether the + server will include a non-specific note in the server + identity about the type of operating system on which the + server is running as well as included module information. As + of Apache 1.3, this additional information is included by + default.
    +
    +
    + +
    Support for Netscape style SHA1 encrypted + passwords
    +
    + +
    To facilitate migration or integration of BasicAuth + password schemes where the password is encrypted using SHA1 + (as opposed to Apache's built in MD5 and/or the OS specific + crypt(3) function ) passwords prefixed with with + {SHA1} are taken as Base64 encoded SHA1 + passwords. More information and some utilities to convert + Netscape ldap/ldif entries can be found in support/SHA1.
    +
    + + + + diff --git a/htdocs/manual/new_features_1_3.html.html b/htdocs/manual/new_features_1_3.html.html new file mode 100644 index 00000000000..87669a107d2 --- /dev/null +++ b/htdocs/manual/new_features_1_3.html.html @@ -0,0 +1,4 @@ + + + diff --git a/htdocs/manual/new_features_1_3.html.ja.jis b/htdocs/manual/new_features_1_3.html.ja.jis new file mode 100644 index 00000000000..23ffd49443c --- /dev/null +++ b/htdocs/manual/new_features_1_3.html.ja.jis @@ -0,0 +1,890 @@ + + + + + + New features with Apache 1.3 + + + + + + + +

    Apache 1.3 $B$N?75!G=$N35MW(B

    + +

    $B:#2s$N%j%j!<%9$G$N?7$7$$FCD'$H$7$F!"(BApache + $B$N5!G=@-$N3HD%$K$D$$$F$3$3$G$O@bL@$7$^$9!#(B + $B%3%"ItJ,$N%3!<%I$,Bg$-$/JQ$o$j$^$7$?$N$G!"=i4|$N%P!<%8%g%s$N(B Apache + ($B$*$h$S(B NCSA httpd) $B$,l9g$K$O(B + $B8_49@-$K4X$7$F(B + $B$G%A%'%C%/$7$F$/$@$5$$!#(B

    + +

    Apache 1.2 $B$+$i$N%"%C%W%0%l!<%I$O(B$B!V%"%C%W%0%l!<%I$K4X$7$F!W(B$B$rFI$`$HNI$$$G$7$g$&!#(B

    + +

    $B3HD%(B: $B%3%"(B | $B%Q%U%)!<%^%s%9(B | $B@_Dj(B | $B%b%8%e!<%k(B | + API | $B$=$NB>(B

    +
    + +

    $B%3%"$N3HD%(B:

    + +
    +
    Dynamic Shared Object (DSO) + $B$N%5%]!<%H(B
    + +
    $B + +
    Windows NT/95 $B$N%5%]!<%H(B
    + +
    Apache $B$O(B Windows NT $B$H(B Windows 2000 $B$r%5%]!<%H$9$k$h$&$K$J$j$^$7$?!#(B + Windows 95, 98, ME $B$G$b(B Apache $B$OF0:n$9$k$+$b$7$l$^$;$s$,!"(B + $B$3$l$i$N%3%s%7%e!<%^@=IJ$N4D6-$G$N;HMQ$O?d>)$7$F$$$^$;$s!#(B + $B$=$7$F!"$=$N;HMQ$K$D$$$F$N>uBV$O!"e$GF0:n$7$F$$$k(B 1.3.15 $B$h$jA0$N$9$Y$F$N%P!<%8%g%s$N(B + Apache $B$O!"%Y!<%?HGIJ + +
    Cygwin + $B$N%5%]!<%H(B
    + +
    Apache $B$O(B Windows NT $B$H(B Windows 2000 $B>e$N(B Cygwin + $B$r%5%]!<%H$9$k$h$&$K$J$j$^$7$?!#0BDj@-$d?.Mj@-$NLL$+$i!"(B + Windows $B<+BN$HJ;$;$F(B Cygwin + $B$N%P!<%8%g%s$r9MN8$9$Y$-$G$9!#(B
    + +
    NetWare 5.x + $B$N%5%]!<%H(B
    + +
    Apache $B$O(B NetWare 5.x + $B$r%5%]!<%H$9$k$h$&$K$J$j$^$7$?!#(B
    + +
    $B%=!<%9$N:F9=@.(B
    + +
    Apache $B$N%=!<%9%U%!%$%k$O:F9=@.$5$l$^$7$?!#(BApache + $B$N%f!<%6$K$H$C$FConfiguration + $B$K$*$1$k(B "Module" $B9T$,(B "AddModule" $B$GCV$-49$o$j!"(B + $B9=J8$,>/$7JQ$o$C$?$3$H$G$9!#%b%8%e!<%k$N:n + +
    $B?.Mj@-$N$"$k%Q%$%W$5$l$?%m%0(B
    + +
    $B$[$H$s$I$9$Y$F$N(B Unix $B%"!<%-%F%/%A%c$G(B Apache + $B$O!V?.Mj@-$N$"$k!W%Q%$%W$5$l$?%m%0$r(B mod_log_config $B$Gl$G$NHsF14|$N(B DNS $B2r7h$r$7$?$j$9$k5!2q$,$G$-$^$9!#(B
    +
    +
    + +

    $B@-G=$N2~A1(B

    + + +
      +
    • IP $B$K4p$E$$$?%P!<%A%c%k%[%9%H$O%O%C%7%e%F!<%V%k$rMQ$$$FD4$Y$i$l$^$9!#(B
    • + +
    • <Directory> $B2r@O$NB.EY8~>e!#(B
    • + +
    • $B@EE*$J%j%/%(%9%H$KBP$9$k%/%j%F%#%+%k%Q%9$N%7%9%F%`%3!<%k(B + $B?t$,8:$j$^$7$?!#$3$l$ODL>o$9$Y$F$N%j%/%(%9%H$GLrN)$A$^$9!#(B + ($B$h$/%A%e!<%s$5$l$?@_Dj$K$*$$$F!"(B1.2 $B$G$O@EE*$J%j%/%(%9%H$G%7%9%F%`%3!<%k$,(B + 45 $B$"$C$?$N$KBP$7$F!"(B1.3 $B$G$O(B 22 $B$G$9(B)$B!#(B
    • + +
    • $B%9%k!<%W%C%H8~>e$N$?$a$K(B + ProxyReceiveBufferSize $B%G%#%l%/%F%#%V$O!"(B + mod_proxy $B$+$i$N30It@\B3$KBP$7$F!"(B + $B$h$jBg$-$J%M%C%H%o!<%/%P%C%U%!$rM?$($^$9!#(B
    • + +
    • $BJ#?t$N=q$-9~$_$r0l$D$N%7%9%F%`%3!<%k$G$9$^$;$k$?$a$KDc%l%Y%k(B + I/O $B$N%k!<%A%s$G$O(B ($B;HMQ2DG=$G$"$l$P(B) writev + $B$r;H$&$h$&$K$J$C$F$$$^$9!#$3$N%k!<%A%s$G$O%a%b%j$N%P%C%U%!$X$N(B + $B%3%T!<$b$G$-$k$@$1Hr$1$F$$$^$9!#$=$N7k2L!"Bg$-$J%U%!%$%k$NE>Aw$K;H$o$l$k(B + CPU $B;~4V$,>/$J$/$J$j$^$9!#(B
    • + +
    • $B@EE*$J%j%/%(%9%H$O(B mmap $B$rMQ$$$F=hM}$5$l$^$9!#(B + $B$3$l$G!"%P%$%H$O%+!<%M%k$K$h$j%G%#%9%/$N%P%C%U%!$+$i%M%C%H%o!<%/$N(B + $B%P%C%U%!$XD>@\%3%T!<$5$l$k$@$1$K$J$j$^$9!#%W%m%0%i%`$O!"(B + $B%P%$%H$N$"$A$3$A$X$N%3%T!<$r$7$^$;$s!#(B($B;HMQ2DG=$+$D%F%9%H(B + $B$5$l$F$$$k$H$-$N$_!#(B) $B$=$l$O(B CPU $B;~4V$r8:>/$5$;$F$7$^$$$^$9!#(B
    • + +
    • $BIi2Y$,5^7c$KA}2C$7$?$H$-!"%5!<%P$OB.$/;R%W%m%;%9$r5/F0$7$F!"(B + $BAGAa$/E,1~$7$^$9!#(B
    • + +
    • $B%b%8%e!<%k$r%G%#%9%Q%C%A$9$k%3!<%I$O(B API + $B$NFCDj$NItJ,$r + +
    • Unix $B$N%9%3%"%\!<%I$N4IM}%3!<%I$r:F9=@.$7$^$7$?!#(B + $B$3$l$K$h$j!"B?$/$N>l9g$G;R%W%m%;%9$N?t$r?t$($k;~4V$,C;$/$J$j$^$7$?!#(B + $B0JA0$O3F%R%C%H$KBP$7$F%9%-%c%s$, + +
    • $B?7$7$$%7%j%"%i%$%:$NJ}K!$rA*Br$7$?$3$H$G(B Linux $B$H(B IRIX + $B$G$N@-G=$,2~A1$5$l$^$7$?!#(B
    • + +
    • mod_log_config $B$O%3%s%Q%$%k;~$K(B + $B%P%C%U%!$X=q$-9~$_$r$9$k$h$&$K@_Dj$G$-$k$h$&$K$J$j$^$7$?!#(B
    • + +
    • strncpy() $B$r7k2LA4BN$r(B 0 $B$GKd$a$kI,MW$N$J$$(B + ap_cpystrn() $B$GCV$-49$($^$7$?!#$3$l$O(B + mod_include $B$NB.EY$K7`E*$J8z2L$,$"$j$^$9!#(B +
    • + +
    • $BFbIt$N(B "table" API ($B%-!<(B/$BCM(B $B$NJ8;zNs$NBP$rJ];}$9$k$N$K;H$o$l$F$$$^$9(B) + $B$X$NDI2C$K$h$j!"B?$/$N>u67$G:GBg(B 20% $B$N@-G=$N2~A1$r$b$?$i$9$h$&$K(B + $B$J$j$^$7$?!#(B
    • +
    + +

    $B>\$7$$>pJs$O(B$B@-G=$K$D$$$F$N?7$7$$%I%-%e%a%s%H(B $B$r;2>H$7$F$/$@$5$$!#(B

    +
    + +

    $B@_Dj$N3HD%(B

    + + +
    +
    $B%5!<%P$N@_Dj%U%!%$%k$N0l852=(B
    + +
    (Apache 1.3.4) $B;0$D$N%5!<%P@_Dj%U%!%$%k(B + (httpd.conf, srm.conf, + access.conf) $B$,(B httpd.conf + $B%U%!%$%k0l$D$K$^$H$a$i$l$^$7$?!#(Bsrm.conf $B$H(B + access.conf $B%U%!%$%k$O!"%&%'%V%^%9%?!<$,(B + httpd.conf $B$r8+$k$h$&%3%a%s%H$,$"$k$@$1$G!"(B + $B8e$O6u$K$J$C$F$$$^$9!#(B + $B99$K!"$^$H$a$i$l$?(B httpd.conf $B%U%!%$%k$G$O!"(B + $B%G%#%l%/%F%#%V(B + $B$,$h$jD>46E*$G0UL#$N$"$k=gHV$K$J$k$h$&$K:F9=@.$5$l$^$7$?!#(B
    + +
    $B@_Dj%U%!%$%k$G$N7QB3$7$?9T(B
    + +
    $B@_Dj%U%!%$%k$K$*$1$k%G%#%l%/%F%#%V$N9T$O(B Unix + $B$N7QB39T$r07$&DL>o$NJ}K!!"$9$J$o$A(B '\' + $B$r$=$N9T$N6uGr0J30$N:G8e$NJ8;z$H$7$FCV$/$3$H$G!"(B + $B + +
    Apache Autoconf-style Interface + (APACI)
    + +
    Apache 1.3 $B$K$J$k$^$G$O!"(B Apache + $B%Q%C%1!<%8A4It$rE83+$7$?$i$9$0$K!"%S%k%I$7$F%$%s%9%H!<%k(B + $B$9$k$h$&$J%P%C%AE*configure + $B%9%/%j%W%H$H!"$=$l$KBP1~$9$k%H%C%W%G%#%l%/%H%j$N(B + Makefile.tmpl $B%U%!%$%k$G!"$=$l$,src/Configure $B4XO"MWAG$N%P%C%A=hM}$H!"(B + GNU $BN.$N%G%#%l%/%H%j9=@.$G$N%Q%C%1!<%8%$%s%9%H!<%k$NN>J}$,2DG=$K$J$j$^$9!#(B + $B8E$$@_DjJ}K!$G2DG=$@$C$?$b$N%*%W%7%g%s$9$Y$F$K2C$($F!"(BApache + $B$r=@Fp$K%+%9%?%^%$%:$9$k$?$a$N$?$/$5$s$N?7$7$$%*%W%7%g%s$,(B + $B;HMQ2DG=$G$9!#(B
    + $BCm0U(B: $B%G%U%)%k%H$N%$%s%9%H!<%k$N9=@.$O(B Apache + 1.3.4 $B$GJQ99$5$l$^$7$?!#>\:Y$K$D$$$F$O(B README.configure + $B$H(B INSTALL $B%U%!%$%k$r;2>H$7$F$/$@$5$$!#(B
    + +
    APache eXtenSion (APXS) + $B%5%]!<%H%D!<%k(B
    + +
    Apache $B$Ol=j$G(B + $B%S%k%I!"%$%s%9%H!<%k!"%"%/%F%#%V2=$r9T$J$&?7$7$$%5%]!<%H%D!<%k(B + apxs $B$,:n@.$5$l$^$7$?!#$3$l$K$h$j!"%W%i%C%H%U%)!<%`(B + $B$K0MB8$7$?(B DSO $B%S%k%IMQ$N%3%^%s%I$O%f!<%6$+$i40A4$K1#$5$l!"(BApache + $B$N%=!<%9%D%j!<$N30$G%b%8%e!<%k$r%S%k%I$9$k$3$H$,MF0W$K$J$C$F$$$^$9!#(B + $B$3$l$rC#@.$9$k$?$a$K!"(BAPACI $B$O(B Apache $B$N(B C $B$N%X%C%@%U%!%$%k$r(B + apxs $B$H0l=o$K%$%s%9%H!<%k$7$^$9!#(B
    + +
    Apache + $B$N%G%U%)%k%H%G%#%l%/%H%j%Q%9$r(B /usr/local/apache/ + $B$XJQ99(B
    +
    + +
    Apache $B$N%G%U%)%k%H$N(B ServerRoot $B%G%#%l%/%H%j$,!"(BNCSA $B8_49$N(B + /usr/local/etc/httpd/$B$+$i(B + /usr/local/apache/ $B$KJQ99$5$l$^$7$?!#(B + $B$3$l$O%G%U%)%k%H$N@_Dj(B ($B$H%I%-%e%a%s%H(B) $B$NJQ99$@$1$G$9!#$b$A$m$s!"(B + Apache $B$r5/F0$9$k$H$-$K(B -d + ServerRoot $B$H(B -f httpd.conf + $B$r;XDj$9$k$3$H$GJQ99$9$k$3$H$,$G$-$^$9!#(B
    + +
    HTTP/1.1 + $B7A<0$N%P!<%A%c%k%[%9%H$N2~A1(B
    + +
    NameVirtualHost + $B$H$$$&?7$7$$%G%#%l%/%F%#%V$r;HMQ$7$F(B IP $B%"%I%l%9(B:$B%]!<%H(B + $B$NBP$r;XDj$9$k$3$H$G!"(BHTTP/1.1 $B7A<0$N%P!<%A%c%k%[%9%H$rHost: $B%X%C%@$K4p$E$/(B + $B%P!<%A%c%k%[%9%H$G$9!#0JA0$O$3$N%"%I%l%9$O0EL[$N$&$A$K%^%7%s$N(B + "$B%a%$%s%"%I%l%9(B" $B$HF1$8$K$7$F$$$^$7$?$,!"$3$l$O?tB?$/$NLdBj$r0z$-5/$3$7!"(B + $B$^$?5!G=$b==J,$G$O$"$j$^$;$s$G$7$?!#@_Dj$N>\:Y$K$D$$$O(B + $B!V(BApache $B%P!<%A%c%k%[%9%H%I%-%e%a%s%H!W(B + $B$r;2>H$7$F$/$@$5$$!#(B
    + +
    Include $B%G%#%l%/%F%#%V(B
    + +
    $B@_Dj%U%!%$%k$N%Q!<%9$NESCf$G(B Include + $B%G%#%l%/%F%#%V$K=P2q$&$H!"(B + $BD>$A$KB>$N@_Dj%U%!%$%k$r$=$N>l=j$KA^F~$7$^$9!#(B
    + +
    $B%P!<%A%c%k%[%9%H$N@_Dj$N%G%P%C%0$N$?$a$N(B -S + $B%3%^%s%I%i%$%s%*%W%7%g%s(B
    + +
    $B%3%^%s%I%i%$%s%*%W%7%g%s(B -S $B$rIU$1$F(B Apache + $B$r5/F0$9$k$H!"(BVirtualHost + $B$r$I$N$h$&$K%Q!<%9$7$?$+$H$$$&>pJs$rI=<($7$^$9!#(B + $B$3$l$O%P!<%A%c%k%[%9%H$N@_Dj$r%G%P%C%0$7$h$&$H$9$k>l9g$KJXMx$G$9!#(B +
    + +
    HTTP $B%a%C%=%I$N@)8f(B
    + +
    <LimitExcept> + $B$H(B </LimitExcept> $B$O%"%/%;%9@)8fL?Na$N%0%k!<%W$r0O$_!"(B + $B0z?t$H$7$F;XDj$7$F$$$J$$(B HTTP + $B%"%/%;%9%a%=%C%I$K$D$$$F$=$N%"%/%;%9@)8fL?Na$,E,MQ$5$l$^$9!#(B + $B$9$J$o$A!"$3$l$O(B <Limit> $B%;%/%7%g%s$N5U$G!"(B + $BI8=`$N%a%=%C%I$HHsI8=`$J$$$7$OG'<1$G$-$J$$(B + $B%a%=%C%I$NN>J}$r@)8f$9$k$?$a$K;H$&$3$H$,$G$-$^$9!#(B
    +
    +
    + +

    $B%b%8%e!<%k$N3HD%(B

    + +
    +
    mod_negotiation + $B$N2~A1(B
    +
    + +
    $B%*%W%7%g%J%k$N%3%s%F%s%H%M%4%7%(!<%7%g%s(B (MultiViews) + $B%b%8%e!<%k$,(B Apache 1.3.4 $B$GA4BNE*$K=$@5$5$l!":G?7$N(B HTTP/1.1 + $B2~D{HG$H + +
    NEW - + $BDV$j=$@5%b%8%e!<%k(B ($BLuCm(B: mod_speling)
    +
    + +
    $B$3$N%*%W%7%g%J%k$J%b%8%e!<%k$O!"%5!<%P$+$iMW5a$5$l$?(B + $B%I%-%e%a%s%H$N%Q%9L>$G$7$P$7$P8+$i$l$kDV$j$dBgJ8;z>.J8;z$N(B + $B4V0c$$$r=$@5$7$^$9!#(B
    + +
    NEW - + $B>r7oIU$-4D6-JQ?t$N@_Dj(B ($BLuCm(B: mod_setenvif)
    +
    + +
    SetEnvIf + $B%G%#%l%/%F%#%V$H(B + SetEnvIfNoCase $B%G%#%l%/%F%#%V$,DI2C$5$l$^$7$?!#(B + $B$3$l$K$h$j!"%j%/%(%9%H$NB0@-$K1~$8$F%5!<%P$H(B CGI + $B$N4D6-JQ?t$r@_Dj$9$k$3$H$,$G$-$^$9!#(B
    + +
    NEW - "Magic" + MIME $B%?%$%W(B ($BLuCm(B: mod-mime_magic)
    + +
    $B%*%W%7%g%J%k$J(B mod_mime_magic $B$,DI2C$5$l$^$7$?!#(B + $B$3$N%b%8%e!<%k$O!"(B"$B%^%8%C%/%J%s%P!<(B" $B$d%U%!%$%k$NFbMF$+$i(B + $BF@$i$l$k>pJs$r;HMQ$7$F!"BP>]$H$J$k%3%s%F%s%D$NB0@-$rD4$Y$^$9!#(B + $B$3$N>pJs$O!"%U%!%$%k$N3HD%;R$+$i$=$N%U%!%$%k$N%a%G%#%"%?%$%W$r(B + $B7hDj$G$-$J$$>l9g$K;HMQ$5$l$^$9!#(B
    + +
    NEW - + $B0l0U$K<1JL2DG=$J(B ID ($BLuCm(B: mod_unique_id)
    + +
    mod_unique_id + mod_unique_id $B$rAH$_9~$`$3$H$G!"$"$k%R%C%H$HB>$N%R%C%H$H$r6hJL$9$k(B + $B%f%K!<%/$J<1JL;R$r@8@.$9$k$h$&$K$J$j$^$9(B ($B$3$3$G$N(B $B!V%f%K!<%/$J!W(B + $B$K$O$$$/$D$+@)8B$,$"$j$^$9!#(B) $B$=$N<1JL;R$O!"4D6-JQ?t(B + UNIQUE_ID $B$H$7$F;2>H$9$k$3$H$,$G$-$^$9!#(B
    + +
    mod_proxy $B$N3HD%(B:
    + +
    +
      +
    • ftp proxy $B$N%m%0%$%s$G$N$h$j4JC1$+$D0BA4$JG'>Z(B:$B@\B3@h$N(B + ftp $B%5!<%P$,MW5a$7$F$$$k$N$K!"(BURL $B$H$7$F(B ftp $B$K%f!<%6L>$H(B + $B%Q%9%o!<%I$,;XDj$5$l$F$$$J$$>l9g!"(BApache $B$O(B "[401] Authorization + Required" $B%9%F!<%?%9$rJV$9$h$&$K$J$j$^$7$?!#$3$N%9%F!<%?%9%3!<%I$r(B + $B%/%i%$%"%s%H$,o$O!V%f!<%6L>$H%Q%9%o!<%I$rF~NO(B + $B$7$F$/$@$5$$!W$H$$$&%@%$%"%m%0$rI=<($7!"$=$3$GF~NO$5$l$?(B + $B%f!<%6G'>Z$rMQ$$$?%j%/%(%9%H$,:F$S9T$J$o$l$^$9!#$3$&$9$k$3$H$G!"(B + $B%j%/%(%9%H(B URL $B$KG'>Z>pJs$r4^$^$;$F;XDj$9$kJ}K!(B ($B8E$$(B proxy + $B%5!<%P$G$OJ?J8$G%m%0$K5-O?$5$l$F$7$^$&2DG=@-$,$"$j$^$9(B) + $B$h$j$b + +
    • $B?75,$N(B AllowCONNECT $B%G%#%l%/%F%#%V$K$h$j!"(Bproxy + CONNECT $B%a%=%C%I$,@\B32DG=$J%]!<%H$,;XDj$G$-$k$h$&$K$J$j$^$7$?!#(B + $B$3$l$K$h$j!"(BApache 1.3.2 $B0JA0$G$O%(%i!<%a%C%;!<%8$,JV$5$l$F$$$?(B + https://some.server:8443/ $B$K$D$$$F(B proxy + $B$9$k$3$H$,$G$-$k$h$&$K$J$j$^$9!#(B
    • + +
    • RFC2068 $B$G;XDj$5$l$F$$$k(B HTTP/1.1 $B$N(B "Via:" $B%X%C%@$r(B + $B%5%]!<%H$9$k$h$&$K$J$j$^$7$?!#?75,$N(B ProxyVia + $B%G%#%l%/%F%#%V$G(B "Via:" $B$N%5%]!<%H$N%*%s(B/$B%*%U$r@Z$jBX$($k$3$H$,$G$-$^$9!#(B + $B$^$?!"%W%i%$%P%7!<>e$NM}M3$+$i!"30$K=P$F9T$/%X%C%@$+$i(B "Via:" + $B$r:o$k$h$&$K$9$k$3$H$,$G$-$^$9!#(B
    • + +
    • HTTP/1.1 $B$G5,Dj$5$l$F$$$k(B "Max-Forwards:" TRACE + $B%X%C%@$r%5%]!<%H$9$k$h$&$K$J$j$^$7$?!#$=$l$K$h$j!"(B($BB>$N(B proxy + $B%5!<%P$G$b%5%]!<%H$7$F$$$l$P(B) $B%W%m%-%7!<$NO":?$r$?$I$C$F(B + $B%j%/%(%9%H$N%Q%9$r%H%l!<%9$9$k$3$H$,$G$-$^$9!#(B
    • + +
    • NoProxy + $B%G%#%l%/%F%#%V$H(B ProxyDomain$B%G%#%l%/%F%#%V$,DI2C$5$l$^$7$?!#(B + $B%$%s%H%i%M%C%H$G$NMxMQ$KJXMx$G$9!#(B
    • + + +
    • ProxyPassReverse $B%G%#%l%/%F%#%VL?Na$,?75,$KDI2C$5$l$^$7$?!#(B + $B$3$l$K$h$j!"(BHTTP $B$N%j%@%$%l%/%H%l%9%]%s%9$K$*$1$k(B Location: + $B%X%C%@Cf$N(B URL $B$rD4@0$9$k$3$H$,$G$-$^$9!#(B
    • + +
    • FTP $B%5!<%P$N%G%#%l%/%H%j%D%j!<$G$N0\F0$,!"$h$j4JC1$K$J$j$^$7$?!#(B
    • +
    +
    + +
    mod_include$B$NJ8;zNsHf3S$N3HD%(B
    +
    + + +
    $BJ8;zNs$K4p$E$$$?(B server-side include (SSI) $B$N%U%m!<@)8f(B + $B%G%#%l%/%F%#%V$KL$K~(B (<)$B!"0J2<(B (<=)$B!"$h$jBg$-$$(B (>)$B!"(B + $B0J>e(B (>=) $B$,4^$a$i$l$^$7$?!#0JA0$OEy$7$$$+Ey$7$/$J$$$+$N(B + $BHf3S$7$+$G$-$^$;$s$G$7$?!#(B
    + + +
    ServerRoot $B$+$i$NAjBP%Q%9$G$N(B auth $B%U%!%$%kL>;XDj(B
    + +
    $BMM!9$JG'>Z%b%8%e!<%k$N(B auth $B%U%!%$%kL>$N;XDj$O!"(B + $B%U%k%Q%9$GL5$$>l9g$O(B ServerRoot $B$+$i$NAjBP%Q%9$H$7$F(B + $B07$o$l$k$h$&$K$J$j$^$7$?!#(B
    + + +
    $B%G%#%l%/%H%j$N%$%s%G%C%/%9$N3HD%(B:($BLuCm(B: mod_autoindex)
    + +
    +
      +
    • $B%3!<%I$NJ,3d(B: mod_dir + $B%b%8%e!<%k$,!"%G%#%l%/%H%j$N%$%s%G%C%/%9%U%!%$%k$r07$&(B mod_dir $B$H!"(B + $B%G%#%l%/%H%jFb$N%U%!%$%k0lMw$r:n@.$9$k(B mod_autoindex + $B$NFs$D$KJ,3d$5$l$^$7$?!#$3$l$K$h$j!"%/%j%F%#%+%k$J%5!<%P$+$i(B + $B%$%s%G%C%/%9$N5!G=$r30$9$3$H$,$G$-$^$9!#(B
    • + +
    • $B%=!<%H2DG=(B: $B%+%i%`$N%?%$%H%k$r(B + $B%/%j%C%/$9$k$H$=$N%+%i%`CM$K$h$k%j%9%H$N%=!<%H$r9T$J$$$^$9!#(B + $B$3$N5!G=$O(B IndexOptions $B$N(B SuppressColumnSorting + $B%-!<%o!<%I$GL58z$K$G$-$^$9!#(B +
    • + +
    • README.html $B%U%!%$%k$K(B HTML $B$N%X%C%@$,5-=R$5$l$F$$$k>l9g$O!"(B + SuppressHTMLPreamble + $B$r;H$&$3$H$,$G$-$^$9!#(B +
    • + +
    • The IndexOptions + $B%G%#%l%/%F%#%V$O!"%-!<%o!<%I0z?t$KBP$7$F(B + $B%$%s%/%j%a%s%?%k%W%l%U%#%C%/%9$r;HMQ$G$-$k$h$&$K$J$j$^$7$?(B + (Options $B%G%#%l%/%F%#%V$HF1MM$K!"(B + $B5!G=$KBP$9$k%-!<%o!<%I$N5!G=$NDI2C$r(B +/- $B$G;XDj$7$^$9(B)$B!#(B + $B$3$l$K$h$j!"F1$8%G%#%l%/%H%j$KE,MQ$5$l$kJ#?t$N(B IndexOptions + $B%G%#%l%/%F%#%V$r0l$D$K$^$H$a$k$3$H$,$G$-$^$9!#(B
    • + +
    • IconHeight $B$H(B IconWidth + $B$G%G%#%l%/%H%j$N0lMwI=<($G$N(B <IMG> + $B%?%0$N(B height $BB0@-$H(B width $BB0@-$r@_Dj$G$-$^$9!#(B +
    • + +
    • IndexOptions + $B%G%#%l%/%F%#%V$K?75,$KDI2C$5$l$?(B NameWidth $B%-!<%o!<%I$G!"(B"$B6E$C$?(B" $B%G%#%l%/%H%jFbMF0lMw(B $B$N7e?t$r@_Dj$G$-$^$9!#(B + $B%"%9%?%j%9%/(B `*' $B$K@_Dj$9$k$H!"L>A0(B ($BLuCm(B: Name $B$NItJ,(B) + $B$NI}$O<+F0E*$KD4@0$5$l$^$9!#(B
    • + +
    • FancyIndexing $B%G%#%l%/%F%#%V$O@_Dj:Q$_$N(B + IndexOptions + $B%G%#%l%/%F%#%V$N8z2L$rCV$-49$($F$7$^$&$3$H$J$/!"@5$7$/(B + IndexOptions FancyIndexing + $B$HF1$88z2L$K$J$k$h$&$K$J$j$^$7$?!#(B
    • + +
    • 1.3.15 $B$+$i$O!"(BIndexOptions $B$K(B TrackModified $B%G%#%l%/%F%#%V$,4^$^$l$F$$$k>l9g$O!"%5!<%P$O%G%#%l%/%H%j$N(B + $B%j%/%(%9%H$re$7$^$9!#$3$N5!G=$O +
    +
    + +
    CGI $B%9%/%j%W%H$N=PNO$N%P%C%U%!%j%s%0$N8:>/(B
    + +
    $B0JA0$N%P!<%8%g%s$N(B Apache $B$G$O!"(BCGI $B%9%/%j%W%H$+$i$N=PNO$O!"(B + $B%5!<%P$,FbItE*$K%P%C%U%!$r$7$F$$$F!"%P%C%U%!$,0lGU$K$J$k$+(B CGI + $B%9%/%j%W%H$,=*N;$9$k$^$G$O%/%i%$%"%s%H$KAw$i$l$^$;$s$G$7$?!#(B + Apache 1.3 $B$G$O!"%/%i%$%"%s%H$X$N%G!<%?$N%P%C%U%!$O!"(B + $B%P%C%U%!Cf$K2?$+$,$"$C$F!"%5!<%P$,%9%/%j%W%H$+$i$N$5$i$J$k=PNO$r(B + $BBT$C$F$$$k$H$-$K$$$D$G$b%U%i%C%7%e$5$l$^$9!#$3$l$K$h$j!"(BCGI + $B%9%/%j%W%H$OD9$$=hM}A`:n$N4V$KItJ,E*$J%9%F!<%?%9Js9p$,2DG=$K$J$j$^$9!#(B +
    + +
    Alias + $B$H(B Redirect $B$G$N@55,I=8=$N%5%]!<%H(B +
    + +
    $B?75,$N(B AliasMatch, + ScriptAliasMatch, + $B$H(B RedirectMatch + $B%G%#%l%/%F%#%V$G!"@55,I=8=$G$N%Q%?!<%s%^%C%A$r;XDj$G$-$k$h$&$K$J$j$^$7$?!#(B + $B99$K!"?75,$N(B <DirectoryMatch>, + <LocationMatch>, + <FilesMatch> + $B%;%/%7%g%s$K$h$j!"(B + $B@55,I=8=$rMQ$$$?%;%/%7%g%s;XDj$,$G$-$k?7$7$$9=J8$,Ds6!$5$l$^$9!#(B
    + +
    mod_info $B$X$N(B AddModuleInfo + $B%G%#%l%/%F%#%V$NDI2C(B
    + +
    $B;XDj$5$l$?%b%8%e!<%k$K$D$$$F!"I=<($5$;$kDI2C>pJs$r;XDj$G$-$k$h$&$K(B + $B$J$j$^$7$?!#(B
    + +
    TransferLog $B$,L5$$>l9g$N%m%0<}=8$NM^@)(B +
    + +
    TransferLog $B%G%#%l%/%F%#%V$,L5$$>l9g$O%m%0$O(B + $B<}=8$5$l$^$;$s!#$3$l$OB>$N%m%0MQ%b%8%e!<%k$H$N6&MQ$r%5%]!<%H$7$^$9!#(B +
    + +
    $B%m%0$N=q<0$KL>A0$rIU$1$k5!G=(B
    + +
    LogFormat + $B%G%#%l%/%F%#%V$,3HD%$5$l!"FCDj$N%m%0%U%)!<%^%C%H$K%K%C%/%M!<%`$r(B + $BIU$1$k$3$H$r2DG=$K$J$j$^$7$?!#Kh2s%m%0%U%)!<%^%C%H$NJ8;zNs$r=q$/Be$o$j$K!"(B + $B$3$N%K%C%/%M!<%`$rB>$N(B LogFormat $B%G%#%l%/%F%#%V$N;XDj$d(B + CustomLog $B%G%#%l%/%F%#%V$N;XDj$G;H$&$3$H$,$G$-$^$9!#(B +
    + +
    $B>r7oIU$-%m%0<}=8(B
    + +
    mod_log_config $B$,4D6-JQ?t$K4p$E$$$?%m%0<}=8$r%5%]!<%H(B + $B$9$k$h$&$K$J$j$^$7$?!#(Bmod_log_referer $B$H(B mod_log_agent + $B$O;HMQ$7$J$$$3$H$,?d>)$5$l$F$$$^$9!#(B
    + +
    mod_cern_meta + $B$r%G%#%l%/%H%jKh$K@_Dj2DG=(B
    + +
    mod_cern_meta + $B$r%G%#%l%/%H%jKh$K@_Dj$9$k$3$H$,$G$-$k$h$&$K$J$j$^$7$?!#(B
    + +
    RewriteMap$B%G%#%l%/%F%#%V$N?7$7$$%^%C%W%?%$%W(B +
    + +
    mod_rewrite $B$N(B RewriteMap + $B%G%#%l%/%F%#%V$K?7$7$$%^%C%W7?(B `Randomized Plain Text' $B$H(B + `Internal Function' $B$,DI2C$5$l$^$7$?!#$3$l$i$N%^%C%W7?$O(B + $BFs$D$N5!G=$rDs6!$7$^$9(B: $B0l$D$O!"=q$-49$(MQ%^%C%W$G;2>H$5$l$k(B + $BCM$+$iBP1~$9$kCM$r%i%s%@%`$KA*Br$9$k$3$H$,$G$-$k$h$&$K$J$j$^$7$?(B + (Reverse Proxy $B$K$*$$$F!"%P%C%/%(%s%I$N%5!<%P$rA*$V>l9g$KJXMx$G$9(B)$B!#(B + $B$b$&0l$D$O!"(BURL $B$N0lIt$rBgJ8;z$+>.J8;z$N$I$A$i$+$KJQ49$9$k$3$H$,(B + $B$G$-$k$h$&$K$J$j$^$7$?(B (mod_rewrite $B$rMQ$$$FBg5,LO$J(B + $B%P!<%A%c%k%[%9%F%#%s%0$r9T$J$&>l9g$KJXMx$G$9(B)$B!#(B
    + +
    CIDR $B$H(B Netmask $B$K$h$k%"%/%;%9@)8f(B
    + +
    mod_access + $B%G%#%l%/%F%#%V$O(B CIDR (Classless Inter-Domain Routing) + $B7A<0$N%W%l%U%#%C%/%9$N;XDj$H!"(BIP $B$N%"%/%;%9%j%9%H$N@)8f$r(B + $B$h$j:Y$+$/@_Dj$G$-$k%M%C%H%^%9%/$r%5%]!<%H$9$k$h$&$K$J$j$^$7$?!#(B
    +
    +
    + +

    API $B$NDI2C$HJQ99(B

    + +

    $B%b%8%e!<%k:npJs(B:

    + +
    +
    child_init
    + +
    "heavy-weight process" $B$K$D$-(B1$B2s8F$P$l$k(B Apache API + $B$N?75,%U%'!<%:$G$9!#$3$N8e$G%j%/%(%9%H$N=hM}$r9T$J$$$^$9!#(B + $B$3$l$r$9$k$3$H$G!"%b%8%e!<%k$,%W%m%;%9Kh$K9T$J$&I,MW$N$"$k$3$H$r(B + $B$9$Y$F@_Dj$9$k$3$H$,$G$-$^$9!#(B + $B$?$H$($P!"%G!<%?%Y!<%9$X$N@\B3$,$"$j$^$9!#(B
    + +
    child_exit
    + +
    "heavy-weight process" $B$K$D$-(B1$B2s8F$P$l$k?75,$N%U%'!<%:$G!"(B + $B%W%m%;%9$N=*N;;~$K8F$P$l$^$9!#CWL?E*$J>u67$G$O(B + ($B$?$H$($P%;%0%a%s%F!<%7%g%s%U%)!<%k%H$d(B kill -9 $B$5$l$?>l9g(B) + $B8F$P$l$J$$$3$H$KCm0U$7$F$/$@$5$$!#(Bchild_init $B4X?t$H(B + child_exit $B4X?t$O!";R%W%m%;%9$N@8B84|4V$H(B (Apache + $B$,2sI|$G$-$k8+9~$_$N$J$$40A4$KCWL?E*$J%$%Y%s%H$r=|$$$F(B) + $BF1$8@8B84|4V$r;}$D%W!<%k$rEO$5$l$^$9!#BP>HE*$K!"%b%8%e!<%k$N(B + init $B4X?t$O?F%W%m%;%9$,=*N;$7$?$j:F5/F0$7$?$j$9$k$H(B + $B>CLG$9$k%W!<%k$rEO$5$l$^$9!#(B
    + +
    child_terminate
    + +
    $B8=:_$N%j%/%(%9%H$r=*N;$7$?8e$K;R%W%m%;%9$,=*N;$9$Y$-$G$"$k$3$H$r(B + $B<($9$?$a$K;R%W%m%;%9$G;H$o$l$^$9!#(B
    + +
    register_other_child
    + +
    http_main.h $B$r;2>H$7$F$/$@$5$$!#(B + $B$3$l$O?F%W%m%;%9$G;HMQ$7!"4F;k$9$k;R%W%m%;%9$rEPO?$7$^$9!#(B + $B?F%W%m%;%9$OM?$($i$l$?%3!<%k%P%C%/4X?t$K>uBV$rJs9p$7$^$9!#(B + $B$3$N4X?t$r;HMQ$9$k$H!"%b%8%e!<%k$,@8@.$9$k;R%W%m%;%9$O!"(B + httpd $B$NB>$N;R%W%m%;%9$H6&$K4F;k$5$l$k$h$&$K$J$j$^$9!#(B
    + +
    piped_log
    + +
    http_log.h $B$r;2>H$7$F$/$@$5$$!#$3$N(B API + $B$O!"%Q%$%W$5$l$?%m%0$rl9g$O(B ($B$D$^$j(B + $B8=;~E@$G$O(B Unix)$B!"?.Mj@-$N$"$k%Q%$%W$5$l$?%m%0$r + +
    $B%9%3%"%\!<%I$N7A<0JQ99(B
    + +
    $B%9%3%"%\!<%I$N7A<0$O$+$J$jJQ99$5$l$^$7$?!#(B + $BIaDL%9%3%"%\!<%I$O(B "private" $B$J%$%s%?!<%U%'!<%9$@$H$5$l$F$$$k$N$G!"(B + $B$3$3$G$O>R2p$9$k$K$H$I$a$F$*$-$^$9!#(B
    + +
    set_last_modified + $B$r;0$D$KJ,3d(B
    + +
    $B8E$$(B set_last_modified $B4X?t$O!"(B + Last-Modified $B%X%C%@$d!"(BEtag $B%X%C%@$N@_Dj!"(B + (If-Modified-Since $B$N$h$&$J(B ) $B>r7oIU$-%j%/%(%9%H$N=hM}$J$I!"(B + $BJ#?t$N;E;v$r$7$F$$$^$7$?!#$3$l$i$N5!G=$O;0$D$N4X?t!"(B + set_last_modified, set_etag, + meets_conditions $B$KJ,3d$5$l$^$7$?!#(B + meets_conditions $B4X?t$N=hM}$r4JC1$K$9$k$?$a$K(B + requrest_rec $B9=B$BN$K(B mtime + $B$,%U%#!<%k%I$,DI2C$5$l$^$7$?!#(B
    + +
    $B%(%i!<%m%0<}=8MQ$N?75,4X?t(B: + ap_log_error
    + +
    $B%m%0<}=8MQ$N8E$$4X?t$O$9$Y$FHs?d>)$H$J$C$F$$$^$9!#(B + $B$3$l$i$N4X?t$r(B ap_log_error + $B$H$$$&C1FH$N4X?t$GCV$-49$($h$&$H$7$F$$$^$9!#(B + $B$3$l$O$^$@:n6HCf$G$9!#(B
    + +
    $B@_Dj2r@O$N$?$a$N(B + set_file_slot
    + +
    set_file_slot $B%k!<%A%s$O!"(B + $B@dBP%Q%9$K$J$C$F$$$J$$%Q%9$NA0$K(B ServerRoot + $B$rDI2C$9$k$?$a$NI8=`%k!<%A%s$rDs6!$7$^$9!#(B
    + +
    post_read_request + $B%b%8%e!<%k(B API
    + +
    $B$3$N%j%/%(%9%H%U%'!<%:$O%j%/%(%9%H(B ($B%X%C%@(B) + $B$rFI$_9~$s$@D>8e$d!"FbIt%j%@%$%l%/%H$r:n@.$7$?D>8e$K5/$3$j$^$9!#(B + $B$=$N8e$NCJ3,$K1F6A$9$k4D6-JQ?t$r@_Dj$9$k$?$a$K0lHVLr$KN)$A$^$9!#(B +
    + +
    psocket $B$H(B + popendir
    + +
    socket $B$N@8@.$K$*$$$F!"6%9g>uBV$,5/$3$i$J$$$h$&$K%j%=!<%9$N(B + $B%H%i%C%-%s%0$r$9$k(B psocket $B4X?t$H(B pclosesocket + $B4X?t$,MQ0U$5$l$^$7$?!#F1MM$K!"(Bpopendir $B4X?t$H(B + pclosedir $B4X?t$O%G%#%l%/%H%j$NFI$_9~$_$rJ]8n$7$^$9!#(B
    + +
    is_initial_req
    + +
    $B%j%/%(%9%H$,=i4|%j%/%(%9%H(B ($B$9$J$o$A(B$B!"(B + $B%/%i%$%"%s%H$+$iMh$k$b$N(B)$B$G$"$k$+$I$&$+$rH=Dj$7$^$9!#(B
    + +
    kill_only_once
    + +
    ap_spawn_child $B4X?t$N%*%W%7%g%s$G!"(B + Apache $B$,;R%W%m%;%9$r@Q6KE*$K(B kill $B$7$h$&$H$9$k$3$H$rM^@)$7$^$9!#(B +
    + +
    alloc $B%G%P%C%0MQ%3!<%I(B
    + +
    ALLOC_DEBUG + $B$rDj5A$9$k$H86;OE*$J%a%b%j%G%P%C%,$,Ds6!$5$l$^$9!#(B + $B$3$l$r;H$&>l9g!"@8B8Cf$N%5!<%P$KM?$($k1F6A$,>/$J$/:Q$_$^$9!#(B + $B$=$l$O!"3d$jEv$F$i$l$F$k%a%b%j$*$h$S2rJ|$5$l$k%a%b%j$N%P%$%H?t$r$9$Y$F(B + 0xa5 $B$K@_Dj$7$^$9!#(BALLOC_USE_MALLOC $B$rDj5A$9$k$H!"(B + alloc $B%3!<%I$,$=$l$>$l$N%*%V%8%'%/%H$KBP$7$F(B malloc() + $B$H(B free() $B$r;H$&$h$&$K$J$j$^$9!#$3$l$O$:$C$H%3%9%H$,9b$/!"(B + Electric Fence $B$d(B Purify $B$N$h$&$J%D!<%k$r;H$C$F%F%9%H$r$9$k$H$-$K$N$_(B + $B;H$o$l$k$Y$-$b$N$G$9!#>\:Y$O(B main/alloc.c $B$r;2>H$7$F$/$@$5$$!#(B
    + +
    ap_cpystrn
    + +
    $B?7$7$$(B strncpy $B$N$h$&$J$b$N$G$9$,!"%P%C%U%!A4BN$r(B + 0 $B$GK~$?$9I,MW$,L5$$$?$a$K(B strncpy + $B$h$j$:$C$HB.$$E@$G + +
    table_addn, table_setn, + table_mergen
    + +
    $B$3$l$i$N?7$7$$4X?t$O!"0z?t$KBP$7$F(B pstrdup + $B$r8F$S(B$B$^$;$s(B$B!#$3$l$OBg$-$JB.EY8~>e$r$b$?$i$7$^$9!#(B + $B%3!<%I$,$=$l$i$rE,@Z$K;HMQ$7$F$$$k$3$H$r3N$+$a$k$?$a$N%G%P%C%0$N(B + $B%5%]!<%H$b$"$j$^$9!#>\$7$$>pJs$O(B src/CHANGES + $B$r;2>H$7$F$/$@$5$$!#(B
    + +
    construct_url
    + +
    $B$3$N4X?t$N%W%m%H%?%$%W$,(B server_rec * $B$+$i(B + request_rec * $B$r0z?t$H$7$F + +
    get_server_name, + get_server_port
    + +
    $B%j%/%(%9%H$KBP1~$9$k%5!<%PL>$H%]!<%HHV9f$rUseCanonicalName + $B%G%#%l%/%F%#%V$r07$&$?$a$N%i%C%Q!<$G$9!#(B +
    + +
    ap_bspawn_child $B$H(B + ap_call_exec $B$N%W%m%H%?%$%W$NJQ99(B
    + +
    Win32 $B$G;R%W%m%;%9$,@5$7$/F0:n$9$k$h$&$K!"(B + spawn $B4X?t(B (ap_bspawn_child + $B$KEO$5$l$k(B) $B$H(B ap_call_exec $B4X?t$K(B + child_info * $B$rDI2C$7$^$7$?!#(B + $B$^$?!"(Bspawn_child_err $B$rC1$K(B + ap_spawn_child $B$GCV$-49$(!"(B + spawn_child_err_buff $B$rC1$K(B + ap_bspawn_child $B$GCV$-49$($k$3$H$G!"(B + $B4X?tL>$r>/$7@0M}$7$^$7$?!#(B
    + +
    ap_add_version_component() +
    + +
    $B$3$N(B API $B4X?t$O(B Server: + $B%X%C%@$K=PNO$5$l$k%5!<%P%H!<%/%s$r!"(B + $B%b%8%e!<%k<+?H$,DI2C$G$-$k$h$&$K$7$^$9!#0JA0$N(B 1.3beta + $B%P!<%8%g%s$G$O%3%s%Q%$%k;~$K(B #define $B$5$l$?(B + SERVER_SUBVERSION $B$rDj5A$7$F$3$N5!G=$rSeverTokens + $B%G%#%l%/%F%#%V$G@)8f$5$l$^$9!#(B
    +
    +
    + +

    $B$=$NB>$N3HD%(B

    + +
    +
    BS2000/OSD $B$r
    + +
    ($BLuCm(B: $B%a%$%s%U%l!<%`%^%7%s$X$N0\?"$N(B ) $Be$G(B + BS2000/OSD $B%*%Z%l!<%F%#%s%0%7%9%F%`$r + +
    AccessFileName + $B$N3HD%(B
    + +
    AccessFileName $B%G%#%l%/%F%#%V$O!"J#?t$N%U%!%$%kL>$r(B + $B + +
    HostnameLookups $B$N%G%U%)%k%H$r(B "Off" $B$KJQ99(B
    + +
    HostnameLookups + $B%G%#%l%/%F%#%V$O%G%U%)%k%H$G(B "Off" $B$K$J$j$^$7$?!#L@<(E*$K(B on + $B$K$7$J$$8B$j!"%5!<%P$O(B IP $B%"%I%l%9$NL>A02r7h$r9T$J$o$J$$$H$$$&$3$H$G$9!#(B + $B$3$NJQ99$O%$%s%?!<%M%C%H$K$*$$$F$rITI,MW$J(B DNS $B%H%i%U%#%C%/$r(B + $BH/@8$5$;$J$$$?$a$K9T$J$o$l$^$7$?!#(B
    + +
    DNS $B$NFs=E5U0z$-$N6/@)5!G=(B
    + +
    HostnameLookups + $B%G%#%l%/%F%#%V$O(B DNS $B$NFs=E5U0z$-$r%5%]!<%H$9$k$h$&$K$J$j$^$7$?!#(B + (tcp_wrapper $B$NMQ8l$G$O(B PARANOID $B$H$7$FCN$i$l$F$$$k$b$N$G$9(B)$B!#(B + IP $B%"%I%l%9$KBP$7$F5U0z$-$r9T$J$$!"$5$i$K@50z$-$7$FF@$i$l$k(B IP + $B%"%I%l%9$N%j%9%H$K85$N(B IP $B%"%I%l%9$,4^$^$l$F$$$l$P!"(B + $BFs=E5U0z$-$N%F%9%H$rDL2a$7$^$9!#(BHostnameLookup $B$N@_Dj$K4X$o$i$:!"(B + mod_access $B%"%/%;%9@)8f$N@_Dj$G(B DNS + $BL>$r;HMQ$7$F$$$k>l9g!"$9$Y$F$NL>A0$,(B DNS $B$NFs=E5U0z$-%F%9%H$K9g3J$9$k(B + $B$3$H$r(B$BMW5a(B$B$7$^$9!#(B($B0JA0$N%P!<%8%g%s$N(B Apache $B$G$O!"(BDNS + $B$NFs=E5U0z$-$r2DG=$K$9$k$?$a$K%3%s%Q%$%k;~$N%9%$%C%A$,I,MW$G$7$?!#(B)
    + +
    LogLevel $B$H(B syslog $B$N%5%]!<%H(B
    + +
    Apache $B$O(B$B%(%i!<$N%m%0<}=8%l%Y%k$r@_Dj(B + $B$G$-$k5!G=$,DI2C$5$l$^$7$?!#$^$?!"(Bsyslogd(8) + $B$K$h$k%(%i!<$N%m%0<}=8(B$B$r%5%]!<%H$9$k$h$&$K$J$j$^$7$?!#(B
    + +
    $BI8=`F~NO(B/$BI8=`=PNO(B/$BI8=`%(%i!<=PNO$+$i$N@ZN%$7(B
    + +
    Apache $B$O!"%V!<%H;~$KI8=`F~NO(B/$BI8=`=PNO(B/$BI8=`%(%i!<=PNO$r(B + $B@Z$jN%$9$h$&$K$J$j$^$7$?!#I8=`%(%i!<=PNO$O!"@_Dj%U%!%$%k$N(B + $BFI$_9~$_$K@.8y$9$k$^$G@Z$jN%$7$^$;$s!#$G$9$+$i!"@_Dj%U%!%$%k$N(B + $B%(%i!<$OL\$K$9$k$3$H$K$J$k$G$7$g$&!#$3$l$K$h$j!"(Brsh $B$d(B crontab + $B$G(B Apache $B$r5/F0$7$d$9$/$J$C$F$$$k$O$:$G$9!#(B
    + +
    2000 $BG/LdBj$N2~A1(B
    + +
    mod_include + $B$G;H$o$l$k%G%U%)%k%H$N(B timefmt + $BJ8;zNs$,!"0JA0;H$o$l$F$$$?(B 2 $B7e$G$O$J$/(B 4 $B7e$r;H$&$h$&$K(B + $B=$@5$5$l$^$7$?!#(Bmod_autoindex $B%b%8%e!<%k$b(B FancyIndex + $B$5$l$?%G%#%l%/%H%j0lMwI=<($K(B 4 $B7e$NG/$rI=<($9$k$h$&$K=$@5$5$l$^$7$?!#(B +
    + +
    $B6&DL$N%k!<%A%s$rFHN)$7$?%i%$%V%i%j$KJ,N%(B
    + +
    $B%*%Z%l!<%F%#%s%0%7%9%F%`$K$h$k%i%$%V%i%j$N%k!<%A%s$N0c$$$r(B + $BJd40$7$?$jCV$-49$($?$j$9$k4X?t$d%k!<%A%s$,!"(BApache + $B%W%m%8%'%/%H$N$?$a$K?tB?$/3+H/$5$l$F$$$^$9!#$[$H$s$I$N$b$N$O(B + Apache $B%5!<%P<+?H$G$N$_$G;HMQ$5$l$F$$$^$9$,!"Cf$K$O(B + htdigest + $B$N$h$&$J%5%]!<%HMQ%"%W%j%1!<%7%g%s$G;2>H$5$l$F$$$k$b$N$b$"$j$^$9!#(B + $B$=$7$F!"$=$N%k!<%A%s$O%5!<%P$K$N$_AH9~$^$l$F$$$k$?$a$K!"(B + $B$3$N$h$&$JJL%"%W%j%1!<%7%g%s$O%S%k%I$K<:GT$7$^$9!#$3$l$i$N%k!<%A%s$r(B + $BJL$N%5%V%G%#%l%/%H%j$GJL$N%i%$%V%i%j$K0\F0$7$^$7$?!#$3$l$K$h$j!"(B + $B%5!<%P$@$1$G$J$/B>$N%"%W%j%1!<%7%g%s$+$i$b;H$($k$h$&$K$J$j$^$7$?!#(B + src/ap/ $B%5%V%G%#%l%/%H%j$r;2>H$7$F$/$@$5$$!#(B +
    + +
    $B?7$7$$(B ServerSignature + $B%G%#%l%/%F%#%V(B
    + +
    $B$3$N%G%#%l%/%F%#%V$O%5!<%P$,:n@.$7$?%Z!<%8(B ($B%(%i!<%I%-%e%a%s%H!"(B + FTP $B$N%G%#%l%/%H%jFbMF0lMw!"(Bmod_info $B$N=PNO(B $B$J$I(B) + $B$K%5!<%P$N%P!<%8%g%s$H%P!<%A%c%k%[%9%HL>$r4^$`9T$r%*%W%7%g%s$GDI2C$7$^$9!#(B + $B$3$l$K$h$j!"FC$K(B pxory $B$NO":?(B ($B%$%s%H%i%M%C%H$N4D6-$G$O$h$/$"$j$^$9(B) + $B$,$"$k$H$-$K!"$I$N%5!<%P$,%(%i!<%a%C%;!<%8$r=P$7$?$N$+$r%f!<%6$,(B + $B4JC1$KCN$k$3$H$,$G$-$k$h$&$K$J$j$^$9!#(B
    + +
    $B?7$7$$(B UseCanonicalName $B%G%#%l%/%F%#%V(B +
    + +
    $B$3$N%G%#%l%/%F%#%V$O!"(BApache $B$,$I$N$h$&$K<+J,<+?H$r;2>H$9$k(B + URL $B$r:n@.$9$k$+$r@)8f$7$^$9!#0JA0$N(B Apache $B$G$O!"(B ServerName $B%G%#%l%/%F%#%V$H(B Port $B%G%#%l%/%F%#%V$r>o$K;XDj$9$k$3$H$G(B + "$B@55,2=$5$l$?(B" $B%5!<%P$NL>$r@8@.$7$F$$$^$7$?!#(BUseCanonicalName + off $B$G!"%/%i%$%"%s%H$+$iDs6!$5$l$?%[%9%HL>$H%]!<%HHV9f$,$"$k>l9g!"(B + Apache $B$O$=$l$r;HMQ$9$k$h$&$K$J$j$^$9!#(B
    + +
    SERVER_VERSION $B$NDj5A$NCj>]2=$H(B + $B%5!<%P$N%S%k%IF|;~$NDI2C(B
    + +
    $B0JA0$N%P!<%8%g%s$G$O!"(BSERVER_VERSION + $B$GDj5A$5$l$?CM$rDL$8$F!"%b%8%e!<%k$O(B Apache + $B%5!<%P$N%P!<%8%g%s$r;2>H$9$k$3$H$,$G$-$^$7$?!#(B + $B%3%"%5!<%P$H%b%8%e!<%k$,0c$&;~$K%3%s%Q%$%k$5$l$?>l9g$G$b(B + $B$3$NCM$N0l4S@-$rJ]$D$?$a$K!"$3$N>pJs$O%3%"(B API $B%k!<%A%s(B + ap_get_server_version() + $B$GF@$k$3$H$,$G$-$k$h$&$K$J$j$^$7$?!#(BSERVER_VERSION + $B%7%s%\%k$N;EMM$OHs?d>)$G$9!#(B + $B$^$?!"(Bap_get_server_built() $B$O%3%"%5!<%P$,%j%s%/$5$l$?(B + $B;~9o$rI=$9J8;zNs$rJV$7$^$9!#(B
    + +
    $B%5!<%P$N(B ID + $B$K%*%Z%l!<%F%#%s%0%7%9%F%`$r4^$a$k(B
    +
    + + +
    $B?7$7$$%G%#%l%/%F%#%V(B ServerTokens $B$K$h$j!"(B + $B%/%i%$%"%s%H$KAw$jJV$5$l$k(B Server + $B%l%9%]%s%9%X%C%@%U%#!<%k%I$NCM$r%&%'%V%^%9%?!<$,(B + $BJQ99$G$-$k$h$&$K$J$j$^$7$?!#(BServerTokens + $B%G%#%l%/%F%#%V$G$O!"%5!<%P$,F0:n$7$F$$$k%*%Z%l!<%F%#%s%0%7%9%F%`$N(B + $B\$7$9$.$J$$DxEY$N>pJs$r!"%b%8%e!<%k>pJs$HF1MM$K%5!<%P(B + ID $B$K4^$a$k$+$I$&$+$r@)8f$7$^$9!#(BApache 1.3 $B$G$O!"(B + $B$3$NDI2C$N>pJs$,%G%U%)%k%H$G4^$^$l$k$h$&$K$J$C$F$$$^$9!#(B +
    +
    +
    + +
    Netscape $B7A<0$N(B SHA1 + $B$G0E9f2=$5$l$?%Q%9%o!<%I$N%5%]!<%H(B
    +
    + +
    (Apache $B$KAH9~$^$l$F$$$k(B MD5 $B$d!"(BOS $B8GM-$N(B crypt(3) + $B4X?t$H0[$J$j(B) $B%Q%9%o!<%I$,(B SHA1 $B$G0E9f2=$5$l$k$h$&$J(B BasicAuth + $B%Q%9%o!<%IJ}<0$N0\9T$dE}9g$rB%?J$9$k$?$a!"(B{SHA1} + $B$,A0$KIU$$$F$$$k%Q%9%o!<%I$O(B Base64 $B$GId9f2=$5$l$?(B SHA1 + $B%Q%9%o!<%I$H$7$F2rpJs$d(B Netscape $B$N(B + ldap/ldif $B%(%s%H%j$rJQ49$9$k$?$a$N%f!<%F%#%j%F%#!<$O!"(B + support/SHA1 $B$K$"$j$^$9!#(B
    +
    + + + diff --git a/htdocs/manual/process-model.html.en b/htdocs/manual/process-model.html.en new file mode 100644 index 00000000000..ff61cf50279 --- /dev/null +++ b/htdocs/manual/process-model.html.en @@ -0,0 +1,67 @@ + + + + + + + Server Pool Management + + + + + + +

    Server Pool Management

    +
    + +

    We found that many people were using values for "MaxServers" + either too high or too low, and were hanging themselves on it. + The model we adopted is still based on long-lived + minimal-forking processes, but instead of specifying one number + of persistent processes, the web-master specifies a maximum and + minimum number of processes to be "spare" - every couple of + seconds the parent checks the actual number of spare servers + and adjusts accordingly. This should keep the number of servers + concurrently running relatively low while still ensuring + minimal forking.

    + +

    We renamed the current StartServers to MinSpareServers, + created separate StartServers parameter which means what it + says, and renamed MaxServers to MaxSpareServers (though the old + name still works, for NCSA 1.4 back-compatibility). The old + names were generally regarded as too confusing.

    + +

    The defaults for each variable are:

    +
    +MinSpareServers         5
    +MaxSpareServers         10
    +StartServers            5
    +
    + There is an absolute maximum number of simultaneous children + defined by a compile-time limit which defaults to 256 and a + "MaxClients" directive which specifies the number of + simultaneous children that will be allowed. MaxClients can be + adjusted up to the compile-time limit (HARD_SERVER_LIMIT, + defined in httpd.h). If you need more than 256 simultaneous + children, you need to modify both HARD_SERVER_LIMIT and + MaxClients. + +

    In versions before 1.2, HARD_SERVER_LIMIT defaulted to + 150.

    + +

    We do not recommend changing either of these values + unless:

    + +
      +
    1. You know you have the server resources to handle + more
    2. + +
    3. You use the machine for other purposes and must limit the + amount of memory Apache uses
    4. +
    + + + + diff --git a/htdocs/manual/process-model.html.html b/htdocs/manual/process-model.html.html new file mode 100644 index 00000000000..08fc55427c3 --- /dev/null +++ b/htdocs/manual/process-model.html.html @@ -0,0 +1,4 @@ + + + diff --git a/htdocs/manual/process-model.html.ja.jis b/htdocs/manual/process-model.html.ja.jis new file mode 100644 index 00000000000..e800ef5e73f --- /dev/null +++ b/htdocs/manual/process-model.html.ja.jis @@ -0,0 +1,68 @@ + + + + + + Server Pool Management + + + + + + + +

    $BM=Hw%5!<%P$N4IM}(B

    +
    + +

    $BB?$/$N?M$,(B "MaxServers" + $B$KBP$7$F9b$9$.$k$^$?$ODc$9$.$kCM$r@_Dj$7!"(B + $B$=$l$r;H$$B3$1$F$$$?$H$$$&$3$H$,$o$+$j$^$7$?!#(B + $B;dC#$,:NMQ$7$F$$$k%b%G%k$O!"(B + $B$J$k$Y$/(B fork $B$r:G>.$K$7!"%W%m%;%9$,D9$/@8B8$9$k$h$&$JJ}K!$K(B + $B4p$E$$$?$^$^$G$9$,!"(B + $B0JA0$N7h$^$C$??t$N;}B3E*$J%W%m%;%9$r;XDj$9$k$H$$$&J}K!$NBe$o$j$K!"(B + $B!VM=Hw!W$H$J$k%W%m%;%9$N:GBgCM$H:G>.CM$r%&%'%V%^%9%?!<$,(B + $B;XDj$G$-$k$h$&$K$7$^$7$?!#$D$^$j!"?F%W%m%;%9$,?tIC$4$H$KM=Hw$N(B + $B%5!<%P$N.8B$KM^$($D$D!"(B + $B%5!<%P$N?t$rHf3SE*>/$J$$>uBV$KJ]$D$3$H$,$G$-$k$O$:$G$9!#(B

    + +

    $B8=:_$N(B StartServers $B$O(B MinSpareServers $B$H$$$&L>A0$K$J$j!"(B + $BJL8D$K!"L>A0$NDL$j$N0UL#$r$b$D!"(BStartServers $B%Q%i%a!<%?$,:n@.$5$l!"(B + MaxServers $B$O(B MaxSpareServers $B$H$$$&L>A0$K$J$j$^$7$?(B ($B8E$$L>A0$b(B + NCSA 1.4 $B$+$i$N8_49@-$rJ]$D$?$a$K$^$@F0:n$7$^$9(B)$B!#(B + $B8E$$L>A0$O0lHL$KJ6$i$o$7$9$.$k$H9M$($i$l$F$$$^$7$?!#(B

    + +

    $B$=$l$>$l$N%G%U%)%k%H$NCM$O0J2<$N$H$*$j$G$9(B

    +
    +MinSpareServers         5
    +MaxSpareServers         10
    +StartServers            5
    +
    +

    $BF1;~$K5vMF$5$l$k;R%W%m%;%9$N?t$O%3%s%Q%$%k;~$K@)8B$5$l$k(B + $B@dBPE*$J:GBgCM(B ($B%G%U%)%k%H$G(B 256 $B$H$J$C$F$$$^$9(B) $B$H(B + "MaxClients" $B%G%#%l%/%F%#%V$K$h$jDj5A$5$l$^$9!#(B + MaxClients $B$O:GBg$G%3%s%Q%$%k;~$N@)8BCM(B (httpd.h $B$GDj5A$5$l$k(B + HARD_SERVER_LIMIT) $B$^$GD4@0$G$-$^$9!#F1;~$K(B 256 + $B0J>e$N;R%W%m%;%9$,I,MW$J>l9g$O(B HARD_SERVER_LIMIT $B$H(B MaxClients + $B$NN>J}$rJQ99$9$kI,MW$,$"$j$^$9!#(B +

    + +

    1.2 $B0JA0$N%P!<%8%g%s$G$O(B HARD_SERVER_LIMIT $B$N%G%U%)%k%H$O(B + 150 $B$K$J$C$F$$$^$9!#(B

    + +

    $B0J2<$,Ev$F$O$^$i$J$$>l9g$O!"(B + $B$3$NCM$N$I$A$i$+$rJQ99$9$k$3$H$OA&$a$i$l$^$;$s!#(B

    + +
      +
    1. $B$h$jB?$/$r07$&$?$a$N%5!<%P$N%j%=!<%9$,M-$k$3$H$,J,$+$C$F$$$k!#(B +
    2. + +
    3. $B%^%7%s$rB>$NL\E*$K$b;HMQ$9$k$N$G(B Apache $B$,;HMQ$9$k(B + $B%a%b%j$NNL$r@)8B$7$J$/$F$O$J$i$J$$!#(B
    4. +
    + + + diff --git a/htdocs/manual/programs/ab.html b/htdocs/manual/programs/ab.html new file mode 100644 index 00000000000..652fff0389d --- /dev/null +++ b/htdocs/manual/programs/ab.html @@ -0,0 +1,153 @@ + + + + + + + Manual Page: ab - Apache HTTP Server + + + + + + +

    Manual Page: ab

    + +
    +NAME
    +     ab - Apache HTTP server benchmarking tool
    +
    +SYNOPSIS
    +     ab [ -k ] [ -i ] [ -n requests ] [ -t timelimit ] [ -c  con-
    +     currency   ]   [   -p   POST   file   ]  [  -A  Authenticate
    +     username:password    ]    [    -P     Proxy     Authenticate
    +     username:password  ]  [  -H  Custom  header  ]  [  -C Cookie
    +     name=value ] [ -T content-type ] [ -v verbosity  ]  [  -w
    +     output HTML ] [ -x <table> attributes ] [ -X proxy[:port] ]
    +     [ -y <tr> attributes     ]   [     -z  <td>  attributes   ]
    +     [http://]hostname[:port]/path
    +
    +     ab [ -V ] [ -h ]
    +
    +DESCRIPTION
    +     ab is a tool for benchmarking the performance of your Apache
    +     HyperText  Transfer Protocol (HTTP) server.  It does this by
    +     giving you an indication of how  many  requests  per  second
    +     your Apache installation can serve.
    +
    +OPTIONS
    +     -k          Enable the HTTP KeepAlive feature; that is, per-
    +                 form  multiple requests within one HTTP session.
    +                 Default is no KeepAlive.
    +
    +     -i          Use an HTTP 'HEAD' instead of  the  GET  method.
    +                 Cannot be mixed with POST.
    +
    +     -n requests The number of requests to perform for the bench-
    +                 marking session.  The default is to perform just
    +                 one  single  request,  which   will   not   give
    +                 representative benchmarking results.
    +
    +     -t timelimit
    +                 The number of  seconds  to  spend  benchmarking.
    +                 Using  this  option automatically set the number
    +                 of requests  for  the  benchmarking  session  to
    +                 50000.   Use  this to benchmark the server for a
    +                 fixed period of time.  By default, there  is  no
    +                 timelimit.
    +
    +     -c concurrency
    +                 The number of simultaneous requests to  perform.
    +                 The default is to perform one HTTP request at a
    +                 time, that is, no concurrency.
    +
    +     -p POST file
    +                 A file containing data  that  the  program  will
    +                 send  to  the  Apache  server  in  any HTTP POST
    +                 requests. The contents of the file  should  look
    +                 like  name=value&something=other,  with  special
    +                 characters URL encoded.
    +
    +     -A Authorization username:password
    +                 Supply Basic Authentication credentials  to  the
    +                 server.  The username and password are separated
    +                 by a single ':', and  sent  as  uuencoded  data.
    +                 The  string  is  sent  regardless of whether the
    +                 server needs it; that is, has sent a 401 Authen-
    +                 tication needed.
    +
    +     -P Proxy-Authorization username:password
    +                 Supply Basic  Authentication  credentials  to  a
    +                 proxy  en-route.  The  username and password are
    +                 separated by a single ':', and sent as uuencoded
    +                 data.   The string is sent regardless of whether
    +                 the proxy needs it; that  is,  has  sent  a  407
    +                 Proxy authentication needed.
    +
    +     -C Cookie name=value
    +                 Add a 'Cookie:' line to the request.  The  argu-
    +                 ment  is  typically  a  'name=value'  pair. This
    +                 option may be repeated.
    +
    +     -H Header string
    +                 Append extra headers to the request.  The  argu-
    +                 ment  is typically in the form of a valid header
    +                 line, usually  a  colon  separated  field  value
    +                 pair,     for     example,     'Accept-Encoding:
    +                 zip/zop;8bit'.
    +
    +     -T content-type
    +                 The content-type header to use for POST data.
    +
    +     -v          Sets the verbosity level.   Level  4  and  above
    +                 prints information on headers, level 3 and above
    +                 prints response codes (for example,  404,  200),
    +                 and level 2 and above prints warnings and infor-
    +                 mational messages.
    +
    +     -w          Print out results in HTML tables.   The  default
    +                 table  is  two  columns wide, with a white back-
    +                 ground.
    +
    +     -x attributes
    +                 The string to use  as  attributes  for  <table>.
    +                 Attributes are inserted <table here >
    +
    +     -X proxy:port
    +                 Use the specified proxy server, running on the
    +                 specified port.
    +
    +     -y attributes
    +                 The string to use as attributes for <tr>.
    +
    +     -z attributes
    +                 The string to use as attributes for <td>.
    +
    +     -V          Display the version number and exit.
    +
    +     -h          Display usage information.
    +
    +BUGS
    +     There are  various  statically  declared  buffers  of  fixed
    +     length.  Combined  with  inefficient  parsing of the command
    +     line arguments, the response headers from  the  server,  and
    +     other external inputs, these buffers might overflow.
    +
    +     Ab does not  implement  HTTP/1.x  fully;  instead,  it  only
    +     accepts some 'expected' forms of responses.
    +
    +     The rather heavy use of strstr(3) by the  program  may  skew
    +     performance   results,   since   it   uses  significant  CPU
    +     resources.  Make sure that performance limits are not hit by
    +     ab before your server's limit is reached.
    +
    +SEE ALSO
    +     httpd(8)
    +
    +
    + + + + diff --git a/htdocs/manual/programs/apachectl.html.en b/htdocs/manual/programs/apachectl.html.en new file mode 100644 index 00000000000..3fe276f62ce --- /dev/null +++ b/htdocs/manual/programs/apachectl.html.en @@ -0,0 +1,95 @@ + + + + + + + Manual Page: apachectl - Apache HTTP Server + + + + + + +

    Manual Page: apachectl

    + +
    +NAME
    +     apachectl - Apache HTTP server control interface
    +
    +SYNOPSIS
    +     apachectl command [...]
    +
    +DESCRIPTION
    +     apachectl is a front end to the  Apache  HyperText  Transfer
    +     Protocol (HTTP) server.  It is designed to help the adminis-
    +     trator control the functioning of the Apache httpd daemon.
    +
    +     NOTE: If your Apache installation uses  non-standard  paths,
    +     you  will  need  to  edit  the  apachectl  script to set the
    +     appropriate paths to your PID file and  your  httpd  binary.
    +     See the comments in the script for details.
    +
    +     The apachectl script returns a 0 exit value on success,  and
    +     >0  if an error occurs.  For more details, view the comments
    +     in the script.
    +
    +     Full   documentation   for   Apache    is    available    at
    +     http://www.apache.org/
    +
    +OPTIONS
    +     The command can be any one or more of the following options:
    +
    +     start       Start the Apache daemon.  Gives an error  if  it
    +                 is already running.
    +
    +     stop        Stops the Apache daemon.
    +
    +     restart     Restarts the  Apache  daemon  by  sending  it  a
    +                 SIGHUP.   If  the  daemon  is not running, it is
    +                 started.  This command automatically checks  the
    +                 configuration  files  via configtest before ini-
    +                 tiating the restart to make sure Apache  doesn't
    +                 die.
    +
    +     fullstatus  Displays a full status report  from  mod_status.
    +                 For  this  to  work, you need to have mod_status
    +                 enabled on your server and a text-based  browser
    +                 such  as lynx available on your system.  The URL
    +                 used to access the status report can be  set  by
    +                 editing the STATUSURL variable in the script.
    +
    +     status      Displays a brief status report.  Similar to  the
    +                 fullstatus  option,  except  that  the  list  of
    +                 requests currently being served is omitted.
    +
    +     graceful    Gracefully restarts the Apache daemon by sending
    +                 it  a SIGUSR1.  If the daemon is not running, it
    +                 is started.  This differs from a normal  restart
    +                 in  that  currently  open  connections  are  not
    +                 aborted.  A side effect is that  old  log  files
    +                 will not be closed immediately.  This means that
    +                 if used in a log rotation script, a  substantial
    +                 delay  may  be  necessary to ensure that the old
    +                 log files are  closed  before  processing  them.
    +                 This command automatically checks the configura-
    +                 tion files via configtest before initiating  the
    +                 restart to make sure Apache doesn't die.
    +
    +     configtest  Run a configuration file syntax test. It  parses
    +                 the  configuration files and either reports Syn-
    +                 tax Ok or detailed information about the partic-
    +                 ular syntax error.
    +
    +     help        Displays a short help message.
    +
    +SEE ALSO
    +     httpd(8)
    +
    +
    + + + + diff --git a/htdocs/manual/programs/apachectl.html.html b/htdocs/manual/programs/apachectl.html.html new file mode 100644 index 00000000000..b782c2ad5ea --- /dev/null +++ b/htdocs/manual/programs/apachectl.html.html @@ -0,0 +1,4 @@ + + + diff --git a/htdocs/manual/programs/apachectl.html.ja.jis b/htdocs/manual/programs/apachectl.html.ja.jis new file mode 100644 index 00000000000..9680dd04a25 --- /dev/null +++ b/htdocs/manual/programs/apachectl.html.ja.jis @@ -0,0 +1,94 @@ + + + + + + Manual Page: apachectl - Apache HTTP Server + + + + + + + +

    Manual Page: apachectl

    + +
    +$BL>>N(B
    +       apachectl - Apache HTTP $B%5!<%P%3%s%H%m!<%k%$%s%?!<%U%'!<%9(B
    +
    +$B=q<0(B
    +       apachectl command [...]
    +
    +$B2r@b(B
    +       apachectl $B$O(B Apache HyperText Transfer Protocol
    +       (HTTP) $B%5!<%P$N%U%m%s%H%(%s%I$G$9!#4IM}httpd
    +       $B%G!<%b%s$r%3%s%H%m!<%k$9$k5!G=$r=u$1$k$h$&$K@_7W$5$l$F$$$^$9!#(B
    +
    +       NOTE: Apache $B$N%$%s%9%H!<%k$GI8=`$G$O$J$$%Q%9(B
    +       $B$r;HMQ$9$k>l9g!"(BPID $B%U%!%$%k$H(B httpd $B%P%$%J%j$r(B
    +       $BE,@Z$J%Q%9$K@_Dj$9$k$?$a(B apachectl $B%9%/%j%W%H(B
    +       $B$rJT=8$9$kI,MW$,$"$j$^$9!#>\:Y$O%9%/%j%W%HFb$N%3%a%s%H$r8+$F$/$@$5$$!#(B
    +
    +       apachectl $B%9%/%j%W%H$O@.8y$7$?>l9g$O(B 0 $B=*N;CM!"(B
    +       $B%(%i!<$,5/$3$C$?>l9g(B 0 $B0J>e$rJV$7$^$9!#(B
    +       $B$5$i$J$k>\:Y$O%9%/%j%W%HFb$N%3%a%s%H$r$_$F$/$@$5$$!#(B
    +
    +       Apache $B$N$?$a$NA4J8>O$O(B http://www.apache.org/
    +       $B$GMxMQ2DG=$G$9!#(B
    +
    +$B%*%W%7%g%s(B
    +     command $B$Oe$r$D$1$F!"(B
    +     $Bstart       Apache $B%G!<%b%s$r5/F0$7$^$9!#(B
    +                 $B4{$Kl9g$O!"%(%i!<$rJV$7$^$9!#(B
    +
    +     stop        Apache $B%G!<%b%s$rDd;_$7$^$9!#(B
    +
    +     restart     Apache $B%G!<%b%s$K(B SIGHUP
    +                 $B$rAw$k$3$H$K$h$j:F5/F0$5$;$^$9!#(B
    +                 $B%G!<%b%s$,l9g$O5/F0$7$^$9!#(B
    +                 $B$3$N%3%^%s%I$O(B Apache $B$,Dd;_$7$J$$$3$H$r3NG'$9$k$?$a(B
    +                 $B:F5/F0$r3+;O$9$kA0$K(B configtest
    +                 $B$K$h$j%U%!%$%k$r<+F0E*$K%A%'%C%/$7$^$9!#(B
    +
    +     fullstatus  mod_status  $B$K$h$jA4>uBV$rJs9p$7$^$9!#(B
    +                 $B$3$l$,5!G=$9$k$?$a$K$O!"%5!<%P>e$G(B mod_status $B$,MxMQ2DG=$G(B
    +                 $B%7%9%F%`>e$K$O(B lynx $B$N$h$&$J%F%-%9%H%Y!<%9$N(B
    +                 $B%V%i%&%6$,I,MW$G$9!#>uBVJs9p$rF@$k$?$a$K;HMQ$5$l$k(B URL $B$O!"(B
    +                 $B%9%/%j%W%H$G(B STATUSURL $BJQ?t$rJT=8$9$k(B
    +                 $B$3$H$K$h$C$F@_Dj$5$l$^$9!#(B
    +
    +     status      $BC;$$>uBVJs9p$rI=<($7$^$9!#(B
    +                 $B8=:_Ds6!$5$l$F$$$k%j%/%(%9%H$N%j%9%H$r>JN,$9$k$H(B
    +                 $B$$$&$3$H$r=|$1$P!"(B fullstatus $B%*%W%7%g%s$H;w$F$$$^$9!#(B
    +
    +     graceful    Apache $B%G!<%b%s$K(B SIGUSR1 $B$rAw$k$3$H(B
    +                 $B$K$h$jCJ3,E*$K:F5/F0$7$^$9!#(B
    +                 $B%G!<%b%s$,l9g$O5/F0$7$^$9!#(B
    +                 $B8=:_MxMQCf$N@\B3$OCfCG$5$l$J$$$H$$$&E@$GDL>o$N(B
    +                 $B:F5/F0$H$O0[$J$j$^$9!#I{:nMQ$O!"$9$0$K$O8E$$(B
    +                 $B%m%0%U%!%$%k$rJD$8$k$3$H$,$G$-$J$$$3$H$G$9!#(B
    +                 $B$3$l$O%m%0$N8r49%9%/%j%W%H$r;HMQ$9$k>l9g!"Z$9$k$N$K(B
    +                 $BI,MW$+$b$7$l$J$$$3$H$r0UL#$7$^$9!#(B
    +                 $B$3$N%3%^%s%I$O(B Apache $B$,Dd;_$7$J$$$3$H$r3NG'$9$k$?$a(B
    +                 $B:F5/F0$r3+;O$9$kA0$K(B configtest
    +                 $B$K$h$j%U%!%$%k$r<+F0E*$K%A%'%C%/$7$^$9!#(B
    +
    +     configtest  $B@_Dj%U%!%$%k$NJ8K!%F%9%H$r9T$$$^$9!#(B
    +                 $B@_Dj%U%!%$%k$rJ,@O$7$F(B Syntax Ok $B$+!"(B
    +                 $BFCDj$NJ8K!%(%i!<$K$D$$$F$N>\:Y>pJs$rJs9p$7$^$9!#(B
    +
    +     help        $BC;$$%X%k%W%a%C%;!<%8$rI=<($7$^$9!#(B
    +
    +$B4XO"9`L\(B
    +     httpd(8)
    +
    +
    + + + + diff --git a/htdocs/manual/programs/apxs.html b/htdocs/manual/programs/apxs.html new file mode 100644 index 00000000000..577df8b9fd4 --- /dev/null +++ b/htdocs/manual/programs/apxs.html @@ -0,0 +1,280 @@ + + + + + + + Manual Page: apxs - Apache HTTP Server + + + + + +

    Manual Page: apxs

    + +
    +NAME
    +     apxs - APache eXtenSion tool
    +
    +SYNOPSIS
    +     apxs -g [ -S variable=value ] -n name
    +
    +     apxs -q [ -S variable=value ] query ...
    +
    +     apxs -c [ -S variable=value ] [ -o dsofile ] [ -I incdir ] [
    +     -D  variable[=value]  ]  [  -L  libdir  ]  [  -l libname ] [
    +     -Wc,compiler-flags ] [ -Wl,linker-flags ] files ...
    +
    +     apxs -i [ -S variable=value ] [ -n name ] [ -a ] [ -A ] dso-
    +     file ...
    +
    +     apxs -e [ -S variable=value ] [ -n name ] [ -a ] [ -A ] dso-
    +     file ...
    +
    +DESCRIPTION
    +     apxs is a tool for building and installing extension modules
    +     for  the  Apache  HyperText Transfer Protocol (HTTP) server.
    +     This is achieved by building a Dynamic Shared  Object  (DSO)
    +     from  one  or  more source or object files which then can be
    +     loaded into the Apache server under runtime via the  LoadMo-
    +     dule directive from mod_so.
    +
    +     So to use this extension mechanism,  your  platform  has  to
    +     support  the DSO feature and your Apache httpd binary has to
    +     be built with the mod_so module.  The  apxs  tool  automati-
    +     cally complains if this is not the case.  You can check this
    +     yourself by manually running the command
    +
    +       $ httpd -l
    +
    +     The module mod_so should be part of the displayed list.   If
    +     these requirements are fulfilled, you can easily extend your
    +     Apache server's functionality by installing your own modules
    +     with the DSO mechanism by the help of this apxs tool:
    +
    +       $ apxs -i -a -c mod_foo.c
    +       gcc -fpic -DSHARED_MODULE -I/path/to/apache/include -c mod_foo.c
    +       ld -Bshareable -o mod_foo.so mod_foo.o
    +       cp mod_foo.so /path/to/apache/libexec/mod_foo.so
    +       chmod 755 /path/to/apache/libexec/mod_foo.so
    +       [activating module `foo' in /path/to/apache/etc/httpd.conf]
    +       $ apachectl restart
    +       /path/to/apache/sbin/apachectl restart: httpd not running, trying to start
    +       [Tue Mar 31 11:27:55 1998] [debug] mod_so.c(303): loaded module foo_module
    +       /path/to/apache/sbin/apachectl restart: httpd started
    +       $ _
    +
    +     The arguments files can be any C source file (.c), a  object
    +     file  (.o)  or  even  a  library archive (.a). The apxs tool
    +     automatically recognizes these extensions and  automatically
    +     uses  the  C source files for compilation while it just uses
    +     the object and archive files for the linking phase. But when
    +     using such pre-compiled objects, make sure they are compiled
    +     for Position Independent Code (PIC) to be able to  use  them
    +     for a DSO. For instance with GCC you always just have to use
    +     -fpic.  For other C compilers please consult its manual page
    +     or  watch  for  the  flags  apxs  uses to compile the object
    +     files.
    +
    +     For more details about DSO support in Apache, first read the
    +     background  information about DSO in htdocs/manual/dso.html,
    +     then read the documentation of mod_so.
    +
    +OPTIONS
    +     Common options:
    +
    +     -n name     This explicitly sets the module name for the  -i
    +                 (install)  and  -g (template generation) option.
    +                 Use this to explicitly specify the module  name.
    +                 For  option  -g  this is required, for option -i
    +                 the apxs tool tries to determine the  name  from
    +                 the source or (as a fallback) at least by guess-
    +                 ing it from the filename.
    +
    +     Query options:
    +
    +     -q          Performs a query for apxs's knowledge about cer-
    +                 tain  settings.  The query parameters can be one
    +                 or more of the following variable names:
    +                   CC              TARGET
    +                   CFLAGS          SBINDIR
    +                   CFLAGS_SHLIB    INCLUDEDIR
    +                   LD_SHLIB        LIBEXECDIR
    +                   LDFLAGS_SHLIB   SYSCONFDIR
    +                   LIBS_SHLIB      PREFIX
    +                 Use this for manually determining settings.  For
    +                 instance use
    +                   INC=-I`apxs -q INCLUDEDIR`
    +                 inside your own Makefiles  if  you  need  manual
    +                 access to Apache's C header files.
    +
    +     Configuration options:
    +
    +     -S variable=value
    +                 This option changes the apxs settings  described
    +                 above.
    +
    +     Template Generation options:
    +     -g          This generates a subdirectory name  (see  option
    +                 -n)  and there two files: A sample module source
    +                 file named mod_name.c which can  be  used  as  a
    +                 template  for  creating your own modules or as a
    +                 quick start for playing with the apxs mechanism.
    +                 And  a  corresponding  Makefile  for even easier
    +                 building and installing of this module.
    +
    +     DSO compilation options:
    +
    +     -c          This indicates  the  compilation  operation.  It
    +                 first  compiles the C source files (.c) of files
    +                 into corresponding object files  (.o)  and  then
    +                 builds  a DSO in dsofile by linking these object
    +                 files plus the remaining object  files  (.o  and
    +                 .a)  of  files  If no -o option is specified the
    +                 output file is guessed from the  first  filename
    +                 in   files   and   thus   usually   defaults  to
    +                 mod_name.so
    +
    +     -o dsofile  Explicitly specifies the filename of the created
    +                 DSO  file.  If not specified and the name cannot
    +                 be guessed from the  files  list,  the  fallback
    +                 name mod_unknown.so is used.
    +
    +     -D variable[=value]
    +                 This option is directly passed  through  to  the
    +                 compilation  command(s).   Use  this to add your
    +                 own defines to the build process.
    +
    +     -I incdir   This option is directly passed  through  to  the
    +                 compilation  command(s).   Use  this to add your
    +                 own include directories to search to  the  build
    +                 process.
    +
    +     -L libdir   This option is directly passed  through  to  the
    +                 linker  command.   Use  this  to  add  your  own
    +                 library directories to search to the build  pro-
    +                 cess.
    +
    +     -l libname  This option is directly passed  through  to  the
    +                 linker  command.   Use  this  to  add  your  own
    +                 libraries to search to the build process.
    +
    +     -Wc,compiler-flags
    +                 This option passes compiler-flags as  additional
    +                 flags  to the compiler command.  Use this to add
    +                 local compiler-specific options.
    +
    +     -Wl,linker-flags
    +                 This option passes  linker-flags  as  additional
    +                 flags  to  the  linker command.  Use this to add
    +                 local linker-specific options.
    +
    +     DSO installation and configuration options:
    +
    +     -i          This indicates the  installation  operation  and
    +                 installs  one  or  more  DSOs  into the server's
    +                 libexec directory.
    +
    +     -a          This  activates  the  module  by   automatically
    +                 adding   a   corresponding  LoadModule  line  to
    +                 Apache's httpd.conf configuration  file,  or  by
    +                 enabling it if it already exists.
    +
    +     -A          Same as option -a  but  the  created  LoadModule
    +                 directive is prefixed with a hash sign (#), i.e.
    +                 the module is just prepared for later activation
    +                 but initially disabled.
    +
    +     -e          This indicates the editing operation, which  can
    +                 be  used with the -a and -A options similarly to
    +                 the -i operation  to  edit  Apache's  httpd.conf
    +                 configuration file without attempting to install
    +                 the module.
    +
    +EXAMPLES
    +     Assume you have an Apache module named  mod_foo.c  available
    +     which should extend Apache's server functionality. To accom-
    +     plish this you first have to compile the C source into a DSO
    +     suitable  for  loading  into the Apache server under runtime
    +     via the following command:
    +
    +       $ apxs -c mod_foo.c
    +       gcc -fpic -DSHARED_MODULE -I/path/to/apache/include -c mod_foo.c
    +       ld -Bshareable -o mod_foo.so mod_foo.o
    +       $ _
    +
    +     Then you have to update the Apache configuration  by  making
    +     sure  a LoadModule directive is present to load this DSO. To
    +     simplify this step apxs provides an automatic way to install
    +     the   DSO  in  the  "libexec"  directory  and  updating  the
    +     httpd.conf file accordingly. This can be  achieved  by  run-
    +     ning:
    +
    +       $ apxs -i -a mod_foo.c
    +       cp mod_foo.so /path/to/apache/libexec/mod_foo.so
    +       chmod 755 /path/to/apache/libexec/mod_foo.so
    +       [activating module `foo' in /path/to/apache/etc/httpd.conf]
    +       $ _
    +
    +     This way a line named
    +
    +       LoadModule foo_module libexec/mod_foo.so
    +
    +     is added to the configuration file if still not present.  If
    +     you  want  to have this operation to be disabled, use the -A
    +     option, i.e.
    +
    +       $ apxs -i -A mod_foo.c
    +
    +     For a quick test of the apxs mechanism you can create a sam-
    +     ple  Apache  module  template  plus a corresponding Makefile
    +     via:
    +
    +       $ apxs -g -n foo
    +       Creating [DIR]  foo
    +       Creating [FILE] foo/Makefile
    +       Creating [FILE] foo/mod_foo.c
    +       $ _
    +
    +     Then you can immediately compile this sample module  into  a
    +     DSO and load it into the Apache server:
    +
    +       $ cd foo
    +       $ make all reload
    +       apxs -c mod_foo.c
    +       gcc -fpic -DSHARED_MODULE -I/path/to/apache/include -c mod_foo.c
    +       ld -Bshareable -o mod_foo.so mod_foo.o
    +       apxs -i -a -n "foo" mod_foo.so
    +       cp mod_foo.so /path/to/apache/libexec/mod_foo.so
    +       chmod 755 /path/to/apache/libexec/mod_foo.so
    +       [activating module `foo' in /path/to/apache/etc/httpd.conf]
    +       apachectl restart
    +       /path/to/apache/sbin/apachectl restart: httpd not running, trying to start
    +       [Tue Mar 31 11:27:55 1998] [debug] mod_so.c(303): loaded module foo_module
    +       /path/to/apache/sbin/apachectl restart: httpd started
    +       $ _
    +
    +     You can even use apxs to compile complex modules outside the
    +     Apache  source  tree,  like PHP3, because apxs automatically
    +     recognized C source files and object files.
    +
    +       $ cd php3
    +       $ ./configure --with-shared-apache=../apache-1.3
    +       $ apxs -c -o libphp3.so mod_php3.c libmodphp3-so.a
    +       gcc -fpic -DSHARED_MODULE -I/tmp/apache/include  -c mod_php3.c
    +       ld -Bshareable -o libphp3.so mod_php3.o libmodphp3-so.a
    +       $ _
    +
    +     Only C source files  are  compiled  while  remaining  object
    +     files are used for the linking phase.
    +
    +SEE ALSO
    +     apachectl(1), httpd(8).
    +
    +
    + + + + diff --git a/htdocs/manual/programs/dbmmanage.html b/htdocs/manual/programs/dbmmanage.html new file mode 100644 index 00000000000..409b8822b5e --- /dev/null +++ b/htdocs/manual/programs/dbmmanage.html @@ -0,0 +1,115 @@ + + + + + + + Manual Page: dbmmanage - Apache HTTP Server + + + + + +

    Manual Page: dbmmanage

    + +
    +NAME
    +     dbmmanage - Create and update user authentication  files  in
    +     DBM format
    +
    +SYNOPSIS
    +     dbmmanage filename [ command ] [ username [ encpasswd ] ]
    +
    +DESCRIPTION
    +     dbmmanage is used to create and update the DBM format  files
    +     used  to  store usernames and password for basic authentica-
    +     tion of HTTP users.   Resources  available  from  the  httpd
    +     Apache web server can be restricted to just the users listed
    +     in the files created by dbmmanage. This program can only  be
    +     used  when  the usernames are stored in a DBM file. To use a
    +     flat-file database see htpasswd.
    +
    +     This manual page only lists the command line arguments.  For
    +     details  of  the  directives  necessary  to  configure  user
    +     authentication in httpd see the Apache manual, which is part
    +     of   the   Apache   distribution   or   can   be   found  at
    +     http://www.apache.org/.
    +
    +OPTIONS
    +     filename
    +          The filename of the DBM format  file.  Usually  without
    +          the extension .db, .pag, or .dir.
    +
    +     command
    +          This selects the operation to perform:
    +
    +     add         Adds an entry for username to filename using the
    +                 encrypted password encpassword.
    +
    +     adduser     Asks for a password and then adds an  entry  for
    +                 username to filename .
    +
    +     check       Asks for a password and then checks if  username
    +                 is  in filename and if it's password matches the
    +                 specified one.
    +
    +     delete      Deletes the username entry from filename.
    +
    +     import      Reads username:password entries (one  per  line)
    +                 from  STDIN and adds them to filename. The pass-
    +                 words already has to be crypted.
    +
    +     update      Same as the "adduser" command,  except  that  it
    +                 makes sure username already exists in filename.
    +
    +     view        Just displays the complete contents of  the  DBM
    +                 file.
    +
    +     username    The user for which the update operation is  per-
    +                 formed.
    +
    +BUGS
    +     One should be aware that there are a number of different DBM
    +     file   formats   in  existence,  and  with  all  likelihood,
    +     libraries for more than one format may exist on your system.
    +     The three primary examples are NDBM, the GNU project's GDBM,
    +     and Berkeley DB 2.  Unfortunately, all these  libraries  use
    +     different file formats, and you must make sure that the file
    +     format used by filename is the same  format  that  dbmmanage
    +     expects  to see. dbmmanage currently has no way of determin-
    +     ing what type of DBM file it is looking at.  If used against
    +     the  wrong format, will simply return nothing, or may create
    +     a different DBM file with a different name, or at worst,  it
    +     may  corrupt the DBM file if you were attempting to write to
    +     it.
    +
    +     dbmmanage has a list of DBM format preferences,  defined  by
    +     the  @AnyDBM::ISA  array  near the beginning of the program.
    +     Since we prefer the Berkeley DB 2 file format, the order  in
    +     which  dbmmanage  will look for system libraries is Berkeley
    +     DB 2, then NDBM, and then GDBM.   The  first  library  found
    +     will  be  the  library dbmmanage will attempt to use for all
    +     DBM file transactions.  This ordering is slightly  different
    +     than  the standard @AnyDBM::ISA ordering in perl, as well as
    +     the ordering used by the simple dbmopen() call in  Perl,  so
    +     if  you  use  any  other utilities to manage your DBM files,
    +     they must also follow  this  preference  ordering.   Similar
    +     care  must  be  taken  if using programs in other languages,
    +     like C, to access these files.
    +
    +     Apache's mod_auth_db.c module corresponds to Berkeley  DB  2
    +     library,   while  mod_auth_dbm.c  corresponds  to  the  NDBM
    +     library.  Also, one can usually use the  file  program  sup-
    +     plied  with  most Unix systems to see what format a DBM file
    +     is in.
    +
    +SEE ALSO
    +     httpd(8)
    +
    +
    + + + + diff --git a/htdocs/manual/programs/footer.html b/htdocs/manual/programs/footer.html new file mode 100644 index 00000000000..10a731d1480 --- /dev/null +++ b/htdocs/manual/programs/footer.html @@ -0,0 +1,6 @@ +
    + +

    Apache HTTP Server Version 1.3

    + Index + Home + diff --git a/htdocs/manual/programs/header.html b/htdocs/manual/programs/header.html new file mode 100644 index 00000000000..09a28d8ca6c --- /dev/null +++ b/htdocs/manual/programs/header.html @@ -0,0 +1,5 @@ +
    + [APACHE DOCUMENTATION] + +

    Apache HTTP Server Version 1.3

    +
    diff --git a/htdocs/manual/programs/htdigest.html b/htdocs/manual/programs/htdigest.html new file mode 100644 index 00000000000..303b2a5db03 --- /dev/null +++ b/htdocs/manual/programs/htdigest.html @@ -0,0 +1,63 @@ + + + + + + + Manual Page: htdigest - Apache HTTP Server + + + + + + +

    Manual Page: htdigest

    + +
    +NAME
    +     htdigest - Create and update user authentication files
    +
    +SYNOPSIS
    +     htdigest [ -c ] passwdfile realm username
    +
    +DESCRIPTION
    +     htdigest is used to create and update the flat-files used to
    +     store  usernames,  realm and password for digest authentica-
    +     tion of HTTP users.   Resources  available  from  the  httpd
    +     Apache web server can be restricted to just the users listed
    +     in the files created by htdigest.
    +
    +     This manual page only lists the command line arguments.  For
    +     details  of  the  directives  necessary  to configure digest
    +     authentication in httpd see the Apache manual, which is part
    +     of   the   Apache   distribution   or   can   be   found  at
    +     http://www.apache.org/.
    +
    +OPTIONS
    +     -c   Create the passwdfile. If passwdfile already exists, it
    +          is deleted first.
    +
    +     passwdfile
    +          Name of the file to contain  the  username,  realm  and
    +          password.  If  -c is specified, this file is created if
    +          it does not already exist, or deleted and recreated  if
    +          it does exist.
    +
    +     realm
    +          The realm name to which the user name belongs.
    +
    +     username
    +          The user name to create or  update  in  passwdfile.  If
    +          username  does  not  exist  is  this  file, an entry is
    +          added. If it does exist, the password is changed.
    +
    +SEE ALSO
    +     httpd(8)
    +
    +
    + + + + diff --git a/htdocs/manual/programs/htpasswd.html.en b/htdocs/manual/programs/htpasswd.html.en new file mode 100644 index 00000000000..67de07d2860 --- /dev/null +++ b/htdocs/manual/programs/htpasswd.html.en @@ -0,0 +1,174 @@ + + + + + + + Manual Page: htpasswd - Apache HTTP Server + + + + + + +

    Manual Page: htpasswd

    + +
    +NAME
    +     htpasswd - Create and update user authentication files
    +
    +SYNOPSIS
    +     htpasswd [ -c ] [ -m | -d | -s | -p ] passwdfile username
    +     htpasswd -b [ -c ] [ -m | -d | -s | -p ] passwdfile username
    +     password
    +     htpasswd -n [ -m | -d | -s | -p ] username
    +     htpasswd -nb [ -m | -d | -s | -p ] username password
    +
    +DESCRIPTION
    +     htpasswd is used to create and update the flat-files used to
    +     store  usernames  and  password  for basic authentication of
    +     HTTP users.  If htpasswd cannot access a file, such  as  not
    +     being  able to write to the output file or not being able to
    +     read the file in order to update it,  it  returns  an  error
    +     status and makes no changes.
    +
    +     Resources available from the httpd Apache web server can  be
    +     restricted  to just the users listed in the files created by
    +     htpasswd. This program can only manage usernames  and  pass-
    +     words  stored  in  a  flat-file.  It can encrypt and display
    +     password information for use in other types of data  stores,
    +     though.  To use a DBM database see dbmmanage.
    +
    +     htpasswd encrypts passwords using either a  version  of  MD5
    +     modified for Apache, or the system's crypt() routine.  Files
    +     managed by htpasswd may contain  both  types  of  passwords;
    +     some  user  records  may  have MD5-encrypted passwords while
    +     others in the same file may have  passwords  encrypted  with
    +     crypt().
    +
    +     This manual page only lists the command line arguments.  For
    +     details  of  the  directives  necessary  to  configure  user
    +     authentication in httpd see the Apache manual, which is part
    +     of   the   Apache   distribution   or   can   be   found  at
    +     <URL:http://www.apache.org/>.
    +
    +OPTIONS
    +     -b   Use batch mode; i.e., get the password from the command
    +          line  rather  than prompting for it. This option should
    +          be used  with  extreme  care,  since  the  password  is
    +          clearly visible on the command line.
    +
    +     -c   Create the passwdfile. If passwdfile already exists, it
    +          is rewritten and truncated.  This option cannot be com-
    +          bined with the -n option.
    +
    +     -n   Display the results  on  standard  output  rather  than
    +          updating  a  file.  This is useful for generating pass-
    +          word records acceptable  to  Apache  for  inclusion  in
    +          non-text  data  stores.  This option changes the syntax
    +          of the command  line,  since  the  passwdfile  argument
    +          (usually  the first one) is omitted.  It cannot be com-
    +          bined with the -c option.
    +
    +     -m   Use Apache's  modified  MD5  algorithm  for  passwords.
    +          Passwords  encrypted with this algorithm are transport-
    +          able to any platform (Windows, Unix, BeOS,  et  cetera)
    +          running  Apache  1.3.9  or  later.  On Windows and TPF,
    +          this flag is the default.
    +
    +     -d   Use crypt() encryption for passwords.  The  default  on
    +          all platforms but Windows and TPF. Though possibly sup-
    +          ported by htpasswd on all platforms,  it  is  not  sup-
    +          ported by the httpd server on Windows and TPF.
    +
    +     -s   Use SHA encryption for passwords. Faciliates  migration
    +          from/to  Netscape  servers  using  the  LDAP  Directory
    +          Interchange Format (ldif).
    +
    +     -p   Use plaintext passwords. Though htpasswd  will  support
    +          creation  on  all platforms, the httpd deamon will only
    +          accept plain text passwords on Windows and TPF.
    +
    +     passwdfile
    +          Name of the file to contain the user name and password.
    +          If  -c  is  given,  this file is created if it does not
    +          already exist, or rewritten and truncated  if  it  does
    +          exist.
    +
    +     username
    +          The username to create  or  update  in  passwdfile.  If
    +          username  does  not  exist  in  this  file, an entry is
    +          added. If it does exist, the password is changed.
    +
    +     password
    +          The plaintext password to be encrypted  and  stored  in
    +          the file.  Only used with the -b flag.
    +
    +EXIT STATUS
    +     htpasswd returns a zero status ("true") if the username  and
    +     password  have  been  successfully  added  or updated in the
    +     passwdfile.  htpasswd returns 1 if it encounters some  prob-
    +     lem  accessing  files,  2 if there was a syntax problem with
    +     the command line, 3 if the  password  was  entered  interac-
    +     tively  and  the  verification  entry didn't match, 4 if its
    +     operation was interrupted, 5 if a value is too  long  (user-
    +     name,  filename,  password, or final computed record), and 6
    +     if the username contains illegal characters  (see  the  RES-
    +     TRICTIONS section).
    +
    +EXAMPLES
    +     htpasswd /usr/local/etc/apache/.htpasswd-users jsmith
    +
    +          Adds or modifies the password for user jsmith. The user
    +          is prompted for the password.  If executed on a Windows
    +          system, the password will be encrypted using the  modi-
    +          fied  Apache  MD5  algorithm;  otherwise,  the system's
    +          crypt() routine will be used.  If  the  file  does  not
    +          exist, htpasswd will do nothing except return an error.
    +
    +     htpasswd -c /home/doe/public_html/.htpasswd jane
    +
    +          Creates a new file and stores a record in it  for  user
    +          jane.   The  user is prompted for the password.  If the
    +          file exists and cannot be read, or cannot  be  written,
    +          it  is  not altered and htpasswd will display a message
    +          and return an error status.
    +
    +     htpasswd -mb /usr/web/.htpasswd-all jones Pwd4Steve
    +
    +          Encrypts the password from the command line (Pwd4Steve)
    +          using the MD5 algorithm, and stores it in the specified
    +          file.
    +
    +SECURITY CONSIDERATIONS
    +     Web password files such as those managed by htpasswd  should
    +     not  be  within  the Web server's URI space -- that is, they
    +     should not be fetchable with a browser.
    +
    +     The use of the -b option is discouraged, since  when  it  is
    +     used the unencrypted password appears on the command line.
    +
    +RESTRICTIONS
    +     On the Windows and MPE platforms, passwords  encrypted  with
    +     htpasswd  are  limited  to  no  more  than 255 characters in
    +     length.  Longer passwords will be truncated to  255  charac-
    +     ters.
    +
    +     The MD5 algorithm used by htpasswd is specific to the Apache
    +     software;  passwords  encrypted  using it will not be usable
    +     with other Web servers.
    +
    +     Usernames are limited to 255 bytes and may not  include  the
    +     character ':'.
    +
    +SEE ALSO
    +     httpd(8) and the scripts in support/SHA1 which come with the
    +     distribution.
    +
    +
    + + + + diff --git a/htdocs/manual/programs/htpasswd.html.html b/htdocs/manual/programs/htpasswd.html.html new file mode 100644 index 00000000000..4b9d23c03e5 --- /dev/null +++ b/htdocs/manual/programs/htpasswd.html.html @@ -0,0 +1,4 @@ + + + diff --git a/htdocs/manual/programs/htpasswd.html.ja.jis b/htdocs/manual/programs/htpasswd.html.ja.jis new file mode 100644 index 00000000000..a68a01c89fb --- /dev/null +++ b/htdocs/manual/programs/htpasswd.html.ja.jis @@ -0,0 +1,173 @@ + + + + + + Manual Page: htpasswd - Apache HTTP Server + + + + + + + +

    Manual Page: htpasswd

    + +
    +$BL>>N(B
    +     htpasswd - $B%f!<%6G'>Z%U%!%$%k$N:n@.$H99?7(B
    +
    +$B=q<0(B
    +     htpasswd [ -c ] [ -m | -d | -s | -p ] passwdfile username
    +     htpasswd -b [ -c ] [ -m | -d | -s | -p ] passwdfile username
    +     password
    +     htpasswd -n [ -m | -d | -s | -p ] username
    +     htpasswd -nb [ -m | -d | -s | -p ] username password
    +
    +$B2r@b(B
    +     htpasswd $B$O!"(BHTTP $B%f!<%6$N4pK\G'>Z$N$?$a%f!<%6L>$H(B
    +       $B%Q%9%o!<%I$r5-O?$9$k$?$a$N%U%i%C%H%U%!%$%k$N:n@.$H99?7$K;HMQ$5$l$^$9!#(B
    +       htpasswd$B$,=PNO%U%!%$%k$K=q$-9~$a$J$$!"$^$?99?7$9$k$?$a$K(B
    +       $BFI$_$H$k$3$H$,$G$-$J$$$J$I!"%U%!%$%k$K%"%/%;%9$9$k$3$H$,$G$-$J$$>l9g!"(B
    +       $B%(%i!<%9%F!<%?%9$rJV$7!"JQ99$r9T$$$^$;$s!#(B
    +
    +       httpd Apache $B%&%'%V%5!<%P$O(B $B%j%=!<%9$N;HMQ$r(B htpasswd
    +       $B$K$h$C$F:n@.$5$l$k%U%!%$%k$K%j%9%H$5$l$?%f!<%6$@$1$K@)8B$9$k(B
    +       $B$3$H$,$G$-$^$9!#$3$N%W%m%0%i%`$O%U%i%C%H%U%!%$%k$K5-O?$5$l$?(B
    +       $B%f!<%6L>$H%Q%9%o!<%I$N4IM}$N$_$r9T$J$&$3$H$,$G$-$^$9!#(B
    +       $B$H$O8@$C$F$b!"B>$N%?%$%W$N%G!<%?$N5-O?$N$?$a$K;HMQ$7$F$b(B
    +       $B%Q%9%o!<%I>pJs$r0E9f2=$7$FI=<($9$k$3$H$,$G$-$^$9!#(B 
    +       DBM $B%G!<%?%Y!<%9$r;HMQ$9$k$?$a$K$O(B dbmmanage $B$r8+$F$/$@$5$$!#(B
    +
    +       htpasswd $B$O(B Apache $BMQ$K2~B$$5$l$?%P!<%8%g%s$N(B MD5 $B$+$^$?$O(B
    +       $B%7%9%F%`$N(B crypt() $B%k!<%A%s$r;HMQ$7$F%Q%9%o!<%I$r0E9f2=$7$^$9!#(B
    +       htpasswd $B$G4IM}$5$l$?%U%!%$%k$ON>J}$N%?%$%W$N%Q%9%o!<%I(B
    +       $B$r4^$`$+$b$7$l$^$;$s(B; $B$"$k%f!<%6%l%3!<%I$,(B MD5 $B$G0E9f2=$5$l$?(B
    +       $B%Q%9%o!<%I$G$"$k$N$KBP$7!"F1$8%U%!%$%k$NB>$N%f!<%6$O(B crypt() $B$K$h$j(B
    +       $B0E9f2=$5$l$?%Q%9%o!<%I$G$"$k$+$b$7$l$^$;$s!#(B
    +
    +       $B$3$N%^%K%e%"%k%Z!<%8$O%3%^%s%I%i%$%s$N0z?t$r5s$2$F$$$k$@$1$G$9!#(B
    +       httpd $B$N%f!<%6G'>Z@_Dj$KI,MW$J%G%#%l%/%F%#%V(B $B$N>\:Y$O!"(B
    +       Apache $BG[I[J*$d(B <URL:http://www.apache.org/> $B$G8+$D$1$k$3$H$,$G$-$k(B
    +       Apache $B%^%K%e%"%k$r;2>H$7$F$/$@$5$$!#(B
    +
    +
    +$B%*%W%7%g%s(B
    +     -b   $B%P%C%A%b!<%I$N;HMQ(B $B$9$J$o$A(B $B!"%W%m%s%W%H$G$O$J$/(B
    +          $B%3%^%s%I%i%$%s$+$i%Q%9%o!<%I$rF@$^$9!#(B$B%Q%9%o!<%I$,(B
    +          $B%3%^%s%I%i%$%s>e$GL@3N$KL\$K8+$($k$N$G!"(B
    +          $B$3$N%*%W%7%g%s$O6K$a$FCm0U$7$F;HMQ$5$l$k$Y$-$G$9!#(B
    +
    +     -c   $B%Q%9%o!<%I%U%!%$%k(B$B$r:n@.$7$^$9!#(B$B%Q%9%o!<%I%U%!%$%k(B
    +          $B$,$9$G$K$"$k>l9g!">e=q$-$5$l$F@Z$j-n $B%*%W%7%g%s$HAH$_9g$o$;$k$3$H$,$G$-$^$;$s!#(B
    +
    +     -n   $B%U%!%$%k$r99?7$9$k$N$G$O$J$/I8=`=PNO$K7k2L$rI=<($7$^$9!#(B
    +          $BHs%F%-%9%H%G!<%?$,4^$^$l$F$$$F(B Apache $B$K$B%Q%9%o!<%I%U%!%$%k(B$B$N0z?t(B
    +          ($BDL>o$O:G=i$N$b$N(B)$B$,>JN,$5$l$k$N$G!"%3%^%s%I%i%$%s$NJ8K!$,(B
    +          $B@Z$jBX$o$j$^$9!#(B
    +          -c $B%*%W%7%g%s$HAH$_9g$o$;$k$3$H$O$G$-$^$;$s!#(B
    +
    +     -m   $B%Q%9%o!<%I$K(B Apache $BMQ$K2~B$$5$l$?(B MD5 $B%"%k%4%j%:%`$r;HMQ(B
    +          $B$7$^$9!#$3$N%"%k%4%j%:%`$K$h$j0E9f2=$5$l$?%Q%9%o!<%I$O!"(B
    +          Apache 1.3.9 $B$^$?$O$=$l0J9_$,F0$$$F$$$k$"$i$f$k%W%i%C%H(B
    +          $B%[!<%`(B (Windows, Unix, BeOS, $B$=$NB>(B) $B$K0\?"2DG=$G$9!#(B
    +          Windows $B$H(B TPF $B$G$O$3$N%U%i%0$,%G%U%)%k%H$G$9!#(B
    +
    +     -d   $B%Q%9%o!<%I$K(B crypt() $B0E9f2=$r;HMQ$7$^$9!#(BWindows $B$H(B TPF
    +          $B0J30$N$9$Y$F$N%W%i%C%H%U%)!<%`$G%G%U%)%k%H$G$9!#(B
    +          $B$*$=$i$/$9$Y$F$N%W%i%C%H%U%)!<%`$G$N(B htpasswd
    +          $B$K$h$j%5%]!<%H$5$l$^$9$,!"(BWindows $B$H(B TPF $B$N(B httpd
    +          $B%5!<%P$K$h$k%5%]!<%H$O$"$j$^$;$s!#(B
    +
    +     -s   $B%Q%9%o!<%I$K(B SHA $B0E9f2=$r;HMQ$7$^$9!#(BLDAP $B%G%#%l%/%H%j(B
    +          $BJQ49%U%)!<%^%C%H(B (ldif) $B$r;HMQ$9$k(B Netscape $B%5!<%P(B
    +          $B$+$i$N(B/$B$X$N(B $B0\9T$rMF0W$K$7$^$9!#(B
    +
    +     -p   $B%W%l!<%s%F%-%9%H%Q%9%o!<%I$r;HMQ$7$^$9!#(B htpasswd
    +          $B$,$9$Y$F$N%W%i%C%H%U%)!<%`$G$N:n@.$r%5%]!<%H$7$F$b(B httpd
    +          $B%G!<%b%s$O(B Windows $B$H(B TPF $B>e$G$O!"%W%l!<%s%F%-%9%H$N%Q%9%o!<%I(B
    +          $B$N$_passwdfile
    +          $B%f!<%6L>$H%Q%9%o!<%I$,4^$^$l$F$$$k%U%!%$%kL>$G$9!#(B
    +          $B$b$7(B -c $B$,M?$($i$l$?>l9g!"%U%!%$%k$,B8:_$7$J$$$J$i$P(B
    +          $B%U%!%$%k$r:n@.$7!"$^$?B8:_$7$F$$$k$J$i!">e=q$-$5$l$^$9!#(B
    +
    +     username
    +          passwdfile $B$K:n@.$^$?$O99?7$9$k%f!<%6L>$G$9!#(B
    +          username $B$,B8:_$7$J$$>l9g$O%(%s%H%j$rDI2C$7$^$9!#(B
    +          $BB8:_$9$k>l9g$K$O%Q%9%o!<%I$rJQ99$7$^$9!#(B
    +
    +     password
    +          $B%U%!%$%k$K0E9f2=$5$l$F5-O?$5$l$k%W%l!<%s%F%-%9%H$N(B
    +          $B%Q%9%o!<%I$G$9!#(B -b $B%U%i%0$G$N$_;HMQ$5$l$^$9!#(B
    +
    +$B=*N;%9%F!<%?%9(B
    +     $B%f!<%6L>$H%Q%9%o!<%I$,passwdfile $B$KDI2C$^$?$O99?7(B
    +     $B$5$l$?>l9g!"(Bhtpasswd $B$O%<%m%9%F!<%?%9(B ("$B??(B") $B$rJV$7$^$9!#(B
    +     htpasswd $B$O!"%U%!%$%k%"%/%;%9$NLdBj$KAx6x$7$?>l9g$O(B 1$B!"(B
    +     $B%3%^%s%I%i%$%s$K4X$9$kJ8K!$NLdBj$,$"$C$?>l9g$O(B 2$B!"(B
    +     $BBPOC<0$G%Q%9%o!<%I$rF~NO$7$?:]$K3NG'$N%(%s%H%j$,%^%C%A$7$J$+$C$?>l9g$O(B 3$B!"(B
    +     $BA`:n$,CfCG$5$l$?>l9g$O(B 4$B!"(B($B%f!<%6L>!"%U%!%$%kL>!"%Q%9%o!<%I!"$^$?$O(B
    +     $B:G8e$K7W;;$5$l$?%l%3!<%I(B) $B$K$*$$$FCM$,D9$9$.$k>l9g$O(B 5$B!"(B
    +     $B%f!<%6L>$KIT@5$JJ8;z$,4^$^$l$F$$$k(B(RESTRICTIONS
    +     $B%;%/%7%g%s$r8+$F$/$@$5$$(B) $B>l9g$O(B 6 $B$rJV$7$^$9!#(B
    +
    +$BNc(B
    +     htpasswd /usr/local/etc/apache/.htpasswd-users jsmith
    +
    +          $B%f!<%6(B jsmith $B$N%Q%9%o!<%I$rDI2C$^$?$O=$@5$7$^$9!#(B
    +          $B%f!<%6$O%Q%9%o!<%I$NF~NO$rB%$5$l$^$9!#(BWindows $B%7%9%F%`>e$G(B
    +          $Bl9g!"%Q%9%o!<%I$O(B Apache MD5 $B%"%k%4%j%:%`$r;HMQ$7$F(B
    +          $B0E9f2=$5$l$k$G$7$g$&!#B>$N>l9g$O!"%7%9%F%`$N(B crypt()
    +          $B%k!<%A%s$,;HMQ$5$l$k$G$7$g$&!#%U%!%$%k$,B8:_$7$J$$>l9g!"(B
    +          htpasswd $B$O%(%i!<$rJV$90J30$K$O2?$b$7$J$$$G$7$g$&!#(B
    +
    +     htpasswd -c /home/doe/public_html/.htpasswd jane
    +
    +          $B?7$7$$%U%!%$%k$r:n@.$7!"%f!<%6(B jane $B$N%l%3!<%I$r5-O?$7$^$9!#(B
    +          $B%f!<%6$O%Q%9%o!<%I$NF~NO$rB%$5$l$^$9!#(B
    +          $B%U%!%$%k$,B8:_$9$k$1$l$IFI$a$J$$$^$?$O=q$-9~$_$,$G$-$J$$>l9g$O(B
    +          $BJQ99$5$l$:!"(Bhtpasswd $B$O%a%C%;!<%8$rI=<($7$F(B
    +          $B%(%i!<%9%F!<%?%9$rJV$9$G$7$g$&!#(B
    +
    +     htpasswd -mb /usr/web/.htpasswd-all jones Pwd4Steve
    +
    +          MD5 $B%"%k%4%j%:%`$r;H$C$F%3%^%s%I%i%$%s$+$i$N%Q%9%o!<%I(B
    +          (Pwd4Steve) $B$r0E9f2=$7!";XDj$5$l$?%U%!%$%k$K5-O?$7$^$9!#(B
    +
    +$B%;%-%e%j%F%#$N=EMW@-(B
    +       htpasswd $B$K$h$C$F4IM}$5$l$k$h$&$J%&%'%V%Q%9%o!<%I%U%!%$%k(B
    +       $B$O%&%'%V%5!<%P$N(B URI $B$N>l=jFb$K$"$k$Y$-$G$O$"$j$^$;$s!#(B--
    +       $B$9$J$o$A!"%&%'%V%V%i%&%6$K$h$C$F8F$S=P$72DG=$H$9$k$Y$-$G$O$"$j$^$;$s!#(B
    +
    +       -b $B%*%W%7%g%s$N;HMQ$9$kJ}K!$O!"0E9f2=$5$l$F$$$J$$%Q%9%o!<%I$,(B
    +       $B%3%^%s%I%i%$%s$K8=$l$?$H$-$+$iM^;_$5$l$^$9!#(B
    +
    +$B@)8B(B
    +       Windows $B$H(B MPE $B%W%i%C%H%U%)!<%`$G(B htpasswd $B$G0E9f2=$5$l$?(B
    +       $B%Q%9%o!<%I$O(B 255 $BJ8;z$ND9$5$@$1$K@)8B$5$l$F$$$^$9!#(B
    +       $B$h$jD9$$%Q%9%o!<%I$O(B 255 $BJ8;z$K@Z$jhtpasswd $B$K$h$C$F;HMQ$5$l$k(B MD5 $B%"%k%4%j%:%`$O(B Apache
    +       $B%=%U%H%&%'%"$KFCM-$G!"$=$l$rMQ$$$F0E9f2=$5$l$?%Q%9%o!<%I$O(B
    +       $BB>$N%&%'%V%5!<%P$G$O;HMQ$G$-$J$$$G$7$g$&!#(B
    +
    +       $B%f!<%6L>$O(B 255 $B%P%$%H$K@)8B$5$l!"%-%c%i%/%?(B ':' $B$r4^$^$l$J(B
    +       $B$$$+$b$7$l$^$;$s!#(B
    +
    +$B4XO"9`L\(B
    +       SHA1 $B%5%]!<%H$N(B httpd(8) $B$H%9%/%j%W%H$OG[I[J*$H6&$K(B
    +       $B=PMh>e$,$j$^$9!#(B
    +
    +
    + + + + + diff --git a/htdocs/manual/programs/httpd.html.en b/htdocs/manual/programs/httpd.html.en new file mode 100644 index 00000000000..84dcd8f4a48 --- /dev/null +++ b/htdocs/manual/programs/httpd.html.en @@ -0,0 +1,130 @@ + + + + + + + Manual Page: httpd - Apache HTTP Server + + + + + + +

    Manual Page: httpd

    + +
    +NAME
    +     httpd - Apache hypertext transfer protocol server
    +
    +SYNOPSIS
    +     httpd [ -X ] [ -R libexecdir ] [ -d serverroot ] [ -f config
    +     ] [ -C directive ] [ -c directive ] [ -D parameter ]
    +
    +     httpd [ -h ] [ -l ] [ -L ] [ -v ] [ -V ] [ -S ] [ -t ] [  -T
    +     ]
    +
    +DESCRIPTION
    +     httpd is  the  Apache  HyperText  Transfer  Protocol  (HTTP)
    +     server  program.  It  is  designed to be run as a standalone
    +     daemon process. When used like this it will create a pool of
    +     child  processes to handle requests. To stop it, send a TERM
    +     signal to the initial (parent) process. The PID of this pro-
    +     cess  is  written  to  a  file as given in the configuration
    +     file.  Alternatively httpd may be invoked  by  the  Internet
    +     daemon  inetd(8)  each time a connection to the HTTP service
    +     is made.
    +
    +     This manual page only lists the command line arguments.  For
    +     details  of  the directives necessary to configure httpd see
    +     the Apache manual, which is part of the Apache  distribution
    +     or  can  be  found  at http://www.apache.org/. Paths in this
    +     manual may not reflect those compiled into httpd.
    +
    +OPTIONS
    +     -R libexecdir
    +                 This option is  only  available  if  Apache  was
    +                 built  with  the  SHARED_CORE rule enabled which
    +                 forces the Apache core code to be placed into  a
    +                 dynamic  shared  object (DSO) file. This file is
    +                 searched in a hardcoded  path  under  ServerRoot
    +                 per  default.  Use  this  option  if you want to
    +                 override it.
    +
    +     -d serverroot
    +                 Set the initial value for the ServerRoot  direc-
    +                 tive  to  serverroot.  This can be overridden by
    +                 the  ServerRoot  command  in  the  configuration
    +                 file. The default is /usr/local/apache.
    +
    +     -f config   Execute the  commands  in  the  file  config  on
    +                 startup. If config does not begin with a /, then
    +                 it is taken to be a path relative to the Server-
    +                 Root. The default is conf/httpd.conf.
    +
    +     -C directive
    +                 Process the configuration directive before read-
    +                 ing config files.
    +
    +     -c directive
    +                 Process the configuration directive after  read-
    +                 ing config files.
    +
    +     -D parameter
    +                 Sets a configuration parameter which can be used
    +                 with  <IfDefine>...</IfDefine>  sections  in the
    +                 configuration files  to  conditionally  skip  or
    +                 process commands.
    +
    +     -h          Output a short summary of available command line
    +                 options.
    +
    +     -l          Output a  list  of  modules  compiled  into  the
    +                 server.
    +
    +     -L          Output  a  list  of  directives  together   with
    +                 expected  arguments  and places where the direc-
    +                 tive is valid.
    +
    +     -S          Show the settings as parsed from the config file
    +                 (currently only shows the virtualhost settings).
    +
    +     -t          Run syntax tests for configuration  files  only.
    +                 The program immediately exits after these syntax
    +                 parsing with either a return code of  0  (Syntax
    +                 OK)  or  return  code  not  equal  to  0 (Syntax
    +                 Error).
    +
    +     -T          Same as option -t but does not check the config-
    +                 ured document roots.
    +
    +     -X          Run in single-process mode, for internal  debug-
    +                 ging  purposes  only; the daemon does not detach
    +                 from the terminal or fork any children.  Do  NOT
    +                 use this mode to provide ordinary web service.
    +
    +     -v          Print the version of httpd , and then exit.
    +
    +     -V          Print the version and build parameters of  httpd
    +                 , and then exit.
    +
    +FILES
    +     /usr/local/apache/conf/httpd.conf
    +     /usr/local/apache/conf/srm.conf
    +     /usr/local/apache/conf/access.conf
    +     /usr/local/apache/conf/mime.types
    +     /usr/local/apache/conf/magic
    +     /usr/local/apache/logs/error_log
    +     /usr/local/apache/logs/access_log
    +     /usr/local/apache/logs/httpd.pid
    +
    +SEE ALSO
    +     inetd(8).
    +
    +
    + + + + diff --git a/htdocs/manual/programs/httpd.html.html b/htdocs/manual/programs/httpd.html.html new file mode 100644 index 00000000000..ae902c9f7fb --- /dev/null +++ b/htdocs/manual/programs/httpd.html.html @@ -0,0 +1,4 @@ + + + diff --git a/htdocs/manual/programs/httpd.html.ja.jis b/htdocs/manual/programs/httpd.html.ja.jis new file mode 100644 index 00000000000..206f79727ff --- /dev/null +++ b/htdocs/manual/programs/httpd.html.ja.jis @@ -0,0 +1,127 @@ + + + + + + Manual Page: httpd - Apache HTTP Server + + + + + + + +

    Manual Page: httpd

    + +
    +$BL>>N(B
    +       httpd - Apache $B%O%$%Q!<%F%-%9%HE>Aw%W%m%H%3%k(B (HTTP) $B%5!<%P(B
    +
    +$B=q<0(B
    +     httpd [ -X ] [ -R libexecdir ] [ -d serverroot ] [ -f config
    +     ] [ -C directive ] [ -c directive ] [ -D parameter ]
    +
    +     httpd [ -h ] [ -l ] [ -L ] [ -v ] [ -V ] [ -S ] [ -t ] [  -T
    +     ]
    +
    +$B2r@b(B
    +       httpd $B$O(B Apache $B%O%$%Q!<%F%-%9%HE>Aw%W%m%H%3%k(B (HTTP) $B%5!<%P(B
    +       $B%W%m%0%i%`$G$9!#%9%?%s%I%"%m%s%G!<%b%s%W%m%;%9$H$7$Fl9g!"%j%/%(%9%H$r=hM}$9$k(B
    +       $B$?$a$K;R%W%m%;%9$N%W!<%k$r:n@.$7$^$9!#Dd;_$5$;$k$?$a$K$O(B TERM
    +       $B%7%0%J%k$r:G=i$N(B ($B?F(B) $B%W%m%;%9$XAw$C$F$/$@$5$$!#?F%W%m%;%9$N(B
    +       PID $B$O!"@_Dj%U%!%$%kCf$G;XDj$5$l$?%U%!%$%k$K=q$-9~$^$l$^$9!#(B
    +       httpd $B$O!"%9%?%s%I%"%m%s%G!<%b%s%W%m%;%9$H$7$F(B
    +       $B$G$O$J$/!"(BHTTP $B%5!<%S%9$X@\B3$5$l$k$?$S$K%$%s%?!<%M%C%H%9!<%Q!<(B
    +       $B%5!<%P(B inetd(8) $B$+$i5/F0$5$;$k$3$H$b$G$-$^$9!#(B
    +
    +       $B$3$N%^%K%e%"%k%Z!<%8$O%3%^%s%I%i%$%s$N0z?t$r%j%9%H$7$F$$$k$@$1$G$9!#(B
    +       httpd $B$N@_Dj$KI,MW$J%G%#%l%/%F%#%V$N>\:Y$O!"(BApache $BG[I[J*$d(B
    +       http://www.apache.org/ $B$G8+$D$1$k$3$H$,$G$-$k(B Apache $B%^%K%e%"%k$r(B
    +       $B;2>H$7$F$/$@$5$$!#$3$N%^%K%e%"%k$N%Q%9$O!"(Bhttpd $B$K%3%s%Q%$%k$5$l$F$$$k$b$N$H$O0c$&$+$b$7$l$^$;$s!#(B
    +
    +$B%*%W%7%g%s(B
    +     -R libexecdir
    +                 $B$3$N%*%W%7%g%s$O(B Apache $B$r(B SHARED_CORE $B%k!<%k$r2DG=$K(B
    +                 $B$7$F%S%k%I$7$?>l9g$N$_MxMQ2DG=$G$9!#$=$N>l9g!"(BApache $B%3%"%3!<%I(B
    +                 $B$KF0E*$J6&M-%*%V%8%'%/%H(B (DSO) $B%U%!%$%k$KCV$+$l$^$9!#(B
    +                 $B$=$N%U%!%$%k$O%G%U%)%k%H$G(B ServerRoot $BG[2<$N(B
    +                 $B%O!<%I%3!<%I$5$l$?%Q%9Cf$+$i8!:w$5$l$^$9!#(B
    +                 $B$=$l$r>e=q$-$7$?$$>l9g$K$3$N%*%W%7%g%s$r;HMQ$7$F$/$@$5$$!#(B
    +
    +     -d serverroot
    +                   ServerRoot $B%G%#%l%/%F%#%V$N=i4|CM$r(B serverroot $B$G@_Dj(B
    +                   $B$7$^$9!#$3$NCM$O@_Dj%U%!%$%k$N(B Server-Root $B%3%^%s%I$G(B
    +                   $B>e=q$-2DG=$G$9!#%G%U%)%k%H$O(B /usr/local/apache $B$G$9!#(B
    +
    +     -f config
    +                   $B5/F0;~$K!"(Bconfig $B$G;XDj$5$l$?%U%!%$%kCf$N%3%^%s%I$r(B
    +                   $Bconfig $B$,(B / $B$G;O$^$i$J$$>l9g!"(BServerRoot
    +                   $B$+$i$NAjBP%Q%9$H2rconf/httpd.conf $B$G$9!#(B
    +
    +     -C directive
    +                   $B@_Dj%U%!%$%k$rFI$_$3$`A0$K(B directive $B$r=hM}$7$^$9!#(B
    +
    +     -c directive
    +                   $B@_Dj%U%!%$%k$rFI$_$3$s$@8e$K(B directive $B$r=hM}$7$^$9!#(B
    +
    +     -D parameter
    +                   $B@_Dj%U%!%$%k$G>r7o$K$h$C$F%3%^%s%I$r%9%-%C%W$^$?$O=hM}(B
    +                   $B$9$k(B <IfDefine>...</IfDefine> $B%;%/%7%g%s$H6&$K;HMQ$9$k(B
    +                   $B$3$H$,$G$-$k(B parameter $B$r@_Dj$7$^$9!#(B
    +
    +     -h          
    +                   $BMxMQ2DG=$J%3%^%s%I%i%$%s%*%W%7%g%s$NC;$$MWLs$r=PNO$7$^$9!#(B
    +
    +     -l          
    +                   $B%5!<%P$K%3%s%Q%$%k$5$l$F$$$k%b%8%e!<%k$N%j%9%H$r=PNO$7$^$9!#(B
    +
    +     -L          
    +                   $B%G%#%l%/%F%#%V$N%j%9%H$r4|BT$5$l$k0z?t$H%G%#%l%/%F%#%V$,(B
    +                   $BM-8z$J>l=j$H6&$K=PNO$7$^$9!#(B
    +
    +     -S          
    +                   $B@_Dj%U%!%$%k$+$i2r@O$5$l$?@_Dj$rI=<($7$^$9(B
    +                   ($B8=:_$O%P!<%A%c%k%[%9%H$N@_Dj$N$_$rI=<($7$^$9(B)$B!#(B
    +
    +     -t          
    +                   $B@_Dj%U%!%$%k$NJ8K!%F%9%H$N$_$r9T$J$$$^$9!#%W%m%0%i%`$O(B
    +                   $BJ8K!2r@O$K$h$j(B 0 $B$N%j%?!<%s%3!<%I(B ($BJ8K!(B OK) $B$+Hs(B 0 $B$N(B
    +                   $B=*N;%3!<%I(B ($BJ8K!%(%i!<(B) $B$rJV$7$F$9$0$K=*N;$7$^$9!#(B
    +
    +     -T          
    +                   $B%*%W%7%g%s(B -t $B$HF1MM$G$9$,!"@_Dj$5$l$?%I%-%e%a%s%H(B
    +                   $B%k!<%H$r%A%'%C%/$7$^$;$s!#(B
    +
    +     -X          
    +                   $BFbIt$N%G%P%C%0L\E*$N$?$a$N$_$N%7%s%0%k%W%m%;%9%b!<%I$G(B
    +                   $Bo$N%&%'%V%5!<%S%9$r9T$J$&>l9g!"(B
    +                   $B$3$N%b!<%I$r;HMQ$7$F$O$$$1$^$;$s!#(B
    +
    +     -v          httpd $B$N%P!<%8%g%s$r=PNO$7$F=*N;$7$^$9!#(B
    +
    +     -V          httpd $B$N%P!<%8%g%s$H%S%k%I%Q%i%a!<%?$r=PNO$7$F=*N;$7$^$9!#(B
    +
    +$B4XO"%U%!%$%k(B
    +       /usr/local/apache/conf/httpd.conf
    +       /usr/local/apache/conf/srm.conf
    +       /usr/local/apache/conf/access.conf
    +       /usr/local/apache/conf/mime.types
    +       /usr/local/apache/conf/magic
    +       /usr/local/apache/logs/error_log
    +       /usr/local/apache/logs/access_log
    +       /usr/local/apache/logs/httpd.pid
    +
    +$B4XO"9`L\(B
    +       inetd(8)
    +
    +
    + + + + + diff --git a/htdocs/manual/programs/index.html.en b/htdocs/manual/programs/index.html.en new file mode 100644 index 00000000000..3da74a516d6 --- /dev/null +++ b/htdocs/manual/programs/index.html.en @@ -0,0 +1,71 @@ + + + + + + + Apache HTTP Server and Supporting Programs + + + + + + +

    Server and Supporting Programs

    + +

    This page documents all the executable programs included + with the Apache HTTP Server.

    + +
    +
    httpd
    + +
    Apache hypertext transfer protocol server
    + +
    apachectl
    + +
    Apache HTTP server control interface
    + +
    ab
    + +
    Apache HTTP server benchmarking tool
    + +
    apxs
    + +
    APache eXtenSion tool
    + +
    dbmmanage
    + +
    Create and update user authentication files in DBM format + for basic authentication
    + +
    htdigest
    + +
    Create and update user authentication files for digest + authentication
    + +
    htpasswd
    + +
    Create and update user authentication files for basic + authentication
    + +
    logresolve
    + +
    Resolve hostnames for IP-addresses in Apache + logfiles
    + +
    rotatelogs
    + +
    Rotate Apache logs without having to kill the server
    + +
    suexec
    + +
    Switch User For Exec
    + +
    Other Programs
    +
    + + + + diff --git a/htdocs/manual/programs/index.html.html b/htdocs/manual/programs/index.html.html new file mode 100644 index 00000000000..f2710912dc8 --- /dev/null +++ b/htdocs/manual/programs/index.html.html @@ -0,0 +1,4 @@ + + + diff --git a/htdocs/manual/programs/index.html.ja.jis b/htdocs/manual/programs/index.html.ja.jis new file mode 100644 index 00000000000..c5a844fea82 --- /dev/null +++ b/htdocs/manual/programs/index.html.ja.jis @@ -0,0 +1,70 @@ + + + + + + Apache HTTP Server and Supporting Programs + + + + + + + +

    $B%5!<%P$H%5%]!<%H%W%m%0%i%`(B

    + +

    $B$3$N%Z!<%8$G$O!"(BApache HTTP $B%5!<%P$H$H$b$KDs6!$5$l$F$$$k + +

    +
    httpd
    + +
    Apache $B%O%$%Q!<%F%-%9%HE>Aw%W%m%H%3%k%5!<%P(B
    + +
    apachectl
    + +
    Apache HTTP $B%5!<%P%3%s%H%m!<%k%$%s%?!<%U%'!<%9(B
    + +
    ab
    + +
    Apache HTTP $B%5!<%P%Y%s%A%^!<%/%D!<%k(B
    + +
    apxs
    + +
    Apache $B3HD%%D!<%k(B
    + +
    dbmmanage
    + +
    Basic $BG'>Z$K$*$$$FMxMQ$9$k(B DBM $B=q<0$G$N%f!<%6G'>ZMQ%U%!%$%k$N(B + $B:n@.$H99?7(B
    + +
    htdigest
    + + +
    Digest $BG'>Z$K$*$$$FMxMQ$9$k%f!<%6G'>ZMQ%U%!%$%k$N:n@.$H99?7(B
    + +
    htpasswd
    + +
    Basic $BG'>Z$K$*$$$FMxMQ$9$k%f!<%6G'>ZMQ%U%!%$%k$N:n@.$H99?7(B
    + + +
    logresolve
    + +
    Apache $B%m%0%U%!%$%kFb$K$*$1$k(B IP $B%"%I%l%9$N%[%9%HL>2r7h(B
    + + +
    rotatelogs
    + +
    $B%5!<%P$r!!(Bkill $B$7$J$$$G(B Apache $B%m%0$r%m!<%F!<%H$9$k(B
    + +
    suexec
    + +
    Apache $B$,(B Exec $B$9$k:]$N%f!<%6@ZBX(B
    + +
    $B$=$NB>$N%W%m%0%i%`(B
    +
    + + + diff --git a/htdocs/manual/programs/logresolve.html b/htdocs/manual/programs/logresolve.html new file mode 100644 index 00000000000..2d21a941d68 --- /dev/null +++ b/htdocs/manual/programs/logresolve.html @@ -0,0 +1,48 @@ + + + + + + + Manual Page: logresolve - Apache HTTP Server + + + + + + +

    Manual Page: logresolve

    +
    +NAME
    +     logresolve - resolve hostnames  for  IP-addresses  in  Apache
    +     logfiles
    +
    +SYNOPSIS
    +     logresolve  [  -s  filename  ]  [  -c  ]  <   access_log   >
    +     access_log.new
    +
    +DESCRIPTION
    +     logresolve is  a  post-processing  program  to  resolve  IP-
    +     addresses in Apache's access logfiles.  To minimize impact on
    +     your nameserver, logresolve has its very own internal  hash-
    +     table  cache.  This  means  that each IP number will only be
    +     looked up the first time it is found in the log file.
    +
    +OPTIONS
    +     -s filename Specifies a filename to record statistics.
    +
    +     -c          This causes logresolve to apply some DNS checks:
    +                 after  finding the hostname from the IP address,
    +                 it looks up the IP addresses  for  the  hostname
    +                 and  checks that one of these matches the origi-
    +                 nal address.
    +
    +SEE ALSO
    +     httpd(8)
    +
    + + + + diff --git a/htdocs/manual/programs/other.html b/htdocs/manual/programs/other.html new file mode 100644 index 00000000000..a7880476071 --- /dev/null +++ b/htdocs/manual/programs/other.html @@ -0,0 +1,46 @@ + + + + + + + Other Programs - Apache HTTP Server + + + + + + +

    Other Programs

    + +

    The following programs are simple support programs included + with the Apache HTTP Server which do not have their own manual + pages.

    + +

    log_server_status

    + +

    This Perl script is designed to be run at a frequent + interval by something like cron. It connects to the server and + downloads the status information. It reformats the information + to a single line and logs it to a file. Adjust the variables at + the top of the script to specify the location of the resulting + logfile.

    + +

    split-logfile

    + +

    This Perl script will take a combined Web server access log + file and break its contents into separate files. It assumes + that the first field of each line is the virtual host identity + (put there by "%v"), and that the logfiles should be named + that+".log" in the current directory.

    + +

    The combined log file is read from stdin. Records read will + be appended to any existing log files.

    + + + + diff --git a/htdocs/manual/programs/rotatelogs.html b/htdocs/manual/programs/rotatelogs.html new file mode 100644 index 00000000000..82e14ba669a --- /dev/null +++ b/htdocs/manual/programs/rotatelogs.html @@ -0,0 +1,60 @@ + + + + + + + Manual Page: rotatelogs - Apache HTTP Server + + + + + + +

    Manual Page: rotatelogs

    + +
    +NAME
    +     rotatelogs - rotate Apache logs without having to  kill  the
    +     server
    +
    +SYNOPSIS
    +     rotatelogs logfile rotationtime [ offset ]
    +
    +DESCRIPTION
    +     rotatelogs is a simple program for use in  conjunction  with
    +     Apache's piped logfile feature which can be used like this:
    +
    +        TransferLog "|rotatelogs /path/to/logs/access_log 86400"
    +
    +     This creates the files  /path/to/logs/access_log.nnnn  where
    +     nnnn  is  the  system time at which the log nominally starts
    +     (this time will always be a multiple of the  rotation  time,
    +     so you can synchronize cron scripts with it).  At the end of
    +     each rotation time (here  after  24  hours)  a  new  log  is
    +     started.
    +
    +OPTIONS
    +     logfile
    +          The path plus basename of the logfile. The suffix .nnnn
    +          is automatically added.
    +
    +     rotationtime
    +          The rotation time in seconds.
    +
    +     offset
    +          The number of minutes offset from UTC. If omitted, zero
    +          is assumed and UTC is used.  For example, to use local
    +          time in the zone UTC -5 hours, specify a value of -300
    +          for this argument.
    +
    +SEE ALSO
    +     httpd(8)
    +
    +
    + + + + diff --git a/htdocs/manual/programs/suexec.html.en b/htdocs/manual/programs/suexec.html.en new file mode 100644 index 00000000000..f3f89f490a0 --- /dev/null +++ b/htdocs/manual/programs/suexec.html.en @@ -0,0 +1,41 @@ + + + + + + + Manual Page: suexec - Apache HTTP Server + + + + + + +

    Manual Page: suexec

    + +
    +NAME
    +     suexec - Switch User For Exec
    +
    +SYNOPSIS
    +     No synopsis for usage, because this program is  used  inter-
    +     nally by Apache only.
    +
    +DESCRIPTION
    +     suexec is the  "wrapper"  support  program  for  the  suEXEC
    +     behavior for Apache.  It is run from within Apache automat-
    +     ically to switch the user when an external program has to be
    +     run  under  a  different  user.  For  more information about
    +     suEXEC  see  the  document  `Apache  suEXEC  Support'  under
    +     http://www.apache.org/docs/suexec.html .
    +
    +SEE ALSO
    +     httpd(8)
    +
    +
    + + + + diff --git a/htdocs/manual/programs/suexec.html.html b/htdocs/manual/programs/suexec.html.html new file mode 100644 index 00000000000..1551afad674 --- /dev/null +++ b/htdocs/manual/programs/suexec.html.html @@ -0,0 +1,4 @@ + + + diff --git a/htdocs/manual/programs/suexec.html.ja.jis b/htdocs/manual/programs/suexec.html.ja.jis new file mode 100644 index 00000000000..4fe1415c6ef --- /dev/null +++ b/htdocs/manual/programs/suexec.html.ja.jis @@ -0,0 +1,40 @@ + + + + + + Manual Page: suexec - Apache HTTP Server + + + + + + + +

    Manual Page: suexec

    + +
    +$BL>>N(B
    +     suexec - Apache $B$,(B Exec $B$9$k:]$N%f!<%6@ZBX(B
    +
    +$B=q<0(B
    +     $B;HMQJ}K!$N=q<0$O$"$j$^$;$s!#$J$<$J$i$3$N%W%m%0%i%`$O(B
    +     Apache $BFbIt$G$N$_;HMQ$5$l$k$+$i$G$9!#(B
    +
    +$B2r@b(B
    +     suexec $B$O(B Apache $B$N(B suEXEC $B:nMQ$N$?$a$N(B "wrapper" $B%5%]!<%H(B
    +     $B%W%m%0%i%`$G$9!#30It$N%W%m%0%i%`$,0[$J$k%f!<%6$N2<$GpJs$O!"(B
    +     http://www.apache.org/docs/suexec.html $B0J2<$N%I%-%e%a%s%H(B
    +     `Apache suEXEC Support' $B$r8+$F$/$@$5$$!#(B
    +
    +$B4XO"9`L\(B
    +     httpd(8)
    +
    +
    + + + diff --git a/htdocs/manual/readme-tpf.html b/htdocs/manual/readme-tpf.html new file mode 100644 index 00000000000..5d2d5ac3f70 --- /dev/null +++ b/htdocs/manual/readme-tpf.html @@ -0,0 +1,788 @@ + + + + + + + The Apache TPF Port + + + + +
    +

    Overview of the Apache TPF Port

    +
    + [ + Configuration Files + | What's Available | + CGI Scripts | + Options | + Syslog | + Porting Notes ] +
    +
    + +

    Apache includes changes allowing it to run on IBM's + EBCDIC-based + TPF + (Transaction Processing Facility) operating system. This builds + on the + EBCDIC + changes previously made to Apache.

    + +

    Refer to either the TPF4.1 + installation or z/TPF1.1 + installation documents for step-by-step build + instructions.

    + +

    If you would like to be notified when new versions of Apache + are released consider joining the + announcements + list.


    + + +
    +

    Apache Configuration + Files

    +
    + +

    The distributed configuration files (httpd.conf-dist and + mime.types, both located in the conf subdirectory) work on TPF + with the following caveats:

    + +
      +
    • Apache on TPF does not support listening on multiple + ports.
    • + +
    • Performance considerations may dictate setting + KeepAlive to "Off" (the default is "On") or lowering the + Timeout value from the default 300 seconds (5 minutes) in + order to reduce the number of active ECBs on your + system.
    • + +
    • The default value of MaxRequestsPerChild is zero + (infinity). A non-zero value is recommended on TPF to + control resource utilization (such as heap storage) by the + long running Apache child ECBs.
    • + +
    • Unlike on Unix systems, newly created Apache child + processes on TPF re-read the various configuration files + (such as httpd.conf and mime.types). Be sure to stop and + restart Apache after changing configuration files so that + the Apache parent process and all child processes are in + sync.
    • +

    + + +
    +

    What's Available in this + Version

    +
    + +

    Unless otherwise noted either TPF4.1 PUT09 or z/TPF1.1 + is required for the server to function on TPF.

    + +

    The Apache organization provides + online + documentation describing the various modules and components + of the server.

    + +

    Components/modules tested on TPF:

    + +
      +
    • alloc.c
    • + +
    • ap_base64.c
    • + +
    • ap_checkpass.c
    • + +
    • ap_cpystrn.c
    • + +
    • ap_ebcdic.c
    • + +
    • ap_fnmatch.c
    • + +
    • ap_md5c.c
    • + +
    • ap_sha1.c
    • + +
    • ap_signal.c
    • + +
    • ap_slack.c
    • + +
    • ap_snprintf.c
    • + +
    • buff.c
    • + +
    • buildmark.c
    • + +
    • http_config.c
    • + +
    • http_core.c
    • + +
    • http_log.c
    • + +
    • http_main.c
    • + +
    • http_protocol.c
    • + +
    • http_request.c
    • + +
    • http_vhost.c
    • + +
    • logresolve.c (requires TPF4.1 PUT 10 or + z/TPF1.1)
    • + +
    • mod_access.c (Use of mod_access directives + "allow from" & "deny from" + with host names (versus ip addresses) requires + TPF4.1 PUT 10 or z/TPF1.1)
    • + +
    • mod_actions.c
    • + +
    • mod_alias.c
    • + +
    • mod_asis.c
    • + +
    • mod_auth.c
    • + +
    • mod_auth_anon.c
    • + +
    • mod_autoindex.c
    • + +
    • mod_cern_meta.c
    • + +
    • mod_cgi.c (requires TPF4.1 PUT 10 or + z/TPF1.1)
    • + +
    • mod_digest.c
    • + +
    • mod_dir.c
    • + +
    • mod_env.c
    • + +
    • mod_example.c
    • + +
    • mod_expires.c
    • + +
    • mod_headers.c
    • + +
    • mod_imap.c
    • + +
    • mod_include.c (CGI execution requires + TPF4.1 PUT 10 or z/TPF1.1)
    • + +
    • mod_info.c
    • + +
    • mod_log_agent.c
    • + +
    • mod_log_config.c
    • + +
    • mod_log_forensic.c
    • + +
    • mod_log_referer.c
    • + +
    • mod_mime.c
    • + +
    • mod_mime_magic.c
    • + +
    • mod_negotiation.c
    • + +
    • + mod_put.c (third party module)
    • + +
    • mod_setenvif.c
    • + +
    • mod_speling.c
    • + +
    • mod_status.c
    • + +
    • mod_tpf_shm_static.c (third party module, requires + TPF4.1 PUT 10 or z/TPF1.1)
    • + +
    • mod_unique_id.c (requires TPF4.1 PUT 10 or + z/TPF1.1)
    • + +
    • mod_userdir.c
    • + +
    • mod_usertrack.c
    • + +
    • os.c
    • + +
    • os-inline.c
    • + +
    • regular expression parser (used only on + TPF4.1)
    • + +
    • regular expression test tool (used only on TPF4.1; + requires TPF4.1 PUT 10 )
    • + +
    • rfc1413.c
    • + +
    • rotatelogs.c (requires TPF4.1 PUT 10 or + z/TPF1.1; on TPF4.1, if PJ27214 is implemented be sure to + apply PJ28367)
    • + +
    • syslog (requires TPF4.1 PUT13 or z/TPF1.1; see + usage instructions)
    • + +
    • util.c
    • + +
    • util_date.c
    • + +
    • util_md5.c
    • + +
    • util_script.c
    • + +
    • util_uri.c
    • +
    + +

    Components/modules not yet supported on TPF:

    + +
      +
    • htdigest.c
    • + +
    • htpasswd.c
    • + +
    • lib/expat-lite
    • + +
    • lib/sdbm
    • + +
    • mod_auth_digest.c
    • + +
    • mod_proxy.c
    • + +
    • mod_rewrite.c
    • + +
    • mod_vhost_alias.c
    • + +
    • proxy_cache.c
    • + +
    • proxy_connect.c
    • + +
    • proxy_ftp.c
    • + +
    • proxy_http.c
    • + +
    • proxy_util.c
    • +
    + +

    Components/modules that don't apply or that probably won't + ever be available on TPF:

    + +
      +
    • ab.c
    • + +
    • ap_getpass.c
    • + +
    • mod_auth_db.c
    • + +
    • mod_auth_dbm.c
    • + +
    • mod_auth_db.module
    • + +
    • mod_mmap_static.c
    • + +
    • mod_so.c
    • + +
    • suexec.c
    • +

    + + +
    +

    How to Use CGI Scripts

    +
    + +

    The following is a very simple example of a CGI script + ("Hello World") and the necessary steps to run it.
    + Refer to the + mod_cgi + module for additional information.

    + +

    Add necessary directives to httpd.conf:

    + +

    Example:

    + +

    ScriptLog logs/script_log
    + ScriptAlias /cgi-bin/ /usr/local/apache/cgi-bin/

    + +

    A request for + http://myserver/cgi-bin/filename.cgi + would cause the server to run the script + /usr/local/apache/cgi-bin/filename.cgi

    + +

    Create the CGI script:

    + +

    For this example QZZ1 is the name of the TPF + program that will be executed by the CGI script.
    + The directory path must match what is in the httpd.conf file + for ScriptAlias directive.

    + +

    zfile echo "#!QZZ1" > + /usr/local/apache/cgi-bin/filename.cgi
    + zfile cat + /usr/local/apache/cgi-bin/filename.cgi    
    + (expected output: #!QZZ1)

    + +

    Mark the script as executable:

    + +

    zfile chmod 755 + /usr/local/apache/cgi-bin/filename.cgi

    + +

    Create, load, and activate the CGI program (QZZ1) on + TPF:

    + + + + + +
    +
    +/* QZZ1-- simple "Hello world" program to demonstrate basic CGI output */
    +
    +#include <stdio.h>
    +#include <stdlib.h>
    +
    +int main() {
    +
    +   /* Print the CGI response header, required for all HTML output. */
    +   /* Note the extra \n, to send the blank line.                   */
    +   /* Print the HTML response page to STDOUT.                      */
    +   printf("Content-type: text/html\n\n");
    +
    +   printf("<html>\n");
    +   printf("<head><title>CGI Output<title><head>\n");
    +   printf("<body>\n");
    +   printf("<h1>Hello world.<h1>\n");
    +   printf("<body>\n");
    +   printf("<html>\n");
    +
    +   exit(0);
    +}
    +                
    +
    + +

    Request the CGI script from a browser:

    + +

    + http://myserver/cgi-bin/filename.cgi

    + +
    +
    + + +

    How to Use Apache's "Dash" + Options

    +
    + +

    Overview of Apache's "dash" options:

    + +

    Apache can be invoked with various options, such as "-f". + Some of these options display information about the server or + perform syntax checks but they don't actually start the server. + These "information only" options are useful with TPF's ZFILE + command line feature: -h, -l, -L, -S, -t, -T, -v, and -V.

    + +

    Another option, -X, is used when actually running the + server. It is passed to Apache through the ZINET XPARM field + since ZINET is the only way to start the server on TPF.

    + +

    A third group of options apply to both the informational + displays (ZFILE) and running the server (ZINET XPARM): -d, -D + and -f.

    + +

    The rest of Apache's options are either not applicable or + are not supported on TPF.

    + +

    On TPF4.1 using dash options requires PJ27277 which shipped + on PUT13.

    + +

    Table of supported Apache options

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + Option        ZFILEZINETDescription
    -d pathZFILEZINETSet the initial value for the + ServerRoot directive.
    -D defineZFILEZINETSet a configuration parameter which + can be used with <IfDefine>...</IfDefine> + sections in the configuration file to conditionally + skip or process commands.
    -f filenameZFILEZINETUse an alternate configuration file + instead of the default conf/httpd.conf file.
    -hZFILE List a short summary of available + command line options then exit. Note that this outputs + all options, not just those supported on TPF.
    -lZFILE List modules compiled into the server + then exit.
    -LZFILE List available configuration + directives then exit. Note that this outputs all + configuration directives, not just those supported on + TPF.
    -SZFILE Show the settings as parsed from the + configuration file then exit. Currently Apache only + shows the virtual host settings.
    -tZFILE Run syntax tests for configuration + files with document root checks then exit.
    -TZFILE Run syntax tests for configuration + files without document root checks then + exit.
    -vZFILE Show the version number then + exit.
    -VZFILE Show the version number and various + compile settings then exit.
    -X ZINETRun in single-process mode for + internal debugging purposes only. The parent process + does not tpf_fork any children.
    + +

    See + http://httpd.apache.org/docs/programs/httpd.html + for more information about these command line options.

    + +

    Setup for ZFILE examples:

    + +

    Ensure Apache (CHTA) is loaded.

    + +

    Create the httpd script:

    + +

    zfile echo "#!CHTA" > + /bin/httpd
    + zfile cat /bin/httpd  
    (expected + output:  #!CHTA)

    + +

    (See "ZFILE-Activate a TPF Segment or + Script" in the + IBM TPF + Information Center for additional information.)

    + +

    Mark the script as executable:

    + +

    zfile chmod 755 + /bin/httpd

    + +

    ZFILE example 1:

    + +

    zfile httpd -v

    + + + + + +
    +
    +FILE0001I 11.43.09 START OF DISPLAY FROM httpd -v          
    +Server version: Apache/1.3.20 (TPF)
    +Server built: May 23 2001 09:39:22
    +END OF DISPLAY
    +                
    +
    + +

    ZFILE example 2:

    + +

    zfile httpd -t -f + /usr/local/apache/conf/alt.conf

    + + + + + +
    +
    +FILE0002I 11.47.26 START OF ERROR DISPLAY FROM httpd -t ...
    +Syntax OK
    +END OF DISPLAY
    +                
    +
    + +

    ZINET XPARM example:

    + +

    This example uses an alternate configuration file called + /usr/local/apache/conf/alt.conf.

    + +

    Create and transfer your alternate configuration file to + your TPF test system.

    + +

    Add and start Apache using zinet commands:

    + +

    zinet add s-apache pgm-chta + model-daemon user-root xparm--f conf/alt.conf
    + zinet start s-apache

    + +

    (See "ZINET ADD-Add an Internet Server Application Entry" + and "ZINET ALTER-Change an Internet Server Application Entry" + in the IBM + TPF Information Center for more information about using the + XPARM field.)

    + +
    +

    Syslog Daemon

    +
    + +

    Syslog overview:

    + +

    The syslog daemon is a server process that provides a + message logging facility for application and system processes. + It can be used to write messages to log files or to tapes. See + "Operating the Syslog Daemon" in the + IBM TPF + Information Center. And see the Apache ErrorLog + directive + documentation for details on how to use syslog with + Apache.

    + +

    On TPF4.1 syslog capabilities were added with PJ27214 which + shipped with PUT13. You must follow the + TPF4.1 syslog-specific + installation instructions in order to have the option of + using syslog with Apache on a TPF4.1 system. No additional + installation steps are needed for z/TPF1.1 systems.

    + +

    Tips on using syslog with your Apache error log:

    + +

    This section provides some tips on using syslog with Apache. + It is not meant to replace the syslog documentation in the TPF + TCP/IP publication.

    + +
      +
    • The syslog daemon will not create files. If you are + logging to a file (as specified in the syslog.conf + configuration file) that file must already exist and have + permissions that allow the syslog daemon to write to + it.
    • + +
    • You must restart the syslog daemon for it to recognize + changes to its syslog.conf configuration + file.
    • + +
    • The syslog daemon must be active prior to starting + Apache.
    • + +
    • To indicate you want to use syslog with your Apache + error log add the following directive to your + httpd.conf file: + "ErrorLog syslog:facility" where + facility is "local0" through "local7".
    • + +
    • Apache will default the facility to "local7" if you + omit the facility name from the ErrorLog directive (that is + "ErrorLog syslog").
    • + +
    • The syslog facility name must be one that is recognized + by both Apache and the syslog.h header file. The facility + names "local0" through "local7" are explicitly set aside + for your use.
    • + +
    • Although "local0" through "local7" are recommended user + facility names, here is the complete list of names + recognized by both Apache and TPF's syslog.h: auth, cron, + daemon, kern, local0, local1, local2, local3, local4, + local5, local6, local7, lpr, mail, news, syslog, user, and + uucp.
    • + +
    • You won't see the normal Apache startup/shutdown + messages when you use syslog with your Apache error + log.
    • + +
    • Syslog does not support TCP/IP Offload devices (ZCLAW; + used only on TPF4.1)
    • +

    + + +
    +

    Porting Notes

    +
    + +

    Changes made due to differences between UNIX and TPF's + process models:

    + +
      +
    • +

      Signals: On TPF a signal that is sent to a + process remains unhandled until the process explicitly + requests that signals be handled using the + tpf_process_signals() function. Additionally, + the default action for an alarm on TPF is to take an + OPR-7777 dump and exit. (On UNIX the default is the + equivalent of exit() with no dump taken.) + These differences necessitated a few modifications:

      + +
        +
      • bypass the use of ap_block_alarms() + & ap_unblock_alarms()
      • + +
      • add tpf_process_signals() calls
      • + +
      • add select() calls to prevent + blocking.
      • +
      +
    • + +

    • + +
    • +

      Find that function... Some simple functions + & definitions needed to be added on TPF. They are + in src/os/tpf/os.h.

      +
    • + +
    • +

      EBCDIC changes: TPF-specific conversion + tables between US-ASCII and EBCDIC (character set + IBM-1047 to be exact) were created.

      +
    • + +
    • +

      Miscellaneous, minor changes: Various minor + changes (such as casting) were made due to differences + in how some functions are implemented on TPF.

      +
    • +
    +
    + +
    + [ top | + Configuration Files + | What's Available | + CGI Scripts | + Options | + Syslog | + Porting Notes ] +
    + + diff --git a/htdocs/manual/sections.html.en b/htdocs/manual/sections.html.en new file mode 100644 index 00000000000..c3a149831a8 --- /dev/null +++ b/htdocs/manual/sections.html.en @@ -0,0 +1,155 @@ + + + + + + + How Directory, Location and Files sections work + + + + + + +

    How Directory, Location and Files sections + work

    + +

    The sections <Directory>, + <Location> + and <Files> can + contain directives which only apply to specified directories, + URLs or files respectively. Also htaccess files can be used + inside a directory to apply directives to that directory. This + document explains how these different sections differ and how + they relate to each other when Apache decides which directives + apply for a particular directory or request URL.

    + +

    Directives allowed in the sections

    + +

    Everything that is syntactically allowed in + <Directory> is also allowed in + <Location> (except a + sub-<Files> section). Semantically, however + some things, most notably AllowOverride and the + two options FollowSymLinks and + SymLinksIfOwnerMatch, make no sense in + <Location>, + <LocationMatch> or + <DirectoryMatch>. The same for + <Files> -- syntactically everything is fine, + but semantically some things are different.

    + +

    How the sections are merged

    + +

    The order of merging is:

    + +
      +
    1. <Directory> (except regular + expressions) and .htaccess done simultaneously (with + .htaccess, if allowed, overriding + <Directory>)
    2. + +
    3. <DirectoryMatch>, and + <Directory> with regular expressions
    4. + +
    5. <Files> and + <FilesMatch> done simultaneously
    6. + +
    7. <Location> and + <LocationMatch> done simultaneously
    8. +
    + +

    Apart from <Directory>, each group is + processed in the order that they appear in the configuration + files. <Directory> (group 1 above) is + processed in the order shortest directory component to longest. + If multiple <Directory> sections apply to + the same directory they are processed in the configuration + file order. The configuration files are read in the order + httpd.conf, srm.conf and access.conf. Configurations included + via the Include directive will be treated as if + they were inside the including file at the location of the + Include directive.

    + +

    Sections inside <VirtualHost> sections + are applied after the corresponding sections outside + the virtual host definition. This allows virtual hosts to + override the main server configuration. (Note: this only works + correctly from 1.2.2 and 1.3a2 onwards. Before those releases + sections inside virtual hosts were applied before the + main server).

    + +

    Later sections override earlier ones.

    + +

    Notes about using sections

    + +

    The general guidelines are:

    + +
      +
    • If you are attempting to match objects at the filesystem + level then you must use <Directory> and/or + <Files>.
    • + +
    • If you are attempting to match objects at the URL level + then you must use <Location>
    • +
    + +

    But a notable exception is:

    + +
      +
    • proxy control is done via <Directory>. + This is a legacy mistake because the proxy existed prior to + <Location>. A future version of the config + language should probably switch this to + <Location>.
    • +
    + +

    Note about .htaccess parsing:

    + +
      +
    • Modifying .htaccess parsing during Location doesn't do + anything because .htaccess parsing has already occurred.
    • +
    + +

    <Location> and symbolic links:

    + +
      +
    • It is not possible to use "Options + FollowSymLinks" or "Options + SymLinksIfOwnerMatch" inside a + <Location>, + <LocationMatch> or + <DirectoryMatch> section (the options are + simply ignored). Using the options in question is only + possible inside a <Directory> section (or + a .htaccess file).
    • +
    + +

    <Files> and Options:

    + +
      +
    • Apache won't check for it, but using an + Options directive inside a + <Files> section has no effect.
    • +
    + +

    Another note:

    + +
      +
    • There is actually a + <Location>/<LocationMatch> + sequence performed just before the name translation phase + (where Aliases and DocumentRoots + are used to map URLs to filenames). The results of this + sequence are completely thrown away after the translation has + completed.
    • +
    + + + + diff --git a/htdocs/manual/sections.html.html b/htdocs/manual/sections.html.html new file mode 100644 index 00000000000..3a717ebdd42 --- /dev/null +++ b/htdocs/manual/sections.html.html @@ -0,0 +1,4 @@ + + + diff --git a/htdocs/manual/sections.html.ja.jis b/htdocs/manual/sections.html.ja.jis new file mode 100644 index 00000000000..41f08c5e7ea --- /dev/null +++ b/htdocs/manual/sections.html.ja.jis @@ -0,0 +1,155 @@ + + + + + + How Directory, Location and Files sections work + + + + + + + +

    Directory, Location, Files + $B%;%/%7%g%s$NF0:nJ}K!(B

    + +

    $B%;%/%7%g%s(B <Directory>, + <Location>, <Files> + $B$K$O!"$=$l$>$l;XDj$5$l$?%G%#%l%/%H%j!"(BURL, + $B%U%!%$%k$K$N$_E,MQ$5$l$k%G%#%l%/%F%#%V$r=q$/$3$H$,$G$-$^$9!#(B + $B$^$?!"%G%#%l%/%H%j$K%G%#%l%/%F%#%V$rE,MQ$9$k$?$a$K%G%#%l%/%H%jCf$K(B + .htaccess $B%U%!%$%k$r;HMQ$9$k$3$H$b$G$-$^$9!#$3$N%I%-%e%a%s%H$O(B + $B$3$l$i$N%;%/%7%g%s$N0c$$$r@bL@$7!"$=$l$i$H!"%G%#%l%/%H%j$d(B + $B%j%/%(%9%H$5$l$?(B URL $B$K(B Apache $B$,$I$N%G%#%l%/%F%#%V$r(B + $BE,MQ$9$k$+$r7hDj$9$kJ}K!$H$N4X78$r@bL@$7$^$9!#(B

    + +

    $B%;%/%7%g%sCf$K5v2D$5$l$F$$$k%G%#%l%/%F%#%V(B

    + +

    $B9=J8>e(B <Directory> + $B$K=q$1$k$b$N$O$9$Y$F(B <Location> + $B$K$b=q$/$3$H$,$G$-$^$9(B (<Files> + $B%;%/%7%g%s$ONc30$G$9(B)$B!#$7$+$7!"Cf$K$O(B + AllowOverride $B$d(B FollowSymLinks + $B$H(B SymLinksIfOwnerMatch + $B$H$$$&Fs$D$N%*%W%7%g%s$N$h$&$K!"(B<Location>, + <LocationMatch>, + <DirectoryMatch> $BCf$G$O0UL#$N$J$$$b$N$b$"$j$^$9!#(B + $BF1MM$N$3$H$,(B <Files> + $B$K$b8@$($^$9!#9=J8E*$K$O$9$Y$FBg>fIW$G$9$,!"(B + $B0UL#E*$K$O$=$&$G$J$$$b$N$b$"$j$^$9!#(B

    + +

    $B%;%/%7%g%s$N%^!<%8J}K!(B

    + +

    $B%^!<%8$N=gHV$O0J2<$N$h$&$K$J$C$F$$$^$9(B:

    + +
      +
    1. <Directory> ($B@55,I=8=L5$7(B) $B$H(B + .htaccess $B$rF1;~$K(B (.htaccess $B$,5v2D$5$l$F$$$l$P!"$=$l$,(B + <Directory> $B$r(B $B>e=q$-$7$^$9(B) +
    2. + +
    3. <DirectoryMatch> $B$H@55,I=8=$N$"$k(B + <Directory>
    4. + +
    5. <Files> $B$H(B + <FilesMatch> $B$rF1;~$K(B
    6. + +
    7. <Location> $B$H(B + <LocationMatch> $B$rF1;~$K(B
    8. +
    + +

    <Directory> + $B0J30$O!"$=$l$>$l$N%0%k!<%W$O@_Dj%U%!%$%k$K8=$l$?=gHV$K=hM}$5$l$^$9!#(B + <Directory> ($B>e$N%0%k!<%W(B 1) + $B$O%G%#%l%/%H%j$,C;$$$b$N$+$iD9$$$b$N$X$H=hM}$5$l$^$9!#J#?t$N(B + <Directory> $B%;%/%7%g%s$,F1$8%G%#%l%/%H%j$K(B + $BE,MQ$5$l$k>l9g$O!"@_Dj%U%!%$%kCf$N=gHV$K=>$C$F=hM}$5$l$^$9!#(B + $B@_Dj%U%!%$%k$O(B httpd.conf, srm.conf, access.conf + $B$N=g$K=hM}$5$l$^$9!#(BInclude + $B$K$h$C$FA^F~$5$l$?@_Dj$O(B $BA^F~$7$F$$$k%U%!%$%k$N(B + Include + $B%G%#%l%/%F%#%V$N0LCV$K$"$C$?$+$N$h$&$K07$o$l$^$9!#(B

    + +

    <VirtualHost> $B%;%/%7%g%sCf$N%;%/%7%g%s$O(B + $B%P!<%A%c%k%[%9%H$NDj5A$N30B&$NBP1~$9$k%;%/%7%g%s$N(B + $B8e(B$B$KE,MQ$5$l$^$9!#$3$l$K$h$j%P!<%A%c%k%[%9%H$,(B + $B%a%$%s$N%5!<%P@_Dj$r>e=q$-$G$-$k$h$&$J$j$^$9!#(B($BCm0U(B: $B$3$l$O(B + 1.2.2 $B0J9_$H(B 1.3a2 $B0J9_$G$N$_@5$7$/F0:n$7$^$9!#(B + $B$3$l$i$N%j%j!<%9$h$jA0$N$b$N$O%P!<%A%c%k%[%9%H$NCf$N%;%/%7%g%s$O(B + $B%a%$%s%5!<%P$N(B$BA0(B$B$KE,MQ$5$l$F$$$^$7$?(B)$B!#(B

    + +

    $B8e$N%;%/%7%g%s$N%G%#%l%/%F%#%V$,A0$N%;%/%7%g%s$N$b$N$r>e=q$-$7$^$9!#(B

    + +

    $B%;%/%7%g%s$r;H$&:]$NCm0U(B

    + +

    $B0lHLE*$J%,%$%I%i%$%s$O(B:

    + +
      +
    • $B%U%!%$%k%7%9%F%`%l%Y%k$G%*%V%8%'%/%H$N%^%C%A$r9T$J$&$H$-$O!"(B + <Directory> $B$H(B <Files> + $B$r;H$&I,MW$,$"$j$^$9!#(B
    • + +
    • URL $B%l%Y%k$G%*%V%8%'%/%H$N%^%C%A$r9T$J$&$H$-$O(B + <Location> $B$r;H$&I,MW$,$"$j$^$9!#(B
    • +
    + +

    $B=EMW$JNc30$O(B:

    + +
      +
    • $B%W%m%-%7$N@)8f$O(B <Directory> + $B$rDL$7$F9T$J$o$l$^$9!#$3$l$O%W%m%-%7$,(B + <Location> + $B$h$jA0$+$iB8:_$7$?$3$H$K$h$k%_%9$G$9!#>-Mh$N@_Dj8@8l$G$O$*$=$i$/(B + <Location> $B$K@Z$jBX$($i$l$k$G$7$g$&!#(B
    • +
    + +

    .htaccess $B%U%!%$%k$N2r@O$K4X$9$kCm0U(B:

    + +
      +
    • Location $BCf$G(B .htaccess $B$N2r@OJ}K!$rJQ99$7$F$b!"(B + $B2?$bJQ$o$j$^$;$s!#(B.htaccess $B$N2r@O$O4{$K=*$o$C$F$$$k$+$i$G$9!#(B
    • +
    + +

    <Location> $B$H%7%s%\%j%C%/%j%s%/(B:

    + +
      +
    • "Options FollowSymLinks" $B$d(B + "Options SymLinksIfOwnerMatch" $B$O(B + <Location>, + <LocationMatch>, + <DirectoryMatch> + $B%;%/%7%g%s$G$O;H$&$3$H$,$G$-$^$;$s(B + ($B$=$l$i$N%*%W%7%g%s$OC1$KL5;k$5$l$^$9(B)$B!#$=$l$i$N%*%W%7%g%s$O(B + <Directory> $B%;%/%7%g%s(B ($B$b$7$/$O(B + .htaccess $B%U%!%$%k(B) $B$NCf$G$N$_;HMQ2DG=$G$9!#(B
    • +
    + +

    <Files> $B$H(B Options:

    + +
      +
    • Apache $B$O$3$N>u67$O%A%'%C%/$7$^$;$s$,!"(B + <Files> $B%;%/%7%g%s$NCf$G(B Options + $B%G%#%l%/%F%#%V$r;HMQ$7$F$b8z2L$O$"$j$^$;$s!#(B
    • +
    + +

    $BB>$NCm0U(B:

    + +
      +
    • $BA0$rJQ49$9$kCJ3,(B (URL + $B$r%U%!%$%kL>$K%^%C%W$9$k$?$a$K(B Alias $B$d(B + DocumentRoot $B$,;HMQ$5$l$k$H$3$m(B) $B$ND>A0$K(B + <Location>/<LocationMatch> + $B$,9T$J$o$l$^$9!#(B + $B$3$l$i$rE,MQ$7$?7k2L$OJQ49$,=*$o$C$?8e$K40A4$K +
    + + + + diff --git a/htdocs/manual/server-wide.html.en b/htdocs/manual/server-wide.html.en new file mode 100644 index 00000000000..ee4f63147f7 --- /dev/null +++ b/htdocs/manual/server-wide.html.en @@ -0,0 +1,269 @@ + + + + + + + Server-Wide Configuration + + + + + + +

    Server-Wide Configuration

    + +

    This document explains some of the directives provided by + the core server which are used to + configure the basic operations of the server.

    + + +
    + +

    Server + Identification

    + + + + + +
    Related Directives
    +
    + ServerName
    + ServerAdmin
    + ServerSignature
    + ServerTokens
    + UseCanonicalName
    +
    + +

    The ServerAdmin and ServerTokens + directives control what information about the server will be + presented in server-generated documents such as error messages. + The ServerTokens directive sets the value of the + Server HTTP response header field.

    + +

    The ServerName and + UseCanonicalName directives are used by the server + to determine how to construct self-referential URLs. For + example, when a client requests a directory, but does not + include the trailing slash in the directory name, Apache must + redirect the client to the full name including the trailing + slash so that the client will correctly resolve relative + references in the document.

    +
    + +

    File Locations

    + + + + + +
    Related Directives
    +
    + CoreDumpDirectory
    + DocumentRoot
    + ErrorLog
    + Lockfile
    + PidFile
    + ScoreBoardFile
    + ServerRoot
    +
    + +

    These directives control the locations of the various files + that Apache needs for proper operation. When the pathname used + does not begin with a slash "/", the files are located relative + to the ServerRoot. Be careful about locating files + in paths which are writable by non-root users. See the security tips documentation + for more details.

    +
    + +

    Process Creation

    + + + + + +
    Related Directives
    +
    + BS2000Account
    + Group
    + MaxClients
    + MaxRequestsPerChild
    + MaxSpareServers
    + MinSpareServers
    + ServerType
    + StartServers
    + ThreadsPerChild
    + User
    +
    + +

    When ServerType is set to its recommended value + of Standalone, Apache 1.3 for Unix is a + pre-forking web server. A single control process is responsible + for launching child processes which listen for connections and + serve them when they arrive. Apache always tries to maintain + several spare or idle server processes, which stand + ready to serve incoming requests. In this way, clients do not + need to wait for a new child processes to be forked before + their requests can be served.

    + +

    The StartServers, MinSpareServers, + MaxSpareServers, and MaxServers + regulate how the parent process creates children to serve + requests. In general, Apache is very self-regulating, so most + sites do not need to adjust these directives from their default + values. Sites which need to serve more than 256 simultaneous + requests may need to increase MaxClients, while + sites with limited memory may need to decrease + MaxClients to keep the server from thrashing + (swapping memory to disk and back). More information about + tuning process creation is provided in the performance hints + documentation.

    + +

    While the parent process is usually started as root under + Unix in order to bind to port 80, the child processes are + launched by Apache as a less-privileged user. The + User and Group directives are used to + set the privileges of the Apache child processes. The child + processes must be able to read all the content that will be + served, but should have as few privileges beyond that as + possible. In addition, unless suexec + is used, these directives also set the privileges which will be + inherited by CGI scripts.

    + +

    MaxRequestsPerChild controls how frequently the + server recycles processes by killing old ones and launching new + ones.

    + +

    Under Windows, Apache launches one control process and one + child process. The child process creates multiple threads to + serve requests. The number of threads is controlled by the + ThreadsPerChild directive.

    +
    + +

    Network + Configuration

    + + + + + +
    Related Directives
    +
    + BindAddress
    + KeepAlive
    + KeepAliveTimeout
    + Listen
    + ListenBackLog
    + AcceptFilter
    + AcceptMutex
    + MaxKeepAliveRequests
    + Port
    + SendBufferSize
    + TimeOut
    +
    + +

    When Apache starts, it connects to some port and address on + the local machine and waits for incoming requests. By default, + it listens to all addresses on the machine, and to the port as + specified by the Port directive in the server + configuration. However, it can be told to listen to more than + one port, to listen to only selected addresses, or a + combination. This is often combined with the Virtual Host feature which determines how + Apache responds to different IP addresses, hostnames and + ports.

    + +

    There are two directives used to restrict or specify which + addresses and ports Apache listens to. The + BindAddress directive is used to restrict the + server to listening to a single IP address. The + Listen directive can be used to specify multiple + IP addresses and/or Ports to which Apache will listen.

    + +

    The ListenBackLog, SendBufferSize, + and TimeOut directives are used to adjust how + Apache interacts with the network.AcceptFilter + controls a BSD specific filter optimization. See the BSD + section on performance hints + documentation. AcceptMutex controls which accept + mutex method will be used. For an explanation of what this is + and why it's needed, see the performance tuning guide

    + +

    The KeepAlive, KeepAliveTimeout, + and MaxKeepAliveRequests directives are used to + configure how Apache handles persistent connections.

    +
    + +

    Limiting Resource + Usage

    + + + + + +
    Related Directives
    +
    + LimitRequestBody
    + LimitRequestFields
    + LimitRequestFieldsize
    + LimitRequestLine
    + RLimitCPU
    + RLimitMEM
    + RLimitNPROC
    + ThreadStackSize
    +
    + +

    The LimitRequest* directives are used to place + limits on the amount of resources Apache will use in reading + requests from clients. By limiting these values, some kinds of + denial of service attacks can be mitigated.

    + +

    The RLimit* directives are used to limit the + amount of resources which can be used by processes forked off + from the Apache children. In particular, this will control + resources used by CGI scripts and SSI exec commands.

    + +

    The ThreadStackSize directive is used only on + Netware to control the stack size.

    + + + + diff --git a/htdocs/manual/server-wide.html.fr b/htdocs/manual/server-wide.html.fr new file mode 100644 index 00000000000..bdc42466e72 --- /dev/null +++ b/htdocs/manual/server-wide.html.fr @@ -0,0 +1,310 @@ + + + + + + + + + Configuration globale du serveur + + + + + + +

    Configuration globale du serveur

    + +

    Ce document décrit certaines directives + traitées par le noyau du + serveur qui sont utilisées pour configurer les + opérations de base du serveur.

    + + +
    + +

    Identification + du serveur

    + + + + + +
    Directives + associées
    +
    + ServerName
    + ServerAdmin
    + ServerSignature
    + ServerTokens
    + UseCanonicalName
    +
    + +

    Les directives ServerAdmin and + ServerTokens contrôlent quelles informations + du serveur seront présentées dans les pages + générées par le serveur telles que les + messages d'erreur. La directive ServerTokens + assigne la valeur du champ serveur dans les en-têtes de + réponse HTTP.

    + +

    Les directives ServerName and + UseCanonicalName sont utilisées pour + déterminer comment former les URLs s'auto + référençant. Par exemple, quand un client + requiert un répertoire, mais n'inclut pas de barre + oblique finale dans le nom du répertoire, Apache doit + rediriger le client vers le nom complet, incluant la barre + oblique finale permettant ainsi au client de résoudre + correctement les références relatives contenues + dans le document.

    +
    + +

    Emplacement des + fichiers

    + + + + + +
    Directives + associées
    +
    + CoreDumpDirectory
    + DocumentRoot
    + ErrorLog
    + Lockfile
    + PidFile
    + ScoreBoardFile
    + ServerRoot
    +
    + +

    Ces directives contrôlent les emplacements des + différents fichiers qu'Apache utilise pour ses propres + besoins. Quand le chemin employé ne commence pas par une + barre oblique, les fichiers sont localisés relativement + à ServerRoot. Soyez attentifs à + placer ces fichiers dans des chemins qui sont autorisés + en écriture aux utilisateurs autres que root. Voir les + trucs sur la + sécurité pour plus de détails.

    +
    + +

    Création des + processus

    + + + + + +
    Directives + associées
    +
    + BS2000Account
    + Group
    + MaxClients
    + MaxRequestsPerChild
    + MaxSpareServers
    + MinSpareServers
    + ServerType
    + StartServers
    + ThreadsPerChild
    + User
    +
    + +

    Si la directive ServerType est définie + avec la valeur recommandée de Standalone, + Apache 1.3 sur Unix est basé sur un modèle de + prélancement des processus. Un unique processus de + contrôle est responsable de lancer des processus fils qui + écoutent les connexions et les traitent à leur + arrivée. Apache essaye de maintenir un certain nombre de + processus en réserve ou inactifs, qui restent toujours + prêts à traiter les requêtes arrivantes. De + cette manière, les clients n'ont pas à attendre + que de nouveaux processus fils soient lancés avant que + leurs requêtes soient traitées.

    + +

    Les directives StartServers, + MinSpareServers, MaxSpareServers, et + MaxServers régissent comment le processus + père crée les processus fils pour traiter les + requêtes. En général Apache se régit + seul correctement, et la plupart des sites n'ont pas besoin + d'ajuster la valeur de ces directives. Les sites qui veulent + servir plus de 256 requêtes simultanées doivent + augmenter la valeur de MaxClients, tandis que les + sites tournant sur des machines limitées en + mémoire doivent réduire la valeur de + MaxClients afin d'éviter d'utiliser le + fichier d'échange. Plus d'informations sur le + paramétrage de la création des processus se + trouvent dans la documentation Aide sur les performances + générales.

    + +

    Tandis que le processus père est + généralement lancé en tant que root sous + Unix pour se connecter sur le port 80, les processus fils sont + lancés sous un utilisateur moins + privilégié. Les directives User et + Group servent à définir les + privilèges des processus fils. Les processus fils + doivent être capable de lire le contenu devant être + servi, mais doivent avoir le minimum de privilèges + possibles. De plus, à moins que suexec soit utilisé, ces + directives définissent également les droits qui + seront hérités par les scripts CGI.

    + +

    MaxRequestsPerChild contrôle la + fréquence de rénovation des processus, en + supprimant les anciens et en lançant de nouveaux.

    + +

    Sous Windows, Apache lance un processus père et un + processus fils. Le processus fils crée un ensemble de + threads pour traiter les requêtes. Le nombre de threads + est contrôlé par la directive + ThreadsPerChild.

    +
    + +

    Configuration + réseau

    + + + + + +
    Directives + associées
    +
    + BindAddress
    + KeepAlive
    + KeepAliveTimeout
    + Listen
    + ListenBackLog
    + AcceptFilter
    + MaxKeepAliveRequests
    + Port
    + SendBufferSize
    + TimeOut
    +
    + +

    Au démarrage d'Apache, celui ci se connecte à + un port et une adresse donnés sur la machine locale et + attend l'arrivée de requêtes. Par défaut, + il écoute sur toutes les adresses, et sur le port + défini par la directive Port. Toutefois, on + peut lui indiquer d'écouter sur plus d'un port, de + n'écouter qu'à partir d'une seule adresse, ou une + combinaison des deux. Ceci est généralement + combiné avec la fonction d' hôte + virtuel qui détermine comment Apache répond + aux différentes adresses IP, noms d'hôtes et + ports.

    + +

    Il y a deux directives qui permettent de restreindre ou de + spécifier quelles adresses et quels ports Apache doit + écouter. La directive BindAddress restreint + le serveur à n'écouter qu'une seule adresse IP. + La directive Listen peut être + utilisée pour spécifier un ensemble d'adresses et + de ports qu'Apache doit écouter.

    + +

    Les directives ListenBackLog, + SendBufferSize, et TimeOut permettent + d'adjuster comment Apache interagit avec le réseau. La + directive AcceptFilter contrôle une + optimisation spécifique à BSD. Veuillez vous + référer à la section concernant BSD dans + la documentation sur la + performance. -->

    +
    +
    + + +

    Les directives KeepAlive, + KeepAliveTimeout, et + MaxKeepAliveRequests définissent comment + Apache gère les connexions persistantes.

    +
    + +

    Limitation de + l'utilisation des Ressources

    + + + + + +
    Directives + associées
    +
    + LimitRequestBody
    + LimitRequestFields
    + LimitRequestFieldsize
    + LimitRequestLine
    + RLimitCPU
    + RLimitMEM
    + RLimitNPROC
    + ThreadStackSize
    +
    + +

    Les directives commençant par + LimitRequest sont employées pour fixer des + limites sur la quantité de ressources qui seront + utilisées pendant la lecture des requêtes + clientes. En limitant ces valeurs, certains types de + déni de service peuvent être + atténués.

    + +

    Les directives commençant par RLimit + sont employées pour fixer des limites sur la + quantité de ressources qu'utiliseront les processus + lancés par les processus enfants Apache. En particulier, + elles contrôle les ressources utilisées par les + scripts CGI et les commandes exec SSI.

    + +

    La directive ThreadStackSize est + utilisée seulement sur Netware pour contrôler la + taille de la pile.

    + + + + diff --git a/htdocs/manual/server-wide.html.html b/htdocs/manual/server-wide.html.html new file mode 100644 index 00000000000..2ad8e1df41e --- /dev/null +++ b/htdocs/manual/server-wide.html.html @@ -0,0 +1,4 @@ + + + diff --git a/htdocs/manual/server-wide.html.ja.jis b/htdocs/manual/server-wide.html.ja.jis new file mode 100644 index 00000000000..ab7583d69a8 --- /dev/null +++ b/htdocs/manual/server-wide.html.ja.jis @@ -0,0 +1,269 @@ + + + + + + Server-Wide Configuration + + + + + + + +

    $B%5!<%PA4BN$N@_Dj(B

    + +

    $B$3$N%I%-%e%a%s%H$G$O(B$B%3%"(B$B%5!<%P$N(B + $B%G%#%l%/%F%#%V$NCf$G!"4pK\F0:n$r@_Dj$9$k$?$a$N$b$N$r@bL@$7$^$9!#(B +

    + + +
    + +

    $B%5!<%P(B ID

    + + + + + + +
    $B4XO"%G%#%l%/%F%#%V(B
    +
    + ServerName
    + ServerAdmin
    + ServerSignature
    + ServerTokens
    + UseCanonicalName
    +
    + +

    ServerAdmin $B%G%#%l%/%F%#%V$H(B ServerTokens + $B%G%#%l%/%F%#%V$O!"%(%i!<%a%C%;!<%8$J$I$N%5!<%P$,:n$k%I%-%e%a%s%H$K!"(B + $B$I$N$h$&$J%5!<%P$N>pJs$rI=<($9$k$+$r@)8f$7$^$9!#(B + ServerTokens $B%G%#%l%/%F%#%V$O!"(BServer HTTP + $B%l%9%]%s%9%X%C%@%U%#!<%k%I$NCM$r@_Dj$7$^$9!#(B

    + +

    ServerName $B%G%#%l%/%F%#%V$H(B + UseCanonicalName $B%G%#%l%/%F%#%V$O!"(B + $B%5!<%P$,<+J,<+?H$r;2>H$9$k(B URL $B$r:n$k$H$-$K;H$o$l$^$9!#$?$H$($P!"(B + $B%/%i%$%"%s%H$,%G%#%l%/%H%j$rMW5a$7$F!"$=$N%G%#%l%/%H%jL>$N:G8e$K(B + $B%9%i%C%7%e$,IU$$$F$$$J$$$h$&$J>l9g$K$O!"%I%-%e%a%s%H$NAjBPE*$J(B + $B;2>H$r@5$7$/2r7h$G$-$k$h$&$K$9$k$?$a$K!"(BApache $B$O:G8e$N%9%i%C%7%e(B + $B$r4^$s$@40A4$J%Q%9$K%/%i%$%"%s%H$r%j%@%$%l%/%H$5$;$kI,MW$,$"$j$^$9!#(B +

    +
    + +

    $B%U%!%$%k$N0LCV(B

    + + + + + +
    $B4XO"%G%#%l%/%F%#%V(B
    +
    + CoreDumpDirectory
    + DocumentRoot
    + ErrorLog
    + Lockfile
    + PidFile
    + ScoreBoardFile
    + ServerRoot
    +
    + +

    $B$3$l$i$N%G%#%l%/%F%#%V$O(B Apache $B$,E,@Z$JF0:n$r$9$k$?$a$KI,MW$J(B + $B3FServerRoot + $B$+$i$NAjBP%Q%9$H$7$FC5$5$l$^$9!#(B + root $B0J30$N%f!<%6$,=q$-9~$_2DG=$J%Q%9$K%U%!%$%k$rCV$/>l9g$OCm0U$,I,MW$G$9!#(B + $B>\:Y$O(B$B!V%;%-%e%j%F%#>pJs!W(B$B$r(B + $B;2>H$7$F$/$@$5$$!#(B

    +
    + +

    $B%W%m%;%9@8@.(B

    + + + + + +
    $B4XO"%G%#%l%/%F%#%V(B
    +
    + BS2000Account
    + Group
    + MaxClients
    + MaxRequestsPerChild
    + MaxSpareServers
    + MinSpareServers
    + ServerType
    + StartServers
    + ThreadsPerChild
    + User
    +
    + +

    ServerType $B$K?d>)$5$l$F$$$kCM$G$"$k(B + Standalone $B$,@_Dj$5$l$F$$$k>l9g$O!"(BUnix $B>e$G$N(B Apache + $B$O(B pre-forking $B%5!<%P$G$9!#$=$3$G$O0l$D$N@)8fMQ%W%m%;%9$,;R%W%m%;%9$r(B + $B5/F0$9$k@UG$$r;}$A$^$9!#$=$7$F!";R%W%m%;%9$O%W%m%;%9$,@8B8$7$F$$$k4V(B + listen $B$7!"@\B3$5$l$?$i$=$N%3%M%/%7%g%s$KBP$9$k=hM}$r9T$J$$$^$9!#(B + Apache $B$O%j%/%(%9%H$,Mh$?$H$-$K$9$0$K1~Ez$G$-$k$h$&$K!">o$KJ#?t$N(B + $B%9%Z%"(B$B%5!<%P%W%m%;%9!"$^$?$O%"%$%I%k%5!<%P%W%m%;%9$r0];}(B + $B$7$h$&$H$7$^$9!#$3$&$9$k$3$H$G!"%j%/%(%9%H$,07$o$l$kA0$K?7$7$$;R%W%m%;%9$,(B + fork $B$5$l$k$N$r%/%i%$%"%s%H$,BT$DI,MW$,$J$/$J$j$^$9!#(B

    + +

    StartServers, MinSpareServers, + MaxSpareServers, MaxServers $B$O!"(B + $B?F%W%m%;%9$,%j%/%(%9%H$r07$&$3$H$K$J$k;R%W%m%;%9$r:n@.$9$kJ}K!$r@)8f$7$^$9!#(B + $BDL>o!"(BApache $B$OHs>o$K<+@)E*$G$9$N$G!"$[$H$s$I$N%5%$%H$G$O(B + $B%G%U%)%k%HCM$+$iJQ99$9$kI,MW$O$"$j$^$;$s!#$?$@!"F1;~$K(B 256 $B$rD6$($k(B + $B%j%/%(%9%H$r07$&%5%$%H$O(B MaxClients $B$rA}$d$9I,MW$,$"$k$G$7$g$&!#(B + $B0lJ}!"%a%b%j$N>/$J$$%5%$%H$G$O!"%5!<%P$,%9%i%C%7%s%0(B ($B%a%b%j$r%G%#%9%/$K(B + $B%9%o%C%W$7$?$j!"%a%b%j$KLa$7$?$j$9$k$N$r7+$jJV$9(B) $B$rKI$0$?$a$K(B + MaxClients $B$r8:$i$9I,MW$,$"$k$G$7$g$&!#(B + $B%W%m%;%9:n@.$r%A%e!<%s$9$k$?$a$N>\$7$$>pJs$O(B + $B@-G=$N>pJs(B + $B%I%-%e%a%s%H$r;2>H$7$F$/$@$5$$!#(B +

    + +

    Unix $B$G$ODL>o!"?F%W%m%;%9$O(B 80 $BHV%]!<%H$r%P%$%s%I$9$k$?$a$K(B + root $B$G5/F0$5$l$^$9$,!";R%W%m%;%9$O(B Apache $B$+$i$h$jFC8"$N>/$J$$(B + $B%f!<%6$H$7$F5/F0$5$l$^$9!#(BUser $B%G%#%l%/%F%#%V$H(B + Group$B%G%#%l%/%F%#%V$O!"(BApache $B$N;R%W%m%;%9$K@_Dj$5$l$k(B + $BFC8"$r@_Dj$9$k$?$a$K;HMQ$5$l$^$9!#;R%W%m%;%9$ODs6!$9$k$9$Y$F$N(B + $B%3%s%F%s%D$rFI$a$J$1$l$P$$$1$^$;$s$,!"(B + $B$=$l0J>e$NFC8"$O>/$J$1$l$P>/$J$$J}$,K>$^$7$$$G$9!#(B + $B$^$?!"(Bsuexec $B$,;HMQ$5$l$F$$$J$$$H$-$O!"(B + CGI $B%9%/%j%W%H$,7Q>5$9$kFC8"$K$b$3$l$i$N%G%#%l%/%F%#%V$N(B + $B@_Dj$,E,MQ$5$l$^$9!#(B

    + +

    MaxRequestsPerChild $B$O!"%5!<%P$,8E$$%W%m%;%9$r(B + kill $B$7$F?7$7$$%W%m%;%9$r5/F0$9$k$3$H$G!"(B + $B%W%m%;%9$r:FMxMQ$9$kIQEY$r@_Dj$7$^$9!#(B

    + +

    Windows $B$G$O!"(BApache $B$O@)8f%W%m%;%90l$D$H;R%W%m%;%90l$D$G%9%?!<%H(B + $B$7$^$9!#;R%W%m%;%9$O%j%/%(%9%H$K1~$($k$?$a$KJ#?t$N%9%l%C%I$r:n@.$7$^$9!#(B + $B%9%l%C%I$N?t$O(B ThreadsPerChild $B%G%#%l%/%F%#%V$G@)8f$7$^$9!#(B +

    +
    + +

    $B%M%C%H%o!<%/@_Dj(B

    + + + + + + +
    $B4XO"%G%#%l%/%F%#%V(B
    +
    + BindAddress
    + KeepAlive
    + KeepAliveTimeout
    + Listen
    + ListenBackLog
    + AcceptFilter
    + AcceptMutex
    + MaxKeepAliveRequests
    + Port
    + SendBufferSize
    + TimeOut
    +
    + + +

    Apache $B$O5/F0$9$k$H!"%m!<%+%k%^%7%s$N2?$i$+$N%]!<%HHV9f$H(B + $B%"%I%l%9$K%3%M%/%H$7!"%j%/%(%9%H$rBT$A$^$9!#%G%U%)%k%H$G$O!"(B + $B%^%7%s$K3d$jEv$F$i$l$F$$$k$9$Y$F$N%"%I%l%9$G%5!<%P@_Dj$N(B + Port $B%G%#%l%/%F%#%V$G;XDj$5$l$F$$$k%]!<%HHV9f$r(B listen + $B$7$^$9!#Fs$D0J>e$N%]!<%H$r(B listen $B$7$?$j!"A*Br$5$l$?%"%I%l%9$N$_$r(B + listen $B$7$?$j!"$=$NAH$_9g$o$;$r(B listen $B$7$?$j$9$k$h$&$K$b$G$-$^$9!#(B + $B0c$&(B IP $B%"%I%l%9!"%[%9%HL>!"%]!<%HHV9f$K$h$C$F(B Apache $B$N1~Ez$r(B + $B7hDj$9$k(B$B%P!<%A%c%k%[%9%H(B$B5!G=$HAH$_9g$o$;$F(B + $B;H$o$l$k$3$H$,$h$/$"$j$^$9!#(B +

    + +

    Apache $B$,(B listen $B$9$k%"%I%l%9$H%]!<%HHV9f$r;XDj!"(B + $B$b$7$/$O@)8B$9$k%G%#%l%/%F%#%V$OFs$D$"$j$^$9!#(B + BindAddress $B%G%#%l%/%F%#%V$O%5!<%P$,0l$D$N(B IP + $B%"%I%l%9$@$1$r(B listen $B$5$;$k$?$a$K;HMQ$5$l$^$9!#(B + Listen $B%G%#%l%/%F%#%V$O(B Apache $B$,(B listen $B$9$k(B IP $B%"%I%l%9$H(B + $B%]!<%HHV9f$NAH!"$^$?$O$I$A$i$+0lJ}$rJ#?t;XDj$9$k$?$a$K;HMQ$5$l$^$9!#(B

    + +

    ListenBackLog $B%G%#%l%/%F%#%V!"(BSendBufferSize + $B%G%#%l%/%F%#%V!"(BTimeOut $B%G%#%l%/%F%#%V$O!"(BApache $B$H(B + $B%M%C%H%o!<%/$H$N4X78$rD4@0$7$^$9!#(BAcceptFilter + $B$O(B BSD $BFCM-$N%U%#%k%?$N:GE,2=$r@)8f$7$^$9!#(B + $B@-G=$K4X$9$k%R%s%H(B$B$N(B BSD $B$N@a$r(B + $B8+$F$/$@$5$$!#(BAcceptMutex $B$O$I$N$h$&$K(B accept $B;~$N(B + $BGSB>@)8f$r9T$J$&$+$r@)8f$7$^$9!#$3$l$,0lBN2?$G!"$J$$B0lHLE*$J@-G=$K4X$9$k%R%s%H(B + $B$r8+$F$/$@$5$$!#(B

    + +

    KeepAlive $B%G%#%l%/%F%#%V!"(BKeepAliveTimeout + $B%G%#%l%/%F%#%V!"(BMaxKeepAliveRequests $B%G%#%l%/%F%#%V$O!"(B + Apache $B$,(B persistent connection $B$r$I$N$h$&$K07$&$+$r@)8f$7$^$9!#(B

    +
    + +

    $B%j%=!<%9$N@)8B(B

    + + + + + + +
    $B4XO"%G%#%l%/%F%#%V(B
    +
    + LimitRequestBody
    + LimitRequestFields
    + LimitRequestFieldsize
    + LimitRequestLine
    + RLimitCPU
    + RLimitMEM
    + RLimitNPROC
    + ThreadStackSize
    +
    + +

    LimitRequest* $B%G%#%l%/%F%#%V$O(B Apache $B$,(B + $B%/%i%$%"%s%H$+$i$N%j%/%(%9%HFI$_9~$_$G;H$&%j%=!<%9$r@)8B$9$k$?$a$K(B + $B;H$o$l$^$9!#$3$l$i$NCM$r@)8B$9$k$3$H$G!"$$$/$D$+$N%5!<%S%95qH]967b$N(B + $B1F6A$rOB$i$2$k$3$H$,$G$-$^$9!#(B

    + +

    RLimit* $B%G%#%l%/%F%#%V$O!"(BApache $B$N;R%W%m%;%9$+$i(B + fork $B$5$l$?%W%m%;%9$,;HMQ$9$k%j%=!<%9$r@)8B$9$k$?$a$K(B + $B;H$o$l$^$9!#FC$K!"$3$l$O(B CGI $B%9%/%j%W%H$H(B SSI exec $B%3%^%s%I$G(B + $B;H$o$l$k%j%=!<%9$r@)8f$7$^$9!#(B

    + +

    ThreadStackSize $B$O(B Netware $B$G$N$_!"(B + $B%9%?%C%/$NBg$-$5$r@)8f$9$k$?$a$K;H$o$l$^$9!#(B

    + + + diff --git a/htdocs/manual/sitemap.html b/htdocs/manual/sitemap.html new file mode 100644 index 00000000000..e2af048506d --- /dev/null +++ b/htdocs/manual/sitemap.html @@ -0,0 +1,178 @@ + + + + + Site Map + + + + + + + +

    Site Map

    + + + + + + + diff --git a/htdocs/manual/sourcereorg.html b/htdocs/manual/sourcereorg.html new file mode 100644 index 00000000000..10175ae1e6b --- /dev/null +++ b/htdocs/manual/sourcereorg.html @@ -0,0 +1,287 @@ + + + + + + + Source Re-organisation + + + + + + +

    Source Re-organisation

    + As of 1.3, the Apache source directories have been + re-organised. This re-organisation is designed to simplify the + directory structure, make it easier to add additional modules, + and to give module authors a way of specifying compile time + options or distribute binary modules. + +

    Summary of Changes

    + The source changes are: + +
      +
    • The non-module source files have moved from + src into src/main
    • + +
    • The module source files previously in src + have moved to src/modules/standard
    • + +
    • The support directory is now in + src/support
    • + +
    • The existing symbol names used for global Apache function + and variable identifiers have been renamed in the source. + This way namespace conflicts are avoided when linking Apache + with third-party libraries. See the file + src/include/compat.h both for the list of + renamed symbol names and for a way to get source backward + compatibility in existing third-party module sources.
    • +
    + In addition, the following enhancements have been made: + +
      +
    • OS abstractions can be added in the src/os + directory. Currently this contains information for unix, OS/2 + and Windows 32 platforms.
    • + +
    • Configuration syntax has been simplified for + adding new modules. Users no longer need to enter the + module's structure name. In addition, new modules can be + located anywhere on the file system, or typically in new or + existing directories under src/modules.
    • + +
    • Module authors can give simpler instructions for adding + their modules to Apache compilation. They can also now + provide compile time information required by + Configure, such as additional libraries + required.
    • + +
    • Module authors can distribute pre-compiled (.a or .o) + versions of their modules if required, along with a "module + definition file" which contains the information required by + Configure.
    • + +
    • All the sub-directories (main, modules/* and os/*) are + built as libraries.
    • + +
    • The new Apache Autoconf-style Interface (APACI) script + named configure replaced the old top-level + Makefile and + src/helpers/InstallApache stuff.
    • +
    + +

    Adding Modules

    + Modules are added to Apache by adding a reference to them in + src/Configuration then running + Configure and make. In earlier + version of Apache before 1.3, the line added to Configuration + looked like this: +
    +  Module    status_module    mod_status.o
    +
    + From 1.3 onwards, the AddModule line should be + used instead, and typically looks like this: +
    +  AddModule    modules/standard/mod_status.o
    +
    + The argument to AddModule is the path, relative to + src, to the module file's source or object file. + +

    Normally when adding a module you should follow the + instructions of the module author. However if the module comes + as a single source file, say mod_foo.c, then the recommended + way to add the module to Apache is as follows:

    + +
      +
    • Put mod_foo.c into the directory + src/modules/extra
    • + +
    • Go to the src directory and add the + following line to Configuration
      + AddModule modules/extra/mod_foo.o
    • + +
    • Run ./Configure
    • + +
    • Run make
    • +
    + +

    New Facilities for Module Authors

    + In previous releases of Apache, new modules were added to the + src directory, and if the module required any + additional compilation options (such as libraries) they would + have to be added to Configuration. Also the user + would have to be told the module's structure name to add on the + Module line of Configuration. + +

    From Apache 1.3 onwards, module authors can make use of + these new features:

    + +
      +
    • Simplified Configuration command AddModule + which only requires a path to the module source or object + file
    • + +
    • If the module requires compile time options (such as + extra libraries) these can be specified in the module file + source or an external "module definition file".
    • + +
    • If a module is distributed as binary (.o or .a) then an + external "module definition file" can also be distributed + which gives the information Configure needs to add the + module, such as extra libraries and the module's structure + name.
    • + +
    • Modules can be installed anywhere on the file system, + although a directory under src/modules is + recommended.
    • + +
    • If the module is in its own directory, Apache can + automatically create a Makefile to build the module given a + file containing the module's dependencies.
    • + +
    • For building a third-party module + outside the Apache source tree the new + apxs support tool can be used to compile the + module into a dynamic shared object + (DSO), install it into the existing Apache installation + and optionally activating it in the Apache + httpd.conf file. The only requirement is that + Apache has DSO-support for the used platform and the module + mod_so was built + into the server binary httpd.
    • +
    + The rest of this document shows how to package modules for + Apache 1.3 and later and what to tell end-users of the module. + +

    Building a simple source distribution

    + Consider a simple add-on module, distributed as a single file. + For example, say it is called mod_demo.c. The archive for this + module should consist of two files, in a suitable directory + name. For example: + +
      +
    • mod_demo/mod_demo.c
    • + +
    • mod_demo/Makefile.tmpl
    • +
    + (Of course end-user instructions, README's, etc can also be + supplied in the archive). The end user should be told to + extract this archive in the src/modules directory + of their Apache source tree. This will create a new directory + src/modules/mod_demo. Then they need to add the + following line to the Configuration file: +
    +  AddModule  modules/mod_demo/mod_demo.o
    +
    + then run Configure and make as + normal. + +

    The mod_demo/Makefile.tmpl should contain the + dependencies of the module source. For example, a simple module + which just interfaces to some standard Apache module API + functions might look this this:

    +
    +  mod_demo.o: mod_demo.c $(INCDIR)/httpd.h $(INCDIR)/http_protocol.h
    +
    + When the user runs Configure Apache will create a + full makefile to build this module. If this module also + requires some additional built-time options to be given, such + as libraries, see the next section. + +

    If the module also comes with header files, these can be + added to the archive. If the module consists of multiple source + files it can be built into a library file using a supplied + makefile. In this case, distribute the makefile as + mod_demo/Makefile and do not + include a mod_demo/Makefile.tmpl. If + Configure sees a Makefile.tmpl it + assumes it is safe to overwrite any existing + Makefile.

    + +

    See the Apache src/modules/standard for an + example of a module directory where the makefile is created + automatically from a Makefile.tmpl file (note that this + directory also shows how to distribute multiple modules in a + single directory). See src/modules/proxy and + src/modules/example for examples of modules built + using custom makefiles (to build a library and an object file, + respectively).

    + +

    Adding Compile time Information

    + Apache source files (or module definition files, see below) can + contain information used by Configure to add + compile-time options such as additional libraries. For example, + if mod_demo in the example above also requires that Apache be + linked against a DBM library, then the following text could be + inserted into the mod_demo.c source: +
    +/*
    + * Module definition information - the part between the -START and -END
    + * lines below is used by Configure. This could be stored in a separate
    + * instead.
    + *
    + * MODULE-DEFINITION-START
    + * Name: demo_module
    + * ConfigStart
    +    LIBS="$LIBS $DBM_LIB"
    +    if [ "X$DBM_LIB" != "X" ]; then
    +        echo " + using $DBM_LIB for mod_demo"
    +    fi
    + * ConfigEnd
    + * MODULE-DEFINITION-END
    + */
    +
    + Note that this is contained inside a C language comment to hide + it from the compiler. Anything between the lines which contains + MODULE-DEFINITION-START and + MODULE-DEFINITION-END is used by + Configure. The Name: line gives the + module's structure name. This is not really necessary in this + case since if not present Configure will guess at + a name based on the filename (e.g., given "mod_demo" + it will remove the leading "mod_" and append "_module" to get a + structure name. This works with all modules distributed with + Apache). + +

    The lines between ConfigStart and + ConfigEnd as executed by Configure + and can be used to add compile-time options and libraries. In + this case it adds the DBM library (from $DBM_LIB) to the + standard compilation libraries ($LIB) and displays a + message.

    + +

    See the default distribution's mod_auth_dbm.c for an example + of an embedded module definition.

    + +

    Module Definition Information for Binary Distribitions

    + If the module is to be distributed as binary (object or + library) rather than source, it is not possible to add the + module definition information to the source file. In this case + it can be placed in a separate file which has the same base + name as the object or library file, but with a + .module extension. So, for example, if the + distributed module object file is mod_demo.o, the module + definition file should be called mod_demo.module. It contains + the same information as above, but does not need to be inside a + C comment or delimited with + MODULE-DEFINITION-START etc. For example: + +
    +Name: demo_module
    +ConfigStart
    + LIBS="$LIBS $DBM_LIB"
    + if [ "X$DBM_LIB" != "X" ]; then
    +     echo " + using $DBM_LIB for mod_demo"
    + fi
    +ConfigEnd
    +
    + See the default distribution's mod_auth_db.module for an + example of a separate module definition file. + + + + diff --git a/htdocs/manual/stopping.html.en b/htdocs/manual/stopping.html.en new file mode 100644 index 00000000000..626b1d3fe6b --- /dev/null +++ b/htdocs/manual/stopping.html.en @@ -0,0 +1,198 @@ + + + + + + + Stopping and Restarting Apache + + + + + + +

    Stopping and Restarting Apache

    + +

    This document covers stopping and restarting Apache on Unix + and Cygwin only. Windows users should see Signalling Apache when + running.

    + +

    You will notice many httpd executables running + on your system, but you should not send signals to any of them + except the parent, whose pid is in the PidFile. That is to say you + shouldn't ever need to send signals to any process except the + parent. There are three signals that you can send the parent: + TERM, HUP, and USR1, + which will be described in a moment.

    + +

    To send a signal to the parent you should issue a command + such as:

    + +
    +
    +    kill -TERM `cat /usr/local/apache/logs/httpd.pid`
    +
    +
    + You can read about its progress by issuing: + +
    +
    +    tail -f /usr/local/apache/logs/error_log
    +
    +
    + Modify those examples to match your ServerRoot and PidFile settings. + +

    As of Apache 1.3 we provide a script called apachectl which can be used + to start, stop, and restart Apache. It may need a little + customization for your system, see the comments at the top of + the script.

    + +

    TERM Signal: stop now

    + +

    Sending the TERM signal to the parent causes it + to immediately attempt to kill off all of its children. It may + take it several seconds to complete killing off its children. + Then the parent itself exits. Any requests in progress are + terminated, and no further requests are served.

    + +

    HUP Signal: restart now

    + +

    Sending the HUP signal to the parent causes it + to kill off its children like in TERM but the + parent doesn't exit. It re-reads its configuration files, and + re-opens any log files. Then it spawns a new set of children + and continues serving hits.

    + +

    Users of the status module + will notice that the server statistics are set to zero when a + HUP is sent.

    + +

    Note: If your configuration file has errors + in it when you issue a restart then your parent will not + restart, it will exit with an error. See below for a method of + avoiding this.

    + +

    USR1 Signal: graceful restart

    + +

    Note: prior to release 1.2b9 this code is + quite unstable and shouldn't be used at all.

    + +

    The USR1 signal causes the parent process to + advise the children to exit after their current + request (or to exit immediately if they're not serving + anything). The parent re-reads its configuration files and + re-opens its log files. As each child dies off the parent + replaces it with a child from the new generation of + the configuration, which begins serving new requests + immediately.

    + +

    This code is designed to always respect the MaxClients, MinSpareServers, and + MaxSpareServers + settings. Furthermore, it respects StartServers in the + following manner: if after one second at least StartServers new + children have not been created, then create enough to pick up + the slack. This is to say that the code tries to maintain both + the number of children appropriate for the current load on the + server, and respect your wishes with the StartServers + parameter.

    + +

    Users of the status module + will notice that the server statistics are not + set to zero when a USR1 is sent. The code was + written to both minimize the time in which the server is unable + to serve new requests (they will be queued up by the operating + system, so they're not lost in any event) and to respect your + tuning parameters. In order to do this it has to keep the + scoreboard used to keep track of all children across + generations.

    + +

    The status module will also use a G to indicate + those children which are still serving requests started before + the graceful restart was given.

    + +

    At present there is no way for a log rotation script using + USR1 to know for certain that all children writing + the pre-restart log have finished. We suggest that you use a + suitable delay after sending the USR1 signal + before you do anything with the old log. For example if most of + your hits take less than 10 minutes to complete for users on + low bandwidth links then you could wait 15 minutes before doing + anything with the old log.

    + +

    Note: If your configuration file has errors + in it when you issue a restart then your parent will not + restart, it will exit with an error. In the case of graceful + restarts it will also leave children running when it exits. + (These are the children which are "gracefully exiting" by + handling their last request.) This will cause problems if you + attempt to restart the server -- it will not be able to bind to + its listening ports. Before doing a restart, you can check the + syntax of the configuration files with the -t + command line argument (see httpd ). This still will not + guarantee that the server will restart correctly. To check the + semantics of the configuration files as well as the syntax, you + can try starting httpd as a non-root user. If there are no + errors it will attempt to open its sockets and logs and fail + because it's not root (or because the currently running httpd + already has those ports bound). If it fails for any other + reason then it's probably a config file error and the error + should be fixed before issuing the graceful restart.

    + +

    Appendix: signals and race conditions

    + +

    Prior to Apache 1.2b9 there were several race + conditions involving the restart and die signals (a simple + description of race condition is: a time-sensitive problem, as + in if something happens at just the wrong time it won't behave + as expected). For those architectures that have the "right" + feature set we have eliminated as many as we can. But it should + be noted that there still do exist race conditions on certain + architectures.

    + +

    Architectures that use an on disk ScoreBoardFile have the + potential to corrupt their scoreboards. This can result in the + "bind: Address already in use" (after HUP) or + "long lost child came home!" (after USR1). The + former is a fatal error, while the latter just causes the + server to lose a scoreboard slot. So it might be advisable to + use graceful restarts, with an occasional hard restart. These + problems are very difficult to work around, but fortunately + most architectures do not require a scoreboard file. See the ScoreBoardFile + documentation for a architecture uses it.

    + +

    NEXT and MACHTEN (68k only) have + small race conditions which can cause a restart/die signal to + be lost, but should not cause the server to do anything + otherwise problematic. + +

    + +

    All architectures have a small race condition in each child + involving the second and subsequent requests on a persistent + HTTP connection (KeepAlive). It may exit after reading the + request line but before reading any of the request headers. + There is a fix that was discovered too late to make 1.2. In + theory this isn't an issue because the KeepAlive client has to + expect these events because of network latencies and server + timeouts. In practice it doesn't seem to affect anything either + -- in a test case the server was restarted twenty times per + second and clients successfully browsed the site without + getting broken images or empty documents. + +

    + + + diff --git a/htdocs/manual/stopping.html.fr b/htdocs/manual/stopping.html.fr new file mode 100644 index 00000000000..7700ecf4eaf --- /dev/null +++ b/htdocs/manual/stopping.html.fr @@ -0,0 +1,251 @@ + + + + + + + + Arrêt et redémarrage d'Apache + + + + + + +

    Arrêt et redémarrage + d'Apache

    + +

    Ce document décrit l'arrêt et le + redémarrage d'Apache sur Unix et Cygwin seulement. Les + utilisateurs de Windows sont invités à lire le + paragraphe signaler à + Apache en cours d'exécution.

    + +

    Lorsque qu'Apache s'exécute, vous pouvez noter que + plusieurs processus httpd s'exécutent en + même temps sur votre machine, mais vous ne devez envoyer + de signaux qu'à celui dont l'identifiant de processus + est celui contenu dans le fichier PidFile. Autrement dit, vous + ne devez jamais envoyer de signaux aux processus + httpd autres que le processus père. Il + existe trois signaux que vous pouvez envoyer au processus + père : TERM, HUP, et + USR1, dont la signification est décrite ci + dessous.

    + +

    Pour envoyer un signal au père vous pouvez utiliser + une commande comme

    + +
    +
    +    kill -TERM `cat /usr/local/apache/logs/httpd.pid`
    +
    +
    + Vous pouvez lire l'effet de la commande + précédente en effectuant la commande + +
    +
    +    tail -f /usr/local/apache/logs/error_log
    +
    +
    + Ces exemples devront être modifiés en fonction des + valeurs des directives ServerRoot et PidFile. + +

    Avec Apache 1.3 est fourni un script apachectl qui peut + être employé pour démarrer, arrêter + et relancer Apache. Il peut nécessiter un peu + d'adaptation pour votre système, pour cela lisez les + commentaires situés au début de ce script.

    + +

    Signal TERM : arrêt immédiat

    + +

    L'envoi du signal TERM demande au processus + père d'essayer de tuer tous ses processus fils. Il peut + s'écouler quelques secondes avant que tous les processus + fils ne soient tués. Le processus père se termine + ensuite. Les requêtes en cours sont terminées et + plus aucune requête n'est traitée.

    + +

    Signal HUP : redémarrage immédiat

    + +

    L'envoi du signal HUP demande au processus + père de tuer tous ses processus fils, comme le signal + TERM, mais le processus père ne se termine + pas. Il relit ses fichiers de configuration, et rouvre les + fichiers de trace. Il lance ensuite un nouvel ensemble de + processus fils et continue de traiter les requêtes.

    + +

    Les utilisateurs du module status noteront que les + statistiques du serveur sont réinitialisées + à zéro après l'envoi du signal + HUP.

    + +

    Note: si votre fichier de configuration + contient des erreurs lorsque vous demandez un + redémarrage, le processus père ne se relancera + pas mais se terminera avec une erreur. Voir plus bas pour une + méthode permettant d'éviter ce + problème.

    + +

    Signal USR1 : redémarrage en douceur

    + +

    Note: pour les versions inférieures + à 1.2b9 cette fonction est instable et ne doit pas + être utilisée.

    + +

    Le signal USR1 demande au processus père + de prier les processus de se terminer après avoir + traité leurs requêtes en cours (ou de se terminer + immédiatement s'ils n'ont pas de traitement en cours). + Le processus père relit les fichiers de configuration et + rouvre les fichiers de trace. Au fur et à mesure que les + fils meurent, ils sont remplacés par des processus fils + prenant en compte la nouvelle génération + de la configuration, et commencent aussitôt à + traiter les nouvelles requêtes.

    + +

    Cette fonction est conçue pour toujours respecter les + valeurs de MaxClients, + MinSpareServers, et + MaxSpareServers. De + plus, elle respecte la valeur de StartServers de la + manière suivante : si après une seconde, au moins + StartServers nouveaux processus fils n'ont pas + été créés, alors elle en + crée suffisament pour combler le manque. Autrement dit, + la fonction essaie de maintenir à la fois le nombre de + processus fils approprié pour traiter la charge actuelle + du serveur, et respecter vos souhaits concernant le + paramètre StartServers.

    + +

    Les utilisateurs du module status noteront que les + statistiques du serveur ne sont pas + réinitialisées à zéro après + l'envoi du signal USR1. La fonction est + écrite afin de minimiser le temps durant lequel le + serveur est incapable de traiter de nouvelles requêtes + (elle sont mises en attente par le système + d'exploitation et donc ne sont pas perdues) tout en respectant + vos réglages. Pour cela, Apache doit maintenir la + table de comunication interprocessus pour les + différents processus fils et leur + génération.

    + +

    Le module status utilise + également un G pour marquer les fils + traitant les requêtes démarrées avant le + redémarrage en douceur.

    + +

    Actuellement, il n'y a aucun moyen pour un script de + rotation des fichiers de trace qui utiliserait le signal + USR1 de savoir de manière absolue que tous + les processus fils écrivant dans l'ancien fichier de + trace sont terminés. Nous suggérons d'utiliser un + délai d'attente raisonnable après l'envoi du + signal avant de faire quoi que ce soit avec l'ancien fichier de + trace. Si par exemple la majorité de vos accès + sont traités en moins de dix minutes pour des + utilisateurs utilisant des liaisons à bas débit, + alors vous devrez attendre quinze minutes avant de faire + quelque chose avec l'ancien fichier de trace.

    + +

    Note: Si votre fichier de configuration + contient des erreurs au moment de réinitialiser le + processus père, ce dernier ne redémarrera pas et + se terminera avec une erreur. Dans le cas d'un + redémarrage en douceur, le processus père laisse + les fils continuer quand il se termine. Ce sont les processus + fils qui sont "terminés en douceur" en traitant leurs + requêtes en cours. Ceci peut poser des problèmes + si vous essayez de redémarrer le serveur -- il ne sera + pas capable de se connecter sur son port d'écoute. Afin + d'effectuer un redémarrage, vous pouvez vérifier + la syntaxe du fichier de configuration en utilisant le + paramètre -t (cf. httpd). Ceci n'est pas suffisant + pour garantir que le serveur redémarrera correctement. + Afin de vérifier la sémantique des fichiers de + configuration ainsi que leur syntaxe, vous pouvez essayer de + lancer httpd sous un compte utilisateur autre que + root. S'il n'y a pas d'erreur, il essaiera d'ouvrir ses ports + réseau, mais échouera, soit parce qu'il n'est pas + root, soit parce que le serveur existant est déjà + connecté sur ces ports. S'il échoue pour une + autre raison, c'est qu'il existe une erreur dans les fichiers + de configuration et cette erreur doit être + corrigée avant de déclencher une relance en + douceur.

    + +

    Annexe : signaux et conditions temporelles

    + +

    Avant la version 1.2b9 d'Apache il existait un certain + nombre de conditions temporelles concernant les + signaux de redémarrage et d'arrêt. Une description + simple d'une condition temporelle est un problème + lié à l'ordre des traitements dans le temps, + comme quand quelque chose arrive au mauvais moment et ne se + comporte pas comme prévu. Pour les architectures + possédant les "bonnes" fonctionnalités, nous les + avons éliminées autant que possible. Mais il doit + être noté qu'il existe toujours des + problèmes sur certaines architectures.

    + +

    Les architectures utilisant un fichier sur disque ScoreBoardFile pour la + communication interprocessus peuvent éventuellement + corrompre ce fichier. Il en résulte le message d'erreur + "bind: Address already in use" (après le signal + HUP) ou "long lost child came home!" (après + le signal USR1). Le premier est une erreur fatale, + tandis que le deuxième a juste pour effet de perdre une + entrée dans la table de communication interprocessus. Il + est donc envisageable d'utiliser le redémarrage en + douceur, avec d'occasionnels redémarrages + immédiats. Ces problèmes sont très + difficiles à éviter, mais heureusement de + nombreuses architectures n'ont pas besoin d'utiliser un fichier + pour la communication interprocessus. Consulter la + documentation sur ScoreBoardFile pour + savoir si votre architecture l'utilise.

    + +

    NEXT et MACHTEN (68k seulement) + présentent quelques conditions temporelles qui peuvent + provoquer la perte d'un signal d'arrêt ou de + redémarrage, mais ne devraient pas créer de + problème majeur.

    + +

    Sur toutes les architectures, les processus fils + présentent des conditions temporelles dans le cas du + traitement de la deuxième requête, et des + suivantes, pour des connexions HTTP persistantes (KeepAlive). + Le processus peut se terminer après avoir lu la + requête mais avant d'avoir lu l'en-tête. Il existe + un correctif, mais celui ci a été + réalisé trop tard pour être + intégré dans la version 1.2. En théorie, + ceci ne doit pas être un problème car le client + utilisant la persistance des connexions doit être capable + de traiter ce genre de cas, qui peut se produire soit à + cause des temps de latence du réseau, soit à + cause des délais de réponse trop longs des + serveurs. En pratique, cela ne semble pas non plus affecter le + système. Dans un test, le serveur était + redémarré vingt fois par seconde et les clients + ont pu consulter le site sans obtenir de documents vides ou + d'images invalides.

    + + + + diff --git a/htdocs/manual/stopping.html.html b/htdocs/manual/stopping.html.html new file mode 100644 index 00000000000..aaab463f89a --- /dev/null +++ b/htdocs/manual/stopping.html.html @@ -0,0 +1,4 @@ + + + diff --git a/htdocs/manual/suexec.html.en b/htdocs/manual/suexec.html.en new file mode 100644 index 00000000000..c1f6069542f --- /dev/null +++ b/htdocs/manual/suexec.html.en @@ -0,0 +1,608 @@ + + + + + + + Apache suEXEC Support + + + + + + +

    Apache suEXEC Support

    + +
      +
    1. CONTENTS
    2. + +
    3. What is suEXEC?
    4. + +
    5. Before we begin.
    6. + +
    7. suEXEC Security Model.
    8. + +
    9. Configuring & Installing + suEXEC
    10. + +
    11. Enabling & Disabling + suEXEC
    12. + +
    13. Using suEXEC
    14. + +
    15. Debugging suEXEC
    16. + +
    17. Beware the Jabberwock: Warnings + & Examples
    18. +
    + +

    What is suEXEC?

    + +

    The suEXEC feature -- + introduced in Apache 1.2 -- provides Apache users the ability + to run CGI and SSI programs + under user IDs different from the user ID of the calling + web-server. Normally, when a CGI or SSI program executes, it + runs as the same user who is running the web server.

    + +

    Used properly, this feature can reduce + considerably the security risks involved with allowing users to + develop and run private CGI or SSI programs. However, if suEXEC + is improperly configured, it can cause any number of problems + and possibly create new holes in your computer's security. If + you aren't familiar with managing setuid root programs and the + security issues they present, we highly recommend that you not + consider using suEXEC.

    + +

    BACK TO + CONTENTS

    + +

    Before we begin.

    + +

    Before jumping head-first into this document, + you should be aware of the assumptions made on the part of the + Apache Group and this document.

    + +

    First, it is assumed that you are using a UNIX + derivate operating system that is capable of + setuid and setgid operations. + All command examples are given in this regard. Other platforms, + if they are capable of supporting suEXEC, may differ in their + configuration.

    + +

    Second, it is assumed you are familiar with + some basic concepts of your computer's security and its + administration. This involves an understanding of + setuid/setgid operations and the various + effects they may have on your system and its level of + security.

    + +

    Third, it is assumed that you are using an + unmodified version of suEXEC code. All code + for suEXEC has been carefully scrutinized and tested by the + developers as well as numerous beta testers. Every precaution + has been taken to ensure a simple yet solidly safe base of + code. Altering this code can cause unexpected problems and new + security risks. It is highly recommended that + you do not alter the suEXEC code unless you are well versed in + the particulars of security programming and are willing to share + your work with the Apache Group for consideration.

    + +

    Fourth, and last, it has been the decision of + the Apache Group to NOT make suEXEC part of + the default installation of Apache. To this end, suEXEC + configuration requires careful attention to details from the + administrator. After due consideration has been given to the + various settings for suEXEC, the administrator may install + suEXEC through normal installation methods. The values for + these settings need to be carefully determined and specified by + the administrator to properly maintain system security during + the use of suEXEC functionality. It is through this detailed + process that the Apache Group hopes to limit suEXEC + installation only to those who are careful and determined + enough to use it.

    + +

    Still with us? Yes? Good. Let's move on!

    + +

    BACK TO + CONTENTS

    + +

    suEXEC Security Model

    + +

    Before we begin configuring and installing + suEXEC, we will first discuss the security model you are about + to implement. By doing so, you may better understand what + exactly is going on inside suEXEC and what precautions are + taken to ensure your system's security.

    + +

    suEXEC is based on a setuid + "wrapper" program that is called by the main Apache web server. + This wrapper is called when an HTTP request is made for a CGI + or SSI program that the administrator has designated to run as + a userid other than that of the main server. When such a + request is made, Apache provides the suEXEC wrapper with the + program's name and the user and group IDs under which the + program is to execute.

    + +

    The wrapper then employs the following process + to determine success or failure -- if any one of these + conditions fail, the program logs the failure and exits with an + error, otherwise it will continue:

    + +
      +
    1. + Was the wrapper called with the proper number of + arguments? + +
      + The wrapper will only execute if it is given the proper + number of arguments. The proper argument format is known + to the Apache web server. If the wrapper is not receiving + the proper number of arguments, it is either being + hacked, or there is something wrong with the suEXEC + portion of your Apache binary. +
      +
    2. + +
    3. + Is the user executing this wrapper a valid user of + this system? + +
      + This is to ensure that the user executing the wrapper is + truly a user of the system. +
      +
    4. + +
    5. + Is this valid user allowed to run the + wrapper? + +
      + Is this user the user allowed to run this wrapper? Only + one user (the Apache user) is allowed to execute this + program. +
      +
    6. + +
    7. + Does the target program have an unsafe hierarchical + reference? + +
      + Does the target program contain a leading '/' or have a + '..' backreference? These are not allowed; the target + program must reside within the Apache webspace. +
      +
    8. + +
    9. + Is the target user name valid? + +
      + Does the target user exist? +
      +
    10. + +
    11. + Is the target group name valid? + +
      + Does the target group exist? +
      +
    12. + +
    13. + Is the target user NOT superuser? + + +
      + Presently, suEXEC does not allow 'root' to execute + CGI/SSI programs. +
      +
    14. + +
    15. + Is the target userid ABOVE the minimum ID + number? + +
      + The minimum user ID number is specified during + configuration. This allows you to set the lowest possible + userid that will be allowed to execute CGI/SSI programs. + This is useful to block out "system" accounts. +
      +
    16. + +
    17. + Is the target group NOT the superuser + group? + +
      + Presently, suEXEC does not allow the 'root' group to + execute CGI/SSI programs. +
      +
    18. + +
    19. + Is the target groupid ABOVE the minimum ID + number? + +
      + The minimum group ID number is specified during + configuration. This allows you to set the lowest possible + groupid that will be allowed to execute CGI/SSI programs. + This is useful to block out "system" groups. +
      +
    20. + +
    21. + Can the wrapper successfully become the target user + and group? + +
      + Here is where the program becomes the target user and + group via setuid and setgid calls. The group access list + is also initialized with all of the groups of which the + user is a member. +
      +
    22. + +
    23. + Does the directory in which the program resides + exist? + +
      + If it doesn't exist, it can't very well contain files. +
      +
    24. + +
    25. + Is the directory within the Apache + webspace? + +
      + If the request is for a regular portion of the server, is + the requested directory within the server's document + root? If the request is for a UserDir, is the requested + directory within the user's document root? +
      +
    26. + +
    27. + Is the directory NOT writable by anyone + else? + +
      + We don't want to open up the directory to others; only + the owner user may be able to alter this directories + contents. +
      +
    28. + +
    29. + Does the target program exist? + +
      + If it doesn't exists, it can't very well be executed. +
      +
    30. + +
    31. + Is the target program NOT writable by + anyone else? + +
      + We don't want to give anyone other than the owner the + ability to change the program. +
      +
    32. + +
    33. + Is the target program NOT setuid or + setgid? + +
      + We do not want to execute programs that will then change + our UID/GID again. +
      +
    34. + +
    35. + Is the target user/group the same as the program's + user/group? + +
      + Is the user the owner of the file? +
      +
    36. + +
    37. + Can we successfully clean the process environment + to ensure safe operations? + +
      + suEXEC cleans the process' environment by establishing a + safe execution PATH (defined during configuration), as + well as only passing through those variables whose names + are listed in the safe environment list (also created + during configuration). +
      +
    38. + +
    39. + Can we successfully become the target program and + execute? + +
      + Here is where suEXEC ends and the target program begins. +
      +
    40. +
    + +

    This is the standard operation of the + suEXEC wrapper's security model. It is somewhat stringent and + can impose new limitations and guidelines for CGI/SSI design, + but it was developed carefully step-by-step with security in + mind.

    + +

    For more information as to how this security + model can limit your possibilities in regards to server + configuration, as well as what security risks can be avoided + with a proper suEXEC setup, see the "Beware the Jabberwock" section of this + document.

    + +

    BACK TO + CONTENTS

    + +

    Configuring & Installing + suEXEC

    + +

    Here's where we begin the fun. If you use + Apache 1.2 or prefer to configure Apache 1.3 with the + "src/Configure" script you have to edit the suEXEC + header file and install the binary in its proper location + manually. This procedure is described in an extra document. The following + sections describe the configuration and installation for Apache + 1.3 with the AutoConf-style interface (APACI).

    + +

    APACI's suEXEC configuration + options
    +

    + +
    +
    --enable-suexec
    + +
    This option enables the suEXEC feature which is never + installed or activated by default. At least one + --suexec-xxxxx option has to be provided together with the + --enable-suexec option to let APACI accept your request for + using the suEXEC feature.
    + +
    --suexec-caller=UID
    + +
    The username under which + Apache normally runs. This is the only user allowed to + execute this program.
    + +
    --suexec-docroot=DIR
    + +
    Define as the DocumentRoot set for Apache. This will be + the only hierarchy (aside from UserDirs) that can be used for + suEXEC behavior. The default directory is the --datadir value + with the suffix "/htdocs", e.g. if you configure + with "--datadir=/home/apache" the directory + "/home/apache/htdocs" is used as document root for the suEXEC + wrapper.
    + +
    --suexec-logfile=FILE
    + +
    This defines the filename to which all suEXEC + transactions and errors are logged (useful for auditing and + debugging purposes). By default the logfile is named + "suexec_log" and located in your standard logfile directory + (--logfiledir).
    + +
    --suexec-userdir=DIR
    + +
    Define to be the subdirectory under users' home + directories where suEXEC access should be allowed. All + executables under this directory will be executable by suEXEC + as the user so they should be "safe" programs. If you are + using a "simple" UserDir directive (ie. one without a "*" in + it) this should be set to the same value. suEXEC will not + work properly in cases where the UserDir directive points to + a location that is not the same as the user's home directory + as referenced in the passwd file. Default value is + "public_html".
    + If you have virtual hosts with a different UserDir for each, + you will need to define them to all reside in one parent + directory; then name that parent directory here. If + this is not defined properly, "~userdir" cgi requests will + not work!
    + +
    --suexec-uidmin=UID
    + +
    Define this as the lowest UID allowed to be a target user + for suEXEC. For most systems, 500 or 100 is common. Default + value is 100.
    + +
    --suexec-gidmin=GID
    + +
    Define this as the lowest GID allowed to be a target + group for suEXEC. For most systems, 100 is common and + therefore used as default value.
    + +
    --suexec-safepath=PATH
    + +
    Define a safe PATH environment to pass to CGI + executables. Default value is + "/usr/local/bin:/usr/bin:/bin".
    +
    + +

    Checking your suEXEC + setup
    + Before you compile and install the suEXEC wrapper you can + check the configuration with the --layout option.
    + Example output:

    +
    +    suEXEC setup:
    +            suexec binary: /usr/local/apache/sbin/suexec
    +            document root: /usr/local/apache/share/htdocs
    +           userdir suffix: public_html
    +                  logfile: /usr/local/apache/var/log/suexec_log
    +                safe path: /usr/local/bin:/usr/bin:/bin
    +                caller ID: www
    +          minimum user ID: 100
    +         minimum group ID: 100
    +
    + +

    Compiling and installing the suEXEC + wrapper
    + If you have enabled the suEXEC feature with the + --enable-suexec option the suexec binary (together with Apache + itself) is automatically built if you execute the command + "make".
    + After all components have been built you can execute the + command "make install" to install them. The binary image + "suexec" is installed in the directory defined by the --sbindir + option. Default location is + "/usr/local/apache/sbin/suexec".
    + Please note that you need root + privileges for the installation step. In order + for the wrapper to set the user ID, it must be installed as + owner root and must have the setuserid + execution bit set for file modes.

    + +

    BACK TO + CONTENTS

    + +

    Enabling & Disabling + suEXEC

    + +

    Upon startup of Apache, it looks for the file + "suexec" in the "sbin" directory (default is + "/usr/local/apache/sbin/suexec"). If Apache finds a properly + configured suEXEC wrapper, it will print the following message + to the error log:

    +
    +    [notice] suEXEC mechanism enabled (wrapper: /path/to/suexec)
    +
    + +

    If you don't see this message at server startup, the server + is most likely not finding the wrapper program where it expects + it, or the executable is not installed setuid + root.
    + If you want to enable the suEXEC mechanism for the first time + and an Apache server is already running you must kill and + restart Apache. Restarting it with a simple HUP or USR1 signal + will not be enough.
    + If you want to disable suEXEC you should kill and restart + Apache after you have removed the "suexec" file.

    + +

    BACK TO + CONTENTS

    + +

    Using suEXEC

    + +

    Virtual Hosts:
    + One way to use the suEXEC wrapper is through the User and Group directives in VirtualHost definitions. + By setting these directives to values different from the main + server user ID, all requests for CGI resources will be executed + as the User and Group defined for that + <VirtualHost>. If only one or neither of + these directives are specified for a + <VirtualHost> then the main server userid is + assumed.

    + +

    User directories:
    + The suEXEC wrapper can also be used to execute CGI programs as + the user to which the request is being directed. This is + accomplished by using the "~" + character prefixing the user ID for whom execution is desired. + The only requirement needed for this feature to work is for CGI + execution to be enabled for the user and that the script must + meet the scrutiny of the security checks + above.

    + +

    BACK TO + CONTENTS

    + +

    Debugging suEXEC

    + +

    The suEXEC wrapper will write log information + to the file defined with the --suexec-logfile option as + indicated above. If you feel you have configured and installed + the wrapper properly, have a look at this log and the error_log + for the server to see where you may have gone astray.

    + +

    BACK TO + CONTENTS

    + +

    Beware the Jabberwock: + Warnings & Examples

    + +

    NOTE! This section may not be + complete. For the latest revision of this section of the + documentation, see the Apache Group's Online + Documentation version.

    + +

    There are a few points of interest regarding + the wrapper that can cause limitations on server setup. Please + review these before submitting any "bugs" regarding suEXEC.

    + +
      +
    • suEXEC Points Of Interest
    • + +
    • + Hierarchy limitations + +
      + For security and efficiency reasons, all suexec requests + must remain within either a top-level document root for + virtual host requests, or one top-level personal document + root for userdir requests. For example, if you have four + VirtualHosts configured, you would need to structure all + of your VHosts' document roots off of one main Apache + document hierarchy to take advantage of suEXEC for + VirtualHosts. (Example forthcoming.) +
      +
    • + +
    • + suEXEC's PATH environment variable + +
      + This can be a dangerous thing to change. Make certain + every path you include in this define is a + trusted directory. You don't want to + open people up to having someone from across the world + running a trojan horse on them. +
      +
    • + +
    • + Altering the suEXEC code + +
      + Again, this can cause Big Trouble if you + try this without knowing what you are doing. Stay away + from it if at all possible. +
      +
    • +
    + +

    BACK TO + CONTENTS

    + + + + diff --git a/htdocs/manual/suexec.html.html b/htdocs/manual/suexec.html.html new file mode 100644 index 00000000000..1551afad674 --- /dev/null +++ b/htdocs/manual/suexec.html.html @@ -0,0 +1,4 @@ + + + diff --git a/htdocs/manual/suexec.html.ja.jis b/htdocs/manual/suexec.html.ja.jis new file mode 100644 index 00000000000..66951facd11 --- /dev/null +++ b/htdocs/manual/suexec.html.ja.jis @@ -0,0 +1,607 @@ + + + + + + Apache suEXEC Support + + + + + + + +

    Apache suEXEC Support

    + +
      + +
    1. $BL\
    2. + +
    3. suEXEC $B$H$O(B?
    4. + +
    5. $B;O$a$kA0$K(B
    6. + +
    7. suEXEC $B$N%;%-%e%j%F%#%b%G%k(B
    8. + +
    9. suEXEC $B$N@_Dj$H%$%s%9%H!<%k(B
    10. + +
    11. suEXEC $B$NM-8z2=$HL58z2=(B
    12. + +
    13. suEXEC $B$N;HMQ(B
    14. + +
    15. suEXEC $B$N%G%P%C%0(B
    16. + +
    17. $B$H$+$2$KCm0U(B: $B7Y9p$H;vNc(B
    18. + +
    + + +

    suEXEC $B$H$O(B?

    + +

    Apache 1.2 $B$GF3F~$5$l$?(B suEXEC + $B5!G=$K$h$j!"(BApache $B%f!<%6$O(B Web $B%5!<%P$rCGI $B%W%m%0%i%`$d(B SSI + $B%W%m%0%i%`$rl9g!"DL>o$O(B web $B%5!<%P$HF1$8%f!<%6$G + +

    $BE,@Z$K;HMQ$9$k$H!"$3$N5!G=$K$h$j%f!<%6$,8DJL$N(B CGI + $B$d(B SSI $B%W%m%0%i%`$r3+H/$7e$N4m81$r!"(B + $B$+$J$j8:$i$9$3$H$,$G$-$^$9!#$7$+$7!"(BsuEXEC $B$N@_Dj$,ITE,@Z$@$H!"(B + $BB?$/$NLdBj$,@8$8!"$"$J$?$N%3%s%T%e!<%?$K?7$7$$%;%-%e%j%F%#%[!<%k$r(B + $B:n$C$F$7$^$&2DG=@-$,$"$j$^$9!#$"$J$?$,(B root $B$K(B setuid + $B$5$l$?%W%m%0%i%`$H!"$=$l$i$+$i@8$8$k%;%-%e%j%F%#>e$NLdBj$N4IM}$K(B + $B>\$7$/$J$$$h$&$J$i!"(BsuEXEC $B$N;HMQ$r8!F$$7$J$$$h$&$K6/$/?d>)$7$^$9!#(B +

    + +

    $BL\ +

    + +

    $B;O$a$kA0$K(B

    + +

    $B$3$NJ8=q$N@hF,$KHt$VA0$K!"(BApache + $B%0%k!<%W$H$3$NJ8=q$G$N2>Dj$rCN$C$F$*$/$Y$-$G$7$g$&!#(B +

    + +

    $BBh(B 1 $B$K!"$"$J$?$,(B setuid $B$H(B + setgid $BA`:n$,2DG=$J(B UNIX + $BM3Mh$N%*%Z%l!<%F%#%s%0%7%9%F%`$r;H$C$F$$$k$3$H$rA[Dj$7$F$$$^$9!#(B + $B$3$l$O!"$9$Y$F$N%3%^%s%INc$K$"$F$O$^$j$^$9!#(B + $B$=$NB>$N%W%i%C%H%[!<%`$G$O!"$b$7(B suEXEC + $B$,%5%]!<%H$5$l$F$$$?$H$7$F$b@_Dj$O0[$J$k$+$b$7$l$^$;$s!#(B

    + +

    $BBh(B 2 $B$K!"$"$J$?$,;HMQCf$N%3%s%T%e!<%?$N(B + $B%;%-%e%j%F%#$K4X$9$k4pK\E*$J35G0$H!"$=$l$i$N4IM}$K$D$$$F>\$7$$$3$H$r(B + $BA[Dj$7$F$$$^$9!#$3$l$O!"(Bsetuid/setgid + $BA`:n!"$"$J$?$N%7%9%F%`>e$G$N$=$NA`:n$K$h$kMM!9$J8z2L!"(B + $B%;%-%e%j%F%#%l%Y%k$K$D$$$F$"$J$?$,M}2r$7$F$$$k$H$$$&$3$H$r4^$_$^$9!#(B +

    + +

    $BBh(B 3 $B$K!"(B$B2~B$$5$l$F$$$J$$(B suEXEC + $B%3!<%I$N;HMQ$rA[Dj$7$F$$$^$9!#(BsuEXEC $B$N%3!<%I$O!"(B + $BB?$/$N%Y!<%?%F%9%?$@$1$G$J$/!"3+H/Z$5$l$^$9!#$3$N%3!<%I$r2~JQ$9$k$3$H$G!"(B + $BM=4|$5$l$J$$LdBj$d?7$7$$%;%-%e%j%F%#>e$N4m81$,@8$8$k$3$H$,$"$j$^$9!#(B + $B%;%-%e%j%F%#%W%m%0%i%_%s%0$N>\:Y$KDL$8$F$$$F!"(B + $B:#8e$N8!F$$N$?$a$K@.2L$r(B Apache + $B%0%k!<%W$H6&M-$7$h$&$H;W$&$N$G$J$1$l$P!"(BsuEXEC + $B%3!<%I$OJQ$($J$$$3$H$r(B $B6/$/(B$B?d>)$7$^$9!#(B

    + +

    $BBh(B 4 $B$K!"$3$l$,:G8e$G$9$,!"(BsuEXEC $B$r(B Apache + $B$N%G%U%)%k%H%$%s%9%H!<%k$K$O(B$B4^$a$J$$(B$B$3$H$,(B + Apache $B%0%k!<%W$G7hDj$5$l$F$$$^$9!#$3$l$O!"(BsuEXEC + $B$N@_Dj$K$O4IM}\:Y$K$o$?$k?5=E$JCm0U$,I,MW$@$+$i$G$9!#(B + suEXEC $B$NMM!9$J@_Dj$K$D$$$F8!F$$,=*$o$l$P!"4IM}o$N%$%s%9%H!<%kJ}K!$G%$%s%9%H!<%k$9$k$3$H$,$G$-$^$9!#(B + $B$3$l$i$N@_DjCM$O!"(BsuEXEC + $B5!G=$N;HMQCf$K%7%9%F%`%;%-%e%j%F%#$rE,@Z$KJ]$D$?$a$K!"(B + $B4IM}\:Y$Jl9g$K8B$C$F$$$?$@$-$?$$$H9M$($F$$$^$9!#(B +

    + +

    $B$=$l$G$b?J$_$^$9$+(B? $B$h$m$7$$!#$G$O!"@h$X?J$_$^$7$g$&(B!

    + +

    $BL\

    + +

    suEXEC $B%;%-%e%j%F%#%b%G%k(B

    + +

    suEXEC $B$N@_Dj$H%$%s%9%H!<%k$r;O$a$kA0$K!"(B + $B$^$:Z$9$k$?$a$K7Y9p$5$l$k$3$H$r(B + $B$h$/M}2r$7$F$*$$$?J}$,$h$$$G$7$g$&!#(B

    + +

    suEXEC $B$O!"(BApache web + $B%5!<%P$+$i8F$S=P$5$l$k(B setuid $B$5$l$?(B "wrapper" + $B%W%m%0%i%`$,4pK\$H$J$C$F$$$^$9!#@_7W$7$?(B CGI$B!"$^$?$O(B SSI + $B%W%m%0%i%`$X$N(B HTTP $B%j%/%(%9%H$,$"$k$H!"$3$N(B wrapper + $B$,8F$S=P$5$l$^$9!#$3$N$h$&$J%j%/%(%9%H$,$"$k$H!"(BApache + $B$O$=$N%W%m%0%i%`$,$H%f!<%6(B ID $B$H%0%k!<%W(B + ID $B$r;XDj$7$F(B suEXEC wrapper $B$r + +

    $B$=$l$+$i!"(Bwrapper $B$O@.8y$^$?$O<:GT$r7hDj$9$k$?$a(B + $B0J2<$N=hM}$r9T$J$$$^$9!#$3$l$i$N>uBV$N$&$A0l$D$G$b<:GT$7$?>l9g!"(B + $B%W%m%0%i%`$O<:GT$r%m%0$K5-O?$7$F%(%i!<$G=*N;$7$^$9!#(B + $B$=$&$G$J$1$l$P!"8e$N=hM}$,B3$1$i$l$^$9!#(B

    + +
      +
    1. + wrapper $B$,E,@Z$J?t$N0z?t$G8F$S=P$5$l$?$+(B? + + +
      + wrapper $B$OE,@Z$J?t$N0z?t$,M?$($i$l$?>l9g$K$N$_ +
    2. + + +
    3. + wrapper + $B$r + +
      + $B$3$l$O!"(Bwrapper $B$rZ$9$k$?$a$G$9!#(B +
      +
    4. + +
    5. + $B$3$N@5Ev$J%f!<%6$O(B wrapper + $B$N + +
      + $B$3$N%f!<%6$O(B wrapper $B +
    6. + +
    7. + $BBP>]$N%W%m%0%i%`$,0BA4$G$J$$3,AX$N;2>H$r$7$F$$$k$+(B? + + +
      + $BBP>]$N%W%m%0%i%`$,(B '/' $B$+$i;O$^$k!"$^$?$O(B + '..' $B$K$h$k;2>H$r9T$J$C$F$$$^$9$+(B? $B$3$l$i$O5v2D$5$l$^$;$s!#(B + $BBP>]$N%W%m%0%i%`$O(B Apache $B$N(B web $B6u4VFb$K$J$1$l$P$J$j$^$;$s!#(B +
      +
    8. + +
    9. + $BBP>]$H$J$k%f!<%6L>$O@5Ev$J$b$N$+(B? + +
      + $BBP>]$H$J$k%f!<%6L>$OB8:_$7$F$$$^$9$+(B? +
      +
    10. + +
    11. + $BBP>]$H$J$k%0%k!<%WL>$O@5Ev$J$b$N$+(B? + +
      + $BBP>]$H$J$k%0%k!<%WL>$OB8:_$7$F$$$^$9$+(B? +
      +
    12. + +
    13. + $BL\E*$N%f!<%6$O%9!<%Q!<%f!<%6$G$O(B$B$J$$(B$B$+(B? + + +
      + $B:#$N$H$3$m!"(BsuEXEC $B$O(B 'root' $B$K$h$k(B CGI/SSI + $B%W%m%0%i%`$N +
    14. + +
    15. + $BBP>]$H$J$k%f!<%6(B ID $B$O!":G>.$N(B ID + $BHV9f$h$j$b(B$BBg$-$$(B$B$+(B? + +
      + $B:G>.%f!<%6(B ID $BHV9f$O@_Dj;~$K;XDj$5$l$^$9!#$3$l$O!"(B + CGI/SSI $B%W%m%0%i%`.CM$G$9!#$3$l$O(B + "system" $BMQ$N%"%+%&%s%H$rJD$a=P$9$N$KM-8z$G$9!#(B +
      +
    16. + +
    17. + $BBP>]$H$J$k%0%k!<%W$O%9!<%Q!<%f!<%6$N%0%k!<%W$G$O(B + $B$J$$(B$B$+(B? + +
      + $B:#$N$H$3$m!"(BsuEXEC $B$O(B 'root' $B%0%k!<%W$K$h$k(B CGI/SSI + $B%W%m%0%i%`$N +
    18. + +
    19. + $BBP>]$H$J$k%0%k!<%W(B ID $B$O:G>.$N(B ID + $BHV9f$h$j$b(B$BBg$-$$(B$B$+(B? + +
      + $B:G>.%0%k!<%W(B ID $BHV9f$O@_Dj;~$K;XDj$5$l$^$9!#$3$l$O!"(B + CGI/SSI $B%W%m%0%i%`.CM$G$9!#(B + $B$3$l$O(B "system" $BMQ$N%0%k!<%W$rJD$a=P$9$N$KM-8z$G$9!#(B +
      +
    20. + +
    21. + wrapper $B$,@5>o$KBP>]$H$J$k%f!<%6$H%0%k!<%W$K$J$l$k$+(B? + + +
      + $B$3$3$G!"(Bsetuid $B$H(B setgid + $B$N5/F0$K$h$j%W%m%0%i%`$OBP>]$H$J$k%f!<%6$H%0%k!<%W$K$J$j$^$9!#(B + $B%0%k!<%W%"%/%;%9%j%9%H$O!"(B + $B%f!<%6$,B0$7$F$$$k$9$Y$F$N%0%k!<%W$G=i4|2=$5$l$^$9!#(B +
      +
    22. + +
    23. + $B%W%m%0%i%`$,CV$+$l$k%G%#%l%/%H%j$OB8:_$7$F$$$k$+(B? + + +
      + $B%G%#%l%/%H%j$,B8:_$7$J$$$J$i!"$=$N%U%!%$%k$bB8:_$7$J$$$+$b$7$l$^$;$s!#(B +
      +
    24. + +
    25. + $B%G%#%l%/%H%j$,(B Apache $B$N%I%-%e%a%s%H%D%j! + +
      + $B%j%/%(%9%H$,%5!<%PFb$N$b$N$G$"$l$P!"(B + $BMW5a$5$l$?%G%#%l%/%H%j$,%5!<%P$N%I%-%e%a%s%H%k!<%HG[2<$K$"$j$^$9$+(B? + $B%j%/%(%9%H$,(B UserDir $B$N$b$N$G$"$l$P!"(B + $BMW5a$5$l$?%G%#%l%/%H%j$,%f!<%6$N%I%-%e%a%s%H%k!<%HG[2<$K$"$j$^$9$+(B? +
      +
    26. + +
    27. + $B%G%#%l%/%H%j$rB>$N%f!<%6$,=q$-9~$a$k$h$&$K$J$C$F(B + $B$$$J$$(B$B$+(B? + +
      + $B%G%#%l%/%H%j$rB>%f!<%6$K3+J|$7$J$$$h$&$K$7$^$9!#(B + $B=jM-%f!<%6$@$1$,$3$N%G%#%l%/%H%j$NFbMF$r2~JQ$G$-$k$h$&$K$7$^$9!#(B +
      +
    28. + + +
    29. + $BBP>]$H$J$k%W%m%0%i%`$OB8:_$9$k$+(B? + +
      + $BB8:_$7$J$1$l$P +
    30. + +
    31. + $BBP>]$H$J$k%W%m%0%i%`%U%!%$%k$,B>%"%+%&%s%H$+$i(B + $B=q$-9~$a$k$h$&$K$J$C$F(B$B$$$J$$(B$B$+(B? + +
      + $B=jM- +
    32. + + +
    33. + $BBP>]$H$J$k%W%m%0%i%`$,(B setuid $B$^$?$O(B setgid + $B$5$l$F(B$B$$$J$$(B$B$+(B? + +
      + UID/GID $B$r:FEYJQ99$7$F$N%W%m%0%i%` +
    34. + + +
    35. + $BBP>]$H$J$k%f!<%6(B/$B%0%k!<%W$,%W%m%0%i%`$N(B + $B%f!<%6(B/$B%0%k!<%W$HF1$8$+(B? + +
      + $B%f!<%6$,$=$N%U%!%$%k$N=jM- +
    36. + +
    37. + $B0BA4$JF0:n$rJ]>Z$9$k$?$a$N4D6-JQ?t%/%j%"$,2DG=$+(B? + + +
      + suEXEC $B$O!"0BA4$J4D6-JQ?t$N%j%9%H(B + ($B$3$l$i$O@_Dj;~$K:n@.$5$l$^$9(B) $BFb$NJQ?t$H$7$FEO$5$l$k0BA4$J(B + PATH $BJQ?t(B ($B@_Dj;~$K;XDj$5$l$^$9(B) $B$r@_Dj$9$k$3$H$G!"(B + $B%W%m%;%9$N4D6-JQ?t$r%/%j%"$7$^$9!#(B +
      +
    38. + + +
    39. + $BBP>]$H$J$k%W%m%0%i%`$r(B exec $B$7$F + + +
      + $B$3$3$G(B suEXEC $B$,=*N;$7!"BP>]$H$J$k%W%m%0%i%`$,3+;O$5$l$^$9!#(B +
      +
    40. +
    + +

    $B$3$3$^$G$,(B suEXEC $B$N(B wrapper + $B$K$*$1$k%;%-%e%j%F%#%b%G%k$NI8=`E*$JF0:n$G$9!#$b$&>/$787=E$K(B + CGI/SSI $B@_7W$K$D$$$F$N?7$7$$@)8B$d5,Dj$r/$7$:$D3+H/$5$l$F$-$^$7$?!#(B +

    + +

    $B$3$N%;%-%e%j%F%#%b%G%k$rMQ$$$F(B + $B%5!<%P@_Dj;~$K$I$N$h$&$K5v$9$3$H$r@)8B$9$k$+!"$^$?!"(BsuEXEC + $B$rE,@Z$K@_Dj$9$k$H$I$N$h$&$J%;%-%e%j%F%#>e$N4m81$rHr$1$i$l$k$+$K(B + $B4X$9$k$h$j>\$7$$>pJs$K$D$$$F$O!"(B"$B$H$+$2$KCm0U(B" + (Beware the Jabberwock) $B$N>O$r;2>H$7$F$/$@$5$$!#(B +

    + +

    $BL\

    + +

    suEXEC + $B$N@_Dj$H%$%s%9%H!<%k(B

    + +

    $B$3$3$+$i3Z$7$/$J$j$^$9!#(BApache 1.2 $B$"$k$$$O(B + "src/Configure" $B%9%/%j%W%H$G(B Apache 1.3 $B$r@_Dj$9$k$J$i!"(B + suEXEC $B%X%C%@%U%!%$%k$rJT=8$7$F%P%$%J%j$rE,@Z$J>l=j$K$BJL$NJ8=q(B$B$K5-:\$5$l$F$$$^$9!#(B + $B0J2<$N>O$G$O!"(BAutoConf-style $B%$%s%?%U%'!<%9(B (APACI) $B$r;H$C$?(B + Apache 1.3 $B$G$N@_Dj$H%$%s%9%H!<%k$K$D$$$F=R$Y$F$$$^$9!#(B +

    + +

    APACI $B$N(B suEXEC + $B@_Dj%*%W%7%g%s(B
    +

    + +
    +
    --enable-suexec
    + +
    $B$3$N%*%W%7%g%s$O!"%G%U%)%k%H$G$O%$%s%9%H!<%k$5$l$:!"(B + $BM-8z$K$O$J$i$J$$(B suEXEC $B5!G=$rM-8z$K$7$^$9!#(B + suEXEC $B$r;H$&$h$&$K(B APACI $B$KMW5a$9$k$K$O!"(B--enable-suexec + $B%*%W%7%g%s$H$"$o$;$F>/$J$/$H$b0l$D$O(B --suexec-xxxxx + $B%*%W%7%g%s$,;XDj$5$l$J$1$l$P$J$j$^$;$s!#(B
    + +
    --suexec-caller=UID
    + +
    Apache $B$rDL>oF0:n$5$;$k(B$B%f!<%6L>(B$B$r;XDj$7$^$9!#(B + $B$3$N%f!<%6$@$1$,(B suexec $B$N + +
    --suexec-docroot=DIR
    + +
    Apache $B$N%I%-%e%a%s%H%k!<%H$r@_Dj$7$^$9!#$3$l$,(B suEXEC + $B$NF0:n$G;HMQ$9$kM#0l$N%G%#%l%/%H%j3,AX$K$J$j$^$9(B (UserDir + $B$N;XDj$OJL(B)$B!#%G%U%)%k%H$G$O(B --datadir $B$K(B "/htdocs" + $B$H$$$&%5%U%#%C%/%9$r$D$1$?$b$N$G$9!#(B + "--datadir=/home/apache" $B$H$7$F@_Dj$9$k$H!"(B + suEXEC wrapper $B$K$H$C$F(B "/home/apache/htdocs" + $B$,%I%-%e%a%s%H%k!<%H$H$7$F;H$o$l$^$9!#(B
    + +
    --suexec-logfile=FILE
    + +
    suEXEC $B$N=hM}$H%(%i!<$,5-O?$5$l$k%U%!%$%kL>$r;XDj$7$^$9!#(B + ($B4F::$d%G%P%C%0L\E*$KM-MQ(B) + $B%G%U%)%k%H$G$O%m%0%U%!%$%k$O(B "suexec_log" $B$H$$$&L>A0$G!"(B + $BI8=`$N%m%0%U%!%$%k%G%#%l%/%H%j(B (--logfiledir) $B$KCV$+$l$^$9!#(B +
    + +
    --suexec-userdir=DIR
    + +
    suEXEC $B$,%"%/%;%9$r5v$5$l$k%f!<%6%[!<%`%G%#%l%/%H%jG[2<$N(B + $B%5%V%G%#%l%/%H%j$r;XDj$7$^$9!#(B + $B$3$N%G%#%l%/%H%j0J2<$NA4l9g(B + ($B$9$J$o$A(B "*" $B$r4^$^$J$$$b$N(B)$B!"$3$l$HF1$8CM$r@_Dj$9$Y$-$G$9!#(B + Userdir $B%G%#%l%/%F%#%V$,$=$N%f!<%6$N%Q%9%o!<%I%U%!%$%kFb$N(B + $B%[!<%`%G%#%l%/%H%j$HF1$8>l=j$r;X$7$F$$$J$1$l$P!"(B + suEXEC $B$OE,@Z$KF0:n$7$^$;$s!#%G%U%)%k%H$O(B "public_html" $B$G$9!#(B +
    + $B3F(B UserDir $B$,0[$J$C$?2>A[%[%9%H$r@_Dj$7$F$$$k>l9g!"(B + $B$=$l$i$rA4$F0l$D$N?F%G%#%l%/%H%j$K4^$a$F!"(B + $B$=$N?F%G%#%l%/%H%j$NL>A0$r$3$3$G;XDj$9$kI,MW$,$"$j$^$9!#(B + $B$3$N$h$&$K;XDj$5$l$J$1$l$P(B "~userdir" cgi + $B$X$N%j%/%(%9%H$,F0:n$7$^$;$s!#(B
    + +
    --suexec-uidmin=UID
    + +
    suEXEC $B$NBP>]%f!<%6$H$7$F5v$5$l$k(B UID $B$N:G>.CM$r;XDj$7$^$9!#(B + $BBgDq$N%7%9%F%`$G$O(B 500 $B$+(B 100 $B$,0lHLE*$G$9!#(B + $B%G%U%)%k%HCM$O(B 100 $B$G$9!#(B
    + +
    --suexec-gidmin=GID
    + +
    suEXEC $B$NBP>]%0%k!<%W$H$7$F5v$5$l$k(B GID + $B$N:G>.CM$r;XDj$7$^$9!#BgDq$N%7%9%F%`$G$O(B 100 $B$,0lHLE*$J$N$G!"(B + $B%G%U%)%k%HCM$H$7$F$b(B 100 $B$,;H$o$l$F$$$^$9!#(B
    + +
    --suexec-safepath=PATH
    + +
    CGI $B +
    + +

    suEXEC $B@_Dj$N3NG'(B +
    + suEXEC wrapper $B$r%3%s%Q%$%k$7$F%$%s%9%H!<%k$9$kA0$K!"@_DjFbMF$r(B + --layout $B%*%W%7%g%s$G3NG'$G$-$^$9!#(B
    + $B=PNONc(B:

    +
    +    suEXEC setup:
    +            suexec binary: /usr/local/apache/sbin/suexec
    +            document root: /usr/local/apache/share/htdocs
    +           userdir suffix: public_html
    +                  logfile: /usr/local/apache/var/log/suexec_log
    +                safe path: /usr/local/bin:/usr/bin:/bin
    +                caller ID: www
    +          minimum user ID: 100
    +         minimum group ID: 100
    +
    + +

    suEXEC wrapper + $B$N%3%s%Q%$%k$H%$%s%9%H!<%k(B
    + --enable-suexec $B%*%W%7%g%s$G(B suEXEC $B5!G=$rM-8z$K$9$k$H!"(B + "make" $B%3%^%s%I$r + $B$9$Y$F$N9=@.MWAG$,:n@.$5$l$k$H!"$=$l$i$N%$%s%9%H!<%k$K$O(B + "make install" $B%3%^%s%I$,l=j$O(B "/usr/local/apache/sbin/suexec" $B$G$9!#(B
    + $B%$%s%9%H!<%k;~$K$O(B root + $B8"8B$,I,MW$J$N$GCm0U$7$F$/$@$5$$!#(Bwrapper $B$,%f!<%6(B ID + $B$r@_Dj$9$k$?$a$K!"=jM-root + $B$G$N%;%C%H%f!<%6(B ID + $B%S%C%H$r$=$N%U%!%$%k$N%b!<%I$K@_Dj$7$J$1$l$P$J$j$^$;$s!#(B +

    + +

    $BL\

    + +

    suEXEC + $B$NM-8z2=$HL58z2=(B

    + +

    $B5/F0;~$K!"(BApache $B$O(B "sbin" $B%G%#%l%/%H%j$G(B + "suexec" $B$rC5$7$^$9(B + ($B%G%U%)%k%H$O(B "/usr/local/apache/sbin/suexec") $B!#(B + $BE,@Z$K@_Dj$5$l$?(B suEXEC $B$,$_$D$+$k$H!"(B + $B%(%i!<%m%0$K0J2<$N%a%C%;!<%8$,=PNO$5$l$^$9!#(B

    +
    +    [notice] suEXEC mechanism enabled (wrapper: /path/to/suexec)
    +
    + +

    $B%5!<%P5/F0;~$K$3$N%a%C%;!<%8$,=P$J$$>l9g!"(B + $BBgDq$O%5!<%P$,A[Dj$7$?>l=j$G(B wrapper $B%W%m%0%i%`$,8+$D$+$i$J$+$C$?$+!"(B + setuid root $B$H$7$F%$%s%9%H!<%k$5$l$F$$$J$$$+$G$9!#(B +
    + suEXEC $B$N;EAH$_$r;HMQ$9$k$N$,=i$a$F$G!"(BApache $B$,4{$KF0:nCf$G$"$l$P!"(B + Apache $B$r(B kill $B$7$F!":F5/F0$7$J$1$l$P$J$j$^$;$s!#(BHUP $B%7%0%J%k$d(B + USR1 $B%7%0%J%k$K$h$kC1=c$J:F5/F0$G$OIT==J,$G$9!#(B
    + suEXEC $B$rL58z$K$9$k>l9g$O!"(B"suexec" $B%U%!%$%k$r:o=|$7$F$+$i(B + Apache $B$r(B kill $B$7$F:F5/F0$7$^$9!#(B +

    + +

    $BL\

    + +

    suEXEC $B$N;HMQ(B

    + +

    $B2>A[%[%9%H(B:
    + suEXEC wrapper $B$N;H$$J}$H$7$F!"(B + $B2>A[%[%9%H(B$B@_Dj$G$N(B + User $B%G%#%l%/%F%#%V$H(B + Group + $B%G%#%l%/%F%#%V$rDL$7$?$b$N$,$"$j$^$9!#(B + $B$3$l$i$N%G%#%l%/%F%#%V$r%a%$%s%5!<%P$N%f!<%6(B ID + $B$H0[$J$k$b$N$K$9$k$H!"(BCGI $B%j%=!<%9$X$N$9$Y$F$N%j%/%(%9%H$O!"$=$N(B + <VirtualHost> $B$G;XDj$5$l$?(B User $B$H(B + Group $B$H$7$F<VirtualHost> + $B$G$=$l$i$N%G%#%l%/%F%#%V$N$I$A$i$+!"$^$?$ON>J}$,;XDj$5$l$F$$$J$$>l9g!"(B + $B%a%$%s%5!<%P$N%f!<%6(B ID $B$,A[Dj$5$l$^$9!#(B

    + +

    $B%f!<%6%G%#%l%/%H%j(B:
    + suEXEC wrapper $B$O!"%j%/%(%9%H@h$N%f!<%6$H$7$F(B CGI + $B$r~
    " + $BJ8;z$rCV$/$3$H$Ge5-$N(B$B%;%-%e%j%F%#8!::(B$B$r%Q%9$G$-$k$3$H$G$9!#(B +

    + +

    $BL\

    + +

    suEXEC $B$N%G%P%C%0(B

    + +

    suEXEC wrapper $B$O!">e5-$G=R$Y$?(B --suexec-logfile + $B%*%W%7%g%s$G;XDj$5$l$?%U%!%$%k$K%m%0>pJs$r5-O?$7$^$9!#(B + wrapper $B$rE,@Z$K@_Dj!"%$%s%9%H!<%k$G$-$F$$$k$H;W$&>l9g!"(B + $B$I$3$GLB$C$F$$$k$+8+$h$&$H$9$k$J$i$3$N%m%0$H%5!<%P$N(B + $B%(%i!<%m%0$r8+$k$H$h$$$G$7$g$&!#(B

    + +

    $BL\

    + +

    $B$H$+$2$KCm0U(B: $B7Y9p$H;vNc(B

    + +

    $BCm0U(B! + $B$3$N>O$O40A4$G$O$"$j$^$;$s!#$3$N>O$N:G?72~D{HG$K$D$$$F$O!"(B + Apache $B%0%k!<%W$N(B + $B%*%s%i%$%s%I%-%e%a%s%H(B$BHG$r;2>H$7$F$/$@$5$$!#(B +

    + +

    $B%5!<%P$N@_Dj$K@)8B$r$b$&$1$k(B wrapper $B$K$D$$$F!"(B + $B$$$/$D$+6=L#?<$$E@$,$"$j$^$9!#(BsuEXEC $B$K4X$9$k(B "$B%P%0(B" + $B$rJs9p$9$kA0$K$3$l$i$r3NG'$7$F$/$@$5$$!#(B

    + +
      +
    • suEXEC $B$N6=L#?<$$E@(B
    • + +
    • $B3,AX9=B$$N@)8B(B + + +
      + $B%;%-%e%j%F%#$H8zN($NM}M3$+$i!"(BsuEXEC $B$NA4$F$N%j%/%(%9%H$O(B + $B2>A[%[%9%H$X$N%j%/%(%9%H$K$*$1$k:G>e0L$N%I%-%e%a%s%H%k!<%HFb$+!"(B + $B%f!<%6%G%#%l%/%H%j$X$N%j%/%(%9%H$K$*$1$k8D!9$N%f!<%6$N:G>e0L$N(B + $B%I%-%e%a%s%H%k!<%HFb$K;D$i$J$1$l$P$J$j$^$;$s!#(B + $BNc$($P!";M$D$N2>A[%[%9%H$r@_Dj$7$F$$$k>l9g!"(B + $B2>A[%[%9%H$N(B suEXEC $B$KM-Mx$J$h$&$K!"%a%$%s$N(B Apache + $B%I%-%e%a%s%H3,AX$N30B&$KA4$F$N2>A[%[%9%H$N%I%-%e%a%s%H%k!<%H$r(B + $B9=C[$9$kI,MW$,$"$j$^$9!#(B($BNc$O8eF|5-:\(B) +
      +
    • + +
    • suEXEC $B$N(B PATH $B4D6-JQ?t(B + + +
      + $B$3$l$rJQ99$9$k$N$O4m81$G$9!#$3$N;XDj$K4^$^$l$k3F%Q%9$,(B + $B?.Mj$G$-$k(B + $B%G%#%l%/%H%j$G$"$k$3$H$r3NG'$7$F$/$@$5$$!#(B + $B@$3&$+$i$N%"%/%;%9$K$h$j!"C/$+$,%[%9%H>e$G%H%m%$$NLZGO(B + $B$r +
    • + +
    • suEXEC $B%3!<%I$N2~B$(B + + +
      + $B7+$jJV$7$^$9$,!"2?$r$d$m$&$H$7$F$$$k$+GD0.$;$:$K$3$l$r$d$k$H(B + $BBg$-$JLdBj(B$B$r0z$-5/$3$7$+$M$^$;$s!#(B + $B2DG=$J8B$jHr$1$F$/$@$5$$!#(B +
      +
    • +
    + +

    $BL\

    + + + diff --git a/htdocs/manual/suexec_1_2.html b/htdocs/manual/suexec_1_2.html new file mode 100644 index 00000000000..3d16823e595 --- /dev/null +++ b/htdocs/manual/suexec_1_2.html @@ -0,0 +1,180 @@ + + + + + + + Apache suEXEC Support + + + + + + +

    Configuring & Installing + suEXEC

    + +

    This section describes the configuration and + installation of the suEXEC feature with the + "src/Configure" script.
    + (If you use Apache 1.3 you may want to use the Apache + AutoConf-style interface (APACI) which is described in the main suEXEC document).

    + +

    EDITING THE SUEXEC HEADER + FILE
    + - From the top-level of the Apache source tree, + type:   cd support + [ENTER]

    + +

    Edit the suexec.h file and change + the following macros to match your local Apache + installation.

    + +

    From support/suexec.h

    +
    +     /*
    +      * HTTPD_USER -- Define as the username under which Apache normally
    +      *               runs.  This is the only user allowed to execute
    +      *               this program.
    +      */
    +     #define HTTPD_USER "www"
    +
    +     /*
    +      * UID_MIN -- Define this as the lowest UID allowed to be a target user
    +      *            for suEXEC.  For most systems, 500 or 100 is common.
    +      */
    +     #define UID_MIN 100
    +
    +     /*
    +      * GID_MIN -- Define this as the lowest GID allowed to be a target group
    +      *            for suEXEC.  For most systems, 100 is common.
    +      */
    +     #define GID_MIN 100
    +
    +     /*
    +      * USERDIR_SUFFIX -- Define to be the subdirectory under users'
    +      *                   home directories where suEXEC access should
    +      *                   be allowed.  All executables under this directory
    +      *                   will be executable by suEXEC as the user so
    +      *                   they should be "safe" programs.  If you are
    +      *                   using a "simple" UserDir directive (ie. one
    +      *                   without a "*" in it) this should be set to
    +      *                   the same value.  suEXEC will not work properly
    +      *                   in cases where the UserDir directive points to
    +      *                   a location that is not the same as the user's
    +      *                   home directory as referenced in the passwd file.
    +      *
    +      *                   If you have VirtualHosts with a different
    +      *                   UserDir for each, you will need to define them to
    +      *                   all reside in one parent directory; then name that
    +      *                   parent directory here.  IF THIS IS NOT DEFINED
    +      *                   PROPERLY, ~USERDIR CGI REQUESTS WILL NOT WORK!
    +      *                   See the suEXEC documentation for more detailed
    +      *                   information.
    +      */
    +     #define USERDIR_SUFFIX "public_html"
    +
    +     /*
    +      * LOG_EXEC -- Define this as a filename if you want all suEXEC
    +      *             transactions and errors logged for auditing and
    +      *             debugging purposes.
    +      */
    +     #define LOG_EXEC "/usr/local/apache/logs/cgi.log" /* Need me? */
    +
    +     /*
    +      * DOC_ROOT -- Define as the DocumentRoot set for Apache.  This
    +      *             will be the only hierarchy (aside from UserDirs)
    +      *             that can be used for suEXEC behavior.
    +      */
    +     #define DOC_ROOT "/usr/local/apache/htdocs"
    +
    +     /*
    +      * SAFE_PATH -- Define a safe PATH environment to pass to CGI executables.
    +      *
    +      */
    +     #define SAFE_PATH "/usr/local/bin:/usr/bin:/bin"
    +
    + +

    COMPILING THE SUEXEC + WRAPPER
    + You now need to compile the suEXEC wrapper. At the shell + command prompt, after compiling Apache, + type:  make + suexec[ENTER]. This should create the + suexec wrapper executable.

    + +

    COMPILING APACHE FOR USE WITH + SUEXEC
    + By default, Apache is compiled to look for the suEXEC wrapper + in the following location.

    + +

    From src/include/httpd.h

    +
    +     /* The path to the suExec wrapper, can be overridden in Configuration */
    +     #ifndef SUEXEC_BIN
    +     #define SUEXEC_BIN  HTTPD_ROOT "/sbin/suexec"
    +     #endif
    +
    + +

    If your installation requires location of the + wrapper program in a different directory, either add + -DSUEXEC_BIN=\"</your/path/to/suexec>\" + to your CFLAGS (or edit src/include/httpd.h) and recompile your + Apache server. See Compiling and + Installing Apache (and the INSTALL file in the + source distribution) for more info on this process.

    + +

    COPYING THE SUEXEC BINARY TO ITS PROPER + LOCATION
    + Copy the suexec executable created + in the exercise above to the defined location for + SUEXEC_BIN.

    + +

    cp suexec + /usr/local/apache/sbin/suexec [ENTER]

    + +

    In order for the wrapper to set the user ID, it + must be installed as owner root and + must have the setuserid execution bit set for file modes. If + you are not running a root user + shell, do so now and execute the following commands.

    + +

    chown root + /usr/local/apache/sbin/suexec [ENTER]
    + chmod 4711 /usr/local/apache/sbin/suexec + [ENTER]

    + +

    Enabling & Disabling + suEXEC

    + +

    After properly installing the + suexec wrapper executable, you must kill and + restart the Apache server. A simple kill -1 `cat + httpd.pid` will not be enough. Upon startup of + the web-server, if Apache finds a properly configured + suexec wrapper, it will print the following + message to the console (Apache 1.2):

    +
    +    Configuring Apache for use with suexec wrapper.
    +
    + If you use Apache 1.3 the following message is printed to the + error log: +
    +    [notice] suEXEC mechanism enabled (wrapper: /path/to/suexec)
    +
    + +

    If you don't see this message at server + startup, the server is most likely not finding the wrapper + program where it expects it, or the executable is not installed + setuid root. Check your installation + and try again.

    + +

    BACK TO MAIN + PAGE

    + + + + diff --git a/htdocs/manual/unixware.html b/htdocs/manual/unixware.html new file mode 100644 index 00000000000..6630ad585de --- /dev/null +++ b/htdocs/manual/unixware.html @@ -0,0 +1,63 @@ + + + + + + + Compiling Apache under UnixWare + + + + + + +

    Compiling Apache under UnixWare

    + To compile a working copy of Apache under UnixWare, there are + several other steps you may need to take. These prevent such + problems as zombie processes, bind errors, and accept errors, + to name a few. + +

    UnixWare 1.x

    + Make sure that USE_FCNTL_SERIALIZE_ACCEPT is defined (if not + defined by Apache autoconfiguration). If using the UnixWare + cc compiler, and you still see accept() errors, don't + use compiler optimization, or get gcc. + +

    UnixWare 2.0.x

    + SCO patch tf2163 is required + in order for Apache to work correctly on UnixWare 2.0.x. See http://www.sco.com for UnixWare + patch information. + +

    In addition, make sure that USE_FCNTL_SERIALIZE_ACCEPT is + defined (if not defined by Apache autoconfiguration). To reduce + instances of connections in FIN_WAIT_2 state, you may also want + to define NO_LINGCLOSE (Apache 1.2 only).

    + +

    UnixWare 2.1.x

    + SCO patch ptf3123 is + required in order for Apache to work correctly on UnixWare + 2.1.x. See http://www.sco.com + for UnixWare patch information. + +

    NOTE: Unixware 2.1.2 and later already have + patch ptf3123 included

    + +

    In addition, make sure that USE_FCNTL_SERIALIZE_ACCEPT is + defined (if not defined by Apache autoconfiguration). To reduce + instances of connections in FIN_WAIT_2 state, you may also want + to define NO_LINGCLOSE (Apache 1.2 only).

    + +

    Thanks to Joe Doupnik <JRD@cc.usu.edu> and Rich Vaughn + <rvaughn@aad.com> for additional info for UnixWare + builds.

    + +

    +

    + + + diff --git a/htdocs/manual/upgrading_to_1_3.html b/htdocs/manual/upgrading_to_1_3.html new file mode 100644 index 00000000000..fe47d0ad7e6 --- /dev/null +++ b/htdocs/manual/upgrading_to_1_3.html @@ -0,0 +1,342 @@ + + + + + + + Upgrading to 1.3 from 1.2 + + + + + + +

    Upgrading to 1.3 from 1.2

    + +

    In order to assist folks upgrading we are now going to + maintain a document describing information critical to existing + Apache users. Note that it only lists differences between + recent major releases, so for example, folks using Apache 1.1 + or earlier will have to figure out what changed up to Apache + 1.2 before this document can be considered relevant. Old users + could look at the src/CHANGES file which tracks + code changes.

    + +

    These are intended to be brief notes, and you should be able + to find more information in either the New Features document, or in + the src/CHANGES file.

    + +

    Compile-Time Configuration Changes

    + +
      +
    • The source code has been reorganized, which affects anyone + with custom modules or modifications. But also, the + Module directive has been changed to the + AddModule directive.
    • + +
    • The Configuration variable + EXTRA_LFLAGS has been renamed + EXTRA_LDFLAGS.
    • + +
    • The -DMAXIMUM_DNS definition has been + obsoleted by changes to mod_access enforcing + double-reverse DNS lookups when necessary.
    • + +
    • The -DSERVER_SUBVERSION=\"string\" + compile-time option has been replaced with the run-time API + call ap_add_version_component(). Compile-time + modification of the server identity by the configuration + scripts is no longer supported.
    • + +
    • mod_dir has been split into two pieces + mod_autoindex, and + mod_dir.
    • + +
    • mod_browser has + been replaced by mod_setenvif.
    • + +
    • IRIX systems with untrusted users who can write CGIs + which execute as the same uid as httpd should consider using + suexec, or adding + -DUSE_FCNTL_SERIALIZED_ACCEPT to + EXTRA_CFLAGS. This is slower, more information + is available on the performance tuning + page. There is a mild denial of service attack possible + with the default config, but the default config is an order + of magnitude faster.
    • + +
    • mod_auth_msql has been removed from the + distribution.
    • + +
    • The new Apache Autoconf-style Interface (APACI) was added + to the top-level to provide a real out-of-the-box build and + installation procedure for the complete Apache package.
    • +
    + +

    Run-Time Configuration Changes

    + +
      +
    • + There have been numerous changes to the default config + files. Ensure that you compare your existing configuration + files with the new ones to ensure there aren't any + undesired differences. In particular: + +
        +
      • As of Apache 1.3.0, the current config files apply + different Options and + AllowOverride + settings to various directories than were used in + 1.2.
      • + +
      • As of the release following Apache 1.3.3, the three + config file templates have been merged into + httpd.conf-dist and the order of the + directives changed.
      • +
      +
    • + +
    • As of 1.3.2, mod_expires will + add Expires headers to content that does not come from a file + on disk, unless you are using a modification time based + setting. Previously, it would never add an Expires header + unless content came from a file on disk. This could result in + Expires headers being added in places where they were not + previously added.
    • + +
    • Standalone FancyIndexing + directives are now combined with the settings of any + IndexOptions directive already in effect, rather + than replacing them.
    • + +
    • + AuthName strings will need to be + quoted in .htaccess or server + configuration files if they contain blank characters (like + spaces). For example, if you use an AuthName + directive like this: +
      +     AuthName This and That
      +   
      +
      + you will need to change it to +
      +     AuthName "This and That"
      +   
      +
      + This change was made for consistency in the config + language. +
    • + +
    • + As of Apache 1.3.1, methods listed in + <Limit> directives must be + uppercase. Method names, such as GET, + POST, and PUT are defined as + being case-sensitive. That is, a GET request + is different from a get request. Prior to + Apache 1.3.1, the <Limit> directive + parser incorrectly treated both of these as being the same. + Apache's built-in method limit processing currently only + understands uppercase method names, so if you've used + clauses such as + "<Limit Get post>" in your + configuration files, you need to correct them to use + uppercase names. + +

      Unrecognized method names in the server configuration + files will result in the server logging an error message + and failing to start. In .htaccess files, + unknown methods will cause the server to log an error to + its error log and return an 'Internal Server Error' page to + the client.

      +
    • + +
    • The default Apache ServerRoot directory + changed from the NCSA-compatible + /usr/local/etc/httpd/ to + /usr/local/apache/. This change covers only the + default setting (and the documentation); it is of course + possible to override it using the -d ServerRoot and + -f httpd.conf switches when starting apache.
    • + +
    • Folks using HTTP/1.1-style virtual hosting will need to + list the ip:port pairs that are supposed to have + HTTP/1.1-style virtual hosting via the NameVirtualHost + directive (one directive per pair). Previously this support + was given implicitly on the "main server address". Now it has + to be explicitly listed so as to avoid many problems that + users had. Please see the Apache Virtual + Host documentation for further details on + configuration.
    • + +
    • The precedence of virtual hosts has been reversed + (applies mainly to vhosts using HTTP/1.1 Host: headers, and + the ServerPath + directive). Now the earlier vhosts in the file have + precedence over the later vhosts.
    • + +
    • HostnameLookups defaults to Off.
    • + +
    • REMOTE_HOST CGI variable + changed. In Apache 1.2 and earlier, the + REMOTE_HOST environment variable made available + to CGI scripts was set to either the full DNS name of the + client, or else to the client's IP address if the name was + not known. This behavior differed from that specified by the + CGI specification, which defines this variable as being NULL + if the name isn't known. In Apache 1.3, we have made this + correction. REMOTE_ADDR always contains the + client's IP address, but REMOTE_HOST is only + defined when the server has been able to determine the + client's DNS name.
    • + +
    • The undocumented mod_access syntax + "allow user-agents" was removed. The replacement is the more + general "allow from env".
    • + +
    • When using wildcards in pathnames (such as * and ?) they + no longer match / (slash). That is, they more closely behave + how a UNIX shell behaves. This affects + <Directory> directives, for example.
    • + +
    • If no TransferLog directive is given then + nothing will be logged. (Previously it would default to + logs/access_log.)
    • + +
    • Apache now has configurable error logging + levels, and the default eliminates some messages that + earlier versions always generated.
    • + +
    • When booting, Apache will now detach itself from stdin, + stdout, and stderr. stderr will not be detached until after + the config files have been read so you will be able to see + initial error messages. After that all errors are logged in + the error_log. This makes it more convenient to start Apache + via rsh, ssh, or crontabs.
    • + +
    • <Files> sections previously could take a full + pathname, and were matched against the full pathnames. This + had some inconsistencies, and was removed. To emulate this + older behavior use a <Files> section nested inside a + <Directory> section.
    • + +
    • <Location> matching behavior with respect to + slashes has changed. See the <Location> + documentation for more info.
    • +
    + +

    Misc Changes

    + +
      +
    • ServerType inetd has been deprecated. It + still exists, but bugs are unlikely to be fixed.
    • + +
    • httpd_monitor has been deprecated. The + replacement is to use mod_status and make a + request to a URL such as + http://myhost/server-status?refresh=10.
    • + +
    • + Apache now provides an effectively unbuffered connection + for CGI scripts. This means that data will be sent to the + client as soon as the CGI pauses or stops output; + previously, Apache would buffer the output up to a fixed + buffer size before sending, which could result in the user + viewing an empty page until the CGI finished or output a + complete buffer. It is no longer necessary to use an "nph-" + CGI to get unbuffered output. Given that most CGIs are + written in a language that by default does buffering + (e.g., perl) this shouldn't have a detrimental + effect on performance. + +

      "nph-" CGIs, which formerly provided a direct socket to + the client without any server post-processing, were not + fully compatible with HTTP/1.1 or SSL support. As such they + would have had to implement the transport details, such as + encryption or chunking, in order to work properly in + certain situations. Now, the only difference between nph + and non-nph scripts is "non-parsed headers".

      +
    • + +
    • dbmmanage has been overhauled.
    • +
    + +

    Third Party Modules

    + +

    The following changes between the 1.2 and 1.3 API may + require slight changes in third party modules not maintained by + Apache.

    + +
      +
    • To avoid symbol clashes with third-party code compiled + into the server, the general prefix `ap_' was + globally applied to the following classes of symbols: Apache + provided general functions (e.g., + ap_cpystrn), public API functions + (e.g., palloc, bgets) and + private functions which can't be made static (because of + cross-object usage) but should be (e.g., + new_connection). For backward source + compatibility with Apache 1.2 a new header file named + compat.h was created which provides defines for + the old symbol names. You'll either have to #include + compat.h or update the API symbols you use.
    • + +
    • Be sure and examine the source + code reorganization page to see whether any item there + affects you.
    • + +
    • Use of SERVER_VERSION definition. If + third-party modules reference the server version string using + this symbol, they should be corrected to obtain it by calling + the new API routine + const char *ap_get_server_version().
    • + +
    • ap_construct_url prototype change. The + second parameter was previously a server_rec, it + has been changed to a request_rec.
    • + +
    • + The table datatype has been made an opaque + type. Code which assumes a table is the same + as an array_header will not compile. This is + actually a change to enforce the API the way it was + intended, all versions of Apache have had a + table_elts() function which is intended for + code which needs to access the elements of a table. The + changes required for this are pretty easy, and work with + all versions of Apache. + +

      Suppose t is a table. Whenever code refers + to t->elts, replace it with something like + this:

      + +
      +
      +    array_header *arr = table_elts(t);
      +    table_entry *elts = (table_entry *)arr->elts;
      +
      +
      + Whenever code refers to t->nelts use + arr->nelts. Many examples can be found in + the standard modules, search for table_elts. +
    • +
    + + + + diff --git a/htdocs/manual/urlmapping.html b/htdocs/manual/urlmapping.html new file mode 100644 index 00000000000..9722dd481bc --- /dev/null +++ b/htdocs/manual/urlmapping.html @@ -0,0 +1,297 @@ + + + + + + + Mapping URLs to Filesystem Locations - Apache HTTP + Server + + + + + + +

    Mapping URLs to Filesystem Locations

    + +

    This document explains how Apache uses the URL of a request + to determine the filesystem location from which to serve a + file.

    + + +
    + + + + + + + +
    Related Modules
    +
    + mod_alias
    + mod_rewrite
    + mod_userdir
    + mod_speling
    + mod_vhost_alias
    +
    Related Directives
    +
    + Alias
    + AliasMatch
    + CheckSpelling
    + DocumentRoot
    + ErrorDocument
    + Options
    + Redirect
    + RedirectMatch
    + RewriteCond
    + RewriteRule
    + ScriptAlias
    + ScriptAliasMatch
    + UserDir
    +
    + +

    DocumentRoot

    + +

    In deciding what file to serve for a given request, Apache's + default behavior is to take the URL-Path for the request (the + part of the URL following the hostname and port) and add it to + the end of the DocumentRoot specified in + your configuration files. Therefore, the files and directories + underneath the DocumentRoot make up the basic + document tree that will be visible from the web.

    + +

    Apache is also capable of Virtual + Hosting, where the server receives requests for more than + one host. In this case, a different DocumentRoot + can be specified for each virtual host, or alternatively, the + directives provided by the module mod_vhost_alias can be used + to dynamically determine the appropriate place from which to + serve content based on the requested IP address or + hostname.

    + +

    Files Outside the + DocumentRoot

    + +

    There are frequently circumstances where it is necessary to + allow web access to parts of the filesystem that are not + strictly underneath the DocumentRoot. Apache + offers several different ways to accomplish this. On Unix + systems, symbolic links can bring other parts of the filesystem + under the DocumentRoot. For security reasons, + Apache will follow symbolic links only if the Options setting for the + relevant directory includes FollowSymLinks or + SymLinksIfOwnerMatch.

    + +

    Alternatively, the Alias directive will map + any part of the filesystem into the web space. For example, + with

    + +
    + Alias /docs /var/web +
    + +

    the URL + http://www.example.com/docs/dir/file.html will be + served from /var/web/dir/file.html. The ScriptAlias directive + works the same way, with the additional effect that all content + located at the target path is treated as CGI scripts.

    + +

    For situations where you require additional flexibility, you + can use the AliasMatch and ScriptAliasMatch + directives to do powerful regular-expression based + matching and substitution. For example,

    + +
    + ScriptAliasMatch ^/~([^/]*)/cgi-bin/(.*) + /home/$1/cgi-bin/$2 +
    + +

    will map a request to + http://example.com/~user/cgi-bin/script.cgi to the + path /home/user/cgi-bin/script.cgi and will treat + the resulting file as a CGI script.

    + +

    User Directories

    + +

    Traditionally on Unix systems, the home directory of a + particular user can be referred to as + ~user/. The module mod_userdir extends this idea + to the web by allowing files under each user's home directory + to be accessed using URLs such as the following.

    + +
    + http://www.example.com/~user/file.html +
    + +

    For security reasons, it is inappropriate to give direct + access to a user's home directory from the web. Therefore, the + UserDir directive + specifies a directory underneath the user's home directory + where web files are located. Using the default setting of + Userdir public_html, the above URL maps to a file + at a directory like + /home/user/public_html/file.html where + /home/user/ is the user's home directory as + specified in /etc/passwd.

    + +

    There are also several other forms of the + Userdir directive which you can use on systems + where /etc/passwd does not contain the location of + the home directory.

    + +

    Some people find the "~" symbol (which is often encoded on + the web as %7e) to be awkward and prefer to use an + alternate string to represent user directories. This + functionality is not supported by mod_userdir. However, if + users' home directories are structured in a regular way, then + it is possible to use the AliasMatch directive + to achieve the desired effect. For example, to make + http://www.example.com/upages/user/file.html map + to /home/user/public_html/file.html, use the + following AliasMatch directive:

    + +
    + AliasMatch ^/upages/([^/]*)/?(.*) + /home/$1/public_html/$2 +
    + +

    URL Redirection

    + +

    The configuration directives discussed in the above sections + tell Apache to get content from a specific place in the + filesystem and return it to the client. Sometimes, it is + desirable instead to inform the client that the requested + content is located at a different URL, and instruct the client + to make a new request with the new URL. This is called + redirection and is implemented by the Redirect directive. For + example, if the contents of the directory /foo/ + under the DocumentRoot are moved to the new + directory /bar/, you can instruct clients to + request the content at the new location as follows:

    + +
    + Redirect permanent /foo/ + http://www.example.com/bar/ +
    + +

    This will redirect any URL-Path starting in + /foo/ to the same URL path on the + www.example.com server with /bar/ + substituted for /foo/. You can redirect clients to + any server, not only the origin server.

    + +

    Apache also provides a RedirectMatch + directive for more complicated rewriting problems. For example, + to redirect requests for the site home page to a different + site, but leave all other requests alone, use the following + configuration:

    + +
    + RedirectMatch permanent ^/$ + http://www.example.com/startpage.html +
    + +

    Alternatively, to temporarily redirect all pages on one site + to a particular page on another site, use the following:

    + +
    + RedirectMatch temp .* + http://othersite.example.com/startpage.html +
    + +

    Rewriting Engine

    + +

    When even more powerful substitution is required, the + rewriting engine provided by mod_rewrite can be useful. The + directives provided by this module use characteristics of the + request such as browser type or source IP address in deciding + from where to serve content. In addition, mod_rewrite can use + external database files or programs to determine how to handle + a request. Many practical examples employing mod_rewrite are + discussed in the URL Rewriting + Guide.

    + +

    File Not Found

    + +

    Inevitably, URLs will be requested for which no matching + file can be found in the filesystem. This can happen for + several reasons. In some cases, it can be a result of moving + documents from one location to another. In this case, it is + best to use URL redirection to inform + clients of the new location of the resource. In this way, you + can assure that old bookmarks and links will continue to work, + even though the resource is at a new location.

    + +

    Another common cause of "File Not Found" errors is + accidental mistyping of URLs, either directly in the browser, + or in HTML links. Apache provides the module mod_speling (sic) to help with + this problem. When this module is activated, it will intercept + "File Not Found" errors and look for a resource with a similar + filename. If one such file is found, mod_speling will send an + HTTP redirect to the client informing it of the correct + location. If several "close" files are found, a list of + available alternatives will be presented to the client.

    + +

    An especially useful feature of mod_speling, is that it will + compare filenames without respect to case. This can help + systems where users are unaware of the case-sensitive nature of + URLs and the Unix filesystem. But using mod_speling for + anything more than the occasional URL correction can place + additional load on the server, since each "incorrect" request + is followed by a URL redirection and a new request from the + client.

    + +

    If all attempts to locate the content fail, Apache returns + an error page with HTTP status code 404 (file not found). The + appearance of this page is controlled with the ErrorDocument directive + and can be customized in a flexible manner as discussed in the + Custom error responses and International Server Error + Responses documents.

    + + + + diff --git a/htdocs/manual/vhosts/details.html b/htdocs/manual/vhosts/details.html new file mode 100644 index 00000000000..781d8b41689 --- /dev/null +++ b/htdocs/manual/vhosts/details.html @@ -0,0 +1,397 @@ + + + + + + + An In-Depth Discussion of Virtual Host Matching + + + + + + +

    An In-Depth Discussion of Virtual Host + Matching

    + +

    The virtual host code was completely rewritten in + Apache 1.3. This document attempts to explain + exactly what Apache does when deciding what virtual host to + serve a hit from. With the help of the new NameVirtualHost + directive virtual host configuration should be a lot easier and + safer than with versions prior to 1.3.

    + +

    If you just want to make it work without + understanding how, here are some + examples.

    + +

    Config File Parsing

    + +

    There is a main_server which consists of all the + definitions appearing outside of + <VirtualHost> sections. There are virtual + servers, called vhosts, which are defined by <VirtualHost> + sections.

    + +

    The directives Port, ServerName, + ServerPath, + and ServerAlias + can appear anywhere within the definition of a server. However, + each appearance overrides the previous appearance (within that + server).

    + +

    The default value of the Port field for + main_server is 80. The main_server has no default + ServerPath, or ServerAlias. The + default ServerName is deduced from the servers IP + address.

    + +

    The main_server Port directive has two functions due to + legacy compatibility with NCSA configuration files. One + function is to determine the default network port Apache will + bind to. This default is overridden by the existence of any Listen + directives. The second function is to specify the port number + which is used in absolute URIs during redirects.

    + +

    Unlike the main_server, vhost ports do not affect + what ports Apache listens for connections on.

    + +

    Each address appearing in the VirtualHost + directive can have an optional port. If the port is unspecified + it defaults to the value of the main_server's most recent + Port statement. The special port * + indicates a wildcard that matches any port. Collectively the + entire set of addresses (including multiple A + record results from DNS lookups) are called the vhost's + address set.

    + +

    Unless a NameVirtualHost + directive is used for a specific IP address the first vhost + with that address is treated as an IP-based vhost. In 1.3.13 + and later that includes the IP address *.

    + +

    If name-based vhosts should be used a + NameVirtualHost directive must appear + with the IP address set to be used for the name-based vhosts. + In other words, you must specify the IP address that holds the + hostname aliases (CNAMEs) for your name-based vhosts via a + NameVirtualHost directive in your configuration + file.

    + +

    Multiple NameVirtualHost directives can be used + each with a set of VirtualHost directives but only + one NameVirtualHost directive should be used for + each specific IP:port pair.

    + +

    The ordering of NameVirtualHost and + VirtualHost directives is not important which + makes the following two examples identical (only the order of + the VirtualHost directives for one + address set is important, see below):

    +
    +                                |
    +  NameVirtualHost 111.22.33.44  | <VirtualHost 111.22.33.44>
    +  <VirtualHost 111.22.33.44>    | # server A
    +  # server A                | </VirtualHost>
    +  ...                   | <VirtualHost 111.22.33.55>
    +  </VirtualHost>          | # server C
    +  <VirtualHost 111.22.33.44>    | ...
    +  # server B                | </VirtualHost>
    +  ...                   | <VirtualHost 111.22.33.44>
    +  </VirtualHost>          | # server B
    +                                | ...
    +  NameVirtualHost 111.22.33.55  | </VirtualHost>
    +  <VirtualHost 111.22.33.55>    | <VirtualHost 111.22.33.55>
    +  # server C                | # server D
    +  ...                   | ...
    +  </VirtualHost>          | </VirtualHost>
    +  <VirtualHost 111.22.33.55>    |
    +  # server D                | NameVirtualHost 111.22.33.44
    +  ...                   | NameVirtualHost 111.22.33.55
    +  </VirtualHost>          |
    +                                |
    +
    + +

    (To aid the readability of your configuration you should + prefer the left variant.)

    + +

    After parsing the VirtualHost directive, the + vhost server is given a default Port equal to the + port assigned to the first name in its VirtualHost + directive.

    + +

    The complete list of names in the VirtualHost + directive are treated just like a ServerAlias (but + are not overridden by any ServerAlias statement) + if all names resolve to the same address set. Note that + subsequent Port statements for this vhost will not + affect the ports assigned in the address set.

    + +

    During initialization a list for each IP address is + generated and inserted into an hash table. If the IP address is + used in a NameVirtualHost directive the list + contains all name-based vhosts for the given IP address. If + there are no vhosts defined for that address the + NameVirtualHost directive is ignored and an error + is logged. For an IP-based vhost the list in the hash table is + empty.

    + +

    Due to a fast hashing function the overhead of hashing an IP + address during a request is minimal and almost not existent. + Additionally the table is optimized for IP addresses which vary + in the last octet.

    + +

    For every vhost various default values are set. In + particular:

    + +
      +
    1. If a vhost has no ServerAdmin, + ResourceConfig, + AccessConfig, + Timeout, + KeepAliveTimeout, + KeepAlive, + MaxKeepAliveRequests, + or SendBufferSize + directive then the respective value is inherited from the + main_server. (That is, inherited from whatever the final + setting of that value is in the main_server.)
    2. + +
    3. The "lookup defaults" that define the default directory + permissions for a vhost are merged with those of the + main_server. This includes any per-directory configuration + information for any module.
    4. + +
    5. The per-server configs for each module from the + main_server are merged into the vhost server.
    6. +
    + Essentially, the main_server is treated as "defaults" or a + "base" on which to build each vhost. But the positioning of + these main_server definitions in the config file is largely + irrelevant -- the entire config of the main_server has been + parsed when this final merging occurs. So even if a main_server + definition appears after a vhost definition it might affect the + vhost definition. + +

    If the main_server has no ServerName at this + point, then the hostname of the machine that httpd is running + on is used instead. We will call the main_server address + set those IP addresses returned by a DNS lookup on the + ServerName of the main_server.

    + +

    For any undefined ServerName fields, a + name-based vhost defaults to the address given first in the + VirtualHost statement defining the vhost.

    + +

    Any vhost that includes the magic _default_ + wildcard is given the same ServerName as the + main_server.

    + +

    Virtual Host Matching

    + +

    The server determines which vhost to use for a request as + follows:

    + +

    Hash table lookup

    + +

    When the connection is first made by a client, the IP + address to which the client connected is looked up in the + internal IP hash table.

    + +

    If the lookup fails (the IP address wasn't found) the + request is served from the _default_ vhost if + there is such a vhost for the port to which the client sent the + request. If there is no matching _default_ vhost + the request is served from the main_server.

    + +

    In Apache 1.3.13 and later, if the IP address is not found + in the hash table then the match against the port number may + also result in an entry corresponding to a + NameVirtualHost *, which is subsequently handled + like other name-based vhosts.

    + +

    If the lookup succeeded (a corresponding list for the IP + address was found) the next step is to decide if we have to + deal with an IP-based or a name-base vhost.

    + +

    IP-based vhost

    + +

    If the entry we found has an empty name list then we have + found an IP-based vhost, no further actions are performed and + the request is served from that vhost.

    + +

    Name-based vhost

    + +

    If the entry corresponds to a name-based vhost the name list + contains one or more vhost structures. This list contains the + vhosts in the same order as the VirtualHost + directives appear in the config file.

    + +

    The first vhost on this list (the first vhost in the config + file with the specified IP address) has the highest priority + and catches any request to an unknown server name or a request + without a Host: header field.

    + +

    If the client provided a Host: header field the + list is searched for a matching vhost and the first hit on a + ServerName or ServerAlias is taken + and the request is served from that vhost. A Host: + header field can contain a port number, but Apache always + matches against the real port to which the client sent the + request.

    + +

    If the client submitted a HTTP/1.0 request without + Host: header field we don't know to what server + the client tried to connect and any existing + ServerPath is matched against the URI from the + request. The first matching path on the list is used and the + request is served from that vhost.

    + +

    If no matching vhost could be found the request is served + from the first vhost with a matching port number that is on the + list for the IP to which the client connected (as already + mentioned before).

    + +

    Persistent connections

    + The IP lookup described above is only done once for a + particular TCP/IP session while the name lookup is done on + every request during a KeepAlive/persistent + connection. In other words a client may request pages from + different name-based vhosts during a single persistent + connection. + +

    Absolute URI

    + +

    If the URI from the request is an absolute URI, and its + hostname and port match the main server or one of the + configured virtual hosts and match the address and + port to which the client sent the request, then the + scheme/hostname/port prefix is stripped off and the remaining + relative URI is served by the corresponding main server or + virtual host. If it does not match, then the URI remains + untouched and the request is taken to be a proxy request.

    + +

    Observations

    + +
      +
    • A name-based vhost can never interfere with an IP-base + vhost and vice versa. IP-based vhosts can only be reached + through an IP address of its own address set and never + through any other address. The same applies to name-based + vhosts, they can only be reached through an IP address of the + corresponding address set which must be defined with a + NameVirtualHost directive.
    • + +
    • ServerAlias and ServerPath + checks are never performed for an IP-based vhost.
    • + +
    • The order of name-/IP-based, the _default_ + vhost and the NameVirtualHost directive within + the config file is not important. Only the ordering of + name-based vhosts for a specific address set is significant. + The one name-based vhosts that comes first in the + configuration file has the highest priority for its + corresponding address set.
    • + +
    • For security reasons the port number given in a + Host: header field is never used during the + matching process. Apache always uses the real port to which + the client sent the request.
    • + +
    • If a ServerPath directive exists which is a + prefix of another ServerPath directive that + appears later in the configuration file, then the former will + always be matched and the latter will never be matched. (That + is assuming that no Host: header field was + available to disambiguate the two.)
    • + +
    • If two IP-based vhosts have an address in common, the + vhost appearing first in the config file is always matched. + Such a thing might happen inadvertently. The server will give + a warning in the error logfile when it detects this.
    • + +
    • A _default_ vhost catches a request only if + there is no other vhost with a matching IP address + and a matching port number for the request. The + request is only caught if the port number to which the client + sent the request matches the port number of your + _default_ vhost which is your standard + Port by default. A wildcard port can be + specified (i.e., _default_:*) to catch + requests to any available port. In Apache 1.3.13 and later + this also applies to NameVirtualHost * + vhosts.
    • + +
    • The main_server is only used to serve a request if the IP + address and port number to which the client connected is + unspecified and does not match any other vhost (including a + _default_ vhost). In other words the main_server + only catches a request for an unspecified address/port + combination (unless there is a _default_ vhost + which matches that port).
    • + +
    • A _default_ vhost or the main_server is + never matched for a request with an unknown or + missing Host: header field if the client + connected to an address (and port) which is used for + name-based vhosts, e.g., in a + NameVirtualHost directive.
    • + +
    • You should never specify DNS names in + VirtualHost directives because it will force + your server to rely on DNS to boot. Furthermore it poses a + security threat if you do not control the DNS for all the + domains listed. There's more + information available on this and the next two + topics.
    • + +
    • ServerName should always be set for each + vhost. Otherwise A DNS lookup is required for each + vhost.
    • +
    + +

    Tips

    + +

    In addition to the tips on the DNS Issues page, here are + some further tips:

    + +
      +
    • Place all main_server definitions before any + VirtualHost definitions. (This is to aid the + readability of the configuration -- the post-config merging + process makes it non-obvious that definitions mixed in around + virtual hosts might affect all virtual hosts.)
    • + +
    • Group corresponding NameVirtualHost and + VirtualHost definitions in your configuration to + ensure better readability.
    • + +
    • Avoid ServerPaths which are prefixes of + other ServerPaths. If you cannot avoid this then + you have to ensure that the longer (more specific) prefix + vhost appears earlier in the configuration file than the + shorter (less specific) prefix (i.e., "ServerPath + /abc" should appear after "ServerPath /abc/def").
    • +
    + + + + diff --git a/htdocs/manual/vhosts/details_1_2.html b/htdocs/manual/vhosts/details_1_2.html new file mode 100644 index 00000000000..30cb9561be8 --- /dev/null +++ b/htdocs/manual/vhosts/details_1_2.html @@ -0,0 +1,386 @@ + + + + + + + An In-Depth Discussion of VirtualHost Matching + + + + + + +

    An In-Depth Discussion of VirtualHost + Matching

    + +

    This is a very rough document that was probably out of date + the moment it was written. It attempts to explain exactly what + the code does when deciding what virtual host to serve a hit + from. It's provided on the assumption that something is better + than nothing. The server version under discussion is Apache + 1.2.

    + +

    If you just want to "make it work" without understanding + how, there's a What Works section at + the bottom.

    + +

    Config File Parsing

    + +

    There is a main_server which consists of all the definitions + appearing outside of VirtualHost sections. There + are virtual servers, called vhosts, which are defined + by VirtualHost + sections.

    + +

    The directives Port, ServerName, + ServerPath, + and ServerAlias + can appear anywhere within the definition of a server. However, + each appearance overrides the previous appearance (within that + server).

    + +

    The default value of the Port field for + main_server is 80. The main_server has no default + ServerName, ServerPath, or + ServerAlias.

    + +

    In the absence of any Listen + directives, the (final if there are multiple) Port + directive in the main_server indicates which port httpd will + listen on.

    + +

    The Port and ServerName directives + for any server main or virtual are used when generating URLs + such as during redirects.

    + +

    Each address appearing in the VirtualHost + directive can have an optional port. If the port is unspecified + it defaults to the value of the main_server's most recent + Port statement. The special port * + indicates a wildcard that matches any port. Collectively the + entire set of addresses (including multiple A + record results from DNS lookups) are called the vhost's + address set.

    + +

    The magic _default_ address has significance + during the matching algorithm. It essentially matches any + unspecified address.

    + +

    After parsing the VirtualHost directive, the + vhost server is given a default Port equal to the + port assigned to the first name in its VirtualHost + directive. The complete list of names in the + VirtualHost directive are treated just like a + ServerAlias (but are not overridden by any + ServerAlias statement). Note that subsequent + Port statements for this vhost will not affect the + ports assigned in the address set.

    + +

    All vhosts are stored in a list which is in the reverse + order that they appeared in the config file. For example, if + the config file is:

    + +
    +
    +    <VirtualHost A>
    +    ...
    +    </VirtualHost>
    +
    +    <VirtualHost B>
    +    ...
    +    </VirtualHost>
    +
    +    <VirtualHost C>
    +    ...
    +    </VirtualHost>
    +
    +
    + Then the list will be ordered: main_server, C, B, A. Keep this + in mind. + +

    After parsing has completed, the list of servers is scanned, + and various merges and default values are set. In + particular:

    + +
      +
    1. If a vhost has no ServerAdmin, + ResourceConfig, + AccessConfig, + Timeout, + KeepAliveTimeout, + KeepAlive, + MaxKeepAliveRequests, + or SendBufferSize + directive then the respective value is inherited from the + main_server. (That is, inherited from whatever the final + setting of that value is in the main_server.)
    2. + +
    3. The "lookup defaults" that define the default directory + permissions for a vhost are merged with those of the main + server. This includes any per-directory configuration + information for any module.
    4. + +
    5. The per-server configs for each module from the + main_server are merged into the vhost server.
    6. +
    + Essentially, the main_server is treated as "defaults" or a + "base" on which to build each vhost. But the positioning of + these main_server definitions in the config file is largely + irrelevant -- the entire config of the main_server has been + parsed when this final merging occurs. So even if a main_server + definition appears after a vhost definition it might affect the + vhost definition. + +

    If the main_server has no ServerName at this + point, then the hostname of the machine that httpd is running + on is used instead. We will call the main_server address + set those IP addresses returned by a DNS lookup on the + ServerName of the main_server.

    + +

    Now a pass is made through the vhosts to fill in any missing + ServerName fields and to classify the vhost as + either an IP-based vhost or a name-based + vhost. A vhost is considered a name-based vhost if any of its + address set overlaps the main_server (the port associated with + each address must match the main_server's Port). + Otherwise it is considered an IP-based vhost.

    + +

    For any undefined ServerName fields, a + name-based vhost defaults to the address given first in the + VirtualHost statement defining the vhost. Any + vhost that includes the magic _default_ wildcard + is given the same ServerName as the main_server. + Otherwise the vhost (which is necessarily an IP-based vhost) is + given a ServerName based on the result of a + reverse DNS lookup on the first address given in the + VirtualHost statement.

    + +

    Vhost Matching

    + +

    Apache 1.3 differs from what is documented here, and + documentation still has to be written.

    + +

    The server determines which vhost to use for a request as + follows:

    + +

    find_virtual_server: When the connection is + first made by the client, the local IP address (the IP address + to which the client connected) is looked up in the server list. + A vhost is matched if it is an IP-based vhost, the IP address + matches and the port matches (taking into account + wildcards).

    + +

    If no vhosts are matched then the last occurrence, if it + appears, of a _default_ address (which if you + recall the ordering of the server list mentioned above means + that this would be the first occurrence of + _default_ in the config file) is matched.

    + +

    In any event, if nothing above has matched, then the + main_server is matched.

    + +

    The vhost resulting from the above search is stored with + data about the connection. We'll call this the connection + vhost. The connection vhost is constant over all requests + in a particular TCP/IP session -- that is, over all requests in + a KeepAlive/persistent session.

    + +

    For each request made on the connection the following + sequence of events further determines the actual vhost that + will be used to serve the request.

    + +

    check_fulluri: If the requestURI is an + absoluteURI, that is it includes http://hostname/, + then an attempt is made to determine if the hostname's address + (and optional port) match that of the connection vhost. If it + does then the hostname portion of the URI is saved as the + request_hostname. If it does not match, then the URI + remains untouched. Note: to achieve this + address comparison, the hostname supplied goes through a DNS + lookup unless it matches the ServerName or the + local IP address of the client's socket.

    + +

    parse_uri: If the URI begins with a protocol + (i.e., http:, ftp:) then the + request is considered a proxy request. Note that even though we + may have stripped an http://hostname/ in the + previous step, this could still be a proxy request.

    + +

    read_request: If the request does not have a + hostname from the earlier step, then any Host: + header sent by the client is used as the request hostname.

    + +

    check_hostalias: If the request now has a + hostname, then an attempt is made to match for this hostname. + The first step of this match is to compare any port, if one was + given in the request, against the Port field of + the connection vhost. If there's a mismatch then the vhost used + for the request is the connection vhost. (This is a bug, see + observations.)

    + +

    If the port matches, then httpd scans the list of vhosts + starting with the next server after the + connection vhost. This scan does not stop if there are any + matches, it goes through all possible vhosts, and in the end + uses the last match it found. The comparisons performed are as + follows:

    + +
      +
    • Compare the request hostname:port with the vhost + ServerName and Port.
    • + +
    • Compare the request hostname against any and all + addresses given in the VirtualHost directive for + this vhost.
    • + +
    • Compare the request hostname against the + ServerAlias given for the vhost.
    • +
    + +

    check_serverpath: If the request has no + hostname (back up a few paragraphs) then a scan similar to the + one in check_hostalias is performed to match any + ServerPath directives given in the vhosts. Note + that the last match is used regardless (again + consider the ordering of the virtual hosts).

    + +

    Observations

    + +
      +
    • It is difficult to define an IP-based vhost for the + machine's "main IP address". You essentially have to create a + bogus ServerName for the main_server that does + not match the machine's IPs.
    • + +
    • + During the scans in both check_hostalias and + check_serverpath no check is made that the + vhost being scanned is actually a name-based vhost. This + means, for example, that it's possible to match an IP-based + vhost through another address. But because the scan starts + in the vhost list at the first vhost that matched the local + IP address of the connection, not all IP-based vhosts can + be matched. + +

      Consider the config file above with three vhosts A, B, + C. Suppose that B is a named-based vhost, and A and C are + IP-based vhosts. If a request comes in on B or C's address + containing a header "Host: A" then it will be + served from A's config. If a request comes in on A's + address then it will always be served from A's config + regardless of any Host: header.

      +
    • + +
    • + Unless you have a _default_ vhost, it doesn't + matter if you mix name-based vhosts in amongst IP-based + vhosts. During the find_virtual_server phase + above no named-based vhost will be matched, so the + main_server will remain the connection vhost. Then scans + will cover all vhosts in the vhost list. + +

      If you do have a _default_ vhost, then you + cannot place named-based vhosts after it in the config. + This is because on any connection to the main server IPs + the connection vhost will always be the + _default_ vhost since none of the name-based + are considered during find_virtual_server.

      +
    • + +
    • You should never specify DNS names in + VirtualHost directives because it will force + your server to rely on DNS to boot. Furthermore it poses a + security threat if you do not control the DNS for all the + domains listed. There's more + information available on this and the next two + topics.
    • + +
    • ServerName should always be set for each + vhost. Otherwise A DNS lookup is required for each + vhost.
    • + +
    • A DNS lookup is always required for the main_server's + ServerName (or to generate that if it isn't + specified in the config).
    • + +
    • If a ServerPath directive exists which is a + prefix of another ServerPath directive that + appears later in the configuration file, then the former will + always be matched and the latter will never be matched. (That + is assuming that no Host header was available to disambiguate + the two.)
    • + +
    • If a vhost that would otherwise be a name-vhost includes + a Port statement that doesn't match the + main_server Port then it will be considered an + IP-based vhost. Then find_virtual_server will + match it (because the ports associated with each address in + the address set default to the port of the main_server) as + the connection vhost. Then check_hostalias will + refuse to check any other name-based vhost because of the + port mismatch. The result is that the vhost will steal all + hits going to the main_server address.
    • + +
    • If two IP-based vhosts have an address in common, the + vhost appearing later in the file is always matched. Such a + thing might happen inadvertently. If the config has + name-based vhosts and for some reason the main_server + ServerName resolves to the wrong address then + all the name-based vhosts will be parsed as ip-based vhosts. + Then the last of them will steal all the hits.
    • + +
    • The last name-based vhost in the config is always matched + for any hit which doesn't match one of the other name-based + vhosts.
    • +
    + +

    What Works

    + +

    In addition to the tips on the DNS Issues page, here are some + further tips:

    + +
      +
    • Place all main_server definitions before any VirtualHost + definitions. (This is to aid the readability of the + configuration -- the post-config merging process makes it + non-obvious that definitions mixed in around virtualhosts + might affect all virtualhosts.)
    • + +
    • Arrange your VirtualHosts such that all name-based + virtual hosts come first, followed by IP-based virtual hosts, + followed by any _default_ virtual host
    • + +
    • Avoid ServerPaths which are prefixes of + other ServerPaths. If you cannot avoid this then + you have to ensure that the longer (more specific) prefix + vhost appears earlier in the configuration file than the + shorter (less specific) prefix (i.e., "ServerPath + /abc" should appear after "ServerPath /abcdef").
    • + +
    • Do not use port-based vhosts in the same server + as name-based vhosts. A loose definition for port-based is a + vhost which is determined by the port on the server + (i.e., one server with ports 8000, 8080, and 80 - + all of which have different configurations).
    • +
    + + + + diff --git a/htdocs/manual/vhosts/examples.html b/htdocs/manual/vhosts/examples.html new file mode 100644 index 00000000000..a664f8147f8 --- /dev/null +++ b/htdocs/manual/vhosts/examples.html @@ -0,0 +1,696 @@ + + + + + + + VirtualHost Examples + + + + + + +

    Virtual Host examples for common setups

    + +

    Base configuration

    + + + +

    Additional features

    + + +
    + +

    Simple name-based + vhosting

    + +
      +
    • Compatibility: This syntax was added in + Apache 1.3.13.
    • + +
    • + Setup: The server machine has a primary + name server.domain.tld. There are two aliases + (CNAMEs) www.domain.tld and + www.sub.domain.tld for the address + server.domain.tld. + +

      Server configuration:

      + +
      +
      +    ...
      +    Port 80
      +    ServerName server.domain.tld
      +
      +    NameVirtualHost *:80
      +
      +    <VirtualHost *:80>
      +    DocumentRoot /www/domain
      +    ServerName www.domain.tld
      +    ...
      +    </VirtualHost>
      +    
      +    <VirtualHost *:80>
      +    DocumentRoot /www/subdomain
      +    ServerName www.sub.domain.tld
      +    ...
      +    </VirtualHost> 
      +   
      +
      + The asterisks match all addresses, so the main server + serves no requests. Due to the fact that + www.domain.tld is first in the configuration + file, it has the highest priority and can be seen as the + default or primary server. +
      +
    • +
    +
    + +

    More complicated name-based + vhosts

    + +
      +
    • + Setup 1: The server machine has one IP + address (111.22.33.44) which resolves to the + name server.domain.tld. There are two aliases + (CNAMEs) www.domain.tld and + www.sub.domain.tld for the address + 111.22.33.44. + +

      Server configuration:

      + +
      +
      +    ...
      +    Port 80
      +    ServerName server.domain.tld
      +
      +    NameVirtualHost 111.22.33.44 
      +
      +    <VirtualHost 111.22.33.44>
      +    DocumentRoot /www/domain
      +    ServerName www.domain.tld
      +    ...
      +    </VirtualHost>
      +    
      +    <VirtualHost 111.22.33.44>
      +    DocumentRoot /www/subdomain
      +    ServerName www.sub.domain.tld
      +    ...
      +    </VirtualHost> 
      +   
      +
      + Apart from localhost there are no + unspecified addresses/ports, therefore the main server + only serves localhost requests. Due to the + fact that www.domain.tld has the highest + priority it can be seen as the default or + primary server. +
      +
    • + +
    • + Setup 2: The server machine has two IP + addresses (111.22.33.44 and + 111.22.33.55) which resolve to the names + server1.domain.tld and + server2.domain.tld respectively. The alias + www.domain.tld should be used for the main + server which should also catch any unspecified addresses. + We want to use a virtual host for the alias + www.otherdomain.tld and another virtual host, + with server name www.sub.domain.tld, should + catch any request to hostnames of the form + *.sub.domain.tld. The address + 111.22.33.55 should be used for the virtual + hosts. + +

      Server configuration:

      + +
      +
      +    ...
      +    Port 80
      +    ServerName www.domain.tld
      +    DocumentRoot /www/domain
      +
      +    NameVirtualHost 111.22.33.55
      +
      +    <VirtualHost 111.22.33.55>
      +    DocumentRoot /www/otherdomain
      +    ServerName www.otherdomain.tld
      +    ...
      +    </VirtualHost>
      +   
      +    <VirtualHost 111.22.33.55>
      +    DocumentRoot /www/subdomain
      +    ServerName www.sub.domain.tld
      +    ServerAlias *.sub.domain.tld
      +    ...
      +    </VirtualHost> 
      +   
      +
      + Any request to an address other than + 111.22.33.55 will be served from the main + server. A request to 111.22.33.55 with an + unknown or no Host: header will be served + from www.otherdomain.tld. +
      +
    • + +
    • + Setup 3: The server machine has two IP + addresses (192.168.1.1 and + 111.22.33.55). The machine is sitting between + an internal (intranet) network and an external (internet) + network. Outside of the network, the name + server1.domain.tld resolves to the external + address (111.22.33.55), but inside the + network, that same name resolves to the internal address + (192.168.1.1). + +

      The server can be made to respond to internal and + external requests with the same content, with just one + VirtualHost section.

      + +

      Server configuration:

      + +
      +
      +    ...
      +    NameVirtualHost 192.168.1.1
      +    NameVirtualHost 111.22.33.55
      +
      +    <VirtualHost 192.168.1.1 111.22.33.55>
      +    DocumentRoot /www/server1
      +    ServerName server1.domain.tld
      +    ServerAlias server1
      +    ...
      +    </VirtualHost>
      +   
      +
      +
      + Now requests from both networks will be served from the + same VirtualHost +
    • + +
    • + Setup 4: You have multiple domains going + to the same IP and also want to serve multiple ports. By + defining the ports in the "NameVirtualHost" tag, you can + allow this to work. If you try using <VirtualHost + name:port> without the NameVirtualHost name:port or you + try to use the Port directive, your configuration will not + work. + +

      Server configuration:

      + +
      +
      +    ...   
      +    NameVirtualHost 111.22.33.44:80
      +    NameVirtualHost 111.22.33.44:8080
      +
      +    <VirtualHost 111.22.33.44:80>
      +    ServerName www.domain.tld
      +    DocumentRoot /www/domain-80
      +    </VirtualHost>
      +
      +    <VirtualHost 111.22.33.44:8080>
      +    ServerName www.domain.tld
      +    DocumentRoot /www/domain-8080
      +    </VirtualHost>
      +
      +    <VirtualHost 111.22.33.44:80>
      +    ServerName www.otherdomain.tld
      +    DocumentRoot /www/otherdomain-80
      +    </VirtualHost>
      +
      +    <VirtualHost 111.22.33.44:8080>
      +    ServerName www.otherdomain.tld
      +    DocumentRoot /www/otherdomain-8080
      +    </VirtualHost>
      +
      +   
      +
      +
      +
    • +
    +
    + +

    IP-based vhosts

    + +
      +
    • + Setup 1: The server machine has two IP + addresses (111.22.33.44 and + 111.22.33.55) which resolve to the names + server.domain.tld and + www.otherdomain.tld respectively. The hostname + www.domain.tld is an alias (CNAME) for + server.domain.tld and will represent the main + server. + +

      Server configuration:

      + +
      +
      +    ...
      +    Port 80
      +    DocumentRoot /www/domain
      +    ServerName www.domain.tld
      +
      +    <VirtualHost 111.22.33.55>
      +    DocumentRoot /www/otherdomain
      +    ServerName www.otherdomain.tld
      +    ...
      +    </VirtualHost>
      +   
      +
      + www.otherdomain.tld can only be reached + through the address 111.22.33.55, while + www.domain.tld can only be reached through + 111.22.33.44 (which represents our main + server). +
      +
    • + +
    • + Setup 2: Same as setup 1, but we don't + want to have a dedicated main server. + +

      Server configuration:

      + +
      +
      +    ...
      +    Port 80
      +    ServerName server.domain.tld
      +    
      +    <VirtualHost 111.22.33.44>
      +    DocumentRoot /www/domain
      +    ServerName www.domain.tld
      +    ...
      +    </VirtualHost>
      +
      +    <VirtualHost 111.22.33.55>
      +    DocumentRoot /www/otherdomain
      +    ServerName www.otherdomain.tld
      +    ...
      +    </VirtualHost>
      +   
      +
      + The main server can never catch a request, because all IP + addresses of our machine are in use for IP-based virtual + hosts (only localhost requests can hit the + main server). +
      +
    • + +
    • + Setup 3: The server machine has two IP + addresses (111.22.33.44 and + 111.22.33.55) which resolve to the names + server.domain.tld and + www-cache.domain.tld respectively. The + hostname www.domain.tld is an alias (CNAME) + for server.domain.tld and will represent the + main server. www-cache.domain.tld will become + our proxy-cache listening on port 8080, while the web + server itself uses the default port 80. + +

      Server configuration:

      + +
      +
      +    ...
      +    Port 80
      +    Listen 111.22.33.44:80
      +    Listen 111.22.33.55:8080
      +    ServerName server.domain.tld
      +    
      +    <VirtualHost 111.22.33.44:80>
      +    DocumentRoot /www/domain
      +    ServerName www.domain.tld
      +    ...
      +    </VirtualHost>
      +
      +    <VirtualHost 111.22.33.55:8080>
      +    ServerName www-cache.domain.tld
      +    ...
      +      <Directory proxy:>
      +      Order Deny,Allow
      +      Deny from all
      +      Allow from 111.22.33
      +      </Directory>
      +    </VirtualHost>
      +   
      +
      + The main server can never catch a request, because all IP + addresses (apart from localhost) of our + machine are in use for IP-based virtual hosts. The web + server can only be reached on the first address through + port 80 and the proxy only on the second address through + port 8080. +
      +
    • +
    +
    + +

    Mixed name-/IP-based + vhosts

    + +
      +
    • + Setup: The server machine has three IP + addresses (111.22.33.44, + 111.22.33.55 and 111.22.33.66) + which resolve to the names server.domain.tld, + www.otherdomain1.tld and + www.otherdomain2.tld respectively. The address + 111.22.33.44 should be used for a couple of + name-based vhosts and the other addresses for IP-based + vhosts. + +

      Server configuration:

      + +
      +
      +    ...
      +    Port 80
      +    ServerName server.domain.tld
      +
      +    NameVirtualHost 111.22.33.44
      +
      +    <VirtualHost 111.22.33.44>
      +    DocumentRoot /www/domain
      +    ServerName www.domain.tld
      +    ...
      +    </VirtualHost>
      +   
      +    <VirtualHost 111.22.33.44>
      +    DocumentRoot /www/subdomain1
      +    ServerName www.sub1.domain.tld
      +    ...
      +    </VirtualHost> 
      +    
      +    <VirtualHost 111.22.33.44>
      +    DocumentRoot /www/subdomain2
      +    ServerName www.sub2.domain.tld
      +    ...
      +    </VirtualHost> 
      + 
      +    <VirtualHost 111.22.33.55>
      +    DocumentRoot /www/otherdomain1
      +    ServerName www.otherdomain1.tld
      +    ...
      +    </VirtualHost> 
      +    
      +    <VirtualHost 111.22.33.66>
      +    DocumentRoot /www/otherdomain2
      +    ServerName www.otherdomain2.tld
      +    ...
      +    </VirtualHost>     
      +   
      +
      +
      +
    • +
    +
    + +

    Port-based vhosts

    + +
      +
    • + Setup: The server machine has one IP + address (111.22.33.44) which resolves to the + name www.domain.tld. If we don't have the + option to get another address or alias for our server we + can use port-based vhosts if we need a virtual host with a + different configuration. + +

      Server configuration:

      + +
      +
      +    ...
      +    Listen 80
      +    Listen 8080
      +    ServerName www.domain.tld
      +    DocumentRoot /www/domain
      +
      +    <VirtualHost 111.22.33.44:8080>
      +    DocumentRoot /www/domain2
      +    ...
      +    </VirtualHost>
      +   
      +
      + A request to www.domain.tld on port 80 is + served from the main server and a request to port 8080 is + served from the virtual host. +
      +
    • +
    +
    + +

    Using _default_ + vhosts

    + +
      +
    • + Setup 1: Catching every request + to any unspecified IP address and port, i.e., an + address/port combination that is not used for any other + virtual host. + +

      Server configuration:

      + +
      +
      +    ...
      +    <VirtualHost _default_:*>
      +    DocumentRoot /www/default
      +    ...
      +    </VirtualHost>
      +   
      +
      + Using such a default vhost with a wildcard port + effectively prevents any request going to the main + server.
      + A default vhost never serves a request that was sent to + an address/port that is used for name-based vhosts. If + the request contained an unknown or no Host: + header it is always served from the primary name-based + vhost (the vhost for that address/port appearing first in + the configuration file).
      + You can use AliasMatch + or RewriteRule + to rewrite any request to a single information page (or + script). +
      +
    • + +
    • + Setup 2: Same as setup 1, but the server + listens on several ports and we want to use a second + _default_ vhost for port 80. + +

      Server configuration:

      + +
      +
      +    ...
      +    <VirtualHost _default_:80>
      +    DocumentRoot /www/default80
      +    ...
      +    </VirtualHost>
      +    
      +    <VirtualHost _default_:*>
      +    DocumentRoot /www/default
      +    ...
      +    </VirtualHost>    
      +   
      +
      + The default vhost for port 80 (which must appear + before any default vhost with a wildcard port) catches + all requests that were sent to an unspecified IP address. + The main server is never used to serve a request. +
      +
    • + +
    • + Setup 3: We want to have a default vhost + for port 80, but no other default vhosts. + +

      Server configuration:

      + +
      +
      +    ...
      +    <VirtualHost _default_:80>
      +    DocumentRoot /www/default
      +    ...
      +    </VirtualHost>
      +   
      +
      + A request to an unspecified address on port 80 is served + from the default vhost any other request to an + unspecified address and port is served from the main + server. +
      +
    • +
    +
    + +

    Migrating a name-based vhost + to an IP-based vhost

    + +
      +
    • + Setup: The name-based vhost with the + hostname www.otherdomain.tld (from our name-based example, setup 2) should get + its own IP address. To avoid problems with name servers or + proxies who cached the old IP address for the name-based + vhost we want to provide both variants during a migration + phase.
      + The solution is easy, because we can simply add the new IP + address (111.22.33.66) to the + VirtualHost directive. + +

      Server configuration:

      + +
      +
      +    ...
      +    Port 80
      +    ServerName www.domain.tld
      +    DocumentRoot /www/domain
      +
      +    NameVirtualHost 111.22.33.55
      +
      +    <VirtualHost 111.22.33.55 111.22.33.66>
      +    DocumentRoot /www/otherdomain
      +    ServerName www.otherdomain.tld
      +    ...
      +    </VirtualHost>
      +   
      +    <VirtualHost 111.22.33.55>
      +    DocumentRoot /www/subdomain
      +    ServerName www.sub.domain.tld
      +    ServerAlias *.sub.domain.tld
      +    ...
      +    </VirtualHost>
      +   
      +
      + The vhost can now be accessed through the new address (as + an IP-based vhost) and through the old address (as a + name-based vhost). +
      +
    • +
    +
    + +

    Using the + ServerPath directive

    + +
      +
    • + Setup: We have a server with two + name-based vhosts. In order to match the correct virtual + host a client must send the correct Host: + header. Old HTTP/1.0 clients do not send such a header and + Apache has no clue what vhost the client tried to reach + (and serves the request from the primary vhost). To provide + as much backward compatibility as possible we create a + primary vhost which returns a single page containing links + with an URL prefix to the name-based virtual hosts. + +

      Server configuration:

      + +
      +
      +    ...
      +    NameVirtualHost 111.22.33.44
      +
      +    <VirtualHost 111.22.33.44>
      +    # primary vhost
      +    DocumentRoot /www/subdomain
      +    RewriteEngine On
      +    RewriteRule ^/.* /www/subdomain/index.html
      +    ...
      +    </VirtualHost>
      +
      +    <VirtualHost 111.22.33.44>
      +    DocumentRoot /www/subdomain/sub1
      +    ServerName www.sub1.domain.tld
      +    ServerPath /sub1/
      +    RewriteEngine On
      +    RewriteRule ^(/sub1/.*) /www/subdomain$1 
      +    ...
      +    </VirtualHost>
      +
      +    <VirtualHost 111.22.33.44>
      +    DocumentRoot /www/subdomain/sub2
      +    ServerName www.sub2.domain.tld
      +    ServerPath /sub2/
      +    RewriteEngine On
      +    RewriteRule ^(/sub2/.*) /www/subdomain$1 
      +    ...
      +    </VirtualHost>
      +   
      +
      + Due to the ServerPath + directive a request to the URL + http://www.sub1.domain.tld/sub1/ is + always served from the sub1-vhost.
      + A request to the URL + http://www.sub1.domain.tld/ is only served + from the sub1-vhost if the client sent a correct + Host: header. If no Host: + header is sent the client gets the information page from + the primary host.
      + Please note that there is one oddity: A request to + http://www.sub2.domain.tld/sub1/ is also + served from the sub1-vhost if the client sent no + Host: header.
      + The RewriteRule directives are used to make + sure that a client which sent a correct + Host: header can use both URL variants, + i.e., with or without URL prefix. +
      +
    • +
    + + + + diff --git a/htdocs/manual/vhosts/fd-limits.html.en b/htdocs/manual/vhosts/fd-limits.html.en new file mode 100644 index 00000000000..dc09fb2d57b --- /dev/null +++ b/htdocs/manual/vhosts/fd-limits.html.en @@ -0,0 +1,73 @@ + + + + + + + Apache Server Virtual Host Support + + + + + + +

    File Descriptor Limits

    + +

    When using a large number of Virtual Hosts, Apache may run + out of available file descriptors (sometimes called file + handles if each Virtual Host specifies different log + files. The total number of file descriptors used by Apache is + one for each distinct error log file, one for every other log + file directive, plus 10-20 for internal use. Unix operating + systems limit the number of file descriptors that may be used + by a process; the limit is typically 64, and may usually be + increased up to a large hard-limit.

    + +

    Although Apache attempts to increase the limit as required, + this may not work if:

    + +
      +
    1. Your system does not provide the setrlimit() system + call.
    2. + +
    3. The setrlimit(RLIMIT_NOFILE) call does not function on + your system (such as Solaris 2.3)
    4. + +
    5. The number of file descriptors required exceeds the hard + limit.
    6. + +
    7. Your system imposes other limits on file descriptors, + such as a limit on stdio streams only using file descriptors + below 256. (Solaris 2)
    8. +
    + In the event of problems you can: + +
      +
    • Reduce the number of log files; don't specify log files + in the VirtualHost sections, but only log to the main log + files.
    • + +
    • + If you system falls into 1 or 2 (above), then increase the + file descriptor limit before starting Apache, using a + script like + +
      + #!/bin/sh
      + ulimit -S -n 100
      + exec httpd
      +
      +
    • +
    + +

    Please see the Descriptors and Apache + document containing further details about file descriptor + problems and how they can be solved on your operating + system.

    + + + + diff --git a/htdocs/manual/vhosts/fd-limits.html.html b/htdocs/manual/vhosts/fd-limits.html.html new file mode 100644 index 00000000000..1da692a06dc --- /dev/null +++ b/htdocs/manual/vhosts/fd-limits.html.html @@ -0,0 +1,4 @@ + + + diff --git a/htdocs/manual/vhosts/fd-limits.html.ja.jis b/htdocs/manual/vhosts/fd-limits.html.ja.jis new file mode 100644 index 00000000000..d6851d85822 --- /dev/null +++ b/htdocs/manual/vhosts/fd-limits.html.ja.jis @@ -0,0 +1,72 @@ + + + + + + Apache $B%5!<%P$N%P!<%A%c%k%[%9%H$N%5%]!<%H(B + + + + + + + +

    $B%U%!%$%k5-=R;R$N8B3&(B

    + +

    $B$?$/$5$s$N%P!<%A%c%k%[%9%H$r1?MQ$9$k>l9g!"$b$7!"(B + $B3F%P!<%A%c%k%[%9%H$4$H$K0[$J$k%m%0%U%!%$%k$,;XDj$7$F$"$k$H!"(B + Apache $B$,%U%!%$%k5-=R;R(B ($B%U%!%$%k%O%s%I%k(B$B$H$b8F$P$l$^$9(B) + $B$r;H$$@Z$C$F$7$^$&$3$H$,$"$j$^$9!#(BApache $B$,;HMQ$9$k%U%!%$%k(B + $B5-=R;R$N?t$O!"3F%(%i!<%m%0%U%!%$%k$K$D$-(B 1 $B$D!"B>$N%m%0%U%!%$%k$N(B + $B%G%#%l%/%F%#%V$K$D$-(B 1 $B$D!"$5$i$KFbIt$G;HMQ$9$k(B 10 $B$+$i(B 20$B!"(B + $B$N9g7W$K$J$j$^$9!#(BUnix $B%*%Z%l!<%F%#%s%0%7%9%F%`$G$O%W%m%;%9$4$H$K(B + $B;HMQ2DG=$J%U%!%$%k5-=R;R$N?t$r@)8B$7$F$$$^$9!#$?$$$F$$$N>l9g$O(B 64 $B$G!"(B + $BIaDL$OBg$-$JCM$N%O!<%I%j%_%C%H$^$GA}$d$9$3$H$,$G$-$^$9!#(B

    + +

    Apache $B$OI,MW$K1~$8$F>e8B$r3HBg$7$h$&$H;n$_$^$9$,!"(B + $B0J2<$N$h$&$J>l9g$K$O$&$^$/$$$+$J$$$+$b$7$l$^$;$s!#(B

    + +
      +
    1. $BMxMQ$7$F$$$k%7%9%F%`$G(B setrlimit() + $B%7%9%F%`%3!<%k$,Ds6!$5$l$F$$$J$$!#(B
    2. + +
    3. $B%7%9%F%`>e$G(B setrlimit(RLIMIT_NOFILE) $B$,F0:n$7$J$$(B + ($B$?$H$($P(B Solaris 2.3 $B$N$h$&$K(B)$B!#(B
    4. + +
    5. $BMW5a$5$l$k%U%!%$%k5-=R;R$N?t$,(B + $B%O!<%I%j%_%C%H$rD6$($F$7$^$&!#(B
    6. + +
    7. $B%7%9%F%`$K%U%!%$%k5-=R;R$K4X$7$FJL$N@)8B$,B8:_$7$F$7$^$C$F$$$k!#(B + $B$?$H$($P!"(Bstdio $B%9%H%j!<%`$G$O%U%!%$%k5-=R;R$r(B 256 $B0J>e;H$($J$$(B + (Solaris 2)$B!"$J$I!#(B
    8. +
    + $BLdBj$,H/@8$7$?;~$K +
  • $B%m%0%U%!%$%k$N?t$r8:$i$9!#(BVirtualHost + $B%;%/%7%g%s$G%m%0%U%!%$%k$r;XDj$;$:!"(B + $B%a%$%s$N%m%0%U%!%$%k$K$N$_5-O?$9$k!#(B
  • + +
  • + $B$b$7!"A0=R$N(B 1 $B$^$?$O(B 2 $B$N>l9g$G$"$l$P!"(B + Apache $B$r5/F0$9$kA0$K%U%!%$%k5-=R;R$rA}$d$7$^$9!#(B + $B$?$H$($P + #!/bin/sh
    + ulimit -S -n 100
    + exec httpd
    + +
  • + + +

    $B%U%!%$%k5-=R;R$NLdBj$K$D$$$F$N>\:Y$d!"(B + $B%*%Z%l!<%F%#%s%0%7%9%F%`$4$H$N2r7hJ}K!$K$D$$$F$O!V(B$B%U%!%$%k5-=R;R$H(B + Apache$B!W$NJ8=q$r;2>H$7$F$/$@$5$$!#(B +

    + + + diff --git a/htdocs/manual/vhosts/footer.html b/htdocs/manual/vhosts/footer.html new file mode 100644 index 00000000000..70ddfccdcd0 --- /dev/null +++ b/htdocs/manual/vhosts/footer.html @@ -0,0 +1,5 @@ +
    + +

    Apache HTTP Server Version 1.3

    + Index + Home diff --git a/htdocs/manual/vhosts/header.html b/htdocs/manual/vhosts/header.html new file mode 100644 index 00000000000..09a28d8ca6c --- /dev/null +++ b/htdocs/manual/vhosts/header.html @@ -0,0 +1,5 @@ +
    + [APACHE DOCUMENTATION] + +

    Apache HTTP Server Version 1.3

    +
    diff --git a/htdocs/manual/vhosts/host.html b/htdocs/manual/vhosts/host.html new file mode 100644 index 00000000000..e25ad6cfd04 --- /dev/null +++ b/htdocs/manual/vhosts/host.html @@ -0,0 +1,173 @@ + + + + + + + Apache non-IP Virtual Hosts + + + + + + +

    Apache non-IP Virtual Hosts

    + See Also: Virtual + Host Support +
    + +

    What is a Virtual Host

    + +

    The "Virtual Host" refers to the practice of maintaining + more than one server on one machine, as differentiated by their + apparent hostname. For example, it is often desirable for + companies sharing a web server to have their own domains, with + web servers accessible as www.company1.com and + www.company2.com, without requiring the user to + know any extra path information.

    + +

    Apache was one of the first servers to support virtual hosts + right out of the box, but since the base HTTP + (HyperText Transport Protocol) standard does not allow any + method for the server to determine the hostname it is being + addressed as, Apache's virtual host support has required a + separate IP address for each server. Documentation on using + this approach (which still works very well) is available.

    + +

    While the approach described above works, with the available + IP address space growing smaller, and the number of domains + increasing, it is not the most elegant solution, and is hard to + implement on some machines. The HTTP/1.1 protocol + contains a method for the server to identify what name it is + being addressed as. Apache 1.1 and later support this approach + as well as the traditional IP-address-per-hostname method.

    + +

    The benefits of using the new virtual host support is a + practically unlimited number of servers, ease of configuration + and use, and requires no additional hardware or software. The + main disadvantage is that the user's browser must support this + part of the protocol. The latest versions of many browsers + (including Netscape Navigator 2.0 and later) do, but many + browsers, especially older ones, do not. This can cause + problems, although a possible solution is addressed below.

    + +

    Using non-IP Virtual Hosts

    + +

    Using the new virtual hosts is quite easy, and superficially + looks like the old method. You simply add to one of the Apache + configuration files (most likely httpd.conf or + srm.conf) code similar to the following:

    +
    +    <VirtualHost www.apache.org>
    +    ServerName www.apache.org
    +    DocumentRoot /usr/web/apache
    +    </VirtualHost>
    +
    + +

    Of course, any additional directives can (and should) be + placed into the <VirtualHost> section. To + make this work, all that is needed is to make sure that the + www.apache.org DNS entry points to the same IP + address as the main server. Optionally, you could simply use + that IP address in the <VirtualHost> entry.

    + +

    Additionally, many servers may wish to be accessible by more + than one name. For example, the Apache server might want to be + accessible as apache.org, or + ftp.apache.org, assuming the IP addresses pointed + to the same server. In fact, one might want it so that all + addresses at apache.org were picked up by the + server. This is possible with the ServerAlias + directive, placed inside the <VirtualHost> section. For + example:

    +
    +    ServerAlias apache.org *.apache.org
    +
    + +

    Note that you can use * and ? as + wild-card characters.

    + +

    You also might need ServerAlias if you are serving local + users who do not always include the domain name. For example, + if local users are familiar with typing "www" or "www.physics" + then you will need to add ServerAlias www + www.physics. It isn't possible for the server to know + what domain the client uses for their name resolution because + the client doesn't provide that information in the request.

    + +

    Security Considerations

    + Apache allows all virtual hosts to be made accessible via the + Host: header through all IP interfaces, even those + which are configured to use different IP interfaces. For + example, if the configuration for www.foo.com + contained a virtual host section for www.bar.com, + and www.bar.com was a separate IP interface, such + that non-Host:-header-supporting browsers can use + it, as before with Apache 1.0. If a request is made to + www.foo.com and the request includes the header + Host: www.bar.com, a page from + www.bar.com will be sent. + +

    This is a security concern if you are controlling access to + a particular server based on IP-layer controls, such as from + within a firewall or router. Let's say www.bar.com + in the above example was instead an intra-net server called + private.foo.com, and the router used by foo.com + only let internal users access private.foo.com. + Obviously, Host: header functionality now allows + someone who has access to www.foo.com to get + private.foo.com, if they send a Host: + private.foo.com header. It is important to note that + this condition exists only if you only implement this policy at + the IP layer - all security controls used by Apache + (i.e., Allow, Deny + from, etc.) are consistently respected.

    + +

    Compatibility with Older Browsers

    + +

    As mentioned earlier, a majority of browsers do not send the + required data for the new virtual hosts to work properly. These + browsers will always be sent to the main server's pages. There + is a workaround, albeit a slightly cumbersome one:

    + +

    To continue the www.apache.org example (Note: + Apache's web server does not actually function in this manner), + we might use the new ServerPath directive in the + www.apache.org virtual host, for example:

    +
    +    ServerPath /apache
    +
    + +

    What does this mean? It means that a request for any file + beginning with "/apache" will be looked for in the + Apache docs. This means that the pages can be accessed as + http://www.apache.org/apache/ for all browsers, + although new browsers can also access it as + http://www.apache.org/.

    + +

    In order to make this work, put a link on your main server's + page to http://www.apache.org/apache/ (Note: Do + not use http://www.apache.org/ - this would create + an endless loop). Then, in the virtual host's pages, be sure to + use either purely relative links (e.g., + "file.html" or "../icons/image.gif" + or links containing the prefacing /apache/ + (e.g., + "http://www.apache.org/apache/file.html" or + "/apache/docs/1.1/index.html").

    + +

    This requires a bit of discipline, but adherence to these + guidelines will, for the most part, ensure that your pages will + work with all browsers, new and old. When a new browser + contacts http://www.apache.org/, they will be + directly taken to the Apache pages. Older browsers will be able + to click on the link from the main server, go to + http://www.apache.org/apache/, and then access the + pages.

    + + + + diff --git a/htdocs/manual/vhosts/index.html.en b/htdocs/manual/vhosts/index.html.en new file mode 100644 index 00000000000..469eba7b230 --- /dev/null +++ b/htdocs/manual/vhosts/index.html.en @@ -0,0 +1,84 @@ + + + + + + + Apache Virtual Host documentation + + + + + + +

    Apache Virtual Host documentation

    + +

    The term Virtual Host refers to the practice of + maintaining more than one server on one machine, as + differentiated by their apparent hostname. For example, it is + often desirable for companies sharing a web server to have + their own domains, with web servers accessible as + www.company1.com and + www.company2.com, without requiring the user to + know any extra path information.

    + +

    Apache was one of the first servers to support IP-based + virtual hosts right out of the box. Versions 1.1 and later of + Apache support both, IP-based and name-based virtual hosts + (vhosts). The latter variant of virtual hosts is sometimes also + called host-based or non-IP virtual hosts.

    + +

    Below is a list of documentation pages which explain all + details of virtual host support in Apache version 1.3 and + later.

    +
    + +

    Virtual Host Support

    + + + +

    Configuration directives

    + + + +

    Folks trying to debug their virtual host configuration may + find the Apache -S command line switch useful. It + will dump out a description of how Apache parsed the + configuration file. Careful examination of the IP addresses and + server names may help uncover configuration mistakes. + +

    + + + diff --git a/htdocs/manual/vhosts/index.html.html b/htdocs/manual/vhosts/index.html.html new file mode 100644 index 00000000000..f2710912dc8 --- /dev/null +++ b/htdocs/manual/vhosts/index.html.html @@ -0,0 +1,4 @@ + + + diff --git a/htdocs/manual/vhosts/index.html.ja.jis b/htdocs/manual/vhosts/index.html.ja.jis new file mode 100644 index 00000000000..6e4e206867c --- /dev/null +++ b/htdocs/manual/vhosts/index.html.ja.jis @@ -0,0 +1,82 @@ + + + + + + Apache $B%P!<%A%c%k%[%9%H@bL@=q(B + + + + + + + +

    Apache $B%P!<%A%c%k%[%9%H@bL@=q(B

    + +

    $B%P!<%A%c%k%[%9%H(B$B$H$$$&MQ8l$O!"(B1 $BBf$N%^%7%s>e$G(B + $B0l$D0J>e$N%5!<%P$r!"(B + $B$=$l$>$lJL$N0c$&%[%9%HL>$G8+$;$k1?MQJ}K!$N$3$H$r;X$7$^$9!#(B + $B$?$H$($P!"0l$D$N%5!<%P$r6&M-$9$kJ#?t$N2q7W$J%Q%9L>$rMW5a$;$:$K!"(Bwww.company1.com + $B$d(B www.company2.com $B$H$$$C$?$=$l$>$l$K8GM-$N(B + $B%I%a%$%sL>$G%&%'%V%5!<%P$K%"%/%;%9$G$-$k$h$&$K$7$?$$!"(B + $B$H$$$C$?$3$H$O$7$P$7$P$"$j$^$9!#(B

    + +

    Apache $B$O!"FC$KuBV$G(B IP $B%Y!<%9$N%P!<%A%c%k%[%9%H(B + $B$r%5%]!<%H$7$?:G=i$N%5!<%P$N0l$D$G$9!#%P!<%8%g%s(B 1.1 $B0J9_$N(B Apache + $B$G$O!"(BIP $B%Y!<%9$H%M!<%`%Y!<%9$N%P!<%A%c%k%[%9%H$NN>J}$r%5%]!<%H(B + $B$7$F$$$^$9!#%M!<%`%Y!<%9$N%P!<%A%c%k%[%9%H$O!"%[%9%H%Y!<%9$"$k$$$OHs(B + IP $B%Y!<%9$N%P!<%A%c%k%[%9%H$H8F$P$l$k$3$H$b$"$j$^$9!#(B

    + +

    $B0J2<$N%Z!<%8$G$O!"(BApache $B%P!<%8%g%s(B 1.3 + $B0J9_$G$N%P!<%A%c%k%[%9%H$N%5%]!<%H$K$D$$$F$N>\:Y$r@bL@$7$^$9!#(B

    + +
    + +

    $B%P!<%A%c%k%[%9%H$N%5%]!<%H(B

    + + + +

    $B@_Dj%G%#%l%/%F%#%V(B

    + + + + +

    $B%P!<%A%c%k%[%9%H$N@_Dj$N%G%P%C%0$r$9$k$K$O(B + Apache $B$N%3%^%s%I%i%$%s%9%$%C%A(B -S $B$,JXMx$G$9!#(B + Apache $B$,@_Dj%U%!%$%k$r$I$&2r@O$7$?$+$K$D$$$F=PNO$7$^$9!#(B + IP $B%"%I%l%9$H%5!<%PL>$rCm0U?<$/D4$Y$l$P!"(B + $B@_Dj$N4V0c$$$r8+$D$1$k=u$1$K$J$k$G$7$g$&!#(B

    + + + diff --git a/htdocs/manual/vhosts/ip-based.html b/htdocs/manual/vhosts/ip-based.html new file mode 100644 index 00000000000..17491e8cbf2 --- /dev/null +++ b/htdocs/manual/vhosts/ip-based.html @@ -0,0 +1,139 @@ + + + + + + + Apache IP-based Virtual Host Support + + + + + + +

    Apache IP-based Virtual Host Support

    + See also: Name-based + Virtual Hosts Support +
    + +

    System requirements

    + As the term IP-based indicates, the server + must have a different IP address for each IP-based + virtual host. This can be achieved by the machine + having several physical network connections, or by use of + virtual interfaces which are supported by most modern operating + systems (see system documentation for details, these are + frequently called "ip aliases", and the "ifconfig" command is + most commonly used to set them up). + +

    How to set up Apache

    + There are two ways of configuring apache to support multiple + hosts. Either by running a separate httpd daemon for each + hostname, or by running a single daemon which supports all the + virtual hosts. + +

    Use multiple daemons when:

    + +
      +
    • There are security partitioning issues, such as company1 + does not want anyone at company2 to be able to read their + data except via the web. In this case you would need two + daemons, each running with different User, Group, Listen, and ServerRoot + settings.
    • + +
    • You can afford the memory and file descriptor + requirements of listening to every IP alias on the + machine. It's only possible to Listen to the "wildcard" + address, or to specific addresses. So if you have a need to + listen to a specific address for whatever reason, then you + will need to listen to all specific addresses. (Although one + httpd could listen to N-1 of the addresses, and another could + listen to the remaining address.)
    • +
    + Use a single daemon when: + +
      +
    • Sharing of the httpd configuration between virtual hosts + is acceptable.
    • + +
    • The machine services a large number of requests, and so + the performance loss in running separate daemons may be + significant.
    • +
    + +

    Setting up multiple daemons

    + Create a separate httpd installation for each virtual host. For + each installation, use the Listen directive in the + configuration file to select which IP address (or virtual host) + that daemon services. e.g. +
    +    Listen www.smallco.com:80
    +
    + It is recommended that you use an IP address instead of a + hostname (see DNS caveats). + +

    Setting up a single daemon with virtual hosts

    + For this case, a single httpd will service requests for the + main server and all the virtual hosts. The VirtualHost directive + in the configuration file is used to set the values of ServerAdmin, ServerName, DocumentRoot, ErrorLog and TransferLog + or CustomLog + configuration directives to different values for each virtual + host. e.g. +
    +    <VirtualHost www.smallco.com>
    +    ServerAdmin webmaster@mail.smallco.com
    +    DocumentRoot /groups/smallco/www
    +    ServerName www.smallco.com
    +    ErrorLog /groups/smallco/logs/error_log
    +    TransferLog /groups/smallco/logs/access_log
    +    </VirtualHost>
    +
    +    <VirtualHost www.baygroup.org>
    +    ServerAdmin webmaster@mail.baygroup.org
    +    DocumentRoot /groups/baygroup/www
    +    ServerName www.baygroup.org
    +    ErrorLog /groups/baygroup/logs/error_log
    +    TransferLog /groups/baygroup/logs/access_log
    +    </VirtualHost>
    +
    + It is recommended that you use an IP address instead of a + hostname (see DNS caveats). + +

    Almost any configuration directive can be + put in the VirtualHost directive, with the exception of + directives that control process creation and a few other + directives. To find out if a directive can be used in the + VirtualHost directive, check the Context using the + directive index.

    + +

    User and Group may be used inside a + VirtualHost directive if the suEXEC + wrapper is used.

    + +

    SECURITY: When specifying where to write log files, + be aware of some security risks which are present if anyone + other than the user that starts Apache has write access to the + directory where they are written. See the security tips document + for details.

    + + + + diff --git a/htdocs/manual/vhosts/mass.html b/htdocs/manual/vhosts/mass.html new file mode 100644 index 00000000000..eb46f3db6f9 --- /dev/null +++ b/htdocs/manual/vhosts/mass.html @@ -0,0 +1,442 @@ + + + + + + + Dynamically configured mass virtual hosting + + + + + + +

    Dynamically configured mass virtual + hosting

    + +

    This document describes how to efficiently serve an + arbitrary number of virtual hosts with Apache 1.3. +

    + +

    Contents:

    + + +
    + +

    Motivation

    + +

    The techniques described here are of interest if your + httpd.conf contains many + <VirtualHost> sections that are + substantially the same, for example:

    +
    +NameVirtualHost 111.22.33.44
    +<VirtualHost 111.22.33.44>
    +    ServerName                 www.customer-1.com
    +    DocumentRoot        /www/hosts/www.customer-1.com/docs
    +    ScriptAlias  /cgi-bin/  /www/hosts/www.customer-1.com/cgi-bin
    +</VirtualHost>
    +<VirtualHost 111.22.33.44>
    +    ServerName                 www.customer-2.com
    +    DocumentRoot        /www/hosts/www.customer-2.com/docs
    +    ScriptAlias  /cgi-bin/  /www/hosts/www.customer-2.com/cgi-bin
    +</VirtualHost>
    +# blah blah blah
    +<VirtualHost 111.22.33.44>
    +    ServerName                 www.customer-N.com
    +    DocumentRoot        /www/hosts/www.customer-N.com/docs
    +    ScriptAlias  /cgi-bin/  /www/hosts/www.customer-N.com/cgi-bin
    +</VirtualHost>
    +
    +
    +
    + + +

    The basic idea is to replace all of the static + <VirtualHost> configuration with a mechanism + that works it out dynamically. This has a number of + advantages:

    + +
      +
    1. Your configuration file is smaller so Apache starts + faster and uses less memory.
    2. + +
    3. Adding virtual hosts is simply a matter of creating the + appropriate directories in the filesystem and entries in the + DNS - you don't need to reconfigure or restart Apache.
    4. +
    +
    +
    + + +

    The main disadvantage is that you cannot have a different + log file for each virtual host; however if you have very many + virtual hosts then doing this is dubious anyway because it eats + file descriptors. It is better to log to a pipe or a fifo and + arrange for the process at the other end to distribute the logs + to the customers (it can also accumulate statistics, etc.).

    +
    + +

    Overview

    + +

    A virtual host is defined by two pieces of information: its + IP address, and the contents of the Host: header + in the HTTP request. The dynamic mass virtual hosting technique + is based on automatically inserting this information into the + pathname of the file that is used to satisfy the request. This + is done most easily using mod_vhost_alias, + but if you are using a version of Apache up to 1.3.6 then you + must use mod_rewrite. + Both of these modules are disabled by default; you must enable + one of them when configuring and building Apache if you want to + use this technique.

    + +

    A couple of things need to be `faked' to make the dynamic + virtual host look like a normal one. The most important is the + server name which is used by Apache to generate + self-referential URLs, etc. It is configured with the + ServerName directive, and it is available to CGIs + via the SERVER_NAME environment variable. The + actual value used at run time is controlled by the UseCanonicalName + setting. With UseCanonicalName Off the server name + comes from the contents of the Host: header in the + request. With UseCanonicalName DNS it comes from a + reverse DNS lookup of the virtual host's IP address. The former + setting is used for name-based dynamic virtual hosting, and the + latter is used for IP-based hosting. If Apache cannot work out + the server name because there is no Host: header + or the DNS lookup fails then the value configured with + ServerName is used instead.

    + +

    The other thing to `fake' is the document root (configured + with DocumentRoot and available to CGIs via the + DOCUMENT_ROOT environment variable). In a normal + configuration this setting is used by the core module when + mapping URIs to filenames, but when the server is configured to + do dynamic virtual hosting that job is taken over by another + module (either mod_vhost_alias or + mod_rewrite) which has a different way of doing + the mapping. Neither of these modules is responsible for + setting the DOCUMENT_ROOT environment variable so + if any CGIs or SSI documents make use of it they will get a + misleading value.

    +
    + +

    Simple dynamic virtual + hosts

    + +

    This extract from httpd.conf implements the + virtual host arrangement outlined in the Motivation section above, but in a + generic fashion using mod_vhost_alias.

    +
    +# get the server name from the Host: header
    +UseCanonicalName Off
    +
    +# this log format can be split per-virtual-host based on the first field
    +LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon
    +CustomLog logs/access_log vcommon
    +
    +# include the server name in the filenames used to satisfy requests
    +VirtualDocumentRoot /www/hosts/%0/docs
    +VirtualScriptAlias  /www/hosts/%0/cgi-bin
    +
    + +

    This configuration can be changed into an IP-based virtual + hosting solution by just turning UseCanonicalName + Off into UseCanonicalName DNS. The server + name that is inserted into the filename is then derived from + the IP address of the virtual host.

    +
    + +

    A virtually hosted + homepages system

    + +

    This is an adjustment of the above system tailored for an + ISP's homepages server. Using a slightly more complicated + configuration we can select substrings of the server name to + use in the filename so that e.g. the documents for + www.user.isp.com are found in + /home/user/. It uses a single cgi-bin + directory instead of one per virtual host.

    +
    +# all the preliminary stuff is the same as above, then
    +
    +# include part of the server name in the filenames
    +VirtualDocumentRoot /www/hosts/%2/docs
    +
    +# single cgi-bin directory
    +ScriptAlias  /cgi-bin/  /www/std-cgi/
    +
    + +

    There are examples of more complicated + VirtualDocumentRoot settings in the + mod_vhost_alias documentation.

    +
    + +

    Using more than + one virtual hosting system on the same server

    + +

    With more complicated setups you can use Apache's normal + <VirtualHost> directives to control the + scope of the various virtual hosting configurations. For + example, you could have one IP address for homepages customers + and another for commercial customers with the following setup. + This can of course be combined with conventional + <VirtualHost> configuration sections.

    +
    +UseCanonicalName Off
    +
    +LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon
    +
    +<Directory /www/commercial>
    +    Options FollowSymLinks
    +    AllowOverride All
    +</Directory>
    +
    +<Directory /www/homepages>
    +    Options FollowSymLinks
    +    AllowOverride None
    +</Directory>
    +
    +<VirtualHost 111.22.33.44>
    +    ServerName www.commercial.isp.com
    +
    +    CustomLog logs/access_log.commercial vcommon
    +
    +    VirtualDocumentRoot /www/commercial/%0/docs
    +    VirtualScriptAlias  /www/commercial/%0/cgi-bin
    +</VirtualHost>
    +
    +<VirtualHost 111.22.33.45>
    +    ServerName www.homepages.isp.com
    +
    +    CustomLog logs/access_log.homepages vcommon
    +
    +    VirtualDocumentRoot /www/homepages/%0/docs
    +    ScriptAlias         /cgi-bin/ /www/std-cgi/
    +</VirtualHost>
    +
    +
    + +

    More efficient IP-based + virtual hosting

    + +

    After the first example I noted that + it is easy to turn it into an IP-based virtual hosting setup. + Unfortunately that configuration is not very efficient because + it requires a DNS lookup for every request. This can be avoided + by laying out the filesystem according to the IP addresses + themselves rather than the corresponding names and changing the + logging similarly. Apache will then usually not need to work + out the server name and so incur a DNS lookup.

    +
    +# get the server name from the reverse DNS of the IP address
    +UseCanonicalName DNS
    +
    +# include the IP address in the logs so they may be split
    +LogFormat "%A %h %l %u %t \"%r\" %s %b" vcommon
    +CustomLog logs/access_log vcommon
    +
    +# include the IP address in the filenames
    +VirtualDocumentRootIP /www/hosts/%0/docs
    +VirtualScriptAliasIP  /www/hosts/%0/cgi-bin
    +
    +
    + +

    Using older versions + of Apache

    + +

    The examples above rely on mod_vhost_alias + which appeared after version 1.3.6. If you are using a version + of Apache without mod_vhost_alias then you can + implement this technique with mod_rewrite as + illustrated below, but only for Host:-header-based virtual + hosts.

    + +

    In addition there are some things to beware of with logging. + Apache 1.3.6 is the first version to include the + %V log format directive; in versions 1.3.0 - 1.3.3 + the %v option did what %V does; + version 1.3.4 has no equivalent. In all these versions of + Apache the UseCanonicalName directive can appear + in .htaccess files which means that customers can + cause the wrong thing to be logged. Therefore the best thing to + do is use the %{Host}i directive which logs the + Host: header directly; note that this may include + :port on the end which is not the case for + %V.

    +
    + +

    Simple dynamic + virtual hosts using mod_rewrite

    + +

    This extract from httpd.conf does the same + thing as the first example. The first + half is very similar to the corresponding part above but with + some changes for backward compatibility and to make the + mod_rewrite part work properly; the second half + configures mod_rewrite to do the actual work.

    + +

    There are a couple of especially tricky bits: By default, + mod_rewrite runs before the other URI translation + modules (mod_alias etc.) so if they are used then + mod_rewrite must be configured to accommodate + them. Also, mome magic must be performed to do a + per-dynamic-virtual-host equivalent of + ScriptAlias.

    +
    +# get the server name from the Host: header
    +UseCanonicalName Off
    +
    +# splittable logs
    +LogFormat "%{Host}i %h %l %u %t \"%r\" %s %b" vcommon
    +CustomLog logs/access_log vcommon
    +
    +<Directory /www/hosts>
    +    # ExecCGI is needed here because we can't force
    +    # CGI execution in the way that ScriptAlias does
    +    Options FollowSymLinks ExecCGI
    +</Directory>
    +
    +# now for the hard bit
    +
    +RewriteEngine On
    +
    +# a ServerName derived from a Host: header may be any case at all
    +RewriteMap  lowercase  int:tolower
    +
    +## deal with normal documents first:
    +# allow Alias /icons/ to work - repeat for other aliases
    +RewriteCond  %{REQUEST_URI}  !^/icons/
    +# allow CGIs to work
    +RewriteCond  %{REQUEST_URI}  !^/cgi-bin/
    +# do the magic
    +RewriteRule  ^/(.*)$  /www/hosts/${lowercase:%{SERVER_NAME}}/docs/$1
    +
    +## and now deal with CGIs - we have to force a MIME type
    +RewriteCond  %{REQUEST_URI}  ^/cgi-bin/
    +RewriteRule  ^/(.*)$  /www/hosts/${lowercase:%{SERVER_NAME}}/cgi-bin/$1  [T=application/x-httpd-cgi]
    +
    +# that's it!
    +
    +
    + +

    A + homepages system using mod_rewrite

    + +

    This does the same thing as the second + example.

    +
    +RewriteEngine on
    +
    +RewriteMap   lowercase  int:tolower
    +
    +# allow CGIs to work
    +RewriteCond  %{REQUEST_URI}  !^/cgi-bin/
    +
    +# check the hostname is right so that the RewriteRule works
    +RewriteCond  ${lowercase:%{SERVER_NAME}}  ^www\.[a-z-]+\.isp\.com$
    +
    +# concatenate the virtual host name onto the start of the URI
    +# the [C] means do the next rewrite on the result of this one
    +RewriteRule  ^(.+)  ${lowercase:%{SERVER_NAME}}$1  [C]
    +
    +# now create the real file name
    +RewriteRule  ^www\.([a-z-]+)\.isp\.com/(.*) /home/$1/$2
    +
    +# define the global CGI directory
    +ScriptAlias  /cgi-bin/  /www/std-cgi/
    +
    +
    + +

    Using a separate virtual + host configuration file

    + +

    This arrangement uses more advanced mod_rewrite + features to get the translation from virtual host to document + root from a separate configuration file. This provides more + flexibility but requires more complicated configuration.

    + +

    The vhost.map file contains something like + this:

    +
    +www.customer-1.com  /www/customers/1
    +www.customer-2.com  /www/customers/2
    +# ...
    +www.customer-N.com  /www/customers/N
    +
    +
    +
    + + +

    The http.conf contains this:

    +
    +RewriteEngine on
    +
    +RewriteMap   lowercase  int:tolower
    +
    +# define the map file
    +RewriteMap   vhost      txt:/www/conf/vhost.map
    +
    +# deal with aliases as above
    +RewriteCond  %{REQUEST_URI}               !^/icons/
    +RewriteCond  %{REQUEST_URI}               !^/cgi-bin/
    +RewriteCond  ${lowercase:%{SERVER_NAME}}  ^(.+)$
    +# this does the file-based remap
    +RewriteCond  ${vhost:%1}                  ^(/.*)$
    +RewriteRule  ^/(.*)$                      %1/docs/$1
    +
    +RewriteCond  %{REQUEST_URI}               ^/cgi-bin/
    +RewriteCond  ${lowercase:%{SERVER_NAME}}  ^(.+)$
    +RewriteCond  ${vhost:%1}                  ^(/.*)$
    +RewriteRule  ^/(.*)$                      %1/cgi-bin/$1
    +
    +
    +
    + + + + diff --git a/htdocs/manual/vhosts/name-based.html.en b/htdocs/manual/vhosts/name-based.html.en new file mode 100644 index 00000000000..a2de9817a13 --- /dev/null +++ b/htdocs/manual/vhosts/name-based.html.en @@ -0,0 +1,240 @@ + + + + + Name-based Virtual Hosts + + + + + + +

    Name-based Virtual Host Support

    + +

    This document describes when and how to use name-based virtual hosts.

    + + + +

    See also: Virtual Host examples for common +setups, IP-based Virtual Host Support, +An In-Depth Discussion of Virtual Host +Matching, and Dynamically configured mass +virtual hosting.

    + +
    + +

    Name-based vs. IP-based Virtual Hosts

    + +

    IP-based virtual hosts use the IP address of the connection to +determine the correct virtual host to serve. Therefore you need to +have a separate IP address for each host. With name-based virtual +hosting, the server relies on the client to report the hostname as +part of the HTTP headers. Using this technique, many different hosts +can share the same IP address.

    + +

    Name-based virtual hosting is usually simpler, since you need +only configure your DNS server to map each hostname to the correct +IP address and then configure the Apache HTTP Server to recognize +the different hostnames. Name-based virtual hosting also eases +the demand for scarce IP addresses. Therefore you should use +name-based virtual hosting unless there is a specific reason to +choose IP-based virtual hosting. Some reasons why you might consider +using IP-based virtual hosting:

    + +
      + +
    • Some ancient clients are not compatible with name-based virtual +hosting. For name-based virtual hosting to work, the client must send +the HTTP Host header. This is required by HTTP/1.1, and is +implemented by all modern HTTP/1.0 browsers as an extension. If you +need to support obsolete clients and still use name-based virtual +hosting, a possible technique is discussed at the end of this +document.
    • + +
    • Name-based virtual hosting cannot be used with SSL secure servers +because of the nature of the SSL protocol.
    • + +
    • Some operating systems and network equipment implement bandwidth +management techniques that cannot differentiate between hosts unless +they are on separate IP addresses.
    • + +
    + +

    Using Name-based Virtual Hosts

    + + +
    +Related Directives

    + +DocumentRoot
    +NameVirtualHost
    +ServerAlias
    +ServerName
    +ServerPath
    +VirtualHost
    +
    + +

    To use name-based virtual hosting, you must designate the IP +address (and possibly port) on the server that will be accepting +requests for the hosts. This is configured using the NameVirtualHost directive. +In the normal case where any and all IP addresses on the server should +be used, you can use * as the argument to +NameVirtualHost. (NameVirtualHost * will +work only in version 1.3.13 and later.) Note that mentioning an IP +address in a NameVirtualHost directive does not +automatically make the server listen to that IP address. See Setting which addresses and ports Apache uses +for more details. In addition, any IP address specified here must be +associated with a network interface on the server.

    + +

    The next step is to create a <VirtualHost> block for +each different host that you would like to serve. The argument to the +<VirtualHost> directive should be the same as the +argument to the NameVirtualHost directive (ie, an IP +address, or * for all addresses). Inside each +<VirtualHost> block, you will need at minimum a ServerName directive to +designate which host is served and a DocumentRoot directive to +show where in the filesystem the content for that host lives.

    + +

    If you are adding virtual hosts to an existing web server, you +must also create a <VirtualHost> block for the existing host. +The ServerName and DocumentRoot included in +this virtual host should be the same as the global +ServerName and DocumentRoot. List this +virtual host first in the configuration file so that it will act as +the default host.

    + +

    For example, suppose that you are serving the domain +www.domain.tld and you wish to add the virtual host +www.otherdomain.tld, which points at the same IP address. +Then you simply add the following to httpd.conf:

    +
    +    NameVirtualHost *
    +
    +    <VirtualHost *>
    +    ServerName www.domain.tld
    +    DocumentRoot /www/domain
    +    </VirtualHost>
    +
    +    <VirtualHost *>
    +    ServerName www.otherdomain.tld
    +    DocumentRoot /www/otherdomain
    +    </VirtualHost>
    +
    + +

    You can alternatively specify an explicit IP address in place of +the * in both the NameVirtualHost and +<VirtualHost> directives. The IP address is +required in version 1.3.12 and earlier.

    + +

    Many servers want to be accessible by more than one name. This is +possible with the ServerAlias +directive, placed inside the <VirtualHost> section. For +example if you add this to the first <VirtualHost> block +above

    + +
    +ServerAlias domain.tld *.domain.tld +
    + +

    then requests for all hosts in the domain.tld domain +will be served by the www.domain.tld virtual host. The +wildcard characters * and ? can be used to match names. Of course, +you can't just make up names and place them in ServerName +or ServerAlias. You must first have your DNS server +properly configured to map those names to an IP address associated +with your server.

    + +

    Finally, you can fine-tune the configuration of the virtual hosts +by placing other directives inside the +<VirtualHost> containers. Most directives can be +placed in these containers and will then change the configuration only +of the relevant virtual host. To find out if a particular directive +is allowed, check the Context of the +directive. Configuration directives set in the main server +context (outside any <VirtualHost> container) +will be used only if they are not overriden by the virtual host +settings.

    + +

    Now when a request arrives, the server will first check if it is +using an IP address that matches the NameVirtualHost. If +it is, then it will look at each <VirtualHost> +section with a matching IP address and try to find one where the +ServerName or ServerAlias matches the +requested hostname. If it finds one, then it uses the configuration +for that server. If no matching virtual host is found, then +the first listed virtual host that matches the IP +address will be used.

    + +

    As a consequence, the first listed virtual host is the +default virtual host. The DocumentRoot from the +main server will never be used when an IP +address matches the NameVirtualHost directive. If you +would like to have a special configuration for requests that do not +match any particular virtual host, simply put that configuration in a +<VirtualHost> container and list it first in the +configuration file.

    + +

    Compatibility with Older Browsers

    + +

    As mentioned earlier, there are some clients + who do not send the required data for the name-based virtual + hosts to work properly. These clients will always be sent the + pages from the first virtual host listed for that IP address + (the primary name-based virtual host).

    + +

    There is a possible workaround with the ServerPath + directive, albeit a slightly cumbersome one:

    + +

    Example configuration:

    +
    +    NameVirtualHost 111.22.33.44
    +
    +    <VirtualHost 111.22.33.44>
    +    ServerName www.domain.tld
    +    ServerPath /domain
    +    DocumentRoot /web/domain
    +    </VirtualHost>
    +
    + +

    What does this mean? It means that a request for any URI + beginning with "/domain" will be served from the + virtual host www.domain.tld This means that the + pages can be accessed as + http://www.domain.tld/domain/ for all clients, + although clients sending a Host: header can also + access it as http://www.domain.tld/.

    + +

    In order to make this work, put a link on your primary + virtual host's page to + http://www.domain.tld/domain/ Then, in the virtual + host's pages, be sure to use either purely relative links + (e.g., "file.html" or + "../icons/image.gif" or links containing the + prefacing /domain/ (e.g., + "http://www.domain.tld/domain/misc/file.html" or + "/domain/misc/file.html").

    + +

    This requires a bit of discipline, but adherence to these + guidelines will, for the most part, ensure that your pages will + work with all browsers, new and old.

    + +

    See also: ServerPath + configuration example

    + + + + diff --git a/htdocs/manual/vhosts/name-based.html.html b/htdocs/manual/vhosts/name-based.html.html new file mode 100644 index 00000000000..91ea0bfd13f --- /dev/null +++ b/htdocs/manual/vhosts/name-based.html.html @@ -0,0 +1,4 @@ + + + diff --git a/htdocs/manual/vhosts/name-based.html.ja.jis b/htdocs/manual/vhosts/name-based.html.ja.jis new file mode 100644 index 00000000000..a0eaa537f1b --- /dev/null +++ b/htdocs/manual/vhosts/name-based.html.ja.jis @@ -0,0 +1,241 @@ + + + + + $BL>A0%Y!<%9$N%P!<%A%c%k%[%9%H(B + + + + + + +

    $B$3$NJ8=q$G$OL>A0%Y!<%9$N%P!<%A%c%k%[%9%H$r$I$s$J$H$-!"(B + $B$^$?$I$&$d$C$F;H$&$N$+$H$$$&$3$H$r@bL@$7$^$9!#(B

    + + + +

    $B;29M(B: $BI8=`E*$J%;%C%H%"%C%W$G$N(B + $B%P!<%A%c%k%[%9%H$NNc(B$B!"(B IP $B%Y!<%9$N(B + $B%P!<%A%c%k%[%9%H$N%5%]!<%H(B$B!"(B + $B%P!<%A%c%k%[%9%H$N%^%C%A%s%0$N6qBNE*$J>\:Y(B $B$H(B $BBgNL$N%P!<%A%c%k%[%9%H$rF0E*$K@_Dj$9$k(B +

    +
    + +

    $BL>A0%Y!<%9$H(B IP $B%Y!<%9$N%P!<%A%c%k%[%9%H$NHf3S(B

    + +

    $B=i4|$N%P!<%8%g%s$N(B HTTP $B$G$O(B ($BB>$NB?$/$N%W%m%H%3%k!"Nc$($P(B FTP + $B$HF1MM(B) $B0l$D$N%5!<%P>e$G$N%P!<%A%c%k%[%9%H$4$H$K0[$J$C$?(B IP + $B%"%I%l%9$,I,MW$G$7$?!#$$$/$D$+$N%W%i%C%H%U%)!<%`$G$O!"$3$N$3$H$,(B + $B + +

    $BL>A0%Y!<%9$N%P!<%A%c%k%[%9%H$ODL>oC1=c$G!"(B + $B$=$l$>$l$N%[%9%HL>$H$=$l$KBP1~$9$k@53N$J(B IP $B%"%I%l%9$r(B DNS + $B$G@_Dj$7!"0[$J$k%[%9%HL>$r6hJL=PMh$k$h$&$K(B Apache HTTP + $B%5!<%P$r@_Dj$9$k$@$1$G$9!#$5$i$K!"L>A0%Y!<%9$N%P!<%A%c%k%[%9%H$OITB-$9$k(B + IP $B%"%I%l%9$N<{MW$r4KOB$7$^$9!#$7$?$,$C$F!"(BIP + $B%Y!<%9$N%P!<%A%c%k%[%9%H$rA*Br$9$Y$-FCDj$NM}M3$,$J$1$l$PL>A0%Y!<%9$N(B + $B%P!<%A%c%k%[%9%H$r;H$&$Y$-$G$9!#(B + IP $B%Y!<%9$N%P!<%A%c%k%[%9%H$r;HMQ$9$k$3$H$r9MN8$9$kM}M3$H$7$F!"(B

    + +
      +
    • $BL>A0%Y!<%9$N%P!<%A%c%k%[%9%H$KBP1~$7$F$$$J$$8E$$%/%i%$%"%s%H$,$"$k(B + $BL>A0%Y!<%9$N%P!<%A%c%k%[%9%H$,F/$/$?$a$K$O!"%/%i%$%"%s%H$O(B + HTTP $B%[%9%H%X%C%@$rAw$C$F$3$J$1$l$P$J$j$^$;$s!#(B + $B$3$l$O(B HTTP/1.1 $B$N;EMM$GMW5a$5$l$F$$$F!"$9$Y$F$N8=BeE*$J(B + HTTP/1.0 $B%V%i%&%6$G$b3HD%$H$7$FA0%Y!<%9$N(B + $B%P!<%A%c%k%[%9%H$r9T$$$?$$>l9g$O!"$3$NJ8=q$N:G8e$NJ}$K(B + $B=q$+$l$F$$$k2r7h:v$K$J$k$+$b$7$l$J$$J}K!$r8+$F$/$@$5$$!#(B
    • + +
    • $BL>A0%Y!<%9$N%P!<%A%c%k%[%9%H$O(B SSL $B%W%m%H%3%k$NFCD'$K$h$j!"(B + SSL $B%;%-%e%"%5!<%P$K$O;H$($^$;$s!#(B
    • + +
    • $B%*%Z%l!<%F%#%s%0%7%9%F%`$d%M%C%H%o!<%/AuCV$N$J$+$K$O!"JL$N(B IP + $B%"%I%l%9>e$G$J$$>l9g!"J#?t$N%[%9%H$rJL07$$$G$-$J$$$h$&$J(B + $BBS0h4IM}$NJ}K!$r +
    + +

    $BL>A0%Y!<%9$N%P!<%A%c%k%[%9%H$rMxMQ$9$k(B

    + + + + + +
    $B4XO"%G%#%l%/%F%#%V(B
    +
    + DocumentRoot
    + NameVirtualHost
    + ServerAlias
    + ServerName
    + ServerPath
    + VirtualHost
    +
    + +

    $BL>A0%Y!<%9$N%P!<%A%c%k%[%9%H$r;H$&$K$O!"$=$N%[%9%H$X$N(B + $B%j%/%(%9%H$rNameVirtualHost + $B%G%#%l%/%F%#%V$G@_Dj$7$^$9!#DL>o!"(BNameVirtualHost $B$G(B + * $B$NB0@-$r;H$C$F%5!<%P$N$9$Y$F$N(B IP $B%"%I%l%9$r;H$$$^$9!#(B + (NameVirtualHost * $B$O%P!<%8%g%s(B 1.3.13 $B0J9_$N$_$GF0:n$7$^$9!#(B) + NameVirtualHost $B%G%#%l%/%F%#%V$G(B IP $B%"%I%l%9$r=q$$$F$b!"(B + $B<+F0E*$K%5!<%P$,$=$N(B IP $B%"%I%l%9$r%j%C%9%s$9$k$H$$$&$3$H$O$J$$$3$H$K(B + $BCm0U$7$F$/$@$5$$!#>\:Y$O(B Apache $B$N;H$&%"%I%l%9$H(B + $B%]!<%H$r@_Dj$9$k(B $B$rFI$s$G$/$@$5$$!#$5$i$K!"$3$3$G;XDj$5$l$?(B + IP $B%"%I%l%9$O$9$Y$F%5!<%P$N%M%C%H%o!<%/%$%s%?!<%U%'!<%9$H4XO"IU$1$i$l$F(B + $B$$$J$1$l$P$J$j$^$;$s!#(B

    + +

    $B$l$N%[%9%H$KBP$7$F(B <VirtualHost> + $B%V%m%C%/$r:n@.$7$F$/$@$5$$!#(B<VirtualHost> + $B%G%#%l%/%F%#%V$N0z?t$O(B NameVirtualHost + $B%G%#%l%/%F%#%V$N0z?t$HF1$8$K$7$F$/$@$5$$(B ($B$9$J$o$A!"(BIP + $B%"%I%l%90l$D$d$9$Y$F$N%"%I%l%9$rI=$9(B *)$B!#$=$l$>$l$N(B + <VirtualHost> $B%G%#%l%/%F%#%V$NCf$K$O!":GDc8B!"(B + $B$I$N%[%9%H$,07$o$l$k$+$r<($9(B ServerName $B%G%#%l%/%F%#%V$H!"(B + $B$=$N%[%9%HMQ$N%3%s%F%s%D$,%U%!%$%k%7%9%F%`>e$N$I$3$K$"$k$+$r<($9(B + DocumentRoot + $B%G%#%l%/%F%#%V$r=q$/I,MW$,$"$j$^$9!#(B

    + +

    $B4{$KB8:_$9$k%&%'%V%5!<%P$K%P!<%A%c%k%[%9%H$rDI2C$9$k>l9g!"(B + $BB8:_$9$k%[%9%HMQ$N(B <VirtualHost> $B%V%m%C%/$r:n$i$J$1$l$P$J$j$^$;$s!#(B + ServerName $B$H(B DocumentRoot + $B$O$3$N%P!<%A%c%k%[%9%H$b4^$a$F!"$=$l$>$l%0%m!<%P%k$J(B + ServerName $B5Z$S(B DocumentRoot + $B$HF1$8$b$N$K$9$k$Y$-$G$9!#@_Dj%U%!%$%kCf$G:G=i$K5-=R$7$?(B + $B$3$N%P!<%A%c%k%[%9%H$O(B + $B%G%U%)%k%H$N%P!<%A%c%k%[%9%H$H$7$F$b?6$kIq$$$^$9!#(B +

    +

    $BNc$($P!"%I%a%$%s(B www.domain.tld $B$r1?MQ$7$F$$$k$H$3$m$K(B + $B%P!<%A%c%k%[%9%H(B www.otherdomain.tld $B$rDI2C$9$k>l9g$G!"(B + $BN>J}$,F1$8(B IP $B%"%I%l%9$r;X$7$F$$$k$H$7$^$9!#$=$N$h$&$J>l9g$O!"(B + httpd.conf $B$K0J2<$N$h$&$J%3!<%I$rDI2C$9$k$@$1$G$9(B

    +
    +    NameVirtualHost *
    +
    +    <VirtualHost *>
    +    ServerName www.domain.tld
    +    DocumentRoot /www/domain
    +    </VirtualHost>
    +
    +    <VirtualHost *>
    +    ServerName www.otherdomain.tld
    +    DocumentRoot /www/otherdomain
    +    </VirtualHost>
    +
    + +

    NameVirtualHost $B5Z$S(B + <VirtualHost> $B$N$I$A$i$N>l9g$b!"(B + * $B$NItJ,$K$OL@<(E*$K(B IP $B%"%I%l%9$r;XDj$9$k$3$H$,$G$-$^$9!#(B + $B%P!<%8%g%s(B 1.3.12 $B0JA0$G$O(B IP $B%"%I%l%9$N;XDj$,I,MW$G$7$?!#(B

    + +

    $BJ#?t$NL>A0$G%5!<%P%"%/%;%9$,$G$-$k$h$&$K$7$?$$$3$H$bB?$$$G$7$g$&!#(B + $B$3$N$h$&$J$3$H$O!"(BServerAlias $B%G%#%l%/%F%#%V$r(B <VirtualHost> + $B%;%/%7%g%s$K5-=R$9$k$3$H$G +

    +    ServerAlias domain.tld *.domain.tld
    +
    + +

    domain.tld $B%I%a%$%s$X$N$9$Y$F$N%[%9%H$X$N%j%/%(%9%H$O(B + www.domain.tld $B$N%P!<%A%c%k%[%9%H$,=hM}$7$^$9!#(B + * $B$d(B ? $B$r%o%$%k%I%+!<%IJ8;z$H$7$F;HMQ$G$-$^$9$,!"EvA3$J$,$i$=$l$@$1$G(B + ServerName $B$d(B ServerAlias + $B$NL>A0$d>l=j$r9=@.$9$k$3$H$O$G$-$^$;$s!#$^$::G=i$K(B DNS $B$N%[%9%HL>$H(B + IP $B%"%I%l%9$r%5!<%P$K$"$o$;$FE,@Z$K@_Dj$9$k;v$,I,MW$G$9(B

    + +

    $B:G8e$K!"(B<VirtualHost> $B%3%s%F%J$NCf$K(B + $BB>$N%G%#%l%/%F%#%V$r=q$/$3$H$G!"%P!<%A%c%k%[%9%H$N@_Dj$r:Y$+$/JQ99(B + $B$9$k$3$H$,$G$-$^$9!#$I$N%G%#%l%/%F%#%V$r=q$/$3$H$,$G$-$k$+$O!"(B + $B%G%#%l%/%F%#%V$N(B $B%3%s%F%-%9%H(B $B$r(B + $BD4$Y$F$/$@$5$$!#(B$B + (<VirtualHost> $B%3%s%F%J$N30(B) $B$N(B + $B@_DjMQ%G%#%l%/%F%#%V$O%P!<%A%c%k%[%9%H$G$N@_Dj$G>e=q$-$5$l$F$$$J$$(B + $B$H$-$N$_;HMQ$5$l$^$9!#(B

    + +

    $B%j%/%(%9%H$,Mh$k$H!"%5!<%P$O$^$::G=i$K(B NameVirtualHost + $B$K%^%C%A$9$k(B IP $B%"%I%l%9$+$I$&$+$r%A%'%C%/$7$^$9!#%^%C%A$9$l$P(B + $B%^%C%A$7$?(B IP $B%"%I%l%9$N(B <VirtualHost> + $B$N$=$l$>$l$N%;%/%7%g%s$NCf$+$i(B ServerName $B$+(B + ServerAlias $B$KMW5a$5$l$?%[%9%HL>$,$"$k$+C5$7$^$9!#(B + $B8+$D$+$l$P$=$N%5!<%PMQ$N@_Dj$r;H$$$^$9!#%^%C%A$9$k%P!<%A%c%k%[%9%H(B + $B$,8+$D$+$i$J$1$l$P!"%^%C%A$7$?(B IP $B%"%I%l%9$N(B + $B%j%9%H$N:G=i$K$"$k%P!<%A%c%k%[%9%H(B $B$,;H$o$l$^$9!#(B

    + +

    $B7k2L$H$7$F!"%j%9%H$N:G=i$N%P!<%A%c%k%[%9%H$,(B $B%G%U%)%k%H(B $B$N(B + $B%P!<%A%c%k%[%9%H$K$J$j$^$9!#(BIP $B%"%I%l%9$,(B NameVirtualHost + $B%G%#%l%/%F%#%V$K%^%C%A$7$?>l9g$O!"(B$B%a%$%s$N%5!<%P(B $B$N(B + DocumentRoot $B;H$o$l(B $B$^$;$s(B + $B$I$N%P!<%A%c%k%[%9%H$K$b%^%C%A$7$J$$%j%/%(%9%H$KBP$7$F!"(B + $BFCJL$J@_Dj$r$7$?$$$N$G$"$l$P!"@_Dj%U%!%$%kCf$N:G=i$N(B + <VirtualHost> $B$K$=$l$r5-=R$7$F$/$@$5$$!#(B

    + +

    $B8E$$%V%i%&%6$H$N8_49@-(B

    + +

    $B>e$G=q$$$?$h$&$K!"L>A0%Y!<%9$N%P!<%A%c%k%[%9%H$,@5$7$/F0:n$9$k(B + $B$?$a$KI,MW$J>pJs$rAw$C$F$3$J$$%/%i%$%"%s%H$,0MA3$H$7$FB8:_$7$F$$$^$9!#(B + $B$=$N$h$&$J%/%i%$%"%s%H$KBP$7$F$O!"3:Ev$9$k(B IP $B%"%I%l%9$K$D$$$F!"(B + $B0lHV:G=i$K@_Dj$5$l$F$$$k%P!<%A%c%k%[%9%H(B + ($B%W%i%$%^%j(B$B$NL>A0%Y!<%9$N%P!<%A%c%k%[%9%H(B) + $B$+$i%Z!<%8$,Aw$jJV$5$l$^$9!#(B

    + +

    ServerPath + $B%G%#%l%/%F%#%V$GBP=h$,2DG=$G$9!#$A$g$C$HIT3J9%$G$9$1$l$I$b!#(B

    + +

    $B@_DjNc(B

    +
    +    NameVirtualHost 111.22.33.44
    +
    +    <VirtualHost 111.22.33.44>
    +    ServerName www.domain.tld
    +    ServerPath /domain
    +    DocumentRoot /web/domain
    +    </VirtualHost>
    +
    + +

    $B$3$NNc$K$O$I$&$$$&0UL#$,$"$k$G$7$g$&$+(B? $B$3$l$O(B + "/domain" $B$G;O$^$k(B URI $B$X$N%j%/%(%9%H$O$9$Y$F!"(B + $B%P!<%A%c%k%[%9%H(B www.domain.tld $B$G=hM}$5$l$k!"(B + $B$H$$$&0UL#$G$9!#$D$^$j!"$9$Y$F$N%/%i%$%"%s%H$G(B + http://www.domain.tld/domain/ $B$G%"%/%;%9$G$-$k%Z!<%8$,!"(B + Host: $B%X%C%@$rAw$C$F$/$k%/%i%$%"%s%H$G$"$l$P(B + http://www.domain.tld/ $B$H$7$F$b%"%/%;%9$G$-$k!"(B + $B$H$$$&0UL#$G$9!#(B

    + +

    $B$3$l$rhttp://www.domain.tld/domain/ $B$X$N%j%s%/$r@_CV$7$^$9!#(B + $B$=$7$F!"%P!<%A%c%k%[%9%H$N%Z!<%8$G$O!"=c?h$JAjBP%j%s%/(B ($BNc(B: + "file.html" $B$d(B "../icons/image.gif")$B!"(B + $B$"$k$$$O(B /domain/ $B$G;O$^$k%j%s%/(B ($BNc(B: + "http://www.domain.tld/domain/misc/file.html" $B$d(B + "/domain/misc/file.html") $B$@$1$r@_CV$7$^$9!#(B

    + +

    $B$3$l$K$O!"4vJ,$+$N5,N'$,I,MW$H$J$j$^$9$,!"(B + $B$3$N$h$&$J%,%$%I%i%$%s$rCil9g!"(B + $B$9$Y$F$N%V%i%&%6$G(B $B!=(B $B?7$7$$%V%i%&%6$G$b8E$$$b$N$G$b(B $B!=(B + $B:n@.$7$?%Z!<%8$,8+$($k$H$$$&$3$H$rJ]>Z$7$^$9!#(B

    + +

    $B;29M(B: ServerPath $B@_DjNc(B

    + + + diff --git a/htdocs/manual/vhosts/vhosts-in-depth.html b/htdocs/manual/vhosts/vhosts-in-depth.html new file mode 100644 index 00000000000..30cb9561be8 --- /dev/null +++ b/htdocs/manual/vhosts/vhosts-in-depth.html @@ -0,0 +1,386 @@ + + + + + + + An In-Depth Discussion of VirtualHost Matching + + + + + + +

    An In-Depth Discussion of VirtualHost + Matching

    + +

    This is a very rough document that was probably out of date + the moment it was written. It attempts to explain exactly what + the code does when deciding what virtual host to serve a hit + from. It's provided on the assumption that something is better + than nothing. The server version under discussion is Apache + 1.2.

    + +

    If you just want to "make it work" without understanding + how, there's a What Works section at + the bottom.

    + +

    Config File Parsing

    + +

    There is a main_server which consists of all the definitions + appearing outside of VirtualHost sections. There + are virtual servers, called vhosts, which are defined + by VirtualHost + sections.

    + +

    The directives Port, ServerName, + ServerPath, + and ServerAlias + can appear anywhere within the definition of a server. However, + each appearance overrides the previous appearance (within that + server).

    + +

    The default value of the Port field for + main_server is 80. The main_server has no default + ServerName, ServerPath, or + ServerAlias.

    + +

    In the absence of any Listen + directives, the (final if there are multiple) Port + directive in the main_server indicates which port httpd will + listen on.

    + +

    The Port and ServerName directives + for any server main or virtual are used when generating URLs + such as during redirects.

    + +

    Each address appearing in the VirtualHost + directive can have an optional port. If the port is unspecified + it defaults to the value of the main_server's most recent + Port statement. The special port * + indicates a wildcard that matches any port. Collectively the + entire set of addresses (including multiple A + record results from DNS lookups) are called the vhost's + address set.

    + +

    The magic _default_ address has significance + during the matching algorithm. It essentially matches any + unspecified address.

    + +

    After parsing the VirtualHost directive, the + vhost server is given a default Port equal to the + port assigned to the first name in its VirtualHost + directive. The complete list of names in the + VirtualHost directive are treated just like a + ServerAlias (but are not overridden by any + ServerAlias statement). Note that subsequent + Port statements for this vhost will not affect the + ports assigned in the address set.

    + +

    All vhosts are stored in a list which is in the reverse + order that they appeared in the config file. For example, if + the config file is:

    + +
    +
    +    <VirtualHost A>
    +    ...
    +    </VirtualHost>
    +
    +    <VirtualHost B>
    +    ...
    +    </VirtualHost>
    +
    +    <VirtualHost C>
    +    ...
    +    </VirtualHost>
    +
    +
    + Then the list will be ordered: main_server, C, B, A. Keep this + in mind. + +

    After parsing has completed, the list of servers is scanned, + and various merges and default values are set. In + particular:

    + +
      +
    1. If a vhost has no ServerAdmin, + ResourceConfig, + AccessConfig, + Timeout, + KeepAliveTimeout, + KeepAlive, + MaxKeepAliveRequests, + or SendBufferSize + directive then the respective value is inherited from the + main_server. (That is, inherited from whatever the final + setting of that value is in the main_server.)
    2. + +
    3. The "lookup defaults" that define the default directory + permissions for a vhost are merged with those of the main + server. This includes any per-directory configuration + information for any module.
    4. + +
    5. The per-server configs for each module from the + main_server are merged into the vhost server.
    6. +
    + Essentially, the main_server is treated as "defaults" or a + "base" on which to build each vhost. But the positioning of + these main_server definitions in the config file is largely + irrelevant -- the entire config of the main_server has been + parsed when this final merging occurs. So even if a main_server + definition appears after a vhost definition it might affect the + vhost definition. + +

    If the main_server has no ServerName at this + point, then the hostname of the machine that httpd is running + on is used instead. We will call the main_server address + set those IP addresses returned by a DNS lookup on the + ServerName of the main_server.

    + +

    Now a pass is made through the vhosts to fill in any missing + ServerName fields and to classify the vhost as + either an IP-based vhost or a name-based + vhost. A vhost is considered a name-based vhost if any of its + address set overlaps the main_server (the port associated with + each address must match the main_server's Port). + Otherwise it is considered an IP-based vhost.

    + +

    For any undefined ServerName fields, a + name-based vhost defaults to the address given first in the + VirtualHost statement defining the vhost. Any + vhost that includes the magic _default_ wildcard + is given the same ServerName as the main_server. + Otherwise the vhost (which is necessarily an IP-based vhost) is + given a ServerName based on the result of a + reverse DNS lookup on the first address given in the + VirtualHost statement.

    + +

    Vhost Matching

    + +

    Apache 1.3 differs from what is documented here, and + documentation still has to be written.

    + +

    The server determines which vhost to use for a request as + follows:

    + +

    find_virtual_server: When the connection is + first made by the client, the local IP address (the IP address + to which the client connected) is looked up in the server list. + A vhost is matched if it is an IP-based vhost, the IP address + matches and the port matches (taking into account + wildcards).

    + +

    If no vhosts are matched then the last occurrence, if it + appears, of a _default_ address (which if you + recall the ordering of the server list mentioned above means + that this would be the first occurrence of + _default_ in the config file) is matched.

    + +

    In any event, if nothing above has matched, then the + main_server is matched.

    + +

    The vhost resulting from the above search is stored with + data about the connection. We'll call this the connection + vhost. The connection vhost is constant over all requests + in a particular TCP/IP session -- that is, over all requests in + a KeepAlive/persistent session.

    + +

    For each request made on the connection the following + sequence of events further determines the actual vhost that + will be used to serve the request.

    + +

    check_fulluri: If the requestURI is an + absoluteURI, that is it includes http://hostname/, + then an attempt is made to determine if the hostname's address + (and optional port) match that of the connection vhost. If it + does then the hostname portion of the URI is saved as the + request_hostname. If it does not match, then the URI + remains untouched. Note: to achieve this + address comparison, the hostname supplied goes through a DNS + lookup unless it matches the ServerName or the + local IP address of the client's socket.

    + +

    parse_uri: If the URI begins with a protocol + (i.e., http:, ftp:) then the + request is considered a proxy request. Note that even though we + may have stripped an http://hostname/ in the + previous step, this could still be a proxy request.

    + +

    read_request: If the request does not have a + hostname from the earlier step, then any Host: + header sent by the client is used as the request hostname.

    + +

    check_hostalias: If the request now has a + hostname, then an attempt is made to match for this hostname. + The first step of this match is to compare any port, if one was + given in the request, against the Port field of + the connection vhost. If there's a mismatch then the vhost used + for the request is the connection vhost. (This is a bug, see + observations.)

    + +

    If the port matches, then httpd scans the list of vhosts + starting with the next server after the + connection vhost. This scan does not stop if there are any + matches, it goes through all possible vhosts, and in the end + uses the last match it found. The comparisons performed are as + follows:

    + +
      +
    • Compare the request hostname:port with the vhost + ServerName and Port.
    • + +
    • Compare the request hostname against any and all + addresses given in the VirtualHost directive for + this vhost.
    • + +
    • Compare the request hostname against the + ServerAlias given for the vhost.
    • +
    + +

    check_serverpath: If the request has no + hostname (back up a few paragraphs) then a scan similar to the + one in check_hostalias is performed to match any + ServerPath directives given in the vhosts. Note + that the last match is used regardless (again + consider the ordering of the virtual hosts).

    + +

    Observations

    + +
      +
    • It is difficult to define an IP-based vhost for the + machine's "main IP address". You essentially have to create a + bogus ServerName for the main_server that does + not match the machine's IPs.
    • + +
    • + During the scans in both check_hostalias and + check_serverpath no check is made that the + vhost being scanned is actually a name-based vhost. This + means, for example, that it's possible to match an IP-based + vhost through another address. But because the scan starts + in the vhost list at the first vhost that matched the local + IP address of the connection, not all IP-based vhosts can + be matched. + +

      Consider the config file above with three vhosts A, B, + C. Suppose that B is a named-based vhost, and A and C are + IP-based vhosts. If a request comes in on B or C's address + containing a header "Host: A" then it will be + served from A's config. If a request comes in on A's + address then it will always be served from A's config + regardless of any Host: header.

      +
    • + +
    • + Unless you have a _default_ vhost, it doesn't + matter if you mix name-based vhosts in amongst IP-based + vhosts. During the find_virtual_server phase + above no named-based vhost will be matched, so the + main_server will remain the connection vhost. Then scans + will cover all vhosts in the vhost list. + +

      If you do have a _default_ vhost, then you + cannot place named-based vhosts after it in the config. + This is because on any connection to the main server IPs + the connection vhost will always be the + _default_ vhost since none of the name-based + are considered during find_virtual_server.

      +
    • + +
    • You should never specify DNS names in + VirtualHost directives because it will force + your server to rely on DNS to boot. Furthermore it poses a + security threat if you do not control the DNS for all the + domains listed. There's more + information available on this and the next two + topics.
    • + +
    • ServerName should always be set for each + vhost. Otherwise A DNS lookup is required for each + vhost.
    • + +
    • A DNS lookup is always required for the main_server's + ServerName (or to generate that if it isn't + specified in the config).
    • + +
    • If a ServerPath directive exists which is a + prefix of another ServerPath directive that + appears later in the configuration file, then the former will + always be matched and the latter will never be matched. (That + is assuming that no Host header was available to disambiguate + the two.)
    • + +
    • If a vhost that would otherwise be a name-vhost includes + a Port statement that doesn't match the + main_server Port then it will be considered an + IP-based vhost. Then find_virtual_server will + match it (because the ports associated with each address in + the address set default to the port of the main_server) as + the connection vhost. Then check_hostalias will + refuse to check any other name-based vhost because of the + port mismatch. The result is that the vhost will steal all + hits going to the main_server address.
    • + +
    • If two IP-based vhosts have an address in common, the + vhost appearing later in the file is always matched. Such a + thing might happen inadvertently. If the config has + name-based vhosts and for some reason the main_server + ServerName resolves to the wrong address then + all the name-based vhosts will be parsed as ip-based vhosts. + Then the last of them will steal all the hits.
    • + +
    • The last name-based vhost in the config is always matched + for any hit which doesn't match one of the other name-based + vhosts.
    • +
    + +

    What Works

    + +

    In addition to the tips on the DNS Issues page, here are some + further tips:

    + +
      +
    • Place all main_server definitions before any VirtualHost + definitions. (This is to aid the readability of the + configuration -- the post-config merging process makes it + non-obvious that definitions mixed in around virtualhosts + might affect all virtualhosts.)
    • + +
    • Arrange your VirtualHosts such that all name-based + virtual hosts come first, followed by IP-based virtual hosts, + followed by any _default_ virtual host
    • + +
    • Avoid ServerPaths which are prefixes of + other ServerPaths. If you cannot avoid this then + you have to ensure that the longer (more specific) prefix + vhost appears earlier in the configuration file than the + shorter (less specific) prefix (i.e., "ServerPath + /abc" should appear after "ServerPath /abcdef").
    • + +
    • Do not use port-based vhosts in the same server + as name-based vhosts. A loose definition for port-based is a + vhost which is determined by the port on the server + (i.e., one server with ports 8000, 8080, and 80 - + all of which have different configurations).
    • +
    + + + + diff --git a/htdocs/manual/vhosts/virtual-host.html b/htdocs/manual/vhosts/virtual-host.html new file mode 100644 index 00000000000..e8a88143c5f --- /dev/null +++ b/htdocs/manual/vhosts/virtual-host.html @@ -0,0 +1,239 @@ + + + + + + + Apache Server Virtual Host Support + + + + + + +

    Virtual Host Support

    + See Also: Non-IP based + virtual hosts + +

    What are virtual hosts?

    + This is the ability of a single machine to be a web server for + multiple domains. For example, an Internet service provider + might have a machine called www.serve.com which + provides Web space for several organizations including, say, + smallco and baygroup. Ordinarily, these + groups would be given parts of the Web tree on www.serve.com. + So smallco's home page would have the URL + +
    + http://www.serve.com/smallco/ +
    + and baygroup's home page would have the URL + +
    + http://www.serve.com/baygroup/ +
    + +

    For esthetic reasons, however, both organizations would + rather their home pages appeared under their own names rather + than that of the service provider's; but they do not want to + set up their own Internet links and servers.

    + +

    Virtual hosts are the solution to this problem. smallco and + baygroup would have their own Internet name registrations, + www.smallco.com and www.baygroup.org + respectively. These hostnames would both correspond to the + service provider's machine (www.serve.com). Thus smallco's home + page would now have the URL

    + +
    + http://www.smallco.com/ +
    + and baygroup's home page would have the URL + +
    + http://www.baygroup.org/ +
    + +

    System requirements

    + Due to limitations in the HTTP/1.0 protocol, the web server + must have a different IP address for each virtual + host. This can be achieved by the machine having + several physical network connections, or by use of a virtual interface on some + operating systems. + +

    How to set up Apache

    + There are two ways of configuring apache to support multiple + hosts. Either by running a separate httpd daemon for each + hostname, or by running a single daemon which supports all the + virtual hosts. + +

    Use multiple daemons when:

    + +
      +
    • The different virtual hosts need very different httpd + configurations, such as different values for: ServerType, User, Group, TypesConfig or ServerRoot.
    • + +
    • The machine does not process a very high request + rate.
    • +
    + Use a single daemon when: + +
      +
    • Sharing of the httpd configuration between virtual hosts + is acceptable.
    • + +
    • The machine services a large number of requests, and so + the performance loss in running separate daemons may be + significant.
    • +
    + +

    Setting up multiple daemons

    + Create a separate httpd installation for each virtual host. For + each installation, use the BindAddress directive + in the configuration file to select which IP address (or + virtual host) that daemon services. E.g., + +
    + BindAddress www.smallco.com +
    + This hostname can also be given as an IP address. + +

    Setting up a single daemon

    + For this case, a single httpd will service requests for all the + virtual hosts. The VirtualHost directive + in the configuration file is used to set the values of ServerAdmin, ServerName, DocumentRoot, ErrorLog and TransferLog + configuration directives to different values for each virtual + host. E.g., + +
    + <VirtualHost www.smallco.com>
    + ServerAdmin webmaster@mail.smallco.com
    + DocumentRoot /groups/smallco/www
    + ServerName www.smallco.com
    + ErrorLog /groups/smallco/logs/error_log
    + TransferLog /groups/smallco/logs/access_log
    + </VirtualHost>
    +
    + <VirtualHost www.baygroup.org>
    + ServerAdmin webmaster@mail.baygroup.org
    + DocumentRoot /groups/baygroup/www
    + ServerName www.baygroup.org
    + ErrorLog /groups/baygroup/logs/error_log
    + TransferLog /groups/baygroup/logs/access_log
    + </VirtualHost>
    +
    +
    + This VirtualHost hostnames can also be given as IP addresses. + +

    Almost ANY configuration directive can be + put in the VirtualHost directive, with the exception of ServerType, User, Group, StartServers, MaxSpareServers, MinSpareServers, MaxRequestsPerChild, + BindAddress, PidFile, TypesConfig, and ServerRoot.

    + +

    SECURITY: When specifying where to write log files, + be aware of some security risks which are present if anyone + other than the user that starts Apache has write access to the + directory where they are written. See the security tips document + for details.

    + +

    File Handle/Resource Limits:

    + When using a large number of Virtual Hosts, Apache may run out + of available file descriptors if each Virtual Host specifies + different log files. The total number of file descriptors used + by Apache is one for each distinct error log file, one for + every other log file directive, plus 10-20 for internal use. + Unix operating systems limit the number of file descriptors + that may be used by a process; the limit is typically 64, and + may usually be increased up to a large hard-limit. + +

    Although Apache attempts to increase the limit as required, + this may not work if:

    + +
      +
    1. Your system does not provide the setrlimit() system + call.
    2. + +
    3. The setrlimit(RLIMIT_NOFILE) call does not function on + your system (such as Solaris 2.3)
    4. + +
    5. The number of file descriptors required exceeds the hard + limit.
    6. + +
    7. Your system imposes other limits on file descriptors, + such as a limit on stdio streams only using file descriptors + below 256. (Solaris 2)
    8. +
    + In the event of problems you can: + +
      +
    • Reduce the number of log files; don't specify log files + in the VirtualHost sections, but only log to the main log + files.
    • + +
    • + If you system falls into 1 or 2 (above), then increase the + file descriptor limit before starting Apache, using a + script like + +
      + #!/bin/sh
      + ulimit -S -n 100
      + exec httpd
      +
      +
    • +
    + The have been reports that Apache may start running out of + resources allocated for the root process. This will exhibit + itself as errors in the error log like "unable to fork". There + are two ways you can bump this up: + +
      +
    1. Have a csh script wrapper around httpd which + sets the "rlimit" to some large number, like 512.
    2. + +
    3. + Edit http_main.c to add calls to setrlimit() from main(), + along the lines of +
      +        struct rlimit rlp;
      +
      +        rlp.rlim_cur = rlp.rlim_max = 512;
      +        if (setrlimit(RLIMIT_NPROC, &rlp)) {
      +            fprintf(stderr, "setrlimit(RLIMIT_NPROC) failed.\n");
      +            exit(1);
      +        }
      +
      + (thanks to "Aaron Gifford <agifford@InfoWest.COM>" + for the patch) +
    4. +
    + The latter will probably manifest itself in a later version of + Apache. + + + diff --git a/htdocs/manual/win_compiling.html.en b/htdocs/manual/win_compiling.html.en new file mode 100644 index 00000000000..1c0ffd51681 --- /dev/null +++ b/htdocs/manual/win_compiling.html.en @@ -0,0 +1,263 @@ + + + + + + + Compiling Apache for Microsoft Windows + + + + + + +

    Compiling Apache for Microsoft Windows

    + +

    There are many important points before you begin compiling + Apache. See Using Apache with Microsoft + Windows before you begin.

    + +

    Compiling Apache requires Microsoft Visual C++ 5.0 or 6.0 to + be properly installed. It can be built with command-line tools, + or within the Visual Studio environment. Consult the VC++ + manual to determine how to install them. Be especially aware + that the vcvars32.bat file from the Program + Files/DevStudio/VC/bin folder, and the setenv.bat file from the + Platform SDK, may be required to prepare the command-line tools + for command-line builds (e.g. using nmake). To install apache + with the Makefile.win or the InstallBin project in the Visual + Studio IDE, the awk utility is also required. If you use Visual + Studio 7.0 (.net), loading Apache.dsw converts it to .msproj + format. When changes are made to the project (.dsp) files, you + must reconvert Apache.dsw all over again.

    + +

    First, you should install awk.exe where it can be found in + the path and the DevStudio environment, if you plan to use the + IDE. There are many versions of awk available for Windows; the + easiest to install is available from Brian Kernighan's http://cm.bell-labs.com/cm/cs/who/bwk/ + site. When downloading http://cm.bell-labs.com/cm/cs/who/bwk/awk95.exe + from this site, you must save it with the name awk.exe rather + than awk95.exe.

    + +

    Note that Developer Studio IDE will only find awk.exe from + the Tools menu Options... Directories tab + (the Projects - VC++ Directories pane in Developer Studio 7.0) + listing Executable file paths. Add the path for awk.exe to this + list, and your system PATH environment variable, as needed.

    + +

    Then unpack the Apache distribution into an appropriate + directory. Open a command-line prompt, and change to the + src subdirectory of the Apache distribution.

    + +

    The master Apache makefile instructions are contained in the + Makefile.win file. To compile Apache on Windows + NT, simply use one of the following commands:

    + +
      +
    • nmake /f Makefile.win _apacher (release + build)
    • + +
    • nmake /f Makefile.win _apached (debug + build)
    • +
    + +

    These will both compile Apache. The latter will include + debugging information in the resulting files, making it easier + to find bugs and track down problems.

    + +

    If you get an error such as "the name specified is not + recognized..." then you need to run vcvars32.bat first. Enter + the following command;

    +
    +  "c:\Program Files\DevStudio\VC\Bin\VCVARS32.BAT"
    +
    + +

    (you will need to adjust this command so it matches the + directory where your VC was installed.)

    + +

    If you are a Visual C++ 5.0 user, and have installed a + recent Platform SDK, you may also need to enter the following + command (adjusted for the install directory of the Platform SDK + update);

    +
    +  "c:\Program Files\Platform SDK\SETENV.BAT"
    +
    + +

    Then try the nmake command again.

    + +

    Note that the Windows Platform SDK update + is required to enable all supported mod_isapi features. The SDK + files distributed with Microsoft Visual C++ 5.0 are out of + date. Without a recent update, Apache will issue warnings under + MSVC++ 5.0 that some mod_isapi features will be disabled. Look + for the update at + http://msdn.microsoft.com/platformsdk/.

    + +

    Apache can also be compiled using VC++'s Visual Studio + development environment. To simplify this process, a Visual + Studio workspace, Apache.dsw, is provided in the + src folder. This workspace exposes the entire list + of working .dsp projects that are required for the complete + Apache binary release. It includes dependencies between the + projects to assure that they are built in the appropriate + order. InstallBin is the top-level project that will build all + other projects, and install the compiled files into their + proper locations.

    + +

    These .dsp project files are distributed in Visual C++ 6.0 + format. Visual C++ 5.0 (97) will recognize them with the single + exception of the /ZI flag, which corresponds to the VC 5.0 /Zi + flag for debugging symbols. To quickly prepare the .dsp files + for the Visual Studio 5.0 (97), you can use the perl scripts + distributed in the src\helpers folder:

    +
    +  cd src\helpers
    +  cvstodsp5.pl
    +
    + +

    This command assumes you have a Perl interpreter installed + and registered for files of type .pl. The list of converted + .dsp project files will be displayed as they are converted. If + you contribute back a patch that offers revised project files, + please convert them back with the script dsp5tocvs.pl, which + puts the projects back to Visual Studio 6.0 format.

    + +

    The core .dsp projects built by Apache.dsw and makefile.win + are:

    + +
      +
    • os\win32\ApacheOS.dsp
    • +
    • os\win32\Win9xConHook.dsp
    • +
    • regex\regex.dsp
    • +
    • ap\ap.dsp
    • +
    • lib\expat-lite\xmltok.dsp
    • +
    • lib\expat-lite\xmlparse.dsp requires + xmltok
    • +
    • lib\sdbm.dsp
    • +
    • main\gen_uri_delims.dsp
    • +
    • main\gen_test_char.dsp
    • +
    • ApacheCore.dsp requires all of the + above
    • +
    • Apache.dsp requires ApacheCore
    • +
    + +

    In addition, the os\win32 subdirectory contains + project files for the optional modules, all of which require + ApacheCore.

    + +
      +
    • os\win32\mod_auth_anon.dsp
    • +
    • os\win32\mod_auth_dbm.dsp also requires + sdbm
    • +
    • os\win32\mod_auth_digest.dsp
    • +
    • os\win32\mod_cern_meta.dsp
    • +
    • os\win32\mod_digest.dsp
    • +
    • os\win32\mod_expires.dsp
    • +
    • os\win32\mod_headers.dsp
    • +
    • os\win32\mod_info.dsp
    • +
    • os\win32\mod_mime_magic.dsp
    • +
    • os\win32\mod_proxy.dsp
    • +
    • os\win32\mod_rewrite.dsp
    • +
    • os\win32\mod_speling.dsp
    • +
    • os\win32\mod_status.dsp
    • +
    • os\win32\mod_unique_id.dsp
    • +
    • os\win32\mod_usertrack.dsp
    • +
    • os\win32\mod_vhost_alias.dsp
    • +
    + +

    The support\ folder contains project files for + additional programs that are not part of the Apache runtime, + but are used by the administrator to maintain password and log + files.

    + +
      +
    • support\htdigest.dsp
    • +
    • support\htpasswd.dsp
    • +
    • support\logresolve.dsp
    • +
    • support\rotatelogs.dsp
    • +
    + +

    Once Apache has been compiled, it needs to be installed in + its server root directory. The default is the + \Apache directory, on the current hard drive.

    + +

    To install the files into the c:\ServerRoot + directory automatically, use one of the following nmake commands + (see above):

    + +
      +
    • nmake /f Makefile.win installr + INSTDIR=c:\ServerRoot (for release + build)
    • +
    • nmake /f Makefile.win installd + INSTDIR=c:\ServerRoot (for debug build)
    • +
    + +

    The c:\ServerRoot argument to INSTDIR gives the + installation directory (it can be omitted if Apache is to be + installed into \Apache).

    + +

    This will install the following:

    + +
      +
    • c:\ServerRoot\Apache.exe - Apache + program
    • +
    • c:\ServerRoot\ApacheCore.dll - + Apache runtime [shared library]
    • +
    • c:\ServerRoot\Win9xConHook.dll - + Win9x console fixups [shared library]
    • +
    • c:\ServerRoot\xmlparse.dll - XML + parser [shared library]
    • +
    • c:\ServerRoot\xmltok.dll - XML + token engine [shared library]
    • +
    • c:\ServerRoot\bin\*.exe - + Administration programs
    • +
    • c:\ServerRoot\cgi-bin - Example CGI + scripts
    • +
    • c:\ServerRoot\conf - Configuration + files directory
    • +
    • c:\ServerRoot\icons - Icons for + FancyIndexing
    • +
    • c:\ServerRoot\include\*.h - Apache + header files
    • +
    • c:\ServerRoot\htdocs - Welcome + index.html pages
    • +
    • c:\ServerRoot\htdocs\manual - + Apache documentation
    • +
    • c:\ServerRoot\lib - Static library + files
    • +
    • c:\ServerRoot\libexec - Dynamic + link libraries
    • +
    • c:\ServerRoot\logs - Empty logging + directory
    • +
    • c:\ServerRoot\modules\mod_*.dll - + Loadable Apache modules
    • +
    + +

    If you do not have nmake, or wish to install in a different + directory, be sure to use a similar naming scheme.

    + +

    To simplify the process, dependencies between all projects + are defined in the Microsoft Visual Studio workspace file:

    +
    +   src/Apache.dsw
    +
    + +

    This assures that lower-level sources are rebuilt from + within Visual Studio. The top level project is InstallBin, + which invokes Makefile.win to move the compiled executables and + dlls. You may personalize the INSTDIR= setting by changing the + Settings for InstallBin, Build command line entry under the + General tab. The default from within the InstallBin.dsp project + is one level up (..) from the src tree. Modify the InstallBin + settings and edit the INSTDIR=.. entry to the desired target + directory.

    + + + + diff --git a/htdocs/manual/win_compiling.html.html b/htdocs/manual/win_compiling.html.html new file mode 100644 index 00000000000..35a053bc01f --- /dev/null +++ b/htdocs/manual/win_compiling.html.html @@ -0,0 +1,4 @@ + + + diff --git a/htdocs/manual/win_compiling.html.ja.jis b/htdocs/manual/win_compiling.html.ja.jis new file mode 100644 index 00000000000..84f713f96c4 --- /dev/null +++ b/htdocs/manual/win_compiling.html.ja.jis @@ -0,0 +1,268 @@ + + + + + + Microsoft Windows $B$G$N(B Apache $B$N%3%s%Q%$%k(B + + + + + + + +

    Microsoft Windows $B$G$N(B Apache $B$N%3%s%Q%$%k(B

    + +

    Apache $B$N%3%s%Q%$%k$r;O$a$k$K$"$?$C$F!"B?$/$N=EMW$J%]%$%s%H$,$"$j$^$9!#(B + $B;O$a$kA0$K!"(BMicrosoft Windows $B$G$N(B Apache + $B$N;HMQ(B$B$r8+$F$/$@$5$$!#(B

    + +

    Apache $B$r%3%s%Q%$%k$9$k$K$O(B Microsoft Visual C++ 5.0 + $B$^$?$O(B 6.0 $B$,E,@Z$K%$%s%9%H!<%k$5$l$F$$$k$3$H$,I,MW$G$9!#(B + $B%S%k%I$O%3%^%s%I%i%$%s%D!<%k!"$^$?$O(B Visual Studio + $B4D6-$G2DG=$G$9!#%$%s%9%H!<%k$NJ}K!$O!"(BVC++ + $B$N%^%K%e%"%k$r;29M$K$7$F$/$@$5$$!#%3%^%s%I%i%$%s$G$N%S%k%I(B + ($BNc$($P(B nmake $B$N;HMQ(B)$B$G$O!"%3%^%s%I%i%$%s%D!<%k$N=`Hw$K(B Program + Files/DevStudio/VC/bin $B%U%)%k%@$K$"$k(B vcvars32.bat $B5Z$S(B Platform + SDK $B$N(B setenv.bat $B$N%U%!%$%k$,I,MW$K$J$k$G$"$m$&$3$H$K$D$$$F!"(B + $BFC$KCm0U$7$F$/$@$5$$!#(BMakefile.win $B$d(B Visual Studio IDE $B$N(B + InstallBin $B%W%m%8%'%/%H$r;H$C$F(B Apache $B$r%$%s%9%H!<%k$9$k>l9g$O!"(B + awk $B%f!<%F%#%j%F%#$bI,MW$K$J$j$^$9!#(BVisual Studio 7.0 (.net) + $B$r;H$&>l9g$O!"(BApache.dsw $B$rFI$_9~$_(B .msproj + $B%U%)!<%^%C%H$KJQ49$7$F$/$@$5$$!#%W%m%8%'%/%H%U%!%$%k(B (.dsp) + $B$KJQ99$,$"$C$?>l9g$O(B Apache.dsw + $B$r0l$+$iJQ49$7D>$5$J$1$l$P$J$j$^$;$s!#(B

    + +

    $B$^$:!"(BIDE $B$r;H$&$D$b$j$J$i%Q%9$,DL$j!"(BDevStudio + $B4D6-$,2rhttp://cm.bell-labs.com/cm/cs/who/bwk/ $B%5%$%H$+$iF~http://cm.bell-labs.com/cm/cs/who/bwk/awk95.exe + $B$r%@%&%s%m!<%I$7$?>l9g$O!"(Bawk95.exe $B$r(B awk.exe + $B$H$$$&L>A0$GJ]B8$7$J$1$l$P$J$j$^$;$s!#(B

    + +

    Developer Studio IDE $B$O%D!<%k(B (T) $B%a%K%e!<$N%*%W%7%g%s(B + (O) $B0J2<$N!"%G%#%l%/%H%j%?%V(B (Developer Studio 7.0 $B$G$O(B + Projects - VC++ Directories) + $B$Nl=j$K$"$k>l9g$K$N$_!"(Bawk.exe + $B$r8+$D$1$i$l$k$3$H$KCm0U$7$F$/$@$5$$!#I,MW$K1~$8!"(Bawk.exe + $B$X$N%Q%9$r$3$N%j%9%H!"%7%9%F%`$N4D6-JQ?t(B PATH $B$KDI2C$7$F$/$@$5$$!#(B

    + +

    $B$=$l$+$i!"E,@Z$J%G%#%l%/%H%j$K(B Apache $B$NG[I[$rE83+$7$F$/$@$5$$!#(B + $B%3%^%s%I%W%m%s%W%H$r3+$-!"(BApache $BG[I[%5%V%G%#%l%/%H%j(B + src $B$K0\F0$7$F$/$@$5$$(B

    + +

    Makefile.win $B%U%!%$%k$K$O(B Apache $B$N(B makefile + $B$N85$H$J$k;X<($,4^$^$l$F$$$^$9!#(BWindowsNT $B$G(B Apache + $B$r%3%s%Q%$%k$9$k$K$O!"C1$K0J2<$N%3%^%s%I$N$&$A$N0l$D$r;H$C$F$/$@$5$$(B

    + +
      +
    • nmake /f Makefile.win _apacher + ($B%j%j!<%9%S%k%I(B)
    • + +
    • nmake /f Makefile.win _apached + ($B%G%P%C%0%S%k%I(B)
    • +
    + +

    $B$3$l$i$O$I$A$i$b(B Apache $B$r%3%s%Q%$%k$7$^$9!#(B + $B8epJs$,4^$^$l!"(B + $B%P%0$r8+$D$1$?$jLdBj$rDI@W$7$?$j$7$d$9$/$J$j$^$9!#(B

    + +

    $B$b$7!"!V(B...$B$H$7$FG'<1$5$l$F$$$^$;$s!W(B + $B$N$h$&$J%(%i!<$,=P$?>l9g$O$^$:!"(Bvcvars32.bat $B$r +

    +  "c:\Program Files\DevStudio\VC\Bin\VCVARS32.bat"
    +
    + +

    ($B$3$N%3%^%s%I$O(B VC $B$,%$%s%9%H!<%k$5$l$?%G%#%l%/%H%j$K9g$o$;$F(B + $BD4@0$9$kI,MW$,$"$j$^$9!#(B)

    + +

    Visual C++ 5.0 $B%f!<%6$G!"$+$D!":G6a$N%W%i%C%H%U%)!<%`(B SDK + $B$r%$%s%9%H!<%k$7$F$$$k>l9g$O!"0J2<$N%3%^%s%I$rF~NO$9$kI,MW$,$"$k$G$7$g$&(B + (Platform SDK $B%"%C%W%G!<%H$,%$%s%9%H!<%k$5$l$F$$$k%G%#%l%/%H%j$K9g$o$;$F(B + $BD4@0$9$kI,MW$,$"$j$^$9(B)

    +
    +  "c:\Program Files\Platform SDK\SETENV.BAT"
    +
    + +

    $B$=$l$+$i!":F$S(B nmake $B%3%^%s%I$r;n$7$F$/$@$5$$!#(B

    + +

    $B%5%]!<%H$5$l$?$9$Y$F$N(B mod_isapi $B5!G=$rM-8z$K$9$k$K$O(B Windows + Platform SDK $B$N99?7$,I,MW$K$J$k$3$H$K(B$BCm0U$7$F$/$@$5$$(B$B!#(B + Microsoft Visual C++ 5.0 $B$H$H$b$KG[I[$5$l$?(B SDK $B%U%!%$%k$O8E$$$?$a$K(B + $B;H$($^$;$s!#(B + $B:G6a$N%"%C%W%G!<%H$,$J$5$l$F$$$J$$>l9g!"(BApache $B$O(B MSVC++ 5.0 $B$G$O!"(B + mod_isapi $B5!G=$,$$$/$D$+;HMQIT2D$K$J$k$3$H$r7Y9p$7$^$9!#(B + $B%"%C%W%G!<%H$K4X$7$F$O(B http://msdn.micro soft.com/platformsdk/ $B$GC5$7$F$/$@$5$$!#(B

    + +

    Apache $B$O!"(BVC++ $B$N(B Visual Studio $B3+H/4D6-$r;H$C$F%3%s%Q%$%k(B + $B$9$k$3$H$b$G$-$^$9!#$3$N%W%m%;%9$r4JAG2=$9$k$?$a$K!"(BVisual Studio + workspace (Apache.dsw) $B$,(B src $B%U%)%k%@$K$*$$$F(B + $BDs6!$5$l$F$$$^$9!#(B + $B$3$N(B workspace $B$O!"40A4$J(B Apache $B$N%P%$%J%j%j%j!<%9$KI,MW$J(B .dsp + $B%W%m%8%'%/%H$NA4BN$N%j%9%H$,=q$+$l$F$$$^$9!#(B + $B$^$?!"$=$l$i$,E,@Z$J=g=x$G%S%k%I$5$l$k$h$&$K$9$k$?$a$K!"(B + $B%W%m%8%'%/%H$N4V$N0MB84X78$b4^$^$l$F$$$^$9!#(B + InstallBin $B$,!"B>$N$9$Y$F$N%W%m%8%'%/%H$r%S%k%I$7!"(B + $B%3%s%Q%$%k$5$l$?%U%!%$%k$rE,@Z$J0LCV$K%$%s%9%H!<%k$9$k!"(B + $B%H%C%W%l%Y%k$N%W%m%8%'%/%H$G$9!#(B

    + +

    $B$3$l$i$N(B .dsp $B%W%m%8%'%/%H%U%!%$%k$O(B Visual C++ 6.0 + $B$N%U%)!<%^%C%H$GG[I[$5$l$^$9!#(BVisual C++ 5.0(97) $B$O(B + $BM#0l$NNc30!"%G%P%C%0%7%s%\%kMQ$N%U%i%0$G$"$k(B /ZI + $B%U%i%0$r=|$$$F$3$N%U%)!<%^%C%H$rG'<1$7$^$9!#(B + VC 5.0 $B$G$O(B /Zi $B%U%i%0$,$3$l$KAjEv$7$^$9!#(B + Visual Studio 5.0 (97) $B$N(B .dsp $B%U%!%$%k$r$9$0$K=`Hw$9$k$K$O!"(B + src\helpers $B%U%)%k%@$K$FG[I[$5$l$F$$$k(B perl + $B%9%/%j%W%H$r;H$&$3$H$,$G$-$^$9(B

    +
    +  cd src\helpers
    +  cvstodsp5.pl
    +
    + +

    $B$3$N%3%^%s%I$O!"(BPerl $B%$%s%?%W%j%?$,%$%s%9%H!<%k$5$l$F$$$F!"(B + .pl $B$N%U%!%$%k%?%$%W$,EPO?$5$l$F$$$k$H2>Dj$7$^$9!#JQ49$5$l$?(B .dsp + $B%W%m%8%'%/%H%U%!%$%k$N%j%9%H$O$=$l$i$,JQ49$5$l$k$K$D$l$FI=<($5$l$F$$$-$^$9!#(B + $B2~D{$5$l$?%W%m%8%'%/%H%U%!%$%k$rDs6!$9$k%Q%C%A$r4sM?$9$k$H$-$O!"(B + Visual Studio6.0 $B%U%)!<%^%C%H$K%W%m%8%'%/%H$rLa$9%9%/%j%W%H(B + dsp5tocvs.pl $B$K$h$C$F$=$l$i$rJQ49$7$F$/$@$5$$!#(B

    + +

    Apache.dsw $B5Z$S(B makefile.win $B$K$h$j%S%k%I$5$l$k%3%"$N(B .dsp + $B%W%m%8%'%/%H$O0J2<$NDL$j$G$9(B

    + +
      +
    • os\win32\ApacheOS.dsp
    • +
    • os\win32\Win9xConHook.dsp
    • +
    • regex\regex.dsp
    • +
    • ap\ap.dsp
    • +
    • lib\expat-lite\xmltok.dsp
    • +
    • lib\expat-lite\xmlparse.dsp xmltok $B$,I,MW(B
    • +
    • lib\sdbm.dsp
    • +
    • main\gen_uri_delims.dsp
    • +
    • main\gen_test_char.dsp
    • +
    • ApacheCore.dsp $B0J>eA4$F$,I,MW(B
    • +
    • Apache.dsp ApacheCore $B$,I,MW(B
    • +
    + +

    $B$5$i$K(B os\win32 $B%5%V%G%#%l%/%H%j$K$O!"(B + $B%*%W%7%g%s$N%b%8%e!<%k$9$Y$F$N%W%m%8%'%/%H%U%!%$%k$,4^$^$l$^$9!#(B + $B$3$l$i$O$9$Y$F(B ApacheCore $B$rI,MW$H$7$^$9!#(B +

    + +
      +
    • os\win32\mod_auth_anon.dsp
    • +
    • os\win32\mod_auth_dbm.dsp sdbm $B$bI,MW(B
    • +
    • os\win32\mod_auth_digest.dsp
    • +
    • os\win32\mod_cern_meta.dsp
    • +
    • os\win32\mod_digest.dsp
    • +
    • os\win32\mod_expires.dsp
    • +
    • os\win32\mod_headers.dsp
    • +
    • os\win32\mod_info.dsp
    • +
    • os\win32\mod_mime_magic.dsp
    • +
    • os\win32\mod_proxy.dsp
    • +
    • os\win32\mod_rewrite.dsp
    • +
    • os\win32\mod_speling.dsp
    • +
    • os\win32\mod_status.dsp
    • +
    • os\win32\mod_unique_id.dsp
    • +
    • os\win32\mod_usertrack.dsp
    • +
    • os\win32\mod_vhost_alias.dsp
    • +
    + +

    support\ $B%U%)%k%@$O!"(BApache + $B%i%s%?%$%`$N0lIt$G$O$J$$$1$l$I$b!"%Q%9%o!<%I$H%m%0%U%!%$%k$r(B + $B4IM}$9$k$?$a$K!"4IM} + +

      +
    • support\htdigest.dsp
    • +
    • support\htpasswd.dsp
    • +
    • support\logresolve.dsp
    • +
    • support\rotatelogs.dsp
    • +
    + +

    Apache $B$,%3%s%Q%$%k$G$-$?$i%5!<%P%k!<%H%G%#%l%/%H%j$K%$%s%9%H!<%k(B + $B$9$kI,MW$,$"$j$^$9!#%G%U%)%k%H$O8=:_$N%O!<%I%G%#%9%/$N%G%#%l%/%H%j(B + \Apache $B$G$9!#(B

    + +

    $B<+F0E*$K(B c:\ServerRoot + $B$K%U%!%$%k$r%$%s%9%H!<%k$9$k$K$O!"0J2<$N(B nmake + $B%3%^%s%I(B($B>eIt;2>H(B)$B$N$I$A$i$+$r;H$C$F$/$@$5$$!#(B

    + +
      +
    • nmake /f Makefile.win installr + INSTDIR=c:\ServerRoot ($B%j%j!<%9HG%S%k%IMQ(B) +
    • +
    • nmake /f Makefile.win installd + INSTDIR=c:\ServerRoot ($B%G%P%C%0HG%S%k%IMQ(B)
    • +
    + +

    INSTDIR $B$X$N(Bc:\ServerRoot + $B0z?t$,%$%s%9%H!<%k%G%#%l%/%H%j$r;XDj$7$^$9(B (Apache $B$r(B \Apache + $B$K%$%s%9%H!<%k$9$k>l9g$O>JN,2D(B)$B!#(B

    + +

    $B$3$l$K$h$j0J2<$,%$%s%9%H!<%k$5$l$^$9(B

    + +
      +
    • c:\ServerRoot\Apache.exe - Apache + $B%W%m%0%i%`(B
    • +
    • c:\ServerRoot\ApacheCore.dll - + Apache $B%i%s%?%$%`(B [$B6&M-%i%$%V%i%j(B]
    • +
    • c:\ServerRoot\Win9xConHook.dll - + Win9x console fixups [$B6&M-%i%$%V%i%j(B]
    • +
    • c:\ServerRoot\xmlparse.dll - XML + $B%Q!<%5(B [$B6&M-%i%$%V%i%j(B]
    • +
    • c:\ServerRoot\xmltok.dll - XML + $B%H!<%/%s%(%s%8%s(B [$B6&M-%i%$%V%i%j(B]
    • +
    • c:\ServerRoot\bin\*.exe - + $B4IM}MQ%W%m%0%i%`(B
    • +
    • c:\ServerRoot\cgi-bin - CGI + $B%9%/%j%W%H$NNc(B
    • +
    • c:\ServerRoot\conf - $B@_Dj%U%!%$%k(B + $B%G%#%l%/%H%j(B
    • +
    • c:\ServerRoot\icons - FancyIndexing + $BMQ$N%"%$%3%s(B
    • +
    • c:\ServerRoot\include\*.h - Apache + $B%X%C%@%U%!%$%k(B
    • +
    • c:\ServerRoot\htdocs - $B$h$&$3$=!"$N(B + index.html $B%Z!<%8(B
    • +
    • c:\ServerRoot\htdocs\manual - + Apache $B%I%-%e%a%s%H(B
    • +
    • c:\ServerRoot\lib - $B@EE*%i%$%V%i%j(B +
    • +
    • c:\ServerRoot\libexec - $BF0E*%i%$%V%i%j(B +
    • +
    • c:\ServerRoot\logs - $B6u$N%m%0%G%#%l%/%H%j(B +
    • +
    • c:\ServerRoot\modules\mod_*.dll - + $B%m!<%I2DG=$J(B Apache $B%b%8%e!<%k(B
    • +
    + +

    $B$b$7(B nmake $B$r;}$C$F$$$J$$$+!"0c$&%G%#%l%/%H%j$K%$%s%9%H!<%k(B + $B$7$?$$>l9g$O!"I,$:F1MM$NL?L>BN7O$r;H$C$F$/$@$5$$!#(B

    + +

    $B%W%m%;%9$N4JAG2=$N$?$a$9$Y$F$N%W%m%8%'%/%H$N4V$N0MB84X78$O(B + Microsoft Visual Studio workspace $B%U%!%$%k$K$*$$$FDj5A$5$l$F$$$^$9(B

    +
    +   src/Apache.dsw
    +
    + +

    $B$3$l$O!"$h$jDc0L$N%=!<%9$O(B Visual Studio + $BFb$G:F%S%k%I$5$l$k$3$H$rJ]>Z$7$^$9!#:G>e0L$N%W%m%8%'%/%H$O(B InstallBin + $B$G$"$j!"(BMakefile.win $B$re(B (..) $B$G$9!#(BInstallBin $B@_Dj$r=$@5$7!"(B + INSTDIR= $B$rL\E*$N%G%#%l%/%H%j$X$HJT=8$7$F$/$@$5$$!#(B +

    + + + diff --git a/htdocs/manual/win_service.html.en b/htdocs/manual/win_service.html.en new file mode 100644 index 00000000000..00598223adf --- /dev/null +++ b/htdocs/manual/win_service.html.en @@ -0,0 +1,435 @@ + + + + + + + Running Apache for Windows as a Service + + + + + + +

    Running Apache for Windows as a Service

    + +

    Apache can be run as a service on Windows NT/2000. (There is + also some experimental support for similar behavior on + Windows 95/98, introduced with Apache + 1.3.13).

    + +

    Installing Apache as a service should only be done once you + can successfully run it in a console window. See Using Apache with Microsoft Windows + before you attempt to install or run Apache as a service. + Changes to the httpd.conf file should always be followed by + starting Apache as a console window. If this succeeds, the + service should succeed.

    + +

    NOTE: Prior to version 1.3.13, the configuration was + not tested prior to performing the + installation, and a lack of service dependencies often + caused the console window to succeed, but the service would + still fail. See below if you are having + problems running a version of Apache prior to 1.3.13 to resolve + the issue. If you have this problem with version 1.3.13 or + greater, first try uninstalling (-u) and re-installing (-i) the + Apache service. Better yet, upgrade to the most recent version.

    +
    + +

    To start Apache as a service, you first need to install it + as a service. Multiple Apache services can be installed, each + with a different name and configuration. To install the default + Apache service named "Apache", choose the "Install as Service for + All Users" option when launching the Apache installation package. + Once this is done you can start the "Apache" service by opening + the Services window (in the Control Panel, hidden in "Administrative + Tools" on Windows 2000), selecting Apache, then clicking + on Start. Apache will now be running, hidden in the background. + You can later stop Apache by clicking on Stop. As an + alternative to using the Services window, you can start and + stop the "Apache" service from the command line with

    +
    +  NET START APACHE
    +  NET STOP APACHE
    +
    + +

    See Controlling Apache as a Service + for more information on installing and controlling Apache + services.

    + +

    Apache, unlike many other Windows NT/2000 services, + logs most errors to its own error.log file, in the logs folder + within the Apache server root folder. You will find few Apache + error details in the Windows NT Event Log. Only errors as + Apache attempts to start are captured in the Application Event + Log.

    + +

    After starting Apache as a service (or if you have trouble + starting it) you can test it using the same procedure as for running in a + console window. Remember to use the command:

    +
    +  apache -n "service name"
    +
    + +

    to assure you are using the service's default + configuration.

    + +

    Running Apache for Windows + as a Service

    + +

    Note: The -n option to specify a service name is + only available with Apache 1.3.7 and later. Earlier + versions of Apache only support the default service name + 'Apache'. Only version 1.3.21 supports Windows 2000 ability + to 'rename' the display name of a service.

    + +

    You can install Apache as a Windows NT service as + follows:

    +
    +    apache -i -n "service name"
    +
    + +

    To install a service to use a particular configuration, + specify the configuration file when the service is + installed:

    +
    +    apache -i -n "service name" -f "\my server\conf\my.conf"
    +
    + +

    You can pass any other arguments, such as -d to change the + default server root directory, -D, -C or -c to change config + file processing, etc. Since these are stored in the registry + and are difficult to modify, use this command to clear the + options and replace them with a new list of options;

    +
    +    apache -k config -n "service name" -f "\my server\conf\my.conf"
    +
    + +

    To remove an Apache service, use:

    +
    +    apache -u -n "service name"
    +
    + +

    The default "service name", if one is not specified, is + "Apache".

    + +

    Once a service is installed, you can use the -n + option, in conjunction with other options, to refer to a + service's configuration file. For example:

    + +

    To test a service's configuration file and report the + default options for the service (configured with -i, -k install + or -k config) use:

    +
    +    apache -n "service name" -t
    +
    + +

    To start a console Apache using a service's configuration + file and its default options, use:

    +
    +    apache -n "service name"
    +
    + +

    Effective with Apache release 1.3.15, the -k install option + was added as an alias to -i, and the -k uninstall option was + added as an alias to -u. The original -i and -u options are + deprecated in Apache 2.0. These aliases were added to ease the + transition for administrators running both versions.

    + +

    Important Note on service + dependencies:

    + +

    Prior to Apache release 1.3.13, the dependencies required to + successfully start an installed service were not configured. + After installing a service using earlier versions of Apache, + you must follow these steps:

    +
    +    Run regedt32
    +    Select Window - "HKEY_LOCAL_MACHINE on Local Machine" from the menu
    +    Double-click to open the SYSTEM, then the CurrentControlSet keys
    +    Scroll down and click on the Apache servicename
    +    Select Edit - Add Value... from the menu
    +    Fill in the Add Value dialog with 
    +        Value Name: DependOnGroup 
    +        Data Type: REG_MULTI_SZ
    +        and click OK
    +    Leave the Multi-String Editor dialog empty and click OK
    +    Select Edit - Add Value... from the menu
    +    Fill in the Add Value dialog with 
    +        Value Name: DependOnService
    +        Data Type: REG_MULTI_SZ
    +        and click OK
    +    Type the following list (one per line) in the Multi-String Editor dialog
    +        Tcpip
    +        Afd
    +        and click OK
    +
    + +

    If you are using COM or DCOM components from a third party + module, ISAPI, or other add-in scripting technologies such as + ActiveState Perl, you may also need to add the entry Rpcss to + the DependOnService list. To avoid exposing the TCP port 135 + when it is unnecessary, Apache does not create that entry upon + installation. Follow the directions above to find or create the + DependOnService value, double click that value if it already + exists, and add the Rpcss entry to the list.

    + +

    Other installations may require additional dependencies. + If any files required at startup reside on a network drive, you + may need to first configure the service to depend on the network + redirector (usually lanmanworkstation) and follow the directions + below under the "User Account for Apache Service to Run As" section.

    + +

    Attempting to use both IIS and Apache, on the same port but on + two different IP addresses may require the W3SVC (IIS) to start prior + to Apache, because IIS tries to glom onto all IP addresses (0.0.0.0) + as it starts, and will fail if Apache has already started on a + specific IP address.

    + +

    Apache 1.3.21 introduces a MUCH simpler way to add a dependency. + The -W "servicename" argument modifies the -k install or -k config + commands to configure a dependency for Apache. Multiple -W arguments + may be given, but they should all occur after the -k option. + For example, to add the LanmanWorkstation dependency to an installed + "Apache" service, use this command:

    +
    +    apache -k config -n Apache -W LanmanWorkstation
    +
    + +

    User Account for Apache Service to Run As (NT/2000)

    + +

    When Apache is first installed as a service (e.g. with the + -i option) it will run as user "System" (the LocalSystem + account). There should be few issues if all resources for the + web server reside on the local system, but it has broad + security privileges to affect the local machine!

    + +
    + LocalSystem is a very privileged account locally, so you + shouldn't run any shareware applications there. However, it + has no network privileges and cannot leave the machine via + any NT-secured mechanism, including file system, named pipes, + DCOM, or secure RPC. +
    + +

    NEVER grant network privileges to the SYSTEM + account! Create a new user account instead, grant the + appropriate privileges to that user, and use the 'Log On As:' + option. Select the Start Menu -> Settings -> Control + Panel -> Services -> apache service ... and click the + "Startup" button to access this setting.

    + +
    + A service that runs in the context of the LocalSystem account + inherits the security context of the SCM. It is not + associated with any logged-on user account and does not have + credentials (domain name, user name, and password) to be used + for verification. +
    + +

    The SYSTEM account has no privileges to the network, so + shared pages or a shared installation of Apache is invisible to + the service. If you intend to use any network + resources, the following steps should help:

    + +
      +
    • Select Apache from the Control Panel's Service dialog and + click Startup.
    • + +
    • Verify that the service account is correct. You may wish + to create an account for your Apache services.
    • + +
    • Retype the password and password confirmation.
    • + +
    • Go to User Manager for Domains.
    • + +
    • Click on Policies from the title bar menu, and select + User Rights.
    • + +
    • Select the option for Advanced User Rights.
    • + +
    • + In the drop-down list, verify that the following rights + have been granted to the selected account: + +
        +
      • Act as part of the operating system
      • + +
      • Back up files and directories
      • + +
      • Log on as a service
      • + +
      • Restore files and directories
      • +
      +
    • + +
    • Confirm that the selected account is a member of the + Users group.
    • + +
    • Confirm the selected account has access to all document + and script directories (minimally read and browse + access).
    • + +
    • Confirm the selected account has read/write/delete access + to the Apache logs directory!
    • +
    + +

    If you allow the account to log in as a user, then you can + log in yourself and test that the account has the privileges to + execute the scripts, read the web pages, and that you can start + Apache in a console window. If this works, and you have + followed the steps above, Apache should execute as a service + with no problems.

    + +

    Note: error code 2186 is a good indication + that you need to review the 'Log On As' configuration, since + the server can't access a required network resource.

    + +

    Troubleshooting Apache for + Windows as a Service

    + +

    When starting Apache as a service you may encounter an error + message from Windows service manager. For example if you try to + start Apache using the Services applet in Windows Control Panel + you may get the following message;

    +
    +  Could not start the apache service on \\COMPUTER
    +  Error 1067; The process terminated unexpectedly.
    +
    + +

    You will get this error if there is any problem starting + Apache. In order to see what is causing the problem you should + follow the instructions for Testing + Apache at the Command Prompt.

    + +

    Also, Apache 1.3.13 now records startup errors in the + Application Event Log under Windows NT/2000, if Apache is run + as a service. Run the Event Viewer and select Log ... + Application to see these events.

    + +

    Check the Application Event Log with the Event + Viewer in case of any problems, even if no error message pops + up to warn you that an error occurred.

    + +

    Running Apache for Windows + from the Command Line

    + For details on controlling Apache service from the command + line, please refer to console + command line section. + +

    Controlling Apache as a + Service

    + +

    Multiple instances of Apache can be installed and run as + services. Signal an installed Apache service to start, restart, + or shutdown/stop as follows:

    +
    +    apache -n "service name" -k start
    +    apache -n "service name" -k restart
    +    apache -n "service name" -k shutdown
    +    apache -n "service name" -k stop
    +
    + +

    For the default "Apache" service, the -n Apache option is + still required, since the -k commands without the -n option are + directed at Apache running in a console window. The quotes are + only required if the service name contains spaces.

    + +

    Note: the -k stop alias for the -k shutdown command + was introduced in Apache version 1.3.13. Earlier + versions of Apache will only recognize the -k shutdown option. + Prior to 1.3.3, Apache did not recognize any -k + options at all!

    + +

    Note that you may specify startup options on the apache -k + start command line, including the -D, -C and -c options. These + affect the processing of the service configuration, and may be + used with an <IfDefine> block to conditionally process + directives. You may also override the server root path or + configuration file with the -d or -f options. The options + should also be passed to the -k restart command, but they are + ignored if the service is running, and only processed if the + service is started.

    + +

    The service also appears in the Service Control applet on + Windows NT/2000. For NT, this is found in the Settings -> + Control Panel -> Services entry, and on 2000 it is found in + the Settings -> Control Panel -> Administrative Tools + -> Services entry. Here you can select the desired Apache + service to start or stop it. Pass additional options such as + -D, -C and -c, or override the default -d or -f options in the + Start Parameters box before clicking the Start button. These + options behave identically to the apache -k start command.

    + +

    In addition, you can use the native Windows NT/2000 command + NET to start and stop Apache services:

    +
    +    NET START "service name"
    +    NET STOP "service name"
    +
    + +

    Again, quotes are only required if the service name contains + spaces. There is no way using the NET START command to pass + additional options such as -D, -c or -C using the NET START + command. If options are required, use one of the other two + methods instead.

    + +

    Experimental + Windows 95/98 Service

    + +

    Note: The service options for Windows 95 and 98 are + only available with Apache 1.3.13 and later. Earlier + versions of Apache only supported Apache in a console window + for Windows 95/98.

    + +

    There is some support for Apache on Windows 95/98 to behave + in a similar manner as a service on Windows NT/2000. It is + experimental, if it works (at all) the Apache + Software Foundation will not attest to its reliability or + future support. Proceed at your own risk!

    + +

    Once you have confirmed that Apache runs correctly at the Command Prompt you can install, + control and uninstall it with the same commands as the Windows + NT/2000 version.

    + +

    There are, however, significant differences that you should + note:

    + +

    Apache will attempt to start and if successful it will run + in the background. If you run the command

    +
    +   Apache -n "service name" -k start
    +
    + +

    via a shortcut on your desktop, for example, then if the + service starts successfully a console window will flash up but + immediately disappears. If Apache detects any errors on startup + such as a incorrect entries in the httpd.conf file, then the + console window will remain visible. This may display an error + message which will be useful in tracking down the cause of the + problem, and you should also review the error.log file in the + Apache logs directory.

    + +

    Windows 95/98 does not support NET START or NET STOP + commands so you must use Apache's Service Control options at a + command prompt. You may wish to set up a shortcut for each of + these commands so that you can just choose it from the start + menu or desktop to perform the required action.

    + +

    Apache and Windows 95/98 offer no support for running the + Apache service as a specific user with network privileges. In + fact, Windows 95/98 offers no security on the local machine, + either. This is the simple reason that the Apache Software + Foundation never endorses the use of Windows 95/98 as a public + httpd server. These facilities exist only to assist the user in + developing web content and learning the Apache server, and + perhaps as a intranet server on a secured, private network.

    + + + + diff --git a/htdocs/manual/win_service.html.html b/htdocs/manual/win_service.html.html new file mode 100644 index 00000000000..66272ce9607 --- /dev/null +++ b/htdocs/manual/win_service.html.html @@ -0,0 +1,4 @@ + + + diff --git a/htdocs/manual/win_service.html.ja.jis b/htdocs/manual/win_service.html.ja.jis new file mode 100644 index 00000000000..27ecede826f --- /dev/null +++ b/htdocs/manual/win_service.html.ja.jis @@ -0,0 +1,434 @@ + + + + + + Windows $B$G(B Apache $B$r%5!<%S%9$H$7$FF0$+$9(B + + + + + + + +

    Windows $B$G(B Apache $B$r%5!<%S%9$H$7$FF0$+$9(B

    + +

    Windows NT/2000 $B$G$O(B Apache + $B$r%5!<%S%9$H$7$FF0$+$9$3$H$,$G$-$^$9!#(B(Apache 1.3.13 + $B$G!"Hs>o$KWindows 95/98 + $B$K$*$$$F$bF1MM$NF0:n$r%5%]!<%H$r$9$k$h$&$K$J$j$^$7$?(B)$B!#(B

    + +

    $B%5!<%S%9$H$7$F(B Apache $B$r%$%s%9%H!<%k$9$k$K$O!"(B + $B%3%s%=!<%k%&%#%s%I%&$G$?$C$?0lEY$3$NMicrosoft Windows $B$G(B Apache $B$rF0$+$9(B + $B$r;2>H$7$F$/$@$5$$!#(Bhttpd.conf $B%U%!%$%k$X$NJQ99$O%3%s%=!<%k%&%#%s%I%&$G(B + Apache $B$r5/F0$9$k$3$H$K$h$j!"$$$D$bH?1G$5$l$^$9!#(B + $B$3$l$G$&$^$/$$$1$P!"%5!<%S%9$O@.8y$9$k$G$7$g$&!#(B

    + +

    $BCm0U(B: $B%P!<%8%g%s(B 1.3.13 $B$h$jA0$G$O%$%s%9%H!<%k$B%F%9%H$5$l$^$;$s(B$B!#%5!<%S%9$N0MB8@-$NITB-$,(B + $B860x$G!"%3%s%=!<%k%&%#%s%I%&$G$O$7$P$7$P$&$^$/$$$-$^$9$,!"(B + $B%5!<%S%9$O$^$@<:GT$7$^$9!#(BApache $B$N(B 1.3.13 $B$h$jA0$N%P!<%8%g%s$r(B + $BF0$+$9$H$-$KLdBj$,$"$k$J$i$P!"(B$B8e=R$N@bL@(B + $B$r;2>H$7$F$/$@$5$$!#%P!<%8%g%s(B 1.3.13 $B0J9_$G$3$NLdBj$,$"$k$J$i!"(B + $B$^$::G=i$K(B Apache $B$r%"%s%$%s%9%H!<%k(B (-u) $B$7$F$+$i:F%$%s%9%H!<%k(B + (-i) $B$r;n$7$F$_$F$/$@$5$$!#(B + $B$b$C$H$h$$ +


    + +

    Apache $B$r%5!<%S%9$H$7$F3+;O$9$k$?$a$K$O!"$^$::G=i$K%5!<%S%9$H$7$F(B + $B%$%s%9%H!<%k$9$kI,MW$,$"$j$^$9!#$=$l$>$lJL$NL>A0$H@_Dj$r;H$C$F!"(B + Apache $B%5!<%S%9$rJ#?t%$%s%9%H!<%k$9$k$3$H$,$G$-$^$9!#%G%U%)%k%H$N(B + "Apache" $B$H$$$&L>A0$G(B Apache $B%5!<%S%9$r%$%s%9%H!<%k$9$k$K$O!"%9%?!<%H(B + $B%a%K%e!<$+$i(B "Install Apache as Service" $B%*%W%7%g%s$r +

    +  NET START APACHE
    +  NET STOP APACHE
    +
    + +

    Apache $B%5!<%S%9$N%$%s%9%H!<%k$H%3%s%H%m!<%k$K4X$9$k$5$i$J$k>pJs$O!"(B + Apache $B%5!<%S%9$N%3%s%H%m!<%k(B$B$r;2>H$7$F$/$@$5$$!#(B +

    + +

    Apache $B$O!"B>$NB?$/$N(B Windows NT/2000 $B$N%5!<%S%9$H0[$J$j!"(B + $B$[$H$s$I$N%(%i!<$OFH<+$K(B Apache $B$N%5!<%P%k!<%H$N(B logs $B%U%)%k%@$K$"$k(B + error.log $B%U%!%$%k$K5-O?$7$^$9!#$[$H$s$I$N(B Apache $B$N%(%i!<$K4X$9$k(B + $B>\:Y$O(BWindows NT $B$N%$%Y%s%H%m%0$G$OJ,$+$i$J$$$G$7$g$&!#(BApache + $B$r5/F0$7$h$&$H$7$?$H$-$KH/@8$7$?%(%i!<$@$1$,%$%Y%s%H%m%0$K5-O?$5$l$^$9!#(B +

    + +

    Apache $B$r%5!<%S%9$H$7$F3+;O$7$?8e(B ($B$^$?$O!"3+;O$9$k$3$H$KLdBj$,(B + $B$"$l$P(B)$B!"%3%s%=!<%k%&%#%s%I%&$+$iF1$8(B$B + $B$G%F%9%H$G$-$^$9!#%G%U%)%k%H$N%5!<%S%9@_Dj$r3NG'$9$k$?$a$K$O!"(B + $B$3$N%3%^%s%I(B:

    +
    +  apache -n "service name"
    +
    + +

    $B$r;H$&$3$H$r3P$($F$*$$$F$/$@$5$$!#(B

    + + +

    Windows $B$G(B Apache $B$r%5!<%S%9$H$7$F(B + $BF0$+$9(B

    + +

    $BCm0U(B: $B%5!<%S%9L>$r;XDj$9$k(B -n $B%*%W%7%g%s$O(B Apache 1.3.7 + $B0J9_$G$N$_MxMQ2DG=$G$9!#(B $B0JA0$N%P!<%8%g%s$N(B Apache $B$G$O!"(B + $B%G%U%)%k%H$N%5!<%S%9L>(B 'Apache' $B$@$1$,%5%]!<%H$5$l$F$$$^$9!#(B + $B%P!<%8%g%s(B 1.3.21 $B$K8B$j!"(BWindows 2000 $B$G%5!<%S%9L>$H$7$FI=<($5$l$k(B + $BL>A0$NJQ99$,%5%]!<%H$5$l$F$$$^$9!#(B

    + +

    $B0J2<$N$h$&$K$9$k$3$H$G!"(BApache $B$r(B Windows NT $B$N%5!<%S%9$H$7$F(B + $B%$%s%9%H!<%k$G$-$^$9(B:

    +
    +    apache -i -n "service name"
    +
    + +

    $BFCDj$N@_Dj$r;H$C$F%5!<%S%9$r%$%s%9%H!<%k$9$k$K$O!"(B + $B%$%s%9%H!<%k$N:]$K@_Dj%U%!%$%k$r;XDj$7$F$/$@$5$$(B:

    + +
    +    apache -i -n "service name" -f "\my server\conf\my.conf"
    +
    + +

    $B%5!<%P%k!<%H%G%#%l%/%H%j$r%G%U%)%k%H$+$iJQ99$9$k$?$a$N(B -d$B!"(B + $B@_Dj%U%!%$%k$rJQ99$9$k$?$a$N(B -D, -C $B$d(B -c $B$J$I!"$=$NB>$NB0@-$O(B + $B>JN,$G$-$^$9!#$3$l$i$,%l%8%9%H%j$K=q$-9~$^$l$F$$$FJQ99$,:$Fq$J$H$-$O!"(B + $B$3$N%3%^%s%I$r;H$C$F%*%W%7%g%s$r%/%j%"$7!"?7$7$$%*%W%7%g%s$KCV$-49$($^$9!#(B +

    +
    +    apache -k config -n "service name" -f "\my server\conf\my.conf"
    +
    + +

    Apache $B%5!<%S%9$r:o=|$9$k$K$O!"0J2<$N$h$&$K$7$^$9(B:

    +
    +    apache -u -n "service name"
    +
    + +

    $B%5!<%S%9L>$,;XDj$5$l$J$$>l9g$N%G%U%)%k%H$N!V%5!<%S%9L>!W$O(B + "Apache" $B$H$J$j$^$9!#(B

    + +

    $B%5!<%S%9$,%$%s%9%H!<%k$5$l$k$H!"%5!<%S%9$N@_Dj%U%!%$%k$r<($9$N$K(B + $BB>$N%*%W%7%g%s$HF1;~$K(B -n $B%*%W%7%g%s$r;HMQ$9$k$3$H$,(B + $B$G$-$^$9!#Nc(B:

    + +

    $B%5!<%S%9$N@_Dj%U%!%$%k$r%F%9%H$7$F!"%5!<%S%9$N%G%U%)%k%H$N(B + $B%*%W%7%g%s$r3NG'$9$k$K$O +

    +    apache -n "service name" -t
    +
    + +

    $B%5!<%S%9$N@_Dj%U%!%$%k$H%G%U%)%k%H$N%*%W%7%g%s$r;HMQ$7$F!"(B + $B%3%s%=!<%k$+$i(B Apache $B$r5/F0$9$k$K$O +

    +    apache -n "service name"
    +
    + +

    Apache $B%j%j!<%9(B 1.3.15 $B$G(B -k install $B%*%W%7%g%s$,(B -i $B%*%W%7%g%s$N!"(B + $B$^$?!"(B-k uninstall $B%*%W%7%g%s$,(B -u $B%*%W%7%g%s$NJLL>$H$7$FDI2C$5$l$^$7$?!#(B + $B85$N(B -i $B$=$7$F(B -u $B%*%W%7%g%s$O(B Apache 2.0 $B$G$O;HMQ$7$J$$$h$&$K$7$F$/$@$5$$!#(B + $B$3$l$i$NJLL>$O!"N>J}$N%P!<%8%g%s$r1?MQ$9$k4IM} + +

    $B%5!<%S%9$N0MB8$K4X$9$k=EMW$JN10UE@(B +

    + +

    $B%j%j!<%9(B 1.3.13 $B0JA0$N(B Apache $B$G$O!"%$%s%9%H!<%k$5$l$?%5!<%S%9$,(B + $B$&$^$/3+;O$9$k$3$H$,A0Ds>r7o$H$J$k0MB84X78$O9=@.$5$l$^$;$s!#(B + Apache $B$N0JA0$N%P!<%8%g%s$r;HMQ$7$F%5!<%S%9$r%$%s%9%H!<%k$7$?8e$K!"(B + $B0J2<$N +

    +    Run regedt32
    +    Select Window - "HKEY_LOCAL_MACHINE on Local Machine" from the menu
    +    Double-click to open the SYSTEM, then the CurrentControlSet keys
    +    Scroll down and click on the Apache servicename
    +    Select Edit - Add Value... from the menu
    +    Fill in the Add Value dialog with 
    +        Value Name: DependOnGroup 
    +        Data Type: REG_MULTI_SZ
    +        and click OK
    +    Leave the Multi-String Editor dialog empty and click OK
    +    Select Edit - Add Value... from the menu
    +    Fill in the Add Value dialog with 
    +        Value Name: DependOnService
    +        Data Type: REG_MULTI_SZ
    +        and click OK
    +    Type the following list (one per line) in the Multi-String Editor dialog
    +        Tcpip
    +        Afd
    +        and click OK
    +
    + +

    $B$^$?!"%5!<%I%Q!<%F%#!<$N%b%8%e!<%k!"(BISAPI$B!"$=$NB>(B ActiveState Perl + $B$J$I$K$h$k!"(BCOM $B$d(B DCOM $B$N9=@.MWAG$r;HMQ$7$F$$$k$J$i$P!"(BDependOnService + $B%j%9%H$K(B Rpcss $B$N%(%s%H%j!<$rDI2C$9$kI,MW$,$"$k$+$b$7$l$^$;$s!#(B + $B$=$l$,ITMW$J>l9g$K!"(BTCP $B%]!<%H(B 135 $B$rO*=P$9$k$N$rHr$1$k$?$a$K!"(B + Apache $B$O%$%s%9%H!<%k$N$H$-$K$=$N%(%s%H%j!<$r:n@.$7$^$;$s!#(B + $B>e$N;X<($K=>$C$F!"(BDependOnService $BCM$r3NG'!"$^$?$O:n@.$7$F$/$@$5$$!#(B + $B4{$KB8:_$7$F$$$k$J$i$P$=$NCM$r%@%V%k%/%j%C%/$7$F!"(BRpcss $B$N%(%s%H%j!<$r(B + $B%j%9%H$KDI2C$7$F$/$@$5$$!#(B

    + +

    $B0MB8@-$N$?$a$^$@B>$K2?$+%$%s%9%H!<%k$,MW5a$5$l$k$+$b$7$l$^$;$s!#(B + $B3+;O;~$K%M%C%H%o!<%/%I%i%$%V>e$KB8:_$9$k%U%!%$%k$rMW5a$5$l$k>l9g!"(B + $B$^$::G=i$K%M%C%H%o!<%/%j%@%$%l%/%?(B($BDL>o(B lanmanworkstation) + $B$N0MB8@-$K4X$o$k%5!<%S%9$r@_Dj$7$F!"(B" $B%f!<%6%"%+%&%s%H$G(B Apache + $B$rF0$+$9(B " $B%;%/%7%g%s0J2<$N@bL@$K=>$C$F$/$@$5$$(B

    + +

    IIS $B$H(B Apache $B$NN>J}$r;H$*$&$H$9$k$J$i!"0[$J$k(B IP + $B%"%I%l%9$NF1$8%]!<%HHV9f$G(B W3SVC (IIS) $B$r(B Apache + $B$NA0$K3+;O$5$;$F$*$/I,MW$,$"$j$^$9!#$J$<$J$i!"(BApache $B$,@h$KFCDj$N(B + IP $B%"%I%l%9$G3+;O$7$F$$$k$H!"(BIIS $B$O3+;O$9$k$H$-$KA4$F$N(B IP $B%"%I%l%9(B + (0.0.0.0) $B$r3NJ]$7$h$&$H$7$F<:GT$9$k$+$i$G$9!#(B

    + +

    Apache 1.3.21 $B$G0MB8@-$r2C$($k$O$k$+$KC1=c$JJ}K!$,F3F~$5$l$^$7$?!#(B + -W "$B%5!<%S%9L>(B" $B0z?t$O(B Apache $B$N0MB8@-$r@_Dj$9$k(B -k install $B$d(B + -k config $B%3%^%s%I$K5!G=$rIU$12C$($^$9!#J#?t$N(B -W + $B0z?t$,M?$($i$l$^$9$,!"$9$Y$F(B -k $B%*%W%7%g%s$N8e$m$G;XDj$9$k$Y$-$G$9!#(B + $BNc$($P!"%$%s%9%H!<%k:Q$_$N(B "Apache" $B%5!<%S%9$K(B LanmanWorkstation + $B0MB8@-$r2C$($k$J$i!"$3$N%3%^%s%I$r;H$$$^$9!#(B

    +
    +    apache -k config -n Apache -W LanmanWorkstation
    +
    + +

    $B%f!<%6%"%+%&%s%H$G(B Apache $B$rF0$+$9(B (NT/2000)

    + +

    Apache $B$,:G=i$K%5!<%S%9(B ( $BNc$($P!"(B-i $B%*%W%7%g%s(B ) $B$H$7$F%$%s%9%H!<%k$5$l$k$H$-!"(B + "System" $B$H$$$&%f!<%6(B (LocalSystem $B%"%+%&%s%H(B ) $B$GF0:n$9$k$G$7$g$&!#(B + $B$b$7(B web $B%5!<%P$N$9$Y$F$N%j%=!<%9$,%m!<%+%k%7%9%F%`>e$K$"$k$J$i(B + $B$[$H$s$ILdBj$"$j$^$;$s$,!"(B(LocalSystem $B%"%+%&%s%H(B ) $B$O%m!<%+%k%^%7%s$K(B + $B1F6A$rM?$($kI}9-$$%;%-%e%j%F%#FC8"$r;}$C$F$$$^$9!#(B

    + +
    + LocalSystem $B$O6I=jE*$KHs>o$KFC8"%"%+%&%s%H$J$N$G!"(B + $B$I$s$J%7%'%"%&%'%"%"%W%j%1!<%7%g%s$b$=$3$GF0:n$5$;$k$Y$-$G$O(B + $B$"$j$^$;$s!#$7$+$7$J$,$i!"$=$l$O%M%C%H%o!<%/FC8"$r;}$?$J$/$F!"(B + NT $B$N5!L)J];}5!G=!"%U%!%$%k%7%9%F%`!"%Q%$%W!"(BDCOM $B!"%;%-%e%"(B RPC $B$r4^$a$F(B + $B$=$N$^$^$K$7$F$*$/$3$H$O$G$-$^$;$s(B +
    + +

    $B7h$7$F%7%9%F%`%"%+%&%s%H$K%M%C%H%o!<%/FC8"$rM?$($F$O(B + $B$$$1$^$;$s(B ! $BBe$o$j$K?7$7$$%f!<%6%"%+%&%s%H$r:n@.$7$F!"(B + $B$=$N%f!<%6$KE,@Z$J8"8B$rM?$($F!"(B'Log On As' $B$H$$$&%*%W%7%g%s$r(B + $B;H$C$F$/$@$5$$!#%9%?!<%H%a%K%e!<(B -> $B@_Dj(B -> $B%3%s%H%m!<%k%Q%M%k(B + -> $B%5!<%S%9(B -> Apache Service $B$HA*Br$7$F!"!V%9%?!<%H%"%C%W!W(B + $B%\%?%s$r%/%j%C%/$7$F!"$3$N@_Dj$K%"%/%;%9$7$F$/$@$5$$!#(B

    + +
    + LocalSystem $B%"%+%&%s%H$N4D6-$GF0:n$9$k%5!<%S%9$O(B SCM + $B4XO"$N%;%-%e%j%F%#4D6-$r0z$-7Q$.$^$9!#(B + $B%5!<%S%9$O$I$N%f!<%6%"%+%&%s%H$H$b4XO"$E$1$i$l$:!"(B + $B$^$?3NG'$K;HMQ$5$l$k$Y$->ZL@(B ( $B%I%a%$%sL>!"%f!<%6L>!"%Q%9%o!<%I(B ) + $B$r;}$A$^$;$s!#(B +
    + +

    SYSTEM $B%"%+%&%s%H$O%M%C%H%o!<%/$KFC8"$r;}$?$J$$$N$G!"6&M-$5$l$?%Z!<%8$d(B + $B6&M-$5$l$?%$%s%9%H!<%k$O%5!<%S%9$+$i$O8+$($^$;$s!#(B + $B$"$J$?$,(B$B$I$s$J(B$B%M%C%H%o!<%/%j%=!<%9$b;HMQ$9$k$D$b$j$G$"$k$J$i$P!"(B + $B0J2<$N%9%F%C%W$OLr$KN)$D$+$b$7$l$^$;$s(B

    + +
      +
    • Control Panel $B$N(B Service $B%@%$%"%m%0$+$i(B Apache $B$rA*Br$7$F!"(B + Startup $B$r%/%j%C%/$7$^$9!#(B
    • + +
    • $B%5!<%S%9%"%+%&%s%H$,@5$7$$$3$H$r3NG'$7$F$/$@$5$$!#(B + Apache $B%5!<%S%9MQ$N%"%+%&%s%H$r:n@.$9$k$3$H$b$h$$J}K!$G$9!#(B
    • + +
    • $B%Q%9%o!<%I$r7+$jJV$7F~NO$7$F%Q%9%o!<%I3NG'$r$7$^$9!#(B
    • + +
    • $B%I%a%$%s$N%f!<%6%^%M!<%8%c$K9T$C$F$/$@$5$$!#(B
    • + +
    • $B%?%$%H%k%P!<%a%K%e!<$+$i(B Policies $B$r%/%j%C%/$7$F!"(B + User Rights $B$rA*Br$7$F$/$@$5$$!#(B
    • + +
    • Advanced User Rights $B$N%*%W%7%g%s$rA*Br$7$F$/$@$5$$!#(B
    • + +
    • + $B%I%m%C%W%@%&%s%j%9%HCf$G!"A*Br$5$l$?%"%+%&%s%H$K0J2<$N8"8B$,(B + $BM?$($i$l$?$3$H$r3NG'$7$F$/$@$5$$!#(B + +
        +
      • Act as part of the operating system
      • + +
      • Back up files and directories
      • + +
      • Log on as a service
      • + +
      • Restore files and directories
      • +
      +
    • + +
    • $BA*Br$5$l$?%"%+%&%s%H$,(B Users $B%0%k!<%W$N%a%s%P$G$"$k$3$H$r(B + $B3NG'$7$F$/$@$5$$!#(B
    • + +
    • $BA*Br$5$l$?%"%+%&%s%H$,$9$Y$F$N%I%-%e%a%s%H$H%9%/%j%W%H%G%#%l%/%H%j$K(B + $B%"%/%;%9$9$k + +
    • $BA*Br$5$l$?%"%+%&%s%H$,(B Apache logs $B%G%#%l%/%H%j$KBP$7$FFI$_=q$-!"(B + $B:o=|$9$k +
    + +

    $B$=$N%"%+%&%s%H$G%f!<%6$H$7$F%m%0%$%s$9$k$3$H$r5v2D$7$?$i!"(B + $B<+J,<+?H$G%m%0%$%s$7$F$=$N%"%+%&%s%H$,%9%/%j%W%H$Ne5-$N%9%F%C%W$K=>$C$F + +

    $BCm0U(B: $B%(%i!<%3!<%I(B 2186 $B$O%5!<%P$,I,MW$J(B + $B%M%C%H%o!<%/%j%=!<%9$K%"%/%;%9$9$k$3$H$,$G$-$J$$$N$G(B 'Log On As' + $B$N@_Dj$r8+D>$9I,MW$,$"$k!"$H$$$&;X<($G$9!#(B

    + +

    Apache $B$r(B Windows $B$G%5!<%S%9$H$7$F(B + $BF0$+$9$H$-$N(B $B%H%i%V%k%7%e!<%F%#%s%0(B

    + +

    $B%5!<%S%9$H$7$F(B Apache $B$r3+;O$9$k>l9g!"(BWindows $B%5!<%S%9%^%M!<%8%c$+$i$N(B + $B%(%i!<%a%C%;!<%8$r8+$k$3$H$K$J$k$+$b$7$l$^$;$s!#Nc$($P%3%s%H%m!<%k%Q%M%k$N(B + $B%5!<%S%9(B $B%"%W%l%C%H$r;HMQ$7$F(B Apache $B$r3+;O$5$;$h$&$H$9$k;~$K!"(B + $B0J2<$N%a%C%;!<%8$r8+$k$+$b$7$l$^$;$s!#(B

    +
    +  Could not start the apache service on \\COMPUTER
    +  Error 1067; The process terminated unexpectedly.
    +
    + +

    Apache $B$N3+;O$K$*$$$F2?$i$+$NLdBj$,$"$k>l9g!"$3$N%(%i!<$KAx$$$^$9!#(B + $BLdBj$N860x$r3NG'$9$k$?$a$K$O!"(B$B%3%^%s%I(B + $B%W%m%s%W%H$G(B Apache $B$r%F%9%H$9$k(B$B$N;X<($K=>$C$F$/$@$5$$!#(B

    + + +

    $B$^$?!"(BApache 1.3.13 $B$G$O(B Windows NT/2000 $B$G%5!<%S%9$H$7$FF0$+$9$H$-!"(B + $B3+;O;~$N%(%i!<$r(B $B%"%W%j%1!<%7%g%s(B $B%m%0(B $B$K5-O?$7$^$9!#%$%Y%s%H(B $B%S%e!<%"(B + $B$r5/F0$7!"(BLog ... Application + $B$HA*Br$7$F%$%Y%s%H$r3NG'$9$k$3$H$,$G$-$^$9!#(B

    + +

    $BLdBj$,$"$C$?>l9g$O!"%(%i!<$,H/@8$7$?$3$H$r7Y9p$N$?$a$N(B + $B%(%i!<%a%C%;!<%8$,%]%C%W%"%C%W$5$l$J$/$F$b!"%$%Y%s%H(B $B%S%e!<%"$G(B + $B%"%W%j%1!<%7%g%s(B $B%m%0$r%A%'%C%/$7$F$/$@$5$$!#(B

    + +

    Windows $B$G%3%^%s%I%i%$%s$+$i(B + Apache $B$rF0$+$9(B

    + $B%3%^%s%I%i%$%s$+$i(B Apache $B%5!<%S%9$r@)8f$9$k$3$H$K4X$9$k>\:Y$K$D$$$F$O!"(B + $B%3%s%=!<%k%3%^%s%I%i%$%s(B$B$N>O$r;2>H$7$F$/$@$5$$!#(B + +

    $B%5!<%S%9$H$7$F$N(B Apache + $B$r@)8f$9$k(B

    + +

    Apache $B$OJ#?t%$%s%9%H!<%k$7$F!"%5!<%S%9$H$7$FF0$+$9$3$H$,$G$-$^$9!#(B + $B%$%s%9%H!<%k$5$l$?(B Apache $B%5!<%S%9$r3+;O!":F3+!"=*N;!"Dd;_$9$k$K$O(B + $B0J2<$N$h$&$K$7$^$9(B:

    +
    +    apache -n "service name" -k start
    +    apache -n "service name" -k restart
    +    apache -n "service name" -k shutdown
    +    apache -n "service name" -k stop
    +
    + +

    -n $B%*%W%7%g%s$N$J$$(B -k $B%3%^%s%I$O%3%s%=!<%k%&%#%s%I%&$G5/F0$7$F$$$k(B + Apache $B$K8~$1$i$l$k$N$G!"%G%U%)%k%H$N(B "Apache" $B%5!<%S%9$G$O(B -n Apache + $B%*%W%7%g%s$,I,MW$G$9!#0zMQId$O%5!<%S%9L>$K%9%Z!<%9$,4^$^$l$k>l9g$K8B$j(B + $BI,MW$K$J$j$^$9!#(B

    + +

    $BCm0U(B: -k shutdown $B%3%^%s%I$NJLL>$N(B -k stop $B%3%^%s%I$O(B + Apache $B%P!<%8%g%s(B 1.3.13 $B$GF3F~$5$l$^$7$?!#(B + $B$=$l$h$jA0$N%P!<%8%g%s$N(B Apache $B$G$O(B -k shutdown + $B%*%W%7%g%s$@$1$,G'<1$5$l$^$9!#(B1.3.3 $B$h$jA0$N(B Apache + $B$G$O(B$B$I$s$J(B -k $B%*%W%7%g%s$bG'<1$5$l$^$;$s$G$7$?!#(B

    + +

    -D, -C, -c $B%*%W%7%g%s$r4^$a$?(B apache -k start + $B%3%^%s%I$G5/F0;~$N%*%W%7%g%s$r;XDj$9$k$3$H$b$G$-$^$9!#(B + $B$3$l$i$O%5!<%S%9$N@_Dj%W%m%;%9$K1F6A$7$^$9(B <IfDefine> + $B%V%m%C%/$G;H$&$3$H$G>r7o$D$-$N;XDj$r$9$k$3$H$b$G$-$^$9!#(B + $B%5!<%P%k!<%H$N%Q%9$d(B -d $B%*%W%7%g%s$d(B -f + $B%*%W%7%g%s$r;H$C$F@_Dj%U%!%$%k$r>e=q$-$9$k$3$H$b$G$-$^$9!#(B + $B$3$l$i$N%*%W%7%g%s$O(B -k restart $B%3%^%s%I$K$h$C$F$bFI$_9~$^$l$^$9$,!"(B + $B%5!<%S%9$NF0:nCf$K$OH?1G$5$l$:!"%5!<%S%9$N5/F0;~$K$N$_H?1G$5$l$^$9!#(B +

    + +

    $B%5!<%S%9$O(B Windows NT/2000 $B$N(B Service Control + $B%"%W%l%C%H$K$b8=$l$^$9!#(BNT $B$N>l9g!"(BSettings -> Control Panel + -> Services $B%(%s%H%j!"(B2000 $B$N>l9g!"(BSettings -> Control Panel + -> Administrative Tools -> Services $B%(%s%H%j$G;2>H$G$-$^$9!#(B + $B$=$3$+$i3+;O$d=*N;$5$;$k(B Apache $B%5!<%S%9$rA*Br$G$-$^$9!#(B + -D, -C, -c $B$N$h$&$JDI2C$N%*%W%7%g%s$d!"3+;O%Q%i%a!<%?$N%G%U%)%k%H$N(B + -d $B$d(B -f $B%*%W%7%g%s$N>e=q$-$O3+;O%\%?%s$r%/%j%C%/$9$kA0$K$7$F$/$@$5$$!#(B + $B$3$l$i$N%*%W%7%g%s$O(B apache -k start + $B%3%^%s%I$HA4$/F1$8$h$&$K=hM}$5$l$^$9!#(B

    + +

    $B$5$i$K!"(BApache $B%5!<%S%9$N3+;O!"=*N;$K%M%$%F%#%V$N(B + Windows NT/2000 $B$N(B NET $B%3%^%s%I$r;H$&$3$H$b$G$-$^$9(B:

    +
    +    NET START "service name"
    +    NET STOP "service name"
    +
    + +

    $B7+$jJV$7$^$9$,!"%5!<%S%9L>$,%9%Z!<%9$r4^$`>l9g$N$_!"(B + $B0zMQId$,I,MW$K$J$j$^$9!#(B-D, -c, -C $B$J$I$NDI2C%*%W%7%g%s$r(B + NET START $B%3%^%s%I$G;XDj$9$kJ}K!$O$"$j$^$;$s!#(B + $B%*%W%7%g%s$,I,MW$J$H$-$O!"B>$N(B + 2 $B + +

    $BHs>o$K

    + +

    $BCm0U(B: Windows 95 $B$H(B 98 $B$G$N%5!<%S%9%*%W%7%g%s$O(B + Apache 1.3.13 $B0J9_$G$N$_M-8z$G$9!#(B$B0JA0$N%P!<%8%g%s$N(B + Apache $B$G$O(B Windows 95/98 + $B$K$*$$$F$O%3%s%=!<%k%&%#%s%I%&$G$N$_%5%]!<%H$5$l$F$$$^$9!#(B

    + +

    Windows NT/2000 $B$G$N%5!<%S%9$HF1$8$h$&$J(B Windows 95/98 $B>e$G$N(B + Apache $B$NF0:n$r$"$kDxEY%5%]!<%H$7$F$$$^$9!#(B + $B$=$l$O(B$BHs>o$K$B$J$b$N$G!"$b$7(B ($B$9$Y$F=gD4$K(B) + $BF0$$$?$H$7$F$b(B Apache Software Foundation $B$O!"?.Mj@-$d>-Mh$N%5%]!<%H(B + $B$OJ]>Z$7$^$;$s!#0J9_$K$D$$$F$O<+J,<+?H$N%j%9%/$G?J$s$G$/$@$5$$(B!

    + +

    Apache $B$,(B Command Prompt + $B$G@5>o$KF0:n$9$k$3$H$r3NG'$7$?$i!"(BWindows NT/2000 + $B$N>l9g$HF1$8%3%^%s%I$G%$%s%9%H!<%k!"@)8f!"(B + $B%"%s%$%s%9%H!<%k$9$k$3$H$,$G$-$^$9!#(B

    + +

    $B$?$@$7!"Cm0U$9$Y$-=EMW$J0c$$$,$"$j$^$9(B:

    + + +

    Apache $B$O!"5/F0$,@.8y$9$k$H!"%P%C%/%0%i%&%s%I$GF0:n$7$^$9!#(B + $B%G%9%/%H%C%W$N%7%g!<%H%+%C%H$rDL$7$F!"%3%^%s%I(B

    +
    +   Apache -n "service name" -k start
    +
    + +

    $B$r$9$Y$-$G$9!#(B

    + +

    Windows 95/98 $B$G$O(B NET START $B$d(B NET STOP $B%3%^%s%I$r(B + $B%5%]!<%H$7$F$$$J$$$N$G!"(BCommand Prompt $B$+$i(B Apache $B$N(BService Control + $B%*%W%7%g%s$r;HMQ$7$J$1$l$P$J$j$^$;$s!#$3$l$i$N%3%^%s%IKh$K(B + $B%7%g!<%H%+%C%H$rMQ0U$7!"%9%?!<%H%a%K%e!<$d%G%9%/%H%C%W$+$i(B + $B$=$l$r$?$@A*$V$3$H$GI,MW$JF0:n$r + +

    Apache $B$H(B Windows 95/98 $B$OFCDj$N%f!<%6$KBP$7$F!"(BApache + $B%5!<%S%9$r%M%C%H%o!<%/FC8"$G$ODs6!$7$^$;$s!#e$N%5!<%P!"%W%i%$%Y!<%H%M%C%H%o!<%/$N(B + $B%f!<%6$rJd=u$9$k$?$a$KJX59>eB8:_$7$F$$$k$K$9$.$^$;$s!#(B

    + + + diff --git a/htdocs/manual/windows.html.en b/htdocs/manual/windows.html.en new file mode 100644 index 00000000000..3d6c0b4dbda --- /dev/null +++ b/htdocs/manual/windows.html.en @@ -0,0 +1,625 @@ + + + + + + + Using Apache with Microsoft Windows + + + + + + +

    Using Apache With + Microsoft Windows

    + +

    This document explains how to install, configure and run + Apache 1.3 under Microsoft Windows. Most of this document + assumes that you are installing Windows from a binary + distribution. If you want to compile Apache yourself (possibly + to help with development, or to track down bugs), see Compiling Apache for Microsoft + Windows.

    + +

    If you find any bugs, please document them on our bug reporting + page. Contributions are welcomed, please submit your code + or suggestions to the bug report page, or join the new-httpd + mailing list.

    + +

    The bug reporting page and new-httpd mailing list are + not provided to answer questions about configuration + or running Apache. Before you submit a bug report or request, + first consult this document, the Frequently Asked Questions page and + the other relevant documentation topics. If you still have a + question or problem, post it to the comp.infosystems.www.servers.ms-windows + newsgroup, where many Apache users and several contributions + are more than willing to answer new and obscure questions about + using Apache on Windows.

    + +

    + groups.google.com's newsgroup archive offers easy browsing + of previous questions. Searching the newsgroup archives, you + will usually find your question was already asked and answered + by other users!

    + +

    Warning: Apache on NT has not yet been optimized for + performance. Apache still performs best, and is most + reliable on Unix platforms. Over time NT performance has + improved, and great progress is being made in the upcoming + version 2.0 of Apache for the Windows platforms. Folks doing + comparative reviews of webserver performance are still asked to + compare against Apache on a Unix platform such as Solaris, + FreeBSD, or Linux.

    +
    + + +
    + +

    Requirements

    + +

    Apache 1.3 is designed to run on Windows NT 4.0 and Windows + 2000. The binary installer will only work with the x86 family + of processors, such as Intel's. Apache may also run on Windows + 95 and 98, but these have not been tested. In all cases TCP/IP + networking must be installed.

    + +

    If running on NT 4.0, installing Service Pack 3 or 6 is + recommended, as Service Pack 4 created known issues with + TCP/IP and WinSock integrity that were resolved in Service + Pack 5 and later.

    + +

    Note: "Winsock2" is required for Apache 1.3.7 and + later.

    + +

    If running on Windows 95, the "Winsock2" upgrade must be + installed before Apache will run. "Winsock2" for Windows 95 is + available + here or via here. + Be warned that the Dialup Networking 1.2 (MS DUN) updates + include a Winsock2 that is entirely insufficient, and the + Winsock2 update must be reinstalled after installing Windows 95 + dialup networking. Windows 98, NT (Service Pack 3 or later) and + 2000 users need to take no special action, those versions provide + Winsock2 as distributed.

    + +

    Downloading Apache for + Windows

    + +

    Information on the latest version of Apache can be found on + the Apache web server at http://httpd.apache.org/. + This will list the current release, any more recent alpha or + beta-test releases, together with details of mirror web and + anonymous FTP sites.

    + +

    You should download the binary build of Apache for Windows + named as apache_1_3_#-win32-src.msi if you are + interested in the source code, or simply + apache_1_3_#-win32-no_src.msi if you don't plan to + do anything with the source code and appreciate a faster + download. Each of these files contains the complete Apache + runtime. You must have the Microsoft Installer version 1.10 + installed on your PC before you can install the Apache runtime + distributions. Windows 2000 and Windows ME are both delivered + with the Microsoft Installer support, others will need to + download it. For more information, visit the main download + page at http://httpd.apache.org/download.cgi. + Instructions on locating the Microsoft Installer, + as well as the binary distributions of Apache, are found at + the win32 download directory on the mirrors.

    + +

    The source code is available in the -src.msi + distribution, or from the + distribution directory as a .zip file. If you plan + on compiling Apache yourself, there is no need to install + either .msi package. The .zip file + contains only source code, with MS-DOS line endings (that is + cr/lf line endings, instead of the single lf used for Unix + files distributed in .tar.gz or .tar.Z archives.)

    + +

    While the source is also available as a .tar.gz + .tar.Z archive, these contain unix lf line endings + that cause grief for Windows users. To use those archives, you + must convert at least the .mak and + .dsp files to have DOS line endings before MSVC + can understand them. Please stick with the .zip + file to spare yourself the headache.

    + +

    Note: prior to 1.3.17 Apache was distributed as an + InstallShield 2.0 .exe file. With an increasing + number of users unable to run the InstallShield package [on + Windows ME or Windows 2000] the binaries were repackaged into + the readily available Microsoft Installer .msi + format.

    + +

    Installing Apache for + Windows

    + +

    Run the Apache .msi file you downloaded above. + This will prompt you for:

    + +
      +
    • whether or not you want to run Apache for all users + (installing Apache as a Service), or if you want it installed + to run in a console window when you choose the Start Apache + shortcut.
    • + +
    • your Server name, Domain name and administrative email + account.
    • + +
    • the directory to install Apache into (the default is + C:\Program Files\Apache Group\Apache although + you can change this to any other directory you wish)
    • + +
    • the installation type. The "Complete" option installs + everything, including the source code if you downloaded the + -src.msi package. Choose the "Custom" install if + you choose not to install the documentation, or the source + code from that package.
    • +
    + +

    During the installation, Apache will configure the files in + the conf directory for your chosen installation + directory. However if any of the files in this directory + already exist they will not be overwritten. + Instead the new copy of the corresponding file will be left + with the extension .default.conf. So, for example, + if conf\httpd.conf already exists it will not be + altered, but the version which would have been installed will + be left in conf\httpd.default.conf. After the + installation has finished you should manually check to see what + in new in the .default.conf file, and if necessary + update your existing configuration files.

    + +

    Also, if you already have a file called + htdocs\index.html then it will not be overwritten + (no index.html.default file will be installed + either). This should mean it is safe to install Apache over an + existing installation (but you will have to stop the existing + server running before doing the installation, then start the + new one after the installation is finished).

    + +

    After installing Apache, you should edit the configuration + files in the conf directory as required. These + files will be configured during the install ready for Apache to + be run from the directory where it was installed, with the + documents served from the subdirectory htdocs. + There are lots of other options which should be set before you + start really using Apache. However to get started quickly the + files should work as installed.

    + +

    If you eventually uninstall Apache, your configuration and log + files will not be removed. You will need to delete the installation + directory tree ("C:\Program Files\Apache Group" by default) + yourself if you do not care to keep your configuration and + other web files. Since the httpd.conf file is your + accumulated effort in using Apache, you need to take the effort + to remove it. The same happens for all other files you may have + created, as well as any log files Apache created.

    + +

    Running Apache for Windows

    + +

    There are two ways you can run Apache:

    + +
      +
    • As a "service". This is + the best option if you want Apache to automatically start + when your machine boots, and to keep Apache running when you + log-off.
    • + +
    • From a console window. Closing + this console window will terminate the Apache server.
    • +
    + +

    Complete the steps below before you attempt to start + Apache as a Windows "service"!

    + +

    To run Apache from a console window, select the "Start + Apache as console app" option from the Start menu (in Apache + 1.3.4 and earlier, this option was called "Apache Server"). + This will open a console window and start Apache running inside + it. The window will remain active until you stop Apache. To + stop Apache running, either press select the "Shutdown Apache + console app" icon option from the Start menu (this is not + available in Apache 1.3.4 or earlier), or see Controlling Apache in a Console Window for + commands to control Apache in a console window.

    + +

    In Apache 1.3.13 and above it is now quite safe to press + Ctrl+C or Ctrl+Break to stop the Apache in the console window. + And on Windows NT/2000 with version 1.3.13, Apache will stop if + you select 'Close' from the system menu (clicking the icon on + the top-left corner of the console window) or click the close + (X) button on the top-right corner. The Close menu item and + close (X) button also work on Windows 95/98 as of Apache + version 1.3.15. But do not try any of these approaches + on earlier versions of the Apache server, since Apache would + not clean up.

    + +

    Testing Apache for + Windows

    + +

    If you have trouble starting Apache please use the following + steps to isolate the problem. This applies if you started + Apache using the "Start Apache as a console app" shortcut from + the Start menu and the Apache console window closes immediately + (or unexpectedly) or if you have trouble starting Apache as a + service.

    + +

    Run the "Command Prompt" from the Start Menu - Programs + list. Change to the folder to which you installed Apache, type + the command apache, and read the error message. Then review the + error.log file for configuration mistakes. If you accepted the + defaults when you installed Apache, the commands would be:

    +
    +  c:
    +  cd "\program files\apache group\apache"
    +  apache
    +  Wait for Apache to exit, or press Ctrl+C
    +  more <logs\error.log
    +
    + +

    After looking at the error.log you will probably have a good + chance of working out what went wrong and be able to fix the + problem and try again. If you are unable to work it out then + please follow the guidelines for assistance + at the top of this document or in the FAQ. Many users discover that + the nature of the httpd.conf file is easier to manage and audit + than page after page of configuration dialog boxes.

    + +

    After starting Apache running (either in a console window or + as a service) it will be listening to port 80 (unless you + changed the Port, Listen or + BindAddress directives in the configuration + files). To connect to the server and access the default page, + launch a browser and enter this URL:

    +
    +  http://localhost/
    +
    + +

    This should respond with a welcome page, and a link to the + Apache manual. If nothing happens or you get an error, look in + the error.log file in the logs + directory. If your host isn't connected to the net, you may + have to use this URL:

    +
    +  http://127.0.0.1/
    +
    + +

    Once your basic installation is working, you should + configure it properly by editing the files in the + conf directory.

    + +

    Because Apache CANNOT share the same port with + another TCP/IP application, you may need to stop or uninstall + certain services first. These include (but are not limited to) + other web servers, and firewall products such as BlackIce. If + you can only start Apache with these services disabled, + reconfigure either Apache or the other product so that they do + not listen on the same TCP/IP ports. You may find the Windows + "netstat -an" command useful in finding out what ports are in + use.

    + +

    Configuring Apache for + Windows

    + +

    Apache is configured by files in the conf + directory. These are the same as files used to configure the + Unix version, but there are a few different directives for + Apache on Windows. See the Apache + documentation for all the available directives.

    + +

    Begin configuring the Apache server by reviewing + httpd.conf and its directives. Although the files + access.conf and srm.conf both exist, + these are old files which are no longer used by most + administrators, and you will find no directives there.

    + +

    httpd.conf contains a great deal of + documentation itself, followed by the default configuration + directives recommended when starting with the Apache server. + Begin by reading these comments to understand the configuration + file, and make small changes, starting Apache in a console + window with each change. If you make a mistake, it will be + easier to back up to configuration that last worked. You will + have a better idea of which change caused the server to + fail.

    + +

    The main differences in Apache for Windows are:

    + +
      +
    • + Because Apache for Windows is multithreaded, it does not + use a separate process for each request, as Apache does + with Unix. Instead there are usually only two Apache + processes running: a parent process, and a child which + handles the requests. Within the child each request is + handled by a separate thread. So, "process"-management + directives are different: + +
        +
      • MaxRequestsPerChild + - Like the Unix directive, this controls how many + requests a process will serve before exiting. However, + unlike Unix, a process serves all the requests at once, + not just one, so if this is set, it is recommended that a + very high number is used. The recommended default, + MaxRequestsPerChild 0, does not cause the + process to ever exit.
      • + +
      • ThreadsPerChild + - This directive is new, and tells the server how many + threads it should use. This is the maximum number of + connections the server can handle at once; be sure and + set this number high enough for your site if you get a + lot of hits. The recommended default is + ThreadsPerChild 50.
      • +
      +
    • + +
    • The directives that accept filenames as arguments now + must use Windows filenames instead of Unix ones. However, + because Apache uses Unix-style names internally, you must use + forward slashes, not backslashes. Drive letters can be used; + if omitted, the drive with the Apache executable will be + assumed.
    • + +
    • + Apache for Windows has the ability to load modules at + runtime, without recompiling the server. If Apache is + compiled normally, it will install a number of optional + modules in the modules directory. To activate + these, or other modules, the new LoadModule directive + must be used. For example, to activate the status module, use + the following (in addition to the status-activating + directives in httpd.conf - see the mod_status docs for more + details.): +
      +    LoadModule status_module modules/mod_status.so
      +
      + +

      Information on creating loadable + modules is also available. Note that some 3rd party + modules may be distributed in the old style names, + ApacheModuleFoo.dll. Always set the LoadModule command as + directed by the 3rd party module's own documentation.

      +
    • + +
    • Apache for Windows version 1.3 series is implemented in + synchronous calls. This poses an enormous problem for CGI + authors, who won't see unbuffered results sent immediately to + the browser. This is not the behavior described for CGI in + Apache, but it is a side-effect of the Windows port. Apache + 2.0 is making progress to implement the expected asynchronous + behavior, and we hope to discover that the NT/2000 + implementation allows CGI's to behave as documented.
    • + +
    • +

      Apache can also load ISAPI Extensions (i.e., + Internet Server Applications), such as those used by + Microsoft's IIS, and other Windows servers. More information is + available. Note that Apache CANNOT load ISAPI + Filters.

      +
    • + +
    • When running CGI scripts, the method Apache uses to find + the interpreter for the script is configurable using the ScriptInterpreterSource + directive.
    • + +
    • Since it is often difficult to manage files with names + like .htaccess under windows, you may find it + useful to change the name of this configuration file using + the AccessFilename + directive.
    • +
    + +

    Running Apache in a Console + Window

    + +

    The Start menu icons and the NT Service manager can provide + a simple interface for administering Apache. But in some cases + it is easier to work from the command line.

    + +

    When working with Apache it is important to know how it will + find the configuration files. You can specify a configuration + file on the command line in two ways:

    + +
      +
    • -f specifies a path to a particular configuration + file:
    • +
    +
    +    apache -f "c:\my server\conf\my.conf"
    +
    +
    +    apache -f test\test.conf
    +
    + +
      +
    • -n specifies the configuration file of an installed + Apache service (Apache 1.3.7 and later):
    • +
    +
    +    apache -n "service name"
    +
    + +

    In these cases, the proper ServerRoot should be set in the + configuration file.

    + +

    If you don't specify a configuration file name with -f or + -n, Apache will use the file name compiled into the server, + usually "conf/httpd.conf". Invoking Apache with the -V switch + will display this value labeled as SERVER_CONFIG_FILE. Apache + will then determine its ServerRoot by trying the following, in + this order:

    + +
      +
    • A ServerRoot directive via a -C switch.
    • + +
    • The -d switch on the command line.
    • + +
    • The current working directory
    • + +
    • A registry entry, created if you did a binary + install.
    • + +
    • The server root compiled into the server.
    • +
    + +

    The server root compiled into the server is usually + "/apache". invoking apache with the -V switch will display this + value labeled as HTTPD_ROOT.

    + +

    When invoked from the start menu, Apache is usually passed + no arguments, so using the registry entry is the preferred + technique for console Apache.

    + +

    During a binary installation, a registry key will have been + installed, for example:

    +
    +  HKEY_LOCAL_MACHINE\Software\Apache Group\Apache\1.3.13\ServerRoot
    +
    + +

    This key is compiled into the server and can enable you to + test new versions without affecting the current version. Of + course you must take care not to install the new version on top + of the old version in the file system.

    + +

    If you did not do a binary install then Apache will in some + scenarios complain about the missing registry key. This warning + can be ignored if it otherwise was able to find its + configuration files.

    + +

    The value of this key is the "ServerRoot" directory, + containing the conf directory. When Apache starts + it will read the httpd.conf file from this + directory. If this file contains a ServerRoot + directive which is different from the directory obtained from + the registry key above, Apache will forget the registry key and + use the directory from the configuration file. If you copy the + Apache directory or configuration files to a new location it is + vital that you update the ServerRoot directory in + the httpd.conf file to the new location.

    + +

    To run Apache from the command line as a console + application, use the following command:

    +
    +    apache 
    +
    + +

    Apache will execute, and will remain running until it is + stopped by pressing control-C.

    + +

    Controlling Apache in a + Console Window

    + +

    You can tell a running Apache to stop by opening another + console window and running:

    +
    +    apache -k shutdown
    +
    + +

    Note: This option is only available with Apache + 1.3.3 and later.

    + +

    For earlier versions, you must use Control-C in the Apache + console window to shut down the server.

    + +

    From version 1.3.3 through 1.3.12, this should be used + instead of pressing Control-C in a running Apache console + window, because it allowed Apache to end any current + transactions and cleanup gracefully.

    + +

    As of version 1.3.13 pressing Control-C in the running + window will cleanup Apache quite gracefully, and you may use -k + stop as an alias for -k shutdown. Earlier versions do not + understand -k stop.

    + +

    You can also tell Apache to restart. This makes it re-read + the configuration files. Any transactions in progress are + allowed to complete without interruption. To restart Apache, + run:

    +
    +    apache -k restart
    +
    + +

    Note: This option is only available with Apache + 1.3.3 and later. For earlier versions, you need to use + Control-C in the Apache console window to shut down the server, + and then restart the server with the Apache + command.

    + +

    Another very useful feature is the configuration + files test option. To test the Apache configuration files, + run:

    +
    +    apache -t
    +
    + +

    This is especially useful following alterations to the + configuration files while Apache is still running. You can make + the changes, confirm that the syntax is good by issuing the + "apache -t" command, then restart Apache with "apache -k + restart". Apache will re-read the configuration files, allowing + any transactions in progress to complete without interruption. + Any new request will then be served using the new + configuration.

    + +

    Note: for people familiar with the Unix version of Apache, + these commands provide a Windows equivalent to kill -TERM + pid and kill -USR1 pid. + The command line option used, -k, was chosen as a + reminder of the "kill" command used on Unix.

    + + + + diff --git a/htdocs/manual/windows.html.html b/htdocs/manual/windows.html.html new file mode 100644 index 00000000000..f916c347ee5 --- /dev/null +++ b/htdocs/manual/windows.html.html @@ -0,0 +1,4 @@ + + + diff --git a/htdocs/manual/windows.html.ja.jis b/htdocs/manual/windows.html.ja.jis new file mode 100644 index 00000000000..c06f6ba5bb5 --- /dev/null +++ b/htdocs/manual/windows.html.ja.jis @@ -0,0 +1,636 @@ + + + + + + Microsoft Windows $B$G$N(B Apache $B$N;HMQ(B + + + + + + + + +

    Microsoft Windows $B$G$N(B Apache $B$N;HMQ(B

    + +

    $B$3$NJ8=q$O!"(BMicrosoft Windows $B>e$G$N(B Apache 1.3 + $B$N%$%s%9%H!<%k!"@_Dj!"l9g$O!"(BMicrosoft Windows $B$G$N(B + Apache $B$N%3%s%Q%$%k(B $B$r8+$F$/$@$5$$!#(B +

    + +

    $B$b$7%P%0$r8+$D$1$?$i!"(B$B%P%0Js9p%Z!<%8(B$B$GJs9p$7$F$/$@$5$$!#(B + $B$=$&$$$C$?4sM?$O4?7^$7$^$9!#(B + $B%3!<%I$^$?$ODs0F$r%P%0Js9p%Z!<%8$GJs9p$9$k$+!"(B + new-httpd $B%a!<%j%s%0%j%9%H$K;22C$7$F$/$@$5$$!#(B

    + +

    $B%P%0Js9p%Z!<%8$H(B new-httpd $B%a!<%j%s%0%j%9%H$O!"(BApache + $B$N@_Dj$d$B$"$j$^$;$s(B$B!#(B $B%P%0!&%l%]!<%H$dMW5a$rDs=P$9$kA0$K$^$:!"(B + $B$3$NJ8=q!"(B$B$h$/=P$k + $B$N%Z!<%8!"$=$NB>4XO"$9$kJ8=q$r;2>H$7$F$/$@$5$$!#(B + $B$=$l$G$b$^$@5?Ld$dLdBj$,$"$k$J$i!"(Bcomp.infosystems.www.servers.ms-windows + $B%K%e!<%9%0%k!<%W$KEj9F$7$F$/$@$5$$!#B?$/$N(B Apache $B%f!<%6$,$$$F(B + Windows $B>e$G(B Apache $B$r;HMQ$9$k$K$"$?$C$F$N?7$7$$5?Ld!"(B + $B$o$+$j$K$/$$5?Ld$KBP$7$FJVEz$r$/$l$k$G$7$g$&!#(B

    + +

    groups.google.com $B$N%K%e!<%9%0%k!<%W$N%"!<%+%$%V(B$B$K$h$j0JA0$NLdBj$r(B + $B4JC1$K1\Mw$G$-$^$9!#%K%e!<%9%0%k!<%W$N%"!<%+%$%V$r8!:w$9$l$P!"(B + $B$[$H$s$I$NLdBj$O4{=P$G!"C/$+$,2sEz$7$F$$$k$N$r8+$D$1$i$l$k$G$7$g$&!#(B +

    + +

    $B7Y9p(B: NT $B>e$G$N(B Apache $B$O@-G=LL$G$^$@:GE,2=$5$l$F$$$^$;$s!#(B + $B8=;~E@$G$O(B Apache $B$O(B Unix $B%W%i%C%H%U%)!<%`$G:G9b$N@-G=$rH/4x$7!"(B + $B:G$b?.Mj$G$-$^$9!#;~$H$H$b$K(B NT $B$G$N@-G=$O2~A1$5$l$F!"(BWindows + $B%W%i%C%H%U%)!<%`>e$G$OMh$?$k$Y$-%P!<%8%g%s(B 2.0 + $B$K$*$$$FBg$-$/?JJb$7$F$$$^$9!#%&%'%V%5!<%P@-G=$NAjBPE*$J%l%S%e!<$r(B + $B$7$F$$$k?M$KBP$7$F$O!"$^$@!"(BSolaris$B!"(BFreeBSD$B!"(BLinux $B$J$I$N(B Unix + $B%W%i%C%H%U%)!<%`$G$N(B Apache $B$KBP$7$FHf3S$9$k$h$&$K$*4j$$$7$F$$$^$9!#(B +

    +
    + + +
    + +

    $BMW7o(B

    + +

    Apache 1.3 $B$O!"(BWindowsNT 4.0 $B$H(B Windows 2000 + $B$GF0$/$h$&$K@_7W$5$l$F$$$^$9!#%P%$%J%j$N%$%s%9%H!<%i$O(B + $B%$%s%F%k@=$N$b$N$J$I(B x86 $B%U%!%_%j!<$N%W%m%;%C%5$G$N$_F0:n$7$^$9!#(B + Apache $B$O(B Windows 95 $B$d(B 98 $B$G$bF0:n$7$^$9$,!"(B + $B$3$l$i$O%F%9%H$5$l$F$$$^$;$s!#(B + $B$9$Y$F$N>l9g(B TCP/IP $B%M%C%H%o!<%/$,%$%s%9%H!<%k$5$l$F$$$J$1$l$P$J$j$^$;$s!#(B

    + +

    NT 4.0 $B$Gl9g!"%5!<%S%9%Q%C%/(B 3 $B$^$?$O(B 6 + $B$N%$%s%9%H!<%k$r?d>)$7$^$9!#%5!<%S%9%Q%C%/(B 4 $B$K$O(B TCP/IP $B$H(B WinSock + $B$NLdBj$,$"$j!"$=$l$O%5!<%S%9%Q%C%/(B 5 $B0J9_$G$O2r7h$5$l$F$$$^$9!#(B

    + + +

    $BCm(B: Apache 1.3.7 $B0J9_$G$O(B "Winsock2" + $B$,I,MW$K$J$j$^$9!#(B

    + +

    Windows 95 $B$Gl9g!"(BApache $B$r$B$3$3(B$B$+(B$B$3$3(B$B$+$iF~ + +

    Windows $BMQ$N(B Apache + $B$N%@%&%s%m!<%I(B

    + +

    Apache $B$N:G?7$N%P!<%8%g%s$K$D$$$F$N>pJs$O!"(Bhttp://httpd.apache.org/ $B$N(B + Apache $B%&%'%V%5!<%P$N%Z!<%8$G8+$D$1$i$l$^$9!#$=$3$K$O!"8=:_$N%j%j!<%9!"(B + $B:G?7$N%"%k%U%!!"$^$?$O%Y!<%?%F%9%H%j%j!<%9$H$H$b$K%_%i!<%&%'%V%5%$%H!"(B + anonymous FTP $B%5%$%H$N>\:Y$,%j%9%H$5$l$^$9!#(B

    + + +

    Windows $BMQ$N(B Apache $B$N%P%$%J%jG[I[$O!"%=!<%9%3!<%I$K6=L#$,$"$k$J$i(B + apache_1_3_#-win32-src.msi $B$HL>IU$1$i$l$?$b$N$r!"(B + $B$^$?$O%=!<%9%3!<%I$KBP$7$F2?$b$9$k$D$b$j$,$J$/!"(B + $B%@%&%s%m!<%I$,Aa$/:Q$s$@J}$,$$$$$H;W$&$J$i(B + apache_1_3_#-win32-no_src.msi $B$r%@%&%s%m!<%I$7$F$/$@$5$$!#(B + $B$3$l$i$N%U%!%$%k$O$=$l$>$l$K40A4$J(B Apache $B%i%s%?%$%`$r4^$s$G$$$^$9!#(B + Apache $B%i%s%?%$%`G[I[$r%$%s%9%H!<%k$9$kA0$K(B Microsoft Installer + version 1.10 $B$,(B PC $B$K%$%s%9%H!<%k$5$l$F$$$J$1$l$P$J$j$^$;$s!#(BWindows + 2000 $B5Z$S(B Windows Me $B$G$O(B Microsoft Installer $B$,I8=`$G(B + $B%5%]!<%H$5$l$F$$$^$9$,!"B>$G$O$=$l$r%@%&%s%m!<%I$9$kI,MW$,$"$j$^$9!#(B + $B$5$i$J$k>pJs$O%a%$%s$N%@%&%s%m!<%I%Z!<%8(B http://httpd.apache.org/download.cgi $B$K9T$C$F$/$@$5$$!#(B + Microsoft Installer $B$r8+$D$1$k$B%_%i!<%5%$%H$N(B win32 $B%@%&%s%m!<%I%G%#%l%/%H%j(B$B$K8+$D$+$j$^$9(B

    + +

    $B%=!<%9%3!<%I$O(B -src.msi $B$NG[I[$^$?$O(B $BG[I[%G%#%l%/%H%j(B $B$K$"$k(B .zip + $B%U%!%$%k$+$iF~.msi $B%Q%C%1!<%8$r(B + $B%$%s%9%H!<%k$9$kI,MW$O$^$C$?$/$"$j$^$;$s!#(B.zip + $B%U%!%$%k$O!"(BMS-DOS $B$N2~9T(B (.tar.gz $B$d(B .tar.Z $B$GG[I[$5$l$k(B unix + $B$G;H$o$l$k(B lf $B$@$1$N2~9T$NBe$o$j$K(B cr/lf $B$N2~9T(B) $B$,;H$o$l$?(B + $B%=!<%9%3!<%I$@$1$,4^$^$l$^$9!#(B +

    + +

    $B$^$?!"%=!<%9$O(B.tar.gz, .tar.Z + $B$N%"!<%+%$%V$+$i$bF~/$J$/$H$b(B .mak $B$H(B + .dsp $B$r(B MSVC $B$,2r.zip $B%U%!%$%k$rA*$s$G$/$@$5$$!#(B

    + +

    $BCm(B: Apache 1.3.17 $B$h$jA0$G$O!"(BInstallShield 2.0 $B$N7A<0$N(B + .exe $B%U%!%$%k$,G[I[$5$l$^$7$?(B + [Windows Me $B$d(B Windows 2000 $B$G(B] InstallShield + $B%Q%C%1!<%8$r;H$($J$$%f!<%6$,A}Bg$7$?$?$a!"(B + $B%P%$%J%jG[I[$O4JC1$KMxMQ$G$-$k(B Microsoft Installer $B$N(B + .msi $B$N7A<0$G:F%Q%C%1!<%8$5$l$^$7$?(B

    + +

    Windows $BMQ$N(B Apache + $B$N%$%s%9%H!<%k(B

    + +

    $B>e$G%@%&%s%m!<%I$7$?(B Apache .msi $B$r + +

      +
    • $B$9$Y$F$N%f!<%6$G(B Apache $B$r + +
    • $B%5!<%PL>!"%I%a%$%sL>!"$*$h$S4IM} + + +
    • Apache $B$r%$%s%9%H!<%k$9$k%G%#%l%/%H%j(B ($B%G%U%)%k%H$O(B + C:\Program Files\Apache Group\Apache $B$G$9$,(B + $B$3$l$O$I$N%G%#%l%/%H%j$K$G$bJQ99$G$-$^$9(B)$B!#(B
    • + +
    • $B%$%s%9%H!<%k%?%$%W!#(B"Complete" $B%*%W%7%g%s$G$O!"(B + $B$9$Y$F$,%$%s%9%H!<%k$5$l$^$9!#$b$7(B -src.msi + $B%Q%C%1!<%8$r%@%&%s%m!<%I$7$?$N$J$i%=!<%9%3!<%I$b4^$^$l$^$9!#(B + $B%I%-%e%a%s%H$d%=!<%9%3!<%I$r%$%s%9%H!<%k(B + $B$7$?$/$J$$>l9g$O(B "Custom" $B%$%s%9%H!<%k$rA*$s$G$/$@$5$$!#(B
    • +
    + +

    $B%$%s%9%H!<%k$N4V$K!"(BApache $B$O%$%s%9%H!<%k%G%#%l%/%H%jCf$N(B + conf $B%G%#%l%/%H%j$N%U%!%$%k$r@_Dj$7$^$9!#$7$+$7!"(B + $B$3$N%G%#%l%/%H%j$N%U%!%$%k$,$I$l$+B8:_$7$?>l9g$O!"$=$l$r>e=q$-(B + $B$7$^$;$s(B$B!#Be$o$j$K!"BP1~$7$?%U%!%$%k$,(B + .default.conf $B$N3HD%;R$rIU$1$FJ]B8$5$l$^$9!#(B + $B$D$^$j!"Nc$($P(B conf\httpd.conf $B$,B8:_$7$?$J$i!"(B + $B$=$l<+BN$OJQ99$5$l$J$$$1$l$I$b!"%$%s%9%H!<%k$5$l$?$G$"$m$&%P!<%8%g%s$,(B + conf\httpd.default.conf $B$H$7$F;D$5$l$^$9!#%$%s%9%H!<%k8e$K!"(B + .default.conf $B$G$I$3$,?7$7$/$J$C$?$N$+!"(B + $B + +

    htdocs\index.html + $B%U%!%$%k$b!"$9$G$KB8:_$9$l$P>e=q$-$5$l$^$;$s(B + (index.html.default $B%U%!%$%k$H$7$F%$%s%9%H!<%k(B + $B$5$l$k$3$H$b$"$j$^$;$s(B)$B!#(B + $B$3$l$O!"4{B8$N(B Apache $B$X$N>e=q$-%$%s%9%H!<%k$,0BA4$J$3$H$r0UL#$7$^$9(B + ($B$7$+$7!"%$%s%9%H!<%k$r$9$kA0$KF0$$$F$$$k4{B8$N%5!<%P$O(B + $B;_$a$J$1$l$P$J$j$^$;$s!#(B + $B%$%s%9%H!<%k40N;8e$K?7$7$$$b$N$r3+;O$7$F$/$@$5$$(B)$B!#(B

    + +

    Apache $B$r%$%s%9%H!<%k$7$?8e$K!"I,MW$J$i(B conf + $B%G%#%l%/%H%jFb$N@_Dj%U%!%$%k$rJT=8$7$F$/$@$5$$!#(B + $B$3$l$i$N%U%!%$%k$O%$%s%9%H!<%k$N4V$K!"(B + $B%$%s%9%H!<%k$5$l$?%G%#%l%/%H%j$+$i(B Apache + $B$,F0:n$G$-$k$h$&$K@_Dj$5$l!"%I%-%e%a%s%H$O%5%V%G%#%l%/%H%j(B + htdocs $B$N$b$N$,%/%i%$%"%s%H$KAw$i$l$^$9!#(B + Apache $B$r$K$bBt;3$"$j$^$9$,!"(B + $B$9$0$K;H$$;O$a$?$$>l9g$O!"(B + $B%$%s%9%H!<%k$5$l$?$^$^$N>uBV$G$bF0:n$9$k$G$7$g$&!#(B

    + +

    $B$b$7(B Apache $B$r%"%s%$%s%9%H!<%k$9$k$3$H$K$J$C$?>l9g!"@_Dj%U%!%$%k$H(B + $B%m%0%U%!%$%k$O:o=|$5$l$^$;$s!#@_Dj%U%!%$%k$dB>$N%&%'%V%U%!%$%k$r(B + $B;D$7$?$$$H;W$o$J$$$J$i%G%#%l%/%H%j%D%j!<(B ($B%G%U%)%k%H$G$O(B + "C:\Program Files\Apache Group") $B$r<+J,$G:o=|$9$kI,MW$,$"$j$^$9!#(B + httpd.conf $B%U%!%$%k$O(B Apache $B$r;H$&>e$GC_@Q$5$l$?@.2L$G$"$k$N$G!"(B + $B:o=|$9$k$?$a$K$OO+NO$rJ'$&I,MW$,$"$j$^$9!#(B + $B$"$J$?$N:n$C$?2DG=@-$,$"$kB>$NA4$F$N%U%!%$%k$K$*$$$F$bF1$8$3$H$,(B + $B8@$($^$9!#(BApache $B$,:n$C$?%m%0%U%!%$%k$bF1MM$G$9!#(B

    + +

    Windows $BMQ$N(B Apache $B$r

    + +

    Apache $B$r + +

      +
    • $B!V(B$B%5!<%S%9(B$B!W$H$7$F!#(B + $B$b$7%^%7%s%V!<%H;~$K(B Apache $B$K!"<+F0E*$K3+;O$7$?$$!"(B + $B$^$?%m%0%*%U$7$F$b!"(BApache $B$NF0:n$OB3$1$?$$$J$i!"(B + $B$3$l$,:GA1$N%*%W%7%g%s$G$9!#(B
    • + +
    • $B%3%s%=!<%k%&%#%s%I%&(B$B$+$i!#(B + $B$3$N%3%s%=!<%k%&%#%s%I%&$rJD$8$k$3$H$K$h$j(B Apache + $B%5!<%P$O=*N;$5$l$^$9!#(B
    • +
    + +

    Apache $B$r(B Windows $B%5!<%S%9(B$B$H$7$F3+;O$7$h$&$H$9$kA0$K!"(B + $B0J2<$N

    + +

    $B%3%s%=!<%k%&%#%s%I%&$+$i(B Apache $B$r$B%3%s%=!<%k%&%#%s%I%&$G(B Apache $B$r%3%s%H%m!<%k$9$k(B + $B$r;2>H$7$F!"%3%s%=!<%k%&%#%s%I%&$G(B Apache + $B$r%3%s%H%m!<%k$9$k%3%^%s%I$r;H$C$F$/$@$5$$!#(B

    + +

    Apache 1.3.13 $B0J9_$G$O!"(BCtrl+C $B$^$?$O(B Ctrl+Break + $B$r2!$7$F$b!"%3%s%=!<%k%&%#%s%I%&$N(B Apache $B$r0BA4$K(B + $B;_$a$i$l$k$h$&$K$J$j$^$7$?!#$=$7$F!"%P!<%8%g%s(B 1.3.13 $B$+$i!"(B + Windows NT/2000 $B>e$G;H$&>l9g$O!"%7%9%F%`%a%K%e!<(B + ($B%3%s%=!<%k%&%#%s%I%&$N:8>e%3!<%J!<$N%"%$%3%s$r%/%j%C%/(B) + $B$+$i!VJD$8$k!W$rA*$V$+!"1&>e%3!<%J!<$N=*N;(B (X) + $B%\%?%s$r%/%j%C%/$9$k$3$H$K$h$j(B Apache $B$rDd;_$5$;$k$3$H$b$G$-$^$9!#(B + Apache $B%P!<%8%g%s(B 1.3.15 $B$+$i!"%a%K%e!<9`L\$N!VJD$8$k!W$d=*N;(B (X) + $B%\%?%s$O(B Windows 95/98 $B$G$bF/$-$^$9!#$7$+$7!"$=$l$h$jA0$N%P!<%8%g%s$N(B + Apache $B%5!<%P$G$O$-$l$$$K=*N;$7$J$$$N$G$=$&$$$C$?$B:N$i$J$$$G$/$@$5$$(B$B!#(B

    + +

    Windows $BMQ$N(B Apache $B$r%F%9%H$9$k(B

    + +

    Apache $B$N5/F0$K$*$$$F%H%i%V%k$,$"$l$P!"LdBj$r@Z$jN%$9$?$a!"(B + $B0J2<$N$C$F$/$@$5$$!#$3$l$O(B "Start Apache as a console app" + $B$N%7%g!<%H%+%C%H$r%9%?!<%H%a%K%e!<$+$iA*$V$3$H$K$h$j(B Apache + $B$r5/F0$7$?$i$9$0$K(B ($B$"$k$$$OFMA3(B) $B%3%s%=!<%k%&%#%s%I%&$,JD$8$?!"$^$?$O(B + Apache $B$r%5!<%S%9$H$7$F3+;O$9$k$H$-$K%H%i%V%k$KAx$C$?>l9g$K(B + $B$"$F$O$^$j$^$9!#(B +

    + +

    $B%9%?!<%H%a%K%e!<(B - $B%W%m%0%i%`(B $B$+$i!V%3%^%s%I%W%m%s%W%H!W$rl9g$O!"%3%^%s%I$O0J2<$NMM$K$J$j$^$9!#(B

    +
    +  c:
    +  cd "\program files\apache group\apache"
    +  apache
    +  Apache $B$,=*N;$9$k$N$rBT$D$+!"(BCtrl+C $B$rF~NO(B 
    +  more <logs\error.log
    +
    + +

    error.log $B$r3NG'$9$k$3$H$G!"$*$=$i$/0-$+$C$?$H$3$m$rD>$7!"(B + $BLdBj$r2r7h$7$F$d$jD>$9$3$H$,$G$-$k$G$7$g$&!#$b$7<+NO$G(B + $B2r7h$G$-$J$+$C$?>l9g$O!"(B + $B$3$NJ8=q$NKAF,$N(B $BJd=u$N$?$a$N%,%$%I%i%$%s(B + $B$d(B FAQ $B$K=>$C$F$/$@$5$$!#(B + $BB?$/$N%f!<%6$O$?$/$5$s$N@_Dj%@%$%"%m%0$h$j$b!"(B + httpd.conf $B%U%!%$%k$NJ}$,4IM}$d8!::$,4JC1$J$3$H$K5$$E$/$G$7$g$&!#(B

    + + +

    $B3+;O8e$O(B Apache $B$O(B($B@_Dj%U%!%$%k$G(B Port, + Listen $B$^$?$O(B BindAddress + $B%G%#%l%/%F%#%V$rJQ99$7$F$$$J$1$l$P(B) + ($B%3%s%=!<%k%&%#%s%I%&$G$b%5!<%S%9$G$b(B) 80 $BHV%]!<%H$r(B Listen + $B$7$F +

    +  http://localhost/
    +
    +

    $B$rF~NO$7$F%5!<%P$K@\B3$7!"%G%U%)%k%H%Z!<%8$K%"%/%;%9$7$F$/$@$5$$(B

    + +

    $B$3$l$G(B welcome $B%Z!<%8$,JV$5$l!"(BApache + $B%^%K%e%"%k$X$N%j%s%/$,$"$k$O$:$G$9!#$b$72?$b5/$3$i$J$$$+!"(B + $B%(%i!<$@$C$?>l9g$O!"(Blogs $B%G%#%l%/%H%jCf$N(B + error.log $B%U%!%$%k$r8+$F$/$@$5$$!#$b$7%[%9%H$,%M%C%H$K(B + $B@\B3$5$l$F$$$J$$>l9g$O!"$3$N(B URL

    +
    +  http://127.0.0.1/
    +
    +

    $B$r;H$&I,MW$,$"$k$+$b$7$l$^$;$s(B

    + +

    $B$$$C$?$s4pK\E*$J%$%s%9%H!<%k$GF0:n$7$?$i!"(Bconf + $B%G%#%l%/%H%jCf$N%U%!%$%k$rJT=8$7$FE,@Z$K@_Dj$7$F$/$@$5$$!#(B

    + +

    Apache $B$OF1$8%]!<%H$rB>$N(B TCP/IP $B%"%W%j%1!<%7%g%s$H6&M-$9$k$3$H$O(B + $B=PMh$J$$(B $B$N$G!"$^$:FCDj$N%5!<%S%9$r;_$a$k$+%"%s%$%s%9%H!<%k(B + $B$9$kI,MW$,$"$k$+$b$7$l$^$;$s!#$3$l$K$OB>$N%&%'%V%5!<%P$d(B BlackIce + $B$J$I$N%U%!%$%"%&%)!<%k@=IJ$,(B ($B$3$l$i$K8B$i$l$^$;$s$,(B) $B4^$^$l$^$9!#(B + $B$=$l$i$N%5!<%S%9$r;HMQ$;$:(B Apache $B$@$1$r5/F0$5$;$k$+!"(B + $B$=$l$i$N@=IJ$HF1$8(B TCP/IP $B%]!<%H$r(B listen $B$7$J$$$h$&$K!"(BApache + $B$^$?$OB>$N@=IJ$r:F@_Dj$7$F$/$@$5$$!#$I$N%]!<%H$,;HMQ$5$l$F$$$k$N$+(B + $B$r3NG'$9$k$K$O(B Windows $B$N(B "netstat -an" + $B%3%^%s%I$,JXMx$+$bCN$l$^$;$s!#(B

    + +

    Windows $BMQ$N(B Apache $B$r@_Dj$9$k(B

    + +

    Apache $B$O(B conf + $B%G%#%l%/%H%jCf$N%U%!%$%k$K$h$j@_Dj$5$l$^$9!#$3$l$i$O!"(BUnix + $B%P!<%8%g%s$N@_DjMQ%U%!%$%k$HF1$8$G$9$,!"(BWindows $B$N(B Apache + $B$O$$$/$i$+0[$J$k%G%#%l%/%F%#%V$,$"$j$^$9!#(B + $BM-8z$J%G%#%l%/%F%#%V$rCN$k$?$a$K$O(B Apache + $B%I%-%e%a%s%H(B$B$r8+$F$/$@$5$$!#(B

    + + +

    httpd.conf $B$H$=$N%G%#%l%/%F%#%V$rFI$`$3$H$+$i(B + Apache $B%5!<%P$N@_Dj$r$O$8$a$F$/$@$5$$!#(Baccess.conf + $B$H(B srm.conf $B$OB8:_$O$7$F$$$^$9$,!"(B + $B8=:_$G$O$[$H$s$I$N4IM} + +

    httpd.conf $B$K$O$=$l<+BN$K%I%-%e%a%s%H$,$?$/$5$s4^$^$l$F$$$F!"(B + Apache $B%5!<%P$r3+;O$9$k;~$K?d>)$5$l$k%G%U%)%k%H@_Dj$N%G%#%l%/%F%#%V$,B3$$$F$$$^$9!#(B + $B@_Dj%U%!%$%k$rM}2r$9$k$K$O$=$l$i$N%3%a%s%H$rFI$`$3$H$+$i;O$a$F!"(B + $B>/$7JQ99$r$7$F$O%3%s%=!<%k%&%#%s%I%&$+$i(B Apache + $B$r3+;O$7!"JQ99$rE,MQ$5$;$F$/$@$5$$!#(B + $B4V0c$($?$H$-$K:G8e$K9T$C$?JQ99$r85$KLa$9$N$O$h$j4JC1$G$7$g$&!#(B + $B$=$&$9$k$&$A$K$I$NJQ99$,%5!<%P$NIT6q9g$K$D$J$,$k$N$+$H$$$&(B + $BCN<1$,@8$^$l$^$9!#(B +

    + +

    Windows $BMQ$N(B Apache $B$G0[$J$k + +

      +
    • + Windows $BMQ$N(B Apache $B$O%^%k%A%9%l%C%I$J$N$G!"(BUnix $B$G$N(B Apache + $B$N$h$&$K$=$l$>$l$NMW5a$4$H$KJL8D$N%W%m%;%9$r;H$$$^$;$s!#(B + $BBe$o$j$K!"DL>o(B Apache $B%W%m%;%9$,Fs$D$@$1;H$o$l$^$9!#(B + $B?F%W%m%;%9$H%j%/%(%9%H$r=hM}$9$k;R%W%m%;%9$G$9!#(B + $B;R%W%m%;%9$G$O!"$=$l$>$l$N%j%/%(%9%H$OJL8D$N%9%l%C%I$K$h$j(B + $B=hM}$5$l$^$9!#=>$C$F!"!V%W%m%;%9!W(B + $B$r4IM}$9$k%G%#%l%/%F%#%V$,0[$J$j$^$9(B: + +
        +
      • MaxRequestsPerChild - Unix $BMQ$N%G%#%l%/%F%#%V$HF1$8$h$&$K!"(B + $B%W%m%;%9$,>C$($k$^$G$K$I$l$/$i$$$N%j%/%(%9%H$r=hM}$9$k$N$+$r(B + $B%3%s%H%m!<%k$7$^$9!#$?$@$7!"(BUnix $B$H$O0[$J$j0l$D$N%W%m%;%9$O(B + $B0l$D$N%j%/%(%9%H$@$1$N=hM}$G$O$J$/!"$9$Y$F$NMW5a$rF1;~$K=hM}$7$^$9!#(B + $B=>$C$F!"$3$l$r@_Dj$9$k>l9g$O!"Hs>o$K9b$$?t$r;H$&$3$H$,?d>)$5$l$^$9!#(B + $B?d>)$5$l$?%G%U%)%k%H$N(B MaxRequestsPerChild 0 + $B$G$O%W%m%;%9$O>C$($^$;$s!#(B
      • + +
      • ThreadsPerChild - + $B$3$N?7$7$$%G%#%l%/%F%#%V$O!"$$$/$D$N%9%l%C%I$r;H$&$N$+$r(B + $B<($7$^$9!#$3$l$O!"F1;~$K%5!<%P$,=hM}$G$-$k@\B3$N(B + $B:GBg?t$K$J$j$^$9!#BgNL$N%"%/%;%9$,M-$k$N$J$i!"(B + $B$3$l$r==J,$K9b$$?tCM$K@_Dj$7$F$/$@$5$$!#?d>)$N%G%U%)%k%H$O(B + ThreadsPerChild 50 $B$G$9!#(B +
      • +
      +
    • + +
    • $B%G%#%l%/%F%#%V$N0z?t$N%U%!%$%kL>$O(B Unix $B7A<0$G$J$/(B Windows + $B7A<0$N%U%!%$%kL>$r;H$o$l$J$1$l$P$J$j$^$;$s!#$7$+$7!"(BApache + $BFbIt$G$O(B Unix $B7A<0$NL>A0$r;H$&$N$G!"%P%C%/%9%i%C%7%e$NBe$o$j$K(B + $B%9%i%C%7%e$r;H$o$J$1$l$P$J$j$^$;$s!#%I%i%$%VL>$r;H$&$3$H$b$G$-$^$9!#(B + $B>JN,$7$?>l9g$O!"(BApache $B$N + +
    • + Windows $BMQ$N(B Apache $B$O%5!<%P$r:F%3%s%Q%$%k$;$:$Kl9g$O(B modules $B%G%#%l%/%H%j$K$"$kB?$/$N(B + $B%*%W%7%g%s$N%b%8%e!<%k$r%$%s%9%H!<%k$7$^$9!#$=$l$i$N%b%8%e!<%k$d(B + $BB>$N%b%8%e!<%k$rM-8z$K$9$k$K$O!"?7$7$$(B LoadModule + $B%G%#%l%/%F%#%V$r;H$o$J$1$l$P$J$j$^$;$s!#Nc$($P!"(Bstatus + $B%b%8%e!<%k$rM-8z$K$9$k$K$O0J2<(B ($B$5$i$K!"(Bhttpd.conf $B$K(B + status $B$rM-8z$K$9$k%G%#%l%/%F%#%V$,I,MW!#>\:Y$K$D$$$F$O(B mod_status + $B$r;2>H(B) $B$,I,MW$G$9!#(B +
      +    LoadModule status_module modules/mod_status.so
      +
      + +

      $B%m!<%I$G$-$k%b%8%e!<%k$N:n@.(B$B$K$D$$$F$N>pJs$b$"$j$^$9!#(B + $B%5!<%I%Q!<%F%#!<$N%b%8%e!<%k$NCf$K$O(B + $B8E$$7A<0$NL>A0!"(BApacheModuleFoo.dll $B$GG[I[$5$l$F$$$k$3$H$,(B + $B$"$k$3$H$KCm0U$7$F$/$@$5$$!#(B + LoadModule $B%G%#%l%/%F%#%V$O>o$K%5!<%I%Q!<%F%#!<$N%b%8%e!<%k<+?H$N(B + $B%I%-%e%a%s%H$K=>$C$F@_Dj$7$F$/$@$5$$!#(B

    • + +
    • Windows $BMQ$N(B Apache $B%P!<%8%g%s(B 1.3 + $B7O$G$OF14|E*$J8F$S=P$7$,$A$K%V%i%&%6$G8+$i$l$J$$$H$$$&(B + CGI $B@):n$^$l$kHsF14|$NF0:n$r + +
    • +

      Apache $B$O!"(BMicrosoft $B$N(B IIS $B$dB>$N(B Windows + $B%5!<%P$G;H$o$l$k$h$&$J(B ISAPI $B3HD%(B ($B$9$J$o$A(B$B!"(B + $B%$%s%?!<%M%C%H%5!<%P%"%W%j%1!<%7%g%s(B) $B$b%m!<%I$G$-$^$9!#(B + $B>\$7$$>pJs$b$"$j$^$9(B$B!#(B + Apache $B$O(B ISAPI + $B%U%#%k%?$O%m!<%I(B$B$G$-$J$$(B$B$3$H$KCm0U$7$F$/$@$5$$!#(B

      +
    • + +
    • CGI $B$,F0:n$9$k;~$K(B Apache $B$,%9%/%j%W%H$N%$%s%?%W%j%?$r(B + $BH=CG$9$kJ}K!$r(B ScriptInterpreterSource $B%G%#%l%/%F%#%V$r;H$C$F@_Dj$G$-$^$9!#(B +
    • + +
    • Windows $B$G$O(B .htaccess + $B$N$h$&$JL>A0$N%U%!%$%k$O4IM}$7$K$/$$$3$H$,B?$$$N$G!"(B + AccessFilename + $B%G%#%l%/%F%#%V$r;H$C$F$3$N%U%!%$%kL>$rJQ99$9$k$H(B + $BJXMx$+$b$7$l$^$;$s!#(B
    • +
    + +

    $B%3%s%=!<%k%&%#%s%I%&$G(B Apache + $B$r

    + +

    $B%9%?!<%H%a%K%e!<%"%$%3%s5Z$S(B NT $B%5!<%S%9%^%M%8%c!<$O!"(B + Apache $B$r4IM}$9$k$?$a$N4JC1$J%$%s%?%U%'!<%9$rDs6!$7$^$9!#(B + $B$7$+$7!"%3%^%s%I%i%$%s$+$i$NJ}$,4JC1$J>l9g$b$"$j$^$9!#(B

    + +

    Apache $B$G2?$+$9$k$H$-$K$O@_Dj%U%!%$%k$r$I$N$h$&$K8+$D$1$k$N$+$r(B + $BCN$C$F$$$k$3$H$,=EMW$G$9!#%3%^%s%I%i%$%s$G@_Dj%U%!%$%k$r;XDj$9$k$K$O(B + $BFs$D$NJ}K!$,$"$j$^$9(B

    + +
      +
    • -f $B$G$OFCDj$N@_Dj%U%!%$%k$N%Q%9$r;XDj$7$^$9(B
    • +
    + +
    +    apache -f "c:\my server\conf\my.conf"
    +
    +
    +    apache -f test\test.conf
    +
    + +
      +
    • -n $B$O!"%$%s%9%H!<%k$5$l$?(B Apache + $B%5!<%S%9$N@_Dj%U%!%$%k$r;XDj$7$^$9(B (Apache 1.3.7$B0J9_(B)
    • +
    +
    +    apache -n "service name"
    +
    + +

    $B$3$l$i$N>l9g!"@_Dj%U%!%$%k$GE,@Z$J%5!<%P%k!<%H(B + $B$,@_Dj$5$l$F$$$kI,MW$,$"$j$^$9!#(B

    + +

    -f $B$d(B -n $B$G@_Dj%U%!%$%kL>$r;XDj$7$J$$>l9g$O!"(BApache $B$ODL>o(B + "conf/httpd.conf" $B$H$$$&%5!<%P$KAH$_9~$^$l$?(B + $B%U%!%$%kL>$,;H$o$l$^$9!#(BApache $B$K(B -V $B%9%$%C%A$rIU$1$?>l9g!"(B + SERVER_CONFIG_FILE $B$HL>IU$1$i$l$?$3$NCM$,I=<($5$l$^$9!#(B + Apache $B$O!"0J2<$N=g=x$G;n$7$F%5!<%P%k!<%H$r7hDj$7$^$9(B +

    + +
      +
    • -C $B%9%$%C%A$K$h$k(B ServerRoot $B%G%#%l%/%F%#%V(B
    • + +
    • $B%3%^%s%I%i%$%s$N(B -d $B%9%$%C%A(B
    • + +
    • $B8=:_$N:n6H%G%#%l%/%H%j(B
    • + +
    • $B%P%$%J%j%$%s%9%H!<%k$7$?>l9g$O%l%8%9%H%j$N%(%s%H%j(B
    • + +
    • $B%5!<%P$K%3%s%Q%$%k$5$l$F$$$k%5!<%P%k!<%H(B
    • + +
    + +

    $B%5!<%P$KAH$_9~$^$l$k%5!<%P%k!<%H$O!"DL>o(B "/apache" + $B$K$J$j$^$9!#(Bapache $B$K(B -V $B%9%$%C%A$rIU$1$?>l9g$O!"(BHTTPD_ROOT + $BL>IU$1$i$l$?$3$NCM$,I=<($5$l$^$9!#(B

    + +

    $B%9%?!<%H%a%K%e!<$+$i$N>l9g$ODL>o!"(BApache $B$K0z?t$,EO$5$l$J$$$N$G(B + $B%3%s%=!<%k$N(B Apache $B$G$b%l%8%9%H%j$N%(%s%H%j$r;H$&$3$H$,(B + $B?d>)$5$l$kJ}K!$G$9!#(B +

    + +

    $B%P%$%J%j%$%s%9%H!<%kCf$K!"%l%8%9%H%j$N%-!<$,%$%s%9%H!<%k$5$l$^$9!#(B + $BNc$($P(B

    +
    +  HKEY_LOCAL_MACHINE\Software\Apache Group\Apache\1.3.13\ServerRoot
    +
    + +

    $B$3$N%-!<$O%5!<%P$KAH$_9~$^$l$F$$$F!"8=:_$N%P!<%8%g%s$K1F6A$r(B + $BM?$($:$K?7$7$$%P!<%8%g%s$r%F%9%H$9$k$3$H$r2DG=$K$7$^$9!#(B + $B$b$A$m$s!"%U%!%$%k%7%9%F%`>e$G8E$$%P!<%8%g%s$N>e$K?7$7$$(B + $B%P!<%8%g%s$r%$%s%9%H!<%k$7$J$$$h$&$KCm0U$7$J$1$l$P$J$j$^$;$s!#(B

    + +

    $B$b$7%P%$%J%j%$%s%9%H!<%k$r$7$J$+$C$?>l9g$O!"(BApache + $B$O$$$/$D$+$N6Z=q$K1h$C$F!"7gMn$7$F$$$k%l%8%9%H%j%-!<$K$D$$$F$N7Y9p$rH/$7$^$9!#(B + $B$3$N7Y9p$O!"@_Dj%U%!%$%k$r8+$D$1$k$3$H$,2?$i$+$N7A$G=PMh$?$J$i(B + $BL5;k$7$F$+$^$$$^$;$s!#(B

    + +

    $B$3$N%-!<$NCM$O(B conf $B%G%#%l%/%H%j$N$"$k(B + "ServerRoot" $B%G%#%l%/%H%j$G$9!#(BApache $B$O3+;O;~$K(B + httpd.conf $B%U%!%$%k$r$3$N%G%#%l%/%H%j$+$iFI$_$^$9!#(B + $B>e5-$N%l%8%9%H%j%-!<$+$iF@$?%G%#%l%/%H%j$H0[$J$k%G%#%l%/%H%j$,(B + $B$3$N%U%!%$%k$N(B ServerRoot $B%G%#%l%/%F%#%V$G;XDj$5$l$?>l9g$O!"(B + Apache $B$O%l%8%9%H%j%-!<$rK:$l$F@_Dj%U%!%$%k$G;X<($5$l$?%G%#%l%/%H%j$r(B + $B;H$$$^$9!#$b$7(B Apache $B%G%#%l%/%H%j$d@_Dj%U%!%$%k$rJL$N>l=j$K(B + $B%3%T!<$9$k>l9g$O(B httpd.conf $B$N(B ServerRoot + $B$r99?7$9$k$3$H$,4N?4$G$9!#(B +

    + +

    $B%3%s%=!<%k%"%W%j%1!<%7%g%s$H$7$F%3%^%s%I%i%$%s$+$i(B Apache + $B$r +

    +    apache 
    +
    + +

    Apache $B$, + +

    $B%3%s%=!<%k%&%#%s%I%&$N(B Apache + $B$r%3%s%H%m!<%k$7$^$9(B

    + +

    $B +

    +    apache -k shutdown
    +
    + +

    $BCm(B: $B$3$N%*%W%7%g%s$O(B Apache 1.3.3 $B0J9_$G$N$_M-8z$G$9!#(B +

    + +

    $B$h$j0JA0$N%P!<%8%g%s$G$O!"%5!<%P$r;_$a$k$K$O!"(BApache + $B$N%3%s%=!<%k%&%#%s%I%&$G(B control-C $B$r;H$o$J$1$l$P$J$j$^$;$s!#(B

    + +

    $B%P!<%8%g%s(B 1.3.3 $B$+$i(B 1.3.12 $B$^$G$G$O!"(BApache + $B$N%3%s%=!<%k%&%#%s%I%&$G(B control-C $B$r;H$&Be$o$j$K$3$l$NJ}$r(B + $B;H$&$N$,I,MW$G$7$?!#$=$l$r;H$&$H!"(BApache $B$,$=$N;~E@$G$N(B + $B=hM}$r=*N;$7$F$-$l$$$K=*N;$G$-$k$3$H$,$G$-$?$+$i$G$9!#(B +

    + +

    $B%P!<%8%g%s(B 1.3.13 $B$G!"F0:n$7$F$$$k%&%#%s%I%&$G(B Control-C + $B$r;H$C$F$b(B Apache $B$,$-$l$$$K=*N;$9$k$h$&$K$J$C$?$N$G(B + -k shutdown $B$NJLL>$H$7$F(B -k stop $B$r;H$C$F$+$^$$$^$;$s!#(B + $BAa4|$N%P!<%8%g%s$G$O(B -k stop $B$r2r + +

    Apache $B$r!":F%9%?!<%H$5$;$k$3$H$b$G$-$^$9!#$=$l$K$h$j@_Dj%U%!%$%k(B + $B$N:FFI9~$r$7$^$9!#7P2aCf$N$I$N=hM}$b3d9~$^$;$:$K40N;$9$k$3$H$,5v$5$l$^$9!#(B + Apache $B$r:F%9%?!<%H$9$k$K$O$3$l$r +

    +    apache -k restart
    +
    + +

    $BCm(B: $B$3$N%*%W%7%g%s$O(B Apache 1.3.3 $B0J9_$G$N$_M-8z$G$9!#(B + $BAa4|$N%P!<%8%g%s$G$O!"(BApache $B$N%3%s%=!<%k%&%#%s%I%&$G(B Control-C + $B$K$h$j%5!<%P$r=*N;$5$;!"$=$l$+$i(B Apache + $B%3%^%s%I$K$h$C$F%5!<%P$r:F5/F0$9$kI,MW$,$"$j$^$9!#(B +

    + +

    $BB>$K!"@_Dj%U%!%$%k%F%9%H%*%W%7%g%s$H$$$&(B$BHs>o$KJXMx$J(B + $B5!G=$,$"$j$^$9!#(BApache + $B$N@_Dj%U%!%$%k$r%F%9%H$9$k$K$O$3$l$r +

    +    apache -t
    +
    + +

    Apache $B$,$^$@$7!"(B + $B3d9~$_$5$;$k$3$H$J$/=hM}$r?J$a$k$3$H$,=PMh$^$9!#(B + $B?7$7$$%j%/%(%9%H$O?7$7$$@_Dj$K4p$E$$$F=hM}$5$l$^$9!#(B +

    + +

    $BCm(B: Apache $B$N(B Unix + $B%P!<%8%g%s$K@:DL$7$??M!9$K$O!"$3$l$i$N%3%^%s%I$O(B + kill -TERM pid + $B$*$h$S(B kill -USR1 pid $B$HF1Ey$N5!G=$r(B Windows + $B$KDs6!$9$k!"$H8@$C$?J}$,$o$+$j$d$9$$$G$7$g$&!#(B + $B%3%^%s%I%i%$%s$N%*%W%7%g%s$G;H$o$l$k(B -k + $B$O(B Unix $B$K$*$1$k(B "kill" $B%3%^%s%I$rO"A[$5$;$k$b$N$H$7$FA*$P$l$^$7$?!#(B

    + + +