diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 15:01:30 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 15:01:30 +0000 |
commit | 6beeb1b708550be0d4a53b272283e17e5e35fe17 (patch) | |
tree | 1ce8673d4aaa948e5554000101f46536a1e4cc29 /docs/manual/vhosts/name-based.html | |
parent | Initial commit. (diff) | |
download | apache2-6beeb1b708550be0d4a53b272283e17e5e35fe17.tar.xz apache2-6beeb1b708550be0d4a53b272283e17e5e35fe17.zip |
Adding upstream version 2.4.57.upstream/2.4.57
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | docs/manual/vhosts/name-based.html | 25 | ||||
-rw-r--r-- | docs/manual/vhosts/name-based.html.de | 299 | ||||
-rw-r--r-- | docs/manual/vhosts/name-based.html.en | 224 | ||||
-rw-r--r-- | docs/manual/vhosts/name-based.html.fr.utf8 | 267 | ||||
-rw-r--r-- | docs/manual/vhosts/name-based.html.ja.utf8 | 303 | ||||
-rw-r--r-- | docs/manual/vhosts/name-based.html.ko.euc-kr | 266 | ||||
-rw-r--r-- | docs/manual/vhosts/name-based.html.tr.utf8 | 238 |
7 files changed, 1622 insertions, 0 deletions
diff --git a/docs/manual/vhosts/name-based.html b/docs/manual/vhosts/name-based.html new file mode 100644 index 0000000..26593d7 --- /dev/null +++ b/docs/manual/vhosts/name-based.html @@ -0,0 +1,25 @@ +# GENERATED FROM XML -- DO NOT EDIT + +URI: name-based.html.de +Content-Language: de +Content-type: text/html; charset=ISO-8859-1 + +URI: name-based.html.en +Content-Language: en +Content-type: text/html; charset=UTF-8 + +URI: name-based.html.fr.utf8 +Content-Language: fr +Content-type: text/html; charset=UTF-8 + +URI: name-based.html.ja.utf8 +Content-Language: ja +Content-type: text/html; charset=UTF-8 + +URI: name-based.html.ko.euc-kr +Content-Language: ko +Content-type: text/html; charset=EUC-KR + +URI: name-based.html.tr.utf8 +Content-Language: tr +Content-type: text/html; charset=UTF-8 diff --git a/docs/manual/vhosts/name-based.html.de b/docs/manual/vhosts/name-based.html.de new file mode 100644 index 0000000..7bdf376 --- /dev/null +++ b/docs/manual/vhosts/name-based.html.de @@ -0,0 +1,299 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" lang="de" xml:lang="de"><head> +<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type" /> +<!-- + XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + This file is generated from xml source: DO NOT EDIT + XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + --> +<title>Unterstützung namensbasierter virtueller Hosts - Apache HTTP Server Version 2.4</title> +<link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" /> +<link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" /> +<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" /> +<script src="../style/scripts/prettify.min.js" type="text/javascript"> +</script> + +<link href="../images/favicon.ico" rel="shortcut icon" /></head> +<body id="manual-page"><div id="page-header"> +<p class="menu"><a href="../mod/">Module</a> | <a href="../mod/directives.html">Direktiven</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossar</a> | <a href="../sitemap.html">Seitenindex</a></p> +<p class="apache">Apache HTTP Server Version 2.4</p> +<img alt="" src="../images/feather.png" /></div> +<div class="up"><a href="./"><img title="<-" alt="<-" src="../images/left.gif" /></a></div> +<div id="path"> +<a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">HTTP-Server</a> > <a href="http://httpd.apache.org/docs/">Dokumentation</a> > <a href="../">Version 2.4</a> > <a href="./">Virtual Hosts</a></div><div id="page-content"><div id="preamble"><h1>Unterstützung namensbasierter virtueller Hosts</h1> +<div class="toplang"> +<p><span>Verfügbare Sprachen: </span><a href="../de/vhosts/name-based.html" title="Deutsch"> de </a> | +<a href="../en/vhosts/name-based.html" hreflang="en" rel="alternate" title="English"> en </a> | +<a href="../fr/vhosts/name-based.html" hreflang="fr" rel="alternate" title="Français"> fr </a> | +<a href="../ja/vhosts/name-based.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> | +<a href="../ko/vhosts/name-based.html" hreflang="ko" rel="alternate" title="Korean"> ko </a> | +<a href="../tr/vhosts/name-based.html" hreflang="tr" rel="alternate" title="Türkçe"> tr </a></p> +</div> +<div class="outofdate">Diese Übersetzung ist möglicherweise + nicht mehr aktuell. Bitte prüfen Sie die englische Version auf + die neuesten Änderungen.</div> + + <p>Das Dokument beschreibt, wann und wie namensbasierte virtuelle Hosts zu + verwenden sind.</p> +</div> +<div id="quickview"><a href="https://www.apache.org/foundation/contributing.html" class="badge"><img src="https://www.apache.org/images/SupportApache-small.png" alt="Support Apache!" /></a><ul id="toc"><li><img alt="" src="../images/down.gif" /> <a href="#namevip">Namensbasierte gegenüber IP-basierten + virtuellen Hosts</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#using">Die Verwendung von namensbasierten virtuellen Hosts</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#compat">Kompatibilität mit älteren Browsern</a></li> +</ul><h3>Siehe auch</h3><ul class="seealso"><li><a href="ip-based.html">Unterstützung IP-basierter virtueller + Hosts</a></li><li><a href="details.html">Tiefergehende Erörterung der Zuweisung + virtueller Hosts</a></li><li><a href="mass.html">Dynamisch konfiguriertes + Massen-Virtual-Hosting</a></li><li><a href="examples.html">Beispiele für virtuelle Hosts in typischen + Installationen</a></li><li><a href="examples.html#serverpath">ServerPath-Beispielkonfiguration</a></li><li><a href="#comments_section">Kommentare</a></li></ul></div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="section"> +<h2><a name="namevip" id="namevip">Namensbasierte gegenüber IP-basierten + virtuellen Hosts</a></h2> + + <p>IP-basierte virtuelle Hosts verwenden die IP-Adresse der Verbindung, um den + korrekten virtuellen Host zur Bedienung einer Anfrage zu ermitteln. Folglich + benötigen Sie eine IP-Adresse für jeden virtuellen Host. Bei der + Verwendung von namensbasierten virtuellen Hosts verläßt sich der + Server darauf, dass der Client den Hostnamen als Bestandteil der HTTP-Header + angibt. Durch Anwendung dieser Technik können sich mehrere verschiedene + Hosts die gleiche IP-Adresse teilen.</p> + + <p>Die Verwendung von namensbasierten virtuellen Hosts ist gewöhnlich + einfacher. Sie müssen lediglich Ihren DNS-Server darauf einstellen, + jeden Hostnamen auf die richtige IP-Adresse abzubilden, und dann den Apache + HTTP Server so konfigurieren, dass er die verschiedenen Hostnamen erkennt. + Namensbasierte virtuelle Hosts entschärfen auch den Bedarf an + knappen IP-Adressen. Daher sollten Sie namensbasierte virtuelle Hosts + verwenden, sofern kein besonderer Grund dafür existiert, IP-basierte + virtuelle Hosts zu wählen. Mögliche Gründe für die + Verwendung IP-basierter virtueller Hosts sind:</p> + + <ul> + <li>Einige antike Clients sind nicht kompatibel zu namensbasierten + virtuellen Hosts. Damit namensbasierte virtuelle Hosts funktionieren, + muss der Client den HTTP-Host-Header senden. Dies ist bei HTTP/1.1 + vorgeschrieben und in allen modernen HTTP/1.0-Browsern als Erweiterung + implementiert. Wenn Sie Unterstützung für veraltete Clients + benötigen und dennoch namensbasierte virtuelle Hosts verwenden, + dann finden Sie eine mögliche Lösung dafür am Ende des + Dokuments.</li> + + <li>Namensbasierte virtuelle Hosts können aufgrund der Natur des + SSL-Protokolls nicht mit SSL-gesicherten Servern verwendet werden.</li> + + <li>Einige Betriebssysteme und Netzwerkanlagen setzen Techniken zum + Bandbreiten-Management ein, die nicht zwischen Hosts unterscheiden + können, wenn diese nicht auf verschiedenen IP-Adressen liegen.</li> + </ul> + +</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="section"> +<h2><a name="using" id="using">Die Verwendung von namensbasierten virtuellen Hosts</a></h2> + + <table class="related"><tr><th>Referenzierte Module</th><th>Referenzierte Direktiven</th></tr><tr><td><ul><li><code class="module"><a href="../mod/core.html">core</a></code></li></ul></td><td><ul><li><code class="directive"><a href="../mod/core.html#documentroot">DocumentRoot</a></code></li><li><code class="directive"><a href="../mod/core.html#namevirtualhost">NameVirtualHost</a></code></li><li><code class="directive"><a href="../mod/core.html#serveralias">ServerAlias</a></code></li><li><code class="directive"><a href="../mod/core.html#servername">ServerName</a></code></li><li><code class="directive"><a href="../mod/core.html#serverpath">ServerPath</a></code></li><li><code class="directive"><a href="../mod/core.html#virtualhost"><VirtualHost></a></code></li></ul></td></tr></table> + + <p>Um namensbasierte virtuelle Hosts zu verwenden, müssen Sie die + IP-Adresse (und möglicherweise den Port) des Servers benennen, an + der Anfragen für die Hosts entgegengenommen werden. Dies wird mit + der Direktive <code class="directive"><a href="../mod/core.html#namevirtualhost">NameVirtualHost</a></code> + eingestellt. Im Normalfall, wenn alle IP-Adressen des Server verwendet + werden sollen, können Sie <code>*</code> als Argument für + <code class="directive"><a href="../mod/core.html#namevirtualhost">NameVirtualHost</a></code> verwenden. Wenn Sie + vorhaben, mehrere Ports zu nutzen (etwa wenn SSL läuft), sollten + Sie dem Argument einen Port hinzufügen, wie zum Beispiel + <code>*:80</code>. Beachten Sie, + dass die Angabe einer IP-Adresse in einer <code class="directive"><a href="../mod/core.html#namevirtualhost">NameVirtualHost</a></code>-Anweisung den Server nicht + automatisch an dieser Adresse lauschen läßt. Lesen Sie bitte "<a href="../bind.html">Bestimmen der vom Apache verwendeten Adressen und + Ports</a>" für weitere Details. Zusätzlich muss jede hier + angegebene IP-Adresse einer Netzwerkkarte des Servers zugeordnet sein.</p> + + <p>Der nächste Schritt ist die Erstellung eines <code class="directive"><a href="../mod/core.html#virtualhost"><VirtualHost></a></code>-Blocks für jeden einzelnen + Host, den Sie bedienen wollen. Das Argument der Direktive <code class="directive"><a href="../mod/core.html#virtualhost"><VirtualHost></a></code> sollte das gleiche + sein wie das Argument der <code class="directive"><a href="../mod/core.html#namevirtualhost">NameVirtualHost</a></code>-Anweisung (d.h. eine IP-Adresse + oder <code>*</code> für alle Adressen). Innerhalb jedes <code class="directive"><a href="../mod/core.html#virtualhost"><VirtualHost></a></code>-Blocks benötigen + Sie zumindestens eine <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code>-Anweisung, um zu bestimmen, welcher + Host bedient wird, und eine <code class="directive"><a href="../mod/core.html#documentroot">DocumentRoot</a></code>-Anweisung, um anzugeben, wo im + Dateisystem der Inhalt des Hosts abgelegt ist.</p> + + <div class="note"><h3>Der Hauptserver verschwindet</h3> + Wenn Sie virtuelle Hosts zu einem bestehenden Webserver hinzufügen, + müssen Sie auch einen <code class="directive"><a href="../mod/core.html#virtualhost"><VirtualHost></a></code>-Block für den bestehenden Host + <span class="transnote">(<em>Anm.d.Ü.:</em> und bisherigen Hauptserver)</span> erstellen. + Die <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code>- und + <code class="directive"><a href="../mod/core.html#documentroot">DocumentRoot</a></code>-Anweisungen zu diesem + virtuellen Host sollten die gleichen sein wie die globalen <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code>- und <code class="directive"><a href="../mod/core.html#documentroot">DocumentRoot</a></code>-Anweisungen. Führen Sie diesen + virtuellen Host als erstes in der Konfigurationsdatei auf, so dass er als + Standard-Host fungiert. + </div> + + <p>Vorausgesetzt, Sie bedienen z.B. die Domain + <code>www.domain.tld</code> und möchten den virtuellen Host + <code>www.otherdomain.tld</code> hinzufügen, welcher auf + die gleiche IP-Adresse zeigt. Dann fügen Sie einfach Folgendes der + <code>httpd.conf</code> hinzu:</p> + + <div class="example"><p><code> + NameVirtualHost *:80<br /> + <br /> + <VirtualHost *:80><br /> + <span class="indent"> + ServerName www.domain.tld<br /> + ServerAlias domain.tld *.domain.tld<br /> + DocumentRoot /www/domain<br /> + </span> + </VirtualHost><br /> + <br /> + <VirtualHost *:80><br /> + <span class="indent">ServerName www.otherdomain.tld<br /> + DocumentRoot /www/otherdomain<br /> + </span> + </VirtualHost><br /> + </code></p></div> + + <p>Sie können anstelle des <code>*</code> bei den beiden Anweisungen + <code class="directive"><a href="../mod/core.html#namevirtualhost">NameVirtualHost</a></code> und <code class="directive"><a href="../mod/core.html#virtualhost"><VirtualHost></a></code> alternativ eine + eindeutige IP-Adresse angeben. Das kann man beispielsweise machen, um + einige namensbasierte virtuelle Hosts auf einer IP-Adresse zu betreiben und + entweder IP-basierte oder ein anderes Set von namensbasierten virtuellen + Hosts auf einer anderen Adresse.</p> + + <p>Viele Server wollen unter mehr als einem Namen erreichbar sein. Die + Direktive <code class="directive"><a href="../mod/core.html#serveralias">ServerAlias</a></code>, die innerhalb + des <code class="directive"><a href="../mod/core.html#virtualhost"><VirtualHost></a></code>-Abschnittes angegeben wird, + ermöglicht dies. Zum Beispiel zeigt die <code class="directive"><a href="../mod/core.html#serveralias">ServerAlias</a></code>-Anweisung in dem ersten <code class="directive"><a href="../mod/core.html#virtualhost"><VirtualHost></a></code>-Block oben an, dass die + aufgeführten Namen alternative Namen sind, die man verwenden kann, um + das gleiche Webangebot zu erreichen:</p> + + <div class="example"><p><code> + ServerAlias domain.tld *.domain.tld + </code></p></div> + + <p>Anfragen für alle Hosts der Domain <code>domain.tld</code> werden + von dem virtuellen Host <code>www.domain.tld</code> bedient. Die + Platzhalter <code>*</code> und <code>?</code> können anstelle + entsprechender Namen verwendet werden. Natürlich können Sie nicht + einfach Namen erfinden und diese bei <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> oder <code>ServerAlias</code> + angeben, Sie müssen zunächst Ihren DNS Server entsprechend + konfigurieren, dass er diese Namen auf die mit Ihrem Server verknüpfte + IP-Adresse abbildet.</p> + + <p>Und schlußendlich können Sie die Konfiguration der virtuellen + Hosts mittels Angabe weiterer Direktiven innherhalb der <code class="directive"><a href="../mod/core.html#virtualhost"><VirtualHost></a></code>-Container + feineinstellen. Die meisten Direktiven können in diesen Containern + angegeben werden und verändern dann ausschließlich die + Konfiguration des entsprechenden virtuellen Hosts. Prüfen Sie den <a href="../mod/directive-dict.html#Context">Kontext</a> einer Direktive, um + herauszufinden, ob eine bestimmte Direktive zulässig ist. + Im <em>Hauptserver-Kontext</em> (außerhalb der <code class="directive"><a href="../mod/core.html#virtualhost"><VirtualHost></a></code>-Container) definierte + Konfigurationsanweisungen werden nur dann angewendet, wenn sie nicht durch + Einstellungen des virtuellen Hosts außer Kraft gesetzt wurden.</p> + + <p>Wenn nun eine Anfrage eintrifft, prüft der Server zuerst, ob sie eine + IP-Adresse verwendet, die der <code class="directive"><a href="../mod/core.html#namevirtualhost">NameVirtualHost</a></code>-Anweisung entspricht. Ist dies der + Fall, dann sieht er sich jeden <code class="directive"><a href="../mod/core.html#virtualhost"><VirtualHost></a></code>-Abschnitt mit einer passenden + IP-Adresse an und versucht den einen zu finden, dessen <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code>- oder <code class="directive"><a href="../mod/core.html#serveralias">ServerAlias</a></code>-Anweisung mit dem gewünschten + Hostnamen übereinstimmt. Findet er einen, dann verwendet er die + Konfiguration dieses Servers. Wird kein passender virtueller Host gefunden, + dann wird <strong>der erste angegeben virtuelle Host</strong> verwendet, + dessen IP-Adresse paßt.</p> + + <p>Die Folge davon ist, dass der erste aufgeführte virtuelle Host der + <em>Standard</em>-Virtual-Host ist. Die <code class="directive"><a href="../mod/core.html#documentroot">DocumentRoot</a></code>-Anweisung des <em>Hauptservers</em> + wird <strong>niemals</strong> verwendet, wenn eine IP-Adresse mit einer + <code class="directive"><a href="../mod/core.html#namevirtualhost">NameVirtualHost</a></code>-Anweisung + übereinstimmt. Wenn Sie eine spezielle Konfiguration für Anfragen + angeben möchten, die keinem bestimmten virtuellen Host entsprechen, + packen Sie diese Konfiguration einfach in einen <code class="directive"><a href="../mod/core.html#virtualhost"><VirtualHost></a></code>-Container und führen diesen als + erstes in der Konfigurationsdatei auf.</p> + +</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="section"> +<h2><a name="compat" id="compat">Kompatibilität mit älteren Browsern</a></h2> + + <p>Wie zuvor erwähnt gibt es einige Clients, die nicht die notwendigen + Daten senden, mit denen namensbasierte virtuelle Hosts korrekt + funktionieren. Diesen Clients werden stets die Seiten des ersten, für + diese IP-Adresse aufgeführten virtuellen Hosts gesendet werden (des + <cite>primären</cite> namensbasierten virtuellen Hosts).</p> + + <div class="note"><h3>Was bedeutet älter?</h3> + <p>Beachten Sie bitte, wenn wir von älter sprechen, meinen wir auch + älter. Es ist sehr unwahrscheinlich, dass sie einen dieser Browser + heutzutage in Verwendung finden werden. Alle aktuellen Browser-Versionen + senden den <code>Host</code>-Header, so wie er für namensbasierte + virtuelle Hosts benäötigt wird.</p> + </div> + + <p>Mit der Direktive <code class="directive"><a href="../mod/core.html#serverpath">ServerPath</a></code> existiert + eine mögliche Behelfskonstruktion, obgleich sie etwas schwerfällig + ist:</p> + + <p>Beispielkonfiguration:</p> + + <div class="example"><p><code> + NameVirtualHost 111.22.33.44<br /> + <br /> + <VirtualHost 111.22.33.44><br /> + <span class="indent"> + ServerName www.domain.tld<br /> + ServerPath /domain<br /> + DocumentRoot /web/domain<br /> + </span> + </VirtualHost><br /> + </code></p></div> + + <p>Was bedeutet das? Es bedeutet, dass eine Anfrage für eine mit + "<code>/domain</code>" beginnende URI von dem virtuellen Host + <code>www.domain.tld</code> bedient wird. Dies heißt, dass die Seiten + für alle Clients unter <code>http://www.domain.tld/domain/</code> + abrufbar sind, wenngleich Clients, die den Header <code>Host:</code> + senden, auch über <code>http://www.domain.tld/</code> auf sie zugreifen + können.</p> + + <p>Legen Sie einen Link auf der Seite Ihres primären virtuellen Hosts zu + <code>http://www.domain.tld/domain/</code>, um die Behelfslösung + verfügbar zu machen. Bei den Seiten der virtuellen Hosts müssen + Sie dann sicherstellen, entweder außschließlich relative Links + (<em>z.B.</em> "<code>file.html</code>" oder + "<code>../icons/image.gif</code>") zu verwenden oder Links, die das + einleitende <code>/domain/</code> enthalten (<em>z.B.</em>, + "<code>http://www.domain.tld/domain/misc/file.html</code>" oder + "<code>/domain/misc/file.html</code>").</p> + + <p>Dies erfordert etwas Disziplin, die Befolgung dieser Richtlinien stellt + jedoch größtenteils sicher, dass Ihre Seiten mit allen Browsern + funktionieren, alten wie neuen.</p> + +</div></div> +<div class="bottomlang"> +<p><span>Verfügbare Sprachen: </span><a href="../de/vhosts/name-based.html" title="Deutsch"> de </a> | +<a href="../en/vhosts/name-based.html" hreflang="en" rel="alternate" title="English"> en </a> | +<a href="../fr/vhosts/name-based.html" hreflang="fr" rel="alternate" title="Français"> fr </a> | +<a href="../ja/vhosts/name-based.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> | +<a href="../ko/vhosts/name-based.html" hreflang="ko" rel="alternate" title="Korean"> ko </a> | +<a href="../tr/vhosts/name-based.html" hreflang="tr" rel="alternate" title="Türkçe"> tr </a></p> +</div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Kommentare</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Libera.chat, or sent to our <a href="https://httpd.apache.org/lists.html">mailing lists</a>.</div> +<script type="text/javascript"><!--//--><![CDATA[//><!-- +var comments_shortname = 'httpd'; +var comments_identifier = 'http://httpd.apache.org/docs/2.4/vhosts/name-based.html'; +(function(w, d) { + if (w.location.hostname.toLowerCase() == "httpd.apache.org") { + d.write('<div id="comments_thread"><\/div>'); + var s = d.createElement('script'); + s.type = 'text/javascript'; + s.async = true; + s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier; + (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s); + } + else { + d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>'); + } +})(window, document); +//--><!]]></script></div><div id="footer"> +<p class="apache">Copyright 2023 The Apache Software Foundation.<br />Lizenziert unter der <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p> +<p class="menu"><a href="../mod/">Module</a> | <a href="../mod/directives.html">Direktiven</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossar</a> | <a href="../sitemap.html">Seitenindex</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!-- +if (typeof(prettyPrint) !== 'undefined') { + prettyPrint(); +} +//--><!]]></script> +</body></html>
\ No newline at end of file diff --git a/docs/manual/vhosts/name-based.html.en b/docs/manual/vhosts/name-based.html.en new file mode 100644 index 0000000..e2496a3 --- /dev/null +++ b/docs/manual/vhosts/name-based.html.en @@ -0,0 +1,224 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head> +<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /> +<!-- + XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + This file is generated from xml source: DO NOT EDIT + XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + --> +<title>Name-based Virtual Host Support - Apache HTTP Server Version 2.4</title> +<link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" /> +<link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" /> +<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" /> +<script src="../style/scripts/prettify.min.js" type="text/javascript"> +</script> + +<link href="../images/favicon.ico" rel="shortcut icon" /></head> +<body id="manual-page"><div id="page-header"> +<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p> +<p class="apache">Apache HTTP Server Version 2.4</p> +<img alt="" src="../images/feather.png" /></div> +<div class="up"><a href="./"><img title="<-" alt="<-" src="../images/left.gif" /></a></div> +<div id="path"> +<a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">HTTP Server</a> > <a href="http://httpd.apache.org/docs/">Documentation</a> > <a href="../">Version 2.4</a> > <a href="./">Virtual Hosts</a></div><div id="page-content"><div id="preamble"><h1>Name-based Virtual Host Support</h1> +<div class="toplang"> +<p><span>Available Languages: </span><a href="../de/vhosts/name-based.html" hreflang="de" rel="alternate" title="Deutsch"> de </a> | +<a href="../en/vhosts/name-based.html" title="English"> en </a> | +<a href="../fr/vhosts/name-based.html" hreflang="fr" rel="alternate" title="Français"> fr </a> | +<a href="../ja/vhosts/name-based.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> | +<a href="../ko/vhosts/name-based.html" hreflang="ko" rel="alternate" title="Korean"> ko </a> | +<a href="../tr/vhosts/name-based.html" hreflang="tr" rel="alternate" title="Türkçe"> tr </a></p> +</div> + + <p>This document describes when and how to use name-based virtual hosts.</p> +</div> +<div id="quickview"><a href="https://www.apache.org/foundation/contributing.html" class="badge"><img src="https://www.apache.org/images/SupportApache-small.png" alt="Support Apache!" /></a><ul id="toc"><li><img alt="" src="../images/down.gif" /> <a href="#namevip">Name-based vs. IP-based Virtual Hosts</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#alg">How the server selects the proper name-based virtual host</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#using">Using Name-based Virtual Hosts</a></li> +</ul><h3>See also</h3><ul class="seealso"><li><a href="ip-based.html">IP-based Virtual Host Support</a></li><li><a href="details.html">An In-Depth Discussion of Virtual Host Matching</a></li><li><a href="mass.html">Dynamically configured mass virtual hosting</a></li><li><a href="examples.html">Virtual Host examples for common setups</a></li><li><a href="#comments_section">Comments</a></li></ul></div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="section"> +<h2><a name="namevip" id="namevip">Name-based vs. IP-based Virtual Hosts</a></h2> + + <p><a href="ip-based.html">IP-based virtual hosts</a> 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.</p> + + <p>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.</p> + + <p>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 you are using equipment + that explicitly demands IP-based hosting. Historical reasons for + IP-based virtual hosting based on client support are no longer + applicable to a general-purpose web server.</p> + + <p> Name-based virtual hosting builds off of the IP-based virtual host + selection algorithm, meaning that searches for the proper server name + occur only between virtual hosts that have the best IP-based address.</p> + +</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="section"> +<h2><a name="alg" id="alg">How the server selects the proper name-based virtual host</a></h2> + + <p>It is important to recognize that the first step in name-based virtual + host resolution is IP-based resolution. Name-based virtual host + resolution only chooses the most appropriate name-based virtual host + after narrowing down the candidates to the best IP-based match. Using a wildcard (*) + for the IP address in all of the VirtualHost directives makes this + IP-based mapping irrelevant.</p> + + <p>When a request arrives, the server will find the best (most specific) matching + <code class="directive"><a href="../mod/core.html#virtualhost"><VirtualHost></a></code> argument based on + the IP address and port used by the request. If there is more than one virtual host + containing this best-match address and port combination, Apache will further + compare the <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> and <code class="directive"><a href="../mod/core.html#serveralias">ServerAlias</a></code> directives to the server name + present in the request.</p> + + <p>If you omit the <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> + directive from any name-based virtual host, the server will default + to a fully qualified domain name (FQDN) derived from the system hostname. + This implicitly set server name can lead to counter-intuitive virtual host + matching and is discouraged.</p> + + <h3><a name="defaultvhost" id="defaultvhost">The default name-based vhost for an IP and port combination </a></h3> + <p> If no matching ServerName or ServerAlias is found in the set of + virtual hosts containing the most specific matching IP address and port + combination, then <strong>the first listed virtual host</strong> that + matches that will be used.</p> +</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="section"> +<h2><a name="using" id="using">Using Name-based Virtual Hosts</a></h2> + +<table class="related"><tr><th>Related Modules</th><th>Related Directives</th></tr><tr><td><ul><li><code class="module"><a href="../mod/core.html">core</a></code></li></ul></td><td><ul><li><code class="directive"><a href="../mod/core.html#documentroot">DocumentRoot</a></code></li><li><code class="directive"><a href="../mod/core.html#serveralias">ServerAlias</a></code></li><li><code class="directive"><a href="../mod/core.html#servername">ServerName</a></code></li><li><code class="directive"><a href="../mod/core.html#virtualhost"><VirtualHost></a></code></li></ul></td></tr></table> + + <p>The first step is to create a <code class="directive"><a href="../mod/core.html#virtualhost"><VirtualHost></a></code> block for + each different host that you would like to serve. Inside each <code class="directive"><a href="../mod/core.html#virtualhost"><VirtualHost></a></code> block, you will need at minimum a + <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> directive to designate + which host is served and a <code class="directive"><a href="../mod/core.html#documentroot">DocumentRoot</a></code> + directive to show where in the filesystem the content for that host + lives.</p> + + <div class="note"><h3>Main host goes away</h3> + <p> Any request that doesn't match an existing <code class="directive"><a href="../mod/core.html#virtualhost"><VirtualHost></a></code> is handled by the global + server configuration, regardless of the hostname or ServerName.</p> + + <p> When you add a name-based virtual host to an existing server, and + the virtual host arguments match preexisting IP and port combinations, + requests will now be handled by an explicit virtual host. In this case, + it's usually wise to create a <a href="#defaultvhost">default virtual host</a> + with a <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> matching that of + the base server. New domains on the same interface and port, but + requiring separate configurations, can then be added as subsequent (non-default) + virtual hosts.</p> + </div> + + <div class="note"><h3>ServerName inheritance</h3> + <p> It is best to always explicitly list a <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> in every name-based virtual host.</p> + <p>If a <code class="directive"><a href="../mod/core.html#virtualhost">VirtualHost</a></code> doesn't specify + a <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code>, a server name will be + inherited from the base server configuration. If no server name was + specified globally, one is detected at startup through reverse DNS resolution + of the first listening address. In either case, this inherited server name + will influence name-based virtual host resolution, so it is best to always + explicitly list a <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> in every + name-based virtual host.</p> + </div> + + <p>For example, suppose that you are serving the domain + <code>www.example.com</code> and you wish to add the virtual host + <code>other.example.com</code>, which points at the same IP address. + Then you simply add the following to <code>httpd.conf</code>:</p> + + <pre class="prettyprint lang-config"><VirtualHost *:80> + # This first-listed virtual host is also the default for *:80 + ServerName www.example.com + ServerAlias example.com + DocumentRoot "/www/domain" +</VirtualHost> + +<VirtualHost *:80> + ServerName other.example.com + DocumentRoot "/www/otherdomain" +</VirtualHost></pre> + + + <p>You can alternatively specify an explicit IP address in place of the + <code>*</code> in <code class="directive"><a href="../mod/core.html#virtualhost"><VirtualHost></a></code> directives. For example, you might want to do this + in order to run some name-based virtual hosts on one IP address, and either + IP-based, or another set of name-based virtual hosts on another address.</p> + + <p>Many servers want to be accessible by more than one name. This is + possible with the <code class="directive"><a href="../mod/core.html#serveralias">ServerAlias</a></code> + directive, placed inside the <code class="directive"><a href="../mod/core.html#virtualhost"><VirtualHost></a></code> section. For example in the first <code class="directive"><a href="../mod/core.html#virtualhost"><VirtualHost></a></code> block above, the + <code class="directive"><a href="../mod/core.html#serveralias">ServerAlias</a></code> directive indicates that + the listed names are other names which people can use to see that same + web site:</p> + + <pre class="prettyprint lang-config">ServerAlias example.com *.example.com</pre> + + + <p>then requests for all hosts in the <code>example.com</code> domain will + be served by the <code>www.example.com</code> virtual host. The wildcard + characters <code>*</code> and <code>?</code> can be used to match names. + Of course, you can't just make up names and place them in <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> or <code>ServerAlias</code>. You must + first have your DNS server properly configured to map those names to an IP + address associated with your server.</p> + + <p>Name-based virtual hosts for the best-matching set of <code class="directive"><a href="../mod/core.html#virtualhost"><virtualhost></a></code>s are processed + in the order they appear in the configuration. The first matching <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> or <code class="directive"><a href="../mod/core.html#serveralias">ServerAlias</a></code> is used, with no different precedence for wildcards + (nor for ServerName vs. ServerAlias). </p> + + <p>The complete list of names in the <code class="directive"><a href="../mod/core.html#virtualhost">VirtualHost</a></code> + directive are treated just like a (non wildcard) + <code class="directive"><a href="../mod/core.html#serveralias">ServerAlias</a></code>.</p> + + <p>Finally, you can fine-tune the configuration of the virtual hosts + by placing other directives inside the <code class="directive"><a href="../mod/core.html#virtualhost"><VirtualHost></a></code> 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 <a href="../mod/directive-dict.html#Context">Context</a> of the + directive. Configuration directives set in the <em>main server context</em> + (outside any <code class="directive"><a href="../mod/core.html#virtualhost"><VirtualHost></a></code> + container) will be used only if they are not overridden by the virtual host + settings.</p> + +</div></div> +<div class="bottomlang"> +<p><span>Available Languages: </span><a href="../de/vhosts/name-based.html" hreflang="de" rel="alternate" title="Deutsch"> de </a> | +<a href="../en/vhosts/name-based.html" title="English"> en </a> | +<a href="../fr/vhosts/name-based.html" hreflang="fr" rel="alternate" title="Français"> fr </a> | +<a href="../ja/vhosts/name-based.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> | +<a href="../ko/vhosts/name-based.html" hreflang="ko" rel="alternate" title="Korean"> ko </a> | +<a href="../tr/vhosts/name-based.html" hreflang="tr" rel="alternate" title="Türkçe"> tr </a></p> +</div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Comments</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Libera.chat, or sent to our <a href="https://httpd.apache.org/lists.html">mailing lists</a>.</div> +<script type="text/javascript"><!--//--><![CDATA[//><!-- +var comments_shortname = 'httpd'; +var comments_identifier = 'http://httpd.apache.org/docs/2.4/vhosts/name-based.html'; +(function(w, d) { + if (w.location.hostname.toLowerCase() == "httpd.apache.org") { + d.write('<div id="comments_thread"><\/div>'); + var s = d.createElement('script'); + s.type = 'text/javascript'; + s.async = true; + s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier; + (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s); + } + else { + d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>'); + } +})(window, document); +//--><!]]></script></div><div id="footer"> +<p class="apache">Copyright 2023 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p> +<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!-- +if (typeof(prettyPrint) !== 'undefined') { + prettyPrint(); +} +//--><!]]></script> +</body></html>
\ No newline at end of file diff --git a/docs/manual/vhosts/name-based.html.fr.utf8 b/docs/manual/vhosts/name-based.html.fr.utf8 new file mode 100644 index 0000000..062c0a9 --- /dev/null +++ b/docs/manual/vhosts/name-based.html.fr.utf8 @@ -0,0 +1,267 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" lang="fr" xml:lang="fr"><head> +<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /> +<!-- + XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + This file is generated from xml source: DO NOT EDIT + XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + --> +<title>Support Apache des serveurs virtuels par nom - Serveur HTTP Apache Version 2.4</title> +<link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" /> +<link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" /> +<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" /> +<script src="../style/scripts/prettify.min.js" type="text/javascript"> +</script> + +<link href="../images/favicon.ico" rel="shortcut icon" /></head> +<body id="manual-page"><div id="page-header"> +<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossaire</a> | <a href="../sitemap.html">Plan du site</a></p> +<p class="apache">Serveur HTTP Apache Version 2.4</p> +<img alt="" src="../images/feather.png" /></div> +<div class="up"><a href="./"><img title="<-" alt="<-" src="../images/left.gif" /></a></div> +<div id="path"> +<a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">Serveur HTTP</a> > <a href="http://httpd.apache.org/docs/">Documentation</a> > <a href="../">Version 2.4</a> > <a href="./">Serveurs virtuels</a></div><div id="page-content"><div id="preamble"><h1>Support Apache des serveurs virtuels par nom</h1> +<div class="toplang"> +<p><span>Langues Disponibles: </span><a href="../de/vhosts/name-based.html" hreflang="de" rel="alternate" title="Deutsch"> de </a> | +<a href="../en/vhosts/name-based.html" hreflang="en" rel="alternate" title="English"> en </a> | +<a href="../fr/vhosts/name-based.html" title="Français"> fr </a> | +<a href="../ja/vhosts/name-based.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> | +<a href="../ko/vhosts/name-based.html" hreflang="ko" rel="alternate" title="Korean"> ko </a> | +<a href="../tr/vhosts/name-based.html" hreflang="tr" rel="alternate" title="Türkçe"> tr </a></p> +</div> + + <p>Ce document décrit quand et comment utiliser des serveurs + virtuels par nom.</p> +</div> +<div id="quickview"><a href="https://www.apache.org/foundation/contributing.html" class="badge"><img src="https://www.apache.org/images/SupportApache-small.png" alt="Support Apache!" /></a><ul id="toc"><li><img alt="" src="../images/down.gif" /> <a href="#namevip">Serveurs virtuels par nom vs. par IP</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#alg">Comment le serveur sélectionne-t-il le serveur +virtuel basé sur le nom approprié</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#using">Utilisation de serveurs virtuels par nom</a></li> +</ul><h3>Voir aussi</h3><ul class="seealso"><li><a href="ip-based.html">Support Apache des serveurs virtuels par IP</a></li><li><a href="details.html">Détails sur le fonctionnement des serveurs virtuels</a></li><li><a href="mass.html">Configuration dynamique des hébergements virtuels de masse</a></li><li><a href="examples.html">Exemples d'utilisations de VirtualHost</a></li><li><a href="#comments_section">Commentaires</a></li></ul></div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="section"> +<h2><a name="namevip" id="namevip">Serveurs virtuels par nom vs. par IP</a></h2> + + <p>Les <a href="ip-based.html">serveurs virtuels</a> par IP utilisent l'adresse IP + de la connexion afin de déterminer quel serveur virtuel doit + répondre. Par conséquent, vous devez disposer d'adresses IP + différentes pour chaque serveur.</p> + + <p>Avec un hébergement + virtuel par nom, le serveur s'appuie sur les informations + transmises par le client dans les en-têtes HTTP de ses requêtes. + La technique présentée ici vous permet de disposer de serveurs + virtuels différents partagés sur une même adresse IP.</p> + + <p>L'hébergement virtuel par nom est habituellement plus simple, + car il vous suffit de configurer votre serveur DNS pour que + chaque domaine pointe sur l'adresse IP dont vous disposez, et de + configurer votre serveur Apache HTTP afin qu'il reconnaisse + ces domaines. Il réduit aussi la pénurie en adresses IP. Par + conséquent, vous devriez utiliser l'hébergement virtuel par + nom, sauf dans le cas où vous utiliseriez des équipements qui + nécessitent un hébergement basé sur IP. Les raisons historiques de + l'hébergement basé sur IP dans un but de support de certains clients ne + s'appliquent plus à un serveur web d'usage général.</p> + + <p>La sélection du serveur virtuel en fonction du nom s'opère en + dehors de l'algorithme de sélection du serveur virtuel en fonction + de l'adresse IP, ce qui signifie que les recherches du point de vue + du nom du serveur ne s'effectuent que parmi le jeu de serveurs + virtuels pour lesquels la correspondance avec la paire adresse + IP/port est la plus exacte.</p> + +</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="section"> +<h2><a name="alg" id="alg">Comment le serveur sélectionne-t-il le serveur +virtuel basé sur le nom approprié</a></h2> + + <p>Il est important de savoir que la première étape de la résolution + de serveur virtuel basée sur le nom est une résolution basée sur IP. + La résolution de serveur virtuel basée sur le nom ne fait que + choisir le serveur virtuel basé sur le nom le plus approprié, en se + limitant aux candidats qui conviennent le mieux du point de vue IP. + La résolution basée sur IP est sans objet si l'on + utilise un caractère générique (*) pour l'adresse IP dans + toutes les directives VirtualHost.</p> + + <p>A l'arrivée d'une requête, le serveur va rechercher l'argument de + section <code class="directive"><a href="../mod/core.html#virtualhost"><VirtualHost></a></code> présentant la meilleure + (la plus exacte) correspondance avec la paire adresse IP/port + utilisée dans la requête. Si plusieurs serveurs virtuels possèdent + cette même paire adresse IP/port, Apache va ensuite comparer les + valeurs des directives <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> et <code class="directive"><a href="../mod/core.html#serveralias">ServerAlias</a></code> avec le nom de serveur + présent dans la requête.</p> + + <p>Si vous ne définissez pas de directive <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> pour un serveur virtuel à base + de nom, le serveur utilisera par défaut le nom de domaine + entièrement qualifié (FQDN) déduit du nom d'hôte système. Cette + configuration sans nom de serveur explicite peut conduire à des + erreurs de choix du serveur virtuel à utiliser et est déconseillée.</p> + + <h3><a name="defaultvhost" id="defaultvhost">Le serveur virtuel à base de nom + par défaut pour une paire adresse IP/port</a></h3> + <p>Si aucune directive ServerName ou ServerAlias ne correspond dans + la liste de serveurs virtuels présentant la meilleure correspondance + du point de vue adresse IP/port, c'est <strong>le premier serveur + virtuel de cette liste</strong> qui sera utilisé.</p> + + +</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="section"> +<h2><a name="using" id="using">Utilisation de serveurs virtuels par nom</a></h2> + +<table class="related"><tr><th>Modules Apparentés</th><th>Directives Apparentées</th></tr><tr><td><ul><li><code class="module"><a href="../mod/core.html">core</a></code></li></ul></td><td><ul><li><code class="directive"><a href="../mod/core.html#documentroot">DocumentRoot</a></code></li><li><code class="directive"><a href="../mod/core.html#serveralias">ServerAlias</a></code></li><li><code class="directive"><a href="../mod/core.html#servername">ServerName</a></code></li><li><code class="directive"><a href="../mod/core.html#virtualhost"><VirtualHost></a></code></li></ul></td></tr></table> + + + <p>La première étape consiste à créer une section + <code class="directive"><a href="../mod/core.html#virtualhost"><VirtualHost></a></code> + pour chacun des serveurs à définir. Dans chaque section + <code class="directive"><a href="../mod/core.html#virtualhost"><VirtualHost></a></code>, + vous devez définir au minimum une directive + <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> pour désigner + le serveur concerné et une directive + <code class="directive"><a href="../mod/core.html#documentroot">DocumentRoot</a></code> pour préciser + l'emplacement sur le système de fichiers du contenu de ce serveur.</p> + + <div class="note"><h3>Le serveur principal disparaît</h3> + <p>Toute requête qui ne correspond à aucune section <code class="directive"><a href="../mod/core.html#virtualhost"><VirtualHost></a></code> existante + est traitée avec la configuration du serveur principal, sans + tenir compte du nom d'hôte ou de la directive ServerName.</p> + + <p>Lorsque vous ajoutez un serveur virtuel basé sur le nom à un + serveur existant, et si les caractéristiques de ce serveur + virtuel correspondent à des combinaisons IP/port préexistantes, + les requêtes seront alors traitées par un serveur virtuel + explicite. Dans ce cas, il est en général judicieux de créer un + <a href="#defaultvhost">serveur virtuel par défaut</a> + comportant une directive <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> correspondant au nom du + serveur principal. De nouveaux domaines sur les mêmes interface + et port, mais nécessitant des configurations distinctes, + pourront alors être ajoutés en tant que serveurs virtuels + spécifiques (et non par défaut).</p> + </div> + + <div class="note"><h3>Héritage du nom de serveur</h3> + <p>Il est toujours préférable de définir une directive <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> au niveau de chaque serveur + virtuel à base de nom. Si un serveur virtuel ne définit pas + de directive <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code>, le + nom de ce serveur virtuel sera hérité du serveur principal. Si + aucun nom de serveur n'a été explicitement défini au niveau du + serveur principal, le serveur tentera de déterminer son nom via + une résolution de nom DNS inverse sur la première adresse + d'écoute. Dans tous les cas, ce nom de serveur hérité influencera + la sélection du serveur virtuel à base de nom, c'est pourquoi il + est toujours préférable de définir une directive <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> pour chaque serveur virtuel + à base de nom.</p> + </div> + + <p>Par exemple, supposez que vous hébergez le domaine + <code>www.example.com</code> et que vous souhaitez ajouter le + serveur virtuel <code>other.example.com</code> qui pointe sur + la même adresse IP. Il vous suffit d'ajouter la configuration + suivante à <code>httpd.conf</code> :</p> + + <pre class="prettyprint lang-config"><VirtualHost *:80> + # Le premier serveur virtuel de la liste est aussi le + # serveur par défaut pour *:80 + ServerName www.example.com + ServerAlias example.com + DocumentRoot "/www/domain" +</VirtualHost> + +<VirtualHost *:80> + ServerName other.example.com + DocumentRoot "/www/otherdomain" +</VirtualHost></pre> + + + <p>Autrement, vous pouvez spécifiez une adresse IP explicite + à la place de <code>*</code> dans la directive + <code class="directive"><a href="../mod/core.html#virtualhost"><VirtualHost></a></code>. + Par exemple, cette méthode est utile si vous souhaitez faire + tourner quelques serveurs virtuels par nom sur une même adresse + IP, et d'autres, soit par IP, soit basés sur un autre jeu de + serveurs virtuels par nom sur une autre adresse IP.</p> + + <p>Plusieurs serveurs sont accessibles par plus d'un nom. Il + suffit de placer la directive + <code class="directive"><a href="../mod/core.html#serveralias">ServerAlias</a></code> dans une section + <code class="directive"><a href="../mod/core.html#virtualhost"><VirtualHost></a></code>. + Par exemple, dans la première section + <code class="directive"><a href="../mod/core.html#virtualhost"><VirtualHost></a></code> + ci-dessus, la directive <code class="directive"><a href="../mod/core.html#serveralias">ServerAlias</a></code> + indique aux utilisateurs les autres noms permis pour accéder au + même site Web :</p> + + <pre class="prettyprint lang-config">ServerAlias example.com *.example.com</pre> + + + <p>ainsi, toutes les requêtes portant sur un domaine + <code>example.com</code> seront servies par le serveur virtuel + <code>www.example.com</code>. Les caractères joker <code>*</code> + et <code>?</code> peuvent être utilisés pour les correspondances. + Bien entendu, vous ne pouvez pas inventer des noms et les placer + dans une directive <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> + ou <code>ServerAlias</code>. Tout d'abord, votre serveur DNS + doit être correctement configuré pour lier ces noms à une + adresse IP associée avec votre serveur.</p> + + <p>La recherche du serveur virtuel à base de nom qui correspond au + plus près à la requête s'effectue parmi les <code class="directive"><a href="../mod/core.html#virtualhost"><virtualhost></a></code> selon leur + ordre d'apparition dans le fichier de configuration. Le premier + serveur virtuel dont le <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> ou le <code class="directive"><a href="../mod/core.html#serveralias">ServerAlias</a></code> correspond est utilisé, sans + priorité particulière en cas de présence de caractères génériques + (que ce soit pour le ServerName ou le ServerAlias).</p> + + <p>La liste complète des noms dans la section <code class="directive"><a href="../mod/core.html#virtualhost">VirtualHost</a></code> sont traités comme une + directive <code class="directive"><a href="../mod/core.html#serveralias">ServerAlias</a></code> sans + caractères génériques.</p> + + <p>Finalement, vous pouvez affiner la configuration des serveurs + virtuels en plaçant d'autres directives à l'intérieur des sections + <code class="directive"><a href="../mod/core.html#virtualhost"><VirtualHost></a></code>. + La plupart des directives peut être placée dans ces sections en + y changeant seulement la configuration du serveur virtuel associé. + Pour déterminer si une directive particulière est permise, + consultez le <a href="../mod/directive-dict.html#Context">contexte</a> de la + directive. Le jeu de directives configurées dans le contexte + du <em>serveur principal</em> (en dehors de toutes sections + <code class="directive"><a href="../mod/core.html#virtualhost"><VirtualHost></a></code>) + sera utilisé seulement s'il n'y a pas de configuration contraire + par un serveur virtuel.</p> + +</div></div> +<div class="bottomlang"> +<p><span>Langues Disponibles: </span><a href="../de/vhosts/name-based.html" hreflang="de" rel="alternate" title="Deutsch"> de </a> | +<a href="../en/vhosts/name-based.html" hreflang="en" rel="alternate" title="English"> en </a> | +<a href="../fr/vhosts/name-based.html" title="Français"> fr </a> | +<a href="../ja/vhosts/name-based.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> | +<a href="../ko/vhosts/name-based.html" hreflang="ko" rel="alternate" title="Korean"> ko </a> | +<a href="../tr/vhosts/name-based.html" hreflang="tr" rel="alternate" title="Türkçe"> tr </a></p> +</div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Commentaires</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Libera.chat, or sent to our <a href="https://httpd.apache.org/lists.html">mailing lists</a>.</div> +<script type="text/javascript"><!--//--><![CDATA[//><!-- +var comments_shortname = 'httpd'; +var comments_identifier = 'http://httpd.apache.org/docs/2.4/vhosts/name-based.html'; +(function(w, d) { + if (w.location.hostname.toLowerCase() == "httpd.apache.org") { + d.write('<div id="comments_thread"><\/div>'); + var s = d.createElement('script'); + s.type = 'text/javascript'; + s.async = true; + s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier; + (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s); + } + else { + d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>'); + } +})(window, document); +//--><!]]></script></div><div id="footer"> +<p class="apache">Copyright 2023 The Apache Software Foundation.<br />Autorisé sous <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p> +<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossaire</a> | <a href="../sitemap.html">Plan du site</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!-- +if (typeof(prettyPrint) !== 'undefined') { + prettyPrint(); +} +//--><!]]></script> +</body></html>
\ No newline at end of file diff --git a/docs/manual/vhosts/name-based.html.ja.utf8 b/docs/manual/vhosts/name-based.html.ja.utf8 new file mode 100644 index 0000000..2089756 --- /dev/null +++ b/docs/manual/vhosts/name-based.html.ja.utf8 @@ -0,0 +1,303 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja"><head> +<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /> +<!-- + XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + This file is generated from xml source: DO NOT EDIT + XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + --> +<title>名前ベースのバーチャルホスト - Apache HTTP サーバ バージョン 2.4</title> +<link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" /> +<link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" /> +<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" /> +<script src="../style/scripts/prettify.min.js" type="text/javascript"> +</script> + +<link href="../images/favicon.ico" rel="shortcut icon" /></head> +<body id="manual-page"><div id="page-header"> +<p class="menu"><a href="../mod/">モジュール</a> | <a href="../mod/directives.html">ディレクティブ</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">用語</a> | <a href="../sitemap.html">サイトマップ</a></p> +<p class="apache">Apache HTTP サーバ バージョン 2.4</p> +<img alt="" src="../images/feather.png" /></div> +<div class="up"><a href="./"><img title="<-" alt="<-" src="../images/left.gif" /></a></div> +<div id="path"> +<a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">HTTP サーバ</a> > <a href="http://httpd.apache.org/docs/">ドキュメンテーション</a> > <a href="../">バージョン 2.4</a> > <a href="./">バーチャルホスト</a></div><div id="page-content"><div id="preamble"><h1>名前ベースのバーチャルホスト</h1> +<div class="toplang"> +<p><span>翻訳済み言語: </span><a href="../de/vhosts/name-based.html" hreflang="de" rel="alternate" title="Deutsch"> de </a> | +<a href="../en/vhosts/name-based.html" hreflang="en" rel="alternate" title="English"> en </a> | +<a href="../fr/vhosts/name-based.html" hreflang="fr" rel="alternate" title="Français"> fr </a> | +<a href="../ja/vhosts/name-based.html" title="Japanese"> ja </a> | +<a href="../ko/vhosts/name-based.html" hreflang="ko" rel="alternate" title="Korean"> ko </a> | +<a href="../tr/vhosts/name-based.html" hreflang="tr" rel="alternate" title="Türkçe"> tr </a></p> +</div> +<div class="outofdate">この日本語訳はすでに古くなっている + 可能性があります。 + 最近更新された内容を見るには英語版をご覧下さい。 + </div> + + <p>この文書では名前ベースのバーチャルホストをどんなとき、 + どうやって使うかを説明します。</p> +</div> +<div id="quickview"><a href="https://www.apache.org/foundation/contributing.html" class="badge"><img src="https://www.apache.org/images/SupportApache-small.png" alt="Support Apache!" /></a><ul id="toc"><li><img alt="" src="../images/down.gif" /> <a href="#namevip">名前ベースと IP ベースのバーチャルホストの比較</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#using">名前ベースのバーチャルホストを利用する</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#compat">古いブラウザとの互換性</a></li> +</ul><h3>参照</h3><ul class="seealso"><li><a href="ip-based.html">ネームベースのバーチャルホスト</a></li><li><a href="details.html">バーチャルホストのマッチングについての詳細</a></li><li><a href="mass.html">大量のバーチャルホストの動的な設定</a></li><li><a href="examples.html">バーチャルホストの一般的な設定例</a></li><li><a href="examples.html#serverpath">ServerPath 設定例</a></li><li><a href="#comments_section">コメント</a></li></ul></div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="section"> +<h2><a name="namevip" id="namevip">名前ベースと IP ベースのバーチャルホストの比較</a></h2> + + <p>IP ベースのバーチャルホストでは、応答する + バーチャルホストへのコネクションを決定するために IP + アドレスを使用します。ですから、それぞれのホストに個々に IP + アドレスが必要になります。これに対して名前ベースのバーチャルホストでは、 + クライアントが HTTP ヘッダの一部としてホスト名を告げる、 + ということに依存します。この技術で同一 IP + アドレスを異なる多数のホストで共有しています。</p> + + <p>名前ベースのバーチャルホストは通常単純で、それぞれのホスト名と + それに対応する正確な IP アドレスを DNS で設定し、異なる + ホスト名を区別するように Apache HTTP サーバを設定するだけです。 + さらに、名前ベースのバーチャルホストは不足する IP + アドレスの需要を緩和します。したがって、IP ベースのバーチャルホストを + 選択すべき特定の理由がなければ名前ベースのバーチャルホストを使うべきです。 + IP ベースのバーチャルホストを使用することを考慮する理由として、</p> + + <ul> + <li>名前ベースのバーチャルホストに対応していない古いクライアントがある + 名前ベースのバーチャルホストが働くためには、クライアントは + HTTP ホストヘッダを送ってこなければなりません。 + これは HTTP/1.1 の仕様で要求されていて、すべての現代的な + HTTP/1.0 ブラウザでも拡張として実装されています。 + とても古いクライアントをサポートしつつ、名前ベースの + バーチャルホストを行いたい場合は、この文書の最後の方に + 書かれている解決策になるかもしれない方法を見てください。</li> + + <li>名前ベースのバーチャルホストは SSL プロトコルの特徴により、 + SSL セキュアサーバには使えません。</li> + + <li>オペレーティングシステムやネットワーク装置のなかには、 + 別の IP アドレス上でない場合、複数のホストを別扱いできないような + 帯域管理の方法を実装しているものがあります。</li> + </ul> + +</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="section"> +<h2><a name="using" id="using">名前ベースのバーチャルホストを利用する</a></h2> + +<table class="related"><tr><th>関連モジュール</th><th>関連ディレクティブ</th></tr><tr><td><ul><li><code class="module"><a href="../mod/core.html">core</a></code></li></ul></td><td><ul><li><code class="directive"><a href="../mod/core.html#documentroot">DocumentRoot</a></code></li><li><code class="directive"><a href="../mod/core.html#namevirtualhost">NameVirtualHost</a></code></li><li><code class="directive"><a href="../mod/core.html#serveralias">ServerAlias</a></code></li><li><code class="directive"><a href="../mod/core.html#servername">ServerName</a></code></li><li><code class="directive"><a href="../mod/core.html#serverpath">ServerPath</a></code></li><li><code class="directive"><a href="../mod/core.html#virtualhost">VirtualHost</a></code></li><li><code class="directive"><a href="../mod/core.html#virtualhost"><VirtualHost></a></code></li></ul></td></tr></table> + + <p>名前ベースのバーチャルホストを使うには、そのホストへの + リクエストを受け付けるサーバの IP アドレス (もしかしたらポートも) + を指定する必要があります。 + これは <code class="directive"><a href="../mod/core.html#namevirtualhost">NameVirtualHost</a></code> + ディレクティブで設定します。通常、<code class="directive"><a href="../mod/core.html#namevirtualhost">NameVirtualHost</a></code> で + <code>*</code> の属性を使ってサーバの全ての IP アドレスを使います。 + (例えば SSL の使用などで) 複数のポートを使うことを計画しているのであれば、 + 引数に <code>*:80</code> のようにポートも含めるようにしてください。 + <code class="directive"><a href="../mod/core.html#namevirtualhost">NameVirtualHost</a></code> ディレクティブで + IP アドレスを書いても、 + 自動的にサーバがその IP アドレスをリッスンするということはないことに + 注意してください。詳細は「<a href="../bind.html">Apache の使うアドレスと + ポートを設定する</a>」を読んでください。さらに、ここで指定された + IP アドレスは全てサーバのネットワークインターフェースと関連付けられて + いなければなりません。</p> + + <p>次は、扱うホストそれぞれに対して <code class="directive"><a href="../mod/core.html#virtualhost"><VirtualHost></a></code> ブロックを + 作成してください。<code class="directive"><a href="../mod/core.html#virtualhost"><VirtualHost></a></code> + ディレクティブの引数は <code class="directive"><a href="../mod/core.html#namevirtualhost">NameVirtualHost</a></code> + ディレクティブの引数と同じにしてください (すなわち、IP アドレスか、全てのアドレスを意味する + <code>*</code>)。それぞれの <code class="directive"><a href="../mod/core.html#virtualhost"><VirtualHost></a></code> + ディレクティブの中には、最低限、どのホストが扱われるかを示す <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> ディレクティブと、 + そのホスト用のコンテンツがファイルシステム上のどこにあるかを示す + <code class="directive"><a href="../mod/core.html#documentroot">DocumentRoot</a></code> ディレクティブを + 書く必要があります。</p> + + <div class="note"><h3>メインホストはなくなります</h3> + <p>既にあるウェブサーバにバーチャルホストを追加する場合、 + 既存のウェブサーバに対しても <code class="directive"><a href="../mod/core.html#virtualhost"><VirtualHost></a></code> + ブロックを作らなければなりません。このバーチャルホストの + <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> と + <code class="directive"><a href="../mod/core.html#documentroot">DocumentRoot</a></code> + は、グローバルな <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> と + <code class="directive"><a href="../mod/core.html#documentroot">DocumentRoot</a></code> + と同じものにします。また、このバーチャルホストを設定ファイルの中で + 先頭に置いて、デフォルトホストとして動作するようにします。</p> + </div> + + <p>たとえば、<code>www.domain.tld</code> を動かしていて、 + さらにバーチャルホスト <code>www.otherdomain.tld</code> + を追加するとしましょう。このバーチャルホストは同一 IP を指しているとします。 + そのような場合は、<code>httpd.conf</code> + に以下のようなコードを追加するだけです</p> + + <div class="example"><p><code> + NameVirtualHost *:80<br /> + <br /> + <VirtualHost *:80><br /> + <span class="indent"> + ServerName www.domain.tld<br /> + ServerAlias domain.tld *.domain.tld<br /> + DocumentRoot /www/domain<br /> + </span> + </VirtualHost><br /> + <br /> + <VirtualHost *:80><br /> + <span class="indent">ServerName www.otherdomain.tld<br /> + DocumentRoot /www/otherdomain<br /> + </span> + </VirtualHost><br /> + </code></p></div> + + <p><code class="directive"><a href="../mod/core.html#namevirtualhost">NameVirtualHost</a></code> 及び + <code class="directive"><a href="../mod/core.html#virtualhost">VirtualHost</a></code> のどちらの場合も、 + * の部分には明示的に IP アドレスを指定することができます。 + 例えば、ある IP アドレスでは名前ベースのバーチャルホストを使いたい一方で、 + 別の IP アドレスでは、他の IP ベースのバーチャルホストや + 別組の名前ベースのバーチャルホストを使いたい場合、 + そう設定することになるでしょう。</p> + + <p>複数の名前でサーバアクセスができるようにしたいことも多いでしょう。 + このようなことは、<code class="directive"><a href="../mod/core.html#serveralias">ServerAlias</a></code> ディレクティブを <code class="directive"><a href="../mod/core.html#virtualhost"><VirtualHost></a></code> + セクションに記述することで実現できます。 + 例えば上記の <code class="directive"><a href="../mod/core.html#virtualhost"><VirtualHost></a></code> の例であれば、 + 次のように一覧に挙げられた名前が、 + ユーザが同一のウェブサイトとして目にして使用できるサーバ名である、 + と <code class="directive"><a href="../mod/core.html#serveralias">ServerAlias</a></code> + ディレクティブで指定できます。</p> + + <div class="example"><p><code> + ServerAlias domain.tld *.domain.tld + </code></p></div> + + <p><code>domain.tld</code> ドメインへの全てのホストへのリクエストは + <code>www.domain.tld</code> のバーチャルホストが処理します。 + 名前をマッチさせるために、ワイルドカード文字 * や ? + を使用することもできます。もちろん思いつきの名前を作って、 + <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> や + <code class="directive"><a href="../mod/core.html#serveralias">ServerAlias</a></code> + にその名前を書くといったことはできません。まずは、 + これらの名前が サーバに付けられた IP アドレスにマップされるように + DNS サーバを適切に設定しなければなりません。</p> + + <p>最後に、<code class="directive"><a href="../mod/core.html#virtualhost"><VirtualHost></a></code> コンテナの中に + 他のディレクティブを書くことで、バーチャルホストの設定を細かく調整 + することができます。 + ほとんどのディレクティブはこれらのコンテナに設置することができて、 + 変更点はそのバーチャルホストに対してのみ有効になります。 + どのディレクティブを書くことができるかは、ディレクティブの <a href="../mod/directive-dist.html#context">コンテキスト</a> を + 調べてください。<em>主サーバコンテキスト</em> + (<code class="directive"><a href="../mod/core.html#virtualhost"><VirtualHost></a></code> + コンテナの外) の設定用ディレクティブはバーチャルホストでの設定で + 上書きされない場合のみ使用されます。</p> + + <p>リクエストが来ると、サーバはまず最初に <code class="directive"><a href="../mod/core.html#namevirtualhost"><NameVirtualHost></a></code> + にマッチする IP アドレスかどうかをチェックします。マッチすれば + マッチした IP アドレスの <code class="directive"><a href="../mod/core.html#virtualhost"><VirtualHost></a></code> + のそれぞれのセクションの中から + <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> か + <code class="directive"><a href="../mod/core.html#serveralias">ServerAlias</a></code> + に要求されたホスト名があるか探します。 + 見つかればそのサーバ用の設定を使います。マッチするバーチャルホスト + が見つからなければ、マッチした IP アドレスの + <strong>リストの最初にあるバーチャルホスト</strong> が使われます。</p> + + <p>結果として、リストの最初のバーチャルホストが <em>デフォルト</em> の + バーチャルホストになります。IP アドレスが <code class="directive"><a href="../mod/core.html#namevirtualhost">NameVirtualHost</a></code> + ディレクティブにマッチした場合は、<em>メインのサーバ</em> の + <code class="directive"><a href="../mod/core.html#documentroot">DocumentRoot</a></code> + は<strong>決して使われません</strong> + どのバーチャルホストにもマッチしないリクエストに対して、 + 特別な設定をしたいのであれば、設定ファイル中の最初の + <code><VirtualHost></code> コンテナにそれを記述してください。</p> + +</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="section"> +<h2><a name="compat" id="compat">古いブラウザとの互換性</a></h2> + + <p>以前述べたように、名前ベースのバーチャルホストが正しく動作する + ために必要な情報を送ってこないクライアントが依然として存在しています。 + そのようなクライアントに対しては、該当する IP アドレスについて、 + 一番最初に設定されているバーチャルホスト + (<cite>プライマリ</cite>の名前ベースのバーチャルホスト) + からページが送り返されます。</p> + + <div class="note"><h3>どのぐらい古いの ?</h3> + <p>「古い」と表現している場合、本当に古いことを意味して使っています。 + 不幸にして今現在でもこのような古いブラウザに遭遇することがあります。 + 現在のブラウザは全て、名前ベースのバーチャルホストに必要な + <code>Host</code> ヘッダを送ります。</p> + </div> + + <p><a href="../mod/core.html#serverpath"><code>ServerPath</code></a> + ディレクティブで対処が可能です。ちょっと不格好ですけれども。</p> + + <p>設定例</p> + + <div class="example"><p><code> + NameVirtualHost 111.22.33.44<br /> + <br /> + <VirtualHost 111.22.33.44><br /> + <span class="indent"> + ServerName www.domain.tld<br /> + ServerPath /domain<br /> + DocumentRoot /web/domain<br /> + </span> + </VirtualHost><br /> + </code></p></div> + + <p>この例にはどういう意味があるでしょうか? これは + "<code>/domain</code>" で始まる URI へのリクエストはすべて、 + バーチャルホスト <code>www.domain.tld</code> で処理される、 + という意味です。つまり、すべてのクライアントで + <code>http://www.domain.tld/domain/</code> でアクセスできるページが、 + <code>Host:</code> ヘッダを送ってくるクライアントであれば + <code>http://www.domain.tld/</code> としてもアクセスできる、 + という意味です。</p> + + <p>これが動作するようにするには、 + プライマリのバーチャルホストのページに + <code>http://www.domain.tld/domain/</code> へのリンクを設置します。 + そして、バーチャルホストのページでは、純粋な相対リンク (<em>例:</em> + "<code>file.html</code>" や "<code>../icons/image.gif</code>")、 + あるいは <code>/domain/</code> で始まるリンク (<em>例:</em> + "<code>http://www.domain.tld/domain/misc/file.html</code>" や + "<code>/domain/misc/file.html</code>") だけを設置します。</p> + + <p>これには、幾分かの規律が必要となりますが、 + このようなガイドラインを忠実に守ることにより、たいていの場合、 + すべてのブラウザで ― 新しいブラウザでも古いものでも ― + 作成したページが見えるということを保証します。</p> + +</div></div> +<div class="bottomlang"> +<p><span>翻訳済み言語: </span><a href="../de/vhosts/name-based.html" hreflang="de" rel="alternate" title="Deutsch"> de </a> | +<a href="../en/vhosts/name-based.html" hreflang="en" rel="alternate" title="English"> en </a> | +<a href="../fr/vhosts/name-based.html" hreflang="fr" rel="alternate" title="Français"> fr </a> | +<a href="../ja/vhosts/name-based.html" title="Japanese"> ja </a> | +<a href="../ko/vhosts/name-based.html" hreflang="ko" rel="alternate" title="Korean"> ko </a> | +<a href="../tr/vhosts/name-based.html" hreflang="tr" rel="alternate" title="Türkçe"> tr </a></p> +</div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">コメント</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Libera.chat, or sent to our <a href="https://httpd.apache.org/lists.html">mailing lists</a>.</div> +<script type="text/javascript"><!--//--><![CDATA[//><!-- +var comments_shortname = 'httpd'; +var comments_identifier = 'http://httpd.apache.org/docs/2.4/vhosts/name-based.html'; +(function(w, d) { + if (w.location.hostname.toLowerCase() == "httpd.apache.org") { + d.write('<div id="comments_thread"><\/div>'); + var s = d.createElement('script'); + s.type = 'text/javascript'; + s.async = true; + s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier; + (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s); + } + else { + d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>'); + } +})(window, document); +//--><!]]></script></div><div id="footer"> +<p class="apache">Copyright 2023 The Apache Software Foundation.<br />この文書は <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a> のライセンスで提供されています。.</p> +<p class="menu"><a href="../mod/">モジュール</a> | <a href="../mod/directives.html">ディレクティブ</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">用語</a> | <a href="../sitemap.html">サイトマップ</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!-- +if (typeof(prettyPrint) !== 'undefined') { + prettyPrint(); +} +//--><!]]></script> +</body></html>
\ No newline at end of file diff --git a/docs/manual/vhosts/name-based.html.ko.euc-kr b/docs/manual/vhosts/name-based.html.ko.euc-kr new file mode 100644 index 0000000..86f7d2a --- /dev/null +++ b/docs/manual/vhosts/name-based.html.ko.euc-kr @@ -0,0 +1,266 @@ +<?xml version="1.0" encoding="EUC-KR"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" lang="ko" xml:lang="ko"><head> +<meta content="text/html; charset=EUC-KR" http-equiv="Content-Type" /> +<!-- + XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + This file is generated from xml source: DO NOT EDIT + XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + --> +<title≯ ȣƮ - Apache HTTP Server Version 2.4</title> +<link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" /> +<link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" /> +<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" /> +<script src="../style/scripts/prettify.min.js" type="text/javascript"> +</script> + +<link href="../images/favicon.ico" rel="shortcut icon" /></head> +<body id="manual-page"><div id="page-header"> +<p class="menu"><a href="../mod/"></a> | <a href="../mod/directives.html">þ</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html"></a> | <a href="../sitemap.html">Ʈ</a></p> +<p class="apache">Apache HTTP Server Version 2.4</p> +<img alt="" src="../images/feather.png" /></div> +<div class="up"><a href="./"><img title="<-" alt="<-" src="../images/left.gif" /></a></div> +<div id="path"> +<a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">HTTP Server</a> > <a href="http://httpd.apache.org/docs/">Documentation</a> > <a href="../">Version 2.4</a> > <a href="./">ȣƮ</a></div><div id="page-content"><div id="preamble"><h1≯ ȣƮ </h1> +<div class="toplang"> +<p><span> : </span><a href="../de/vhosts/name-based.html" hreflang="de" rel="alternate" title="Deutsch"> de </a> | +<a href="../en/vhosts/name-based.html" hreflang="en" rel="alternate" title="English"> en </a> | +<a href="../fr/vhosts/name-based.html" hreflang="fr" rel="alternate" title="Français"> fr </a> | +<a href="../ja/vhosts/name-based.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> | +<a href="../ko/vhosts/name-based.html" title="Korean"> ko </a> | +<a href="../tr/vhosts/name-based.html" hreflang="tr" rel="alternate" title="Türkçe"> tr </a></p> +</div> +<div class="outofdate"> ֽ ƴմϴ. + ֱٿ ϼ.</div> + + <p> ̸ ȣƮ ϴ + Ѵ.</p> +</div> +<div id="quickview"><a href="https://www.apache.org/foundation/contributing.html" class="badge"><img src="https://www.apache.org/images/SupportApache-small.png" alt="Support Apache!" /></a><ul id="toc"><li><img alt="" src="../images/down.gif" /> <a href="#namevip"≯ IP ȣƮ</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#using"≯ ȣƮ ϱ</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#compat"> ȣȯ</a></li> +</ul><h3></h3><ul class="seealso"><li><a href="ip-based.html">IP ȣƮ </a></li><li><a href="details.html">ȣƮ ã ڼ </a></li><li><a href="mass.html">뷮 ȣƮ ϱ</a></li><li><a href="examples.html">Ϲ ȣƮ </a></li><li><a href="examples.html#serverpath">ServerPath </a></li><li><a href="#comments_section">Comments</a></li></ul></div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="section"> +<h2><a name="namevip" id="namevip"≯ IP ȣƮ</a></h2> + + <p>IP ȣƮ IP ּҸ + ȣƮ Ѵ. ȣƮ ٸ IP ּҸ + Ѵ. ̸ ȣƮ Ŭ̾Ʈ + HTTP ȣƮ ˷ֱ ٶ. ̷ + IP ּҷ ٸ ȣƮ ִ.</p> + + <p≯ ȣƮ DNS ȣƮ ùٸ + IP ּҷ ϵ ȣƮ ϰ, ٸ ȣƮ + ֵ ġ ϱ⸸ ϸǹǷ ϴ. ̸ + ȣƮ IP ּҰ ʿ. Ƿ Ư + IP ȣƮ ٸ ̸ ȣƮ + ؾ Ѵ. IP ȣƮ ؾ δ:</p> + + <ul> + <li≯ ȣƮ ʴ + Ŭ̾Ʈ ִ. ̸ ȣƮ Ϸ + Ŭ̾Ʈ HTTP Host Ѵ. ̴ + HTTP/1.1 ʼ̰, ֱ HTTP/1.0 鵵 + Ȯ Ѵ. ̸ ȣƮ ϸ鼭 + Ŭ̾Ʈ ؾ Ѵٸ ִ + .</li> + + <li>SSL ݻ SSL ȼ ̸ + ȣƮ .</li> + + <li> ü Ʈ ġ ٸ IP ּҸ + ȣƮ ϴ Ʈ 뷮(bandwidth) + Ѵ.</li> + </ul> + +</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="section"> +<h2><a name="using" id="using"≯ ȣƮ ϱ</a></h2> + +<table class="related"><tr><th>õ </th><th>õ þ</th></tr><tr><td><ul><li><code class="module"><a href="../mod/core.html">core</a></code></li></ul></td><td><ul><li><code class="directive"><a href="../mod/core.html#documentroot">DocumentRoot</a></code></li><li><code class="directive"><a href="../mod/core.html#namevirtualhost">NameVirtualHost</a></code></li><li><code class="directive"><a href="../mod/core.html#serveralias">ServerAlias</a></code></li><li><code class="directive"><a href="../mod/core.html#servername">ServerName</a></code></li><li><code class="directive"><a href="../mod/core.html#serverpath">ServerPath</a></code></li><li><code class="directive"><a href="../mod/core.html#virtualhost"><VirtualHost></a></code></li></ul></td></tr></table> + + <p≯ ȣƮ Ϸ + IP ּҸ (Ƹ Ʈ) ؾ Ѵ. ̴ <code class="directive"><a href="../mod/core.html#namevirtualhost">NameVirtualHost</a></code> þ ϴ. + Ϲ IP ּҸ Ѵٸ + <code class="directive"><a href="../mod/core.html#namevirtualhost">NameVirtualHost</a></code> + ƱԸƮ <code>*</code> Ѵ. Ʈ + ( , SSL ) ȹ̶ <code>*:80</code> + ƱԸƮ Ʈ ߰ؾ Ѵ. <code class="directive"><a href="../mod/core.html#namevirtualhost">NameVirtualHost</a></code> þ IP ּҸ + ־ٰ ڵ IP ּҸ ٸ + ϶. ڼ <a href="../bind.html">ġ + ּҿ Ʈ ϱ</a> ϶. , ⼭ + IP ּҴ Ʈ ̽̾ Ѵ.</p> + + <p> ܰ Ϸ ȣƮ <code class="directive"><a href="../mod/core.html#virtualhost"><VirtualHost></a></code> + ̴. <code class="directive"><a href="../mod/core.html#virtualhost>"><VirtualHost>></a></code> þ ƱԸƮ + <code class="directive"><a href="../mod/core.html#namevirtualhost">NameVirtualHost</a></code> þ + ƱԸƮ( , IP ּҳ ּҸ ϴ <code>*</code>) + ƾ Ѵ. <code class="directive"><a href="../mod/core.html#virtualhost>"><VirtualHost>></a></code> ȿ + ּ ȣƮ ϴ <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> þ ȣƮ + Ͻý ִ ϴ <code class="directive"><a href="../mod/core.html#documentroot">DocumentRoot</a></code> þ ʿϴ.</p> + + <div class="note"><h3> ȣƮ </h3> + <p> ϴ ȣƮ ߰Ѵٸ + ϴ ȣƮ <code class="directive"><a href="../mod/core.html#virtualhost"><VirtualHost></a></code> ϵ ߰ؾ + Ѵ. Ͽ ϴ <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> <code class="directive"><a href="../mod/core.html#documentroot">DocumentRoot</a></code> ü <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> <code class="directive"><a href="../mod/core.html#documentroot">DocumentRoot</a></code> ƾ Ѵ. + Ͽ ȣƮ ⺻ ȣƮ + ȴ.</p> + </div> + + <p> <code>www.domain.tld</code> ϰ + ־µ IP ּҿ + <code>www.otherdomain.tld</code> ȣƮ ߰ϰ + ʹٰ . <code>httpd.conf</code> + ߰ϸ ȴ:</p> + + <div class="example"><p><code> + NameVirtualHost *:80<br /> + <br /> + <VirtualHost *:80><br /> + <span class="indent"> + ServerName www.domain.tld<br /> + ServerAlias domain.tld *.domain.tld<br /> + DocumentRoot /www/domain<br /> + </span> + </VirtualHost><br /> + <br /> + <VirtualHost *:80><br /> + <span class="indent">ServerName www.otherdomain.tld<br /> + DocumentRoot /www/otherdomain<br /> + </span> + </VirtualHost><br /> + </code></p></div> + + <p><code class="directive"><a href="../mod/core.html#namevirtualhost">NameVirtualHost</a></code> + <code class="directive"><a href="../mod/core.html#virtualhost"><VirtualHost></a></code> + þ <code>*</code> IP ּҸ + ִ. , ̷ IP ּҿ ̸ + ȣƮ , ٸ ּҿ IP Ȥ ̸ + ȣƮ ִ.</p> + + <p> ̸ ֱ ٶ. ̴ + <code class="directive"><a href="../mod/core.html#virtualhost"><VirtualHost></a></code> + ȿ <code class="directive"><a href="../mod/core.html#serveralias">ServerAlias</a></code> + þ Ͽ ϴ. ù° <code class="directive"><a href="../mod/core.html#virtualhost"><VirtualHost></a></code> Ͽ + <code class="directive"><a href="../mod/core.html#serveralias">ServerAlias</a></code> þ + ϸ ̸ Ʈ ִ:</p> + + <div class="example"><p><code> + ServerAlias domain.tld *.domain.tld + </code></p></div> + + <p><code>domain.tld</code> ο ִ ȣƮ + û <code>www.domain.tld</code> ȣƮ Ѵ. + ̸ ٶ ϵī <code>*</code> <code>?</code> + ִ. <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code>̳ <code>ServerAlias</code> + ̸ ־ٰ ƴϴ. ̸ + IP ּҷ ϵ DNS ˸° ؾ Ѵ.</p> + + <p> <code class="directive"><a href="../mod/core.html#<virtualhost>"><<VirtualHost>></a></code> ȿ ٸ + þ Ͽ ȣƮ ڼ ִ. + κ þ , õ ȣƮ + Ѵ. þ 밡 ˷ þ <a href="../mod/directive-dict.html#Context"></a> + Ȯ϶. (<code class="directive"><a href="../mod/core.html#<virtualhost>"><<VirtualHost>></a></code> ƴ) + <em>ּ</em> þ ȣƮ + þ 쿡 ȴ.</p> + + <p>û <code class="directive"><a href="../mod/core.html#namevirtualhost">NameVirtualHost</a></code> IP + ּ ˻Ѵ. ٸ IP ּҸ <code class="directive"><a href="../mod/core.html#virtualhost"><VirtualHost></a></code> + ǵ鿡 û ȣƮ ġϴ <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code>̳ + <code>ServerAlias</code> ã´. ã Ѵ. + ȣƮ ãϸ, IP ּҿ شϴ + <strong>ȣƮ ù° </strong> Ѵ.</p> + + <p> ó ȣƮ <em>⺻</em> + ȣƮ ȴ. IP ּҰ <code class="directive"><a href="../mod/core.html#namevirtualhost">NameVirtualHost</a></code> þ شϸ, + <em>ּ</em> <code class="directive"><a href="../mod/core.html#documentroot">DocumentRoot</a></code> + <strong></strong> ʴ´. Ư ȣƮ + شʴ û Ϸ <code class="directive"><a href="../mod/core.html#virtualhost"><VirtualHost></a></code> Ͽ + ϸ ȴ.</p> + +</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="section"> +<h2><a name="compat" id="compat"> ȣȯ</a></h2> + + <p>̹ ̸ ȣƮ ùٷ ϱ + ʿ ʴ Ŭ̾Ʈ ִ. ̷ Ŭ̾Ʈ + û IP ּҿ ù° ȣƮ + (<cite></cite> ̸ ȣƮ) + Ѵ.</p> + + <div class="note"><h3> ϴ°?</h3> + <p>⼭ Ǿ Ѵ. + ó ̷ Ǿ. + ̸ ȣƮ ʿ <code>Host</code> + .</p> + </div> + + <p> ణ 彺 <code class="directive"><a href="../mod/core.html#serverpath">ServerPath</a></code> þ ذ ִ:</p> + + <p> :</p> + + <div class="example"><p><code> + NameVirtualHost 111.22.33.44<br /> + <br /> + <VirtualHost 111.22.33.44><br /> + <span class="indent"> + ServerName www.domain.tld<br /> + ServerPath /domain<br /> + DocumentRoot /web/domain<br /> + </span> + </VirtualHost><br /> + </code></p></div> + + <p>̰ ΰ? "<code>/domain</code>" ϴ + URI û ȣƮ <code>www.domain.tld</code> + Ѵ. , <code>Host:</code> Ŭ̾Ʈ + <code>http://www.domain.tld/</code>ε , + <code>http://www.domain.tld/domain/</code>δ + Ŭ̾Ʈ ִ.</p> + + <p≯ ȣƮ ִ + <code>http://www.domain.tld/domain/</code> ũ + ִ´. ȣƮ 븵ũ ( , + "<code>file.html</code>" ̳ "<code>../icons/image.gif</code>") + Ȥ ("<code>http://www.domain.tld/domain/misc/file.html</code>"̳ + "<code>/domain/misc/file.html</code>" ) տ + <code>/domain/</code> ũ Ѵ.</p> + + <p> Ģ ʿ Ģ κ + ̳ ̳ + ִ.</p> + +</div></div> +<div class="bottomlang"> +<p><span> : </span><a href="../de/vhosts/name-based.html" hreflang="de" rel="alternate" title="Deutsch"> de </a> | +<a href="../en/vhosts/name-based.html" hreflang="en" rel="alternate" title="English"> en </a> | +<a href="../fr/vhosts/name-based.html" hreflang="fr" rel="alternate" title="Français"> fr </a> | +<a href="../ja/vhosts/name-based.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> | +<a href="../ko/vhosts/name-based.html" title="Korean"> ko </a> | +<a href="../tr/vhosts/name-based.html" hreflang="tr" rel="alternate" title="Türkçe"> tr </a></p> +</div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Comments</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Libera.chat, or sent to our <a href="https://httpd.apache.org/lists.html">mailing lists</a>.</div> +<script type="text/javascript"><!--//--><![CDATA[//><!-- +var comments_shortname = 'httpd'; +var comments_identifier = 'http://httpd.apache.org/docs/2.4/vhosts/name-based.html'; +(function(w, d) { + if (w.location.hostname.toLowerCase() == "httpd.apache.org") { + d.write('<div id="comments_thread"><\/div>'); + var s = d.createElement('script'); + s.type = 'text/javascript'; + s.async = true; + s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier; + (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s); + } + else { + d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>'); + } +})(window, document); +//--><!]]></script></div><div id="footer"> +<p class="apache">Copyright 2023 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p> +<p class="menu"><a href="../mod/"></a> | <a href="../mod/directives.html">þ</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html"></a> | <a href="../sitemap.html">Ʈ</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!-- +if (typeof(prettyPrint) !== 'undefined') { + prettyPrint(); +} +//--><!]]></script> +</body></html>
\ No newline at end of file diff --git a/docs/manual/vhosts/name-based.html.tr.utf8 b/docs/manual/vhosts/name-based.html.tr.utf8 new file mode 100644 index 0000000..3d51992 --- /dev/null +++ b/docs/manual/vhosts/name-based.html.tr.utf8 @@ -0,0 +1,238 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" lang="tr" xml:lang="tr"><head> +<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /> +<!-- + XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + This file is generated from xml source: DO NOT EDIT + XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + --> +<title>İsme Dayalı Sanal Konaklar - Apache HTTP Sunucusu Sürüm 2.4</title> +<link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" /> +<link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" /> +<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" /> +<script src="../style/scripts/prettify.min.js" type="text/javascript"> +</script> + +<link href="../images/favicon.ico" rel="shortcut icon" /></head> +<body id="manual-page"><div id="page-header"> +<p class="menu"><a href="../mod/">Modüller</a> | <a href="../mod/directives.html">Yönergeler</a> | <a href="http://wiki.apache.org/httpd/FAQ">SSS</a> | <a href="../glossary.html">Terimler</a> | <a href="../sitemap.html">Site Haritası</a></p> +<p class="apache">Apache HTTP Sunucusu Sürüm 2.4</p> +<img alt="" src="../images/feather.png" /></div> +<div class="up"><a href="./"><img title="<-" alt="<-" src="../images/left.gif" /></a></div> +<div id="path"> +<a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">HTTP Sunucusu</a> > <a href="http://httpd.apache.org/docs/">Belgeleme</a> > <a href="../">Sürüm 2.4</a> > <a href="./">Sanal Konaklar</a></div><div id="page-content"><div id="preamble"><h1>İsme Dayalı Sanal Konaklar</h1> +<div class="toplang"> +<p><span>Mevcut Diller: </span><a href="../de/vhosts/name-based.html" hreflang="de" rel="alternate" title="Deutsch"> de </a> | +<a href="../en/vhosts/name-based.html" hreflang="en" rel="alternate" title="English"> en </a> | +<a href="../fr/vhosts/name-based.html" hreflang="fr" rel="alternate" title="Français"> fr </a> | +<a href="../ja/vhosts/name-based.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> | +<a href="../ko/vhosts/name-based.html" hreflang="ko" rel="alternate" title="Korean"> ko </a> | +<a href="../tr/vhosts/name-based.html" title="Türkçe"> tr </a></p> +</div> + + <p>Bu belgede isme dayalı sanal konakların ne zaman, nasıl kullanılacakları + açıklanmıştır.</p> +</div> +<div id="quickview"><a href="https://www.apache.org/foundation/contributing.html" class="badge"><img src="https://www.apache.org/images/SupportApache-small.png" alt="Support Apache!" /></a><ul id="toc"><li><img alt="" src="../images/down.gif" /> <a href="#namevip">İsme dayalı ve IP’ye dayalı Sanal Konaklar</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#alg">Sunucu isme dayalı sanal konaklardan uygun olanını nasıl seçer</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#using">İsme Dayalı Sanal Konakların Kullanımı</a></li> +</ul><h3>Ayrıca bakınız:</h3><ul class="seealso"><li><a href="ip-based.html">IP Adresine Dayalı Sanal Konaklar</a></li><li><a href="details.html">Konak Eşlemenin Derinliğine İncelenmesi</a> +</li><li><a href="mass.html">Devingen olarak Yapılandırılan Kütlesel Sanal +Barındırma</a></li><li><a href="examples.html">Çok kullanılan sanal konak yapılandırma +örnekleri</a></li><li><a href="#comments_section">Yorumlar</a></li></ul></div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="section"> +<h2><a name="namevip" id="namevip">İsme dayalı ve IP’ye dayalı Sanal Konaklar</a></h2> + + <p><a href="ip-based.html">IP’ye dayalı sanal konaklar</a>da sunulacak + sanal konağı doğru tespit edebilmek için bağlantının yapıldığı IP + adresine bakılır. Bu bakımdan her konak için ayrı bir IP adresine + gereksinim vardır.</p> + + <p>İsme dayalı sanal konaklarda ise sunucu, istemcinin HTTP başlığının bir + parçası olarak gönderdiği konak adını kullanır. Bu teknikte aynı IP + adresini çok sayıda farklı konak kullanabilir.</p> + + <p>İsme dayalı sanal barındırma nispeten daha kolaydır, çünkü her konak + ismini doğru IP adresiyle eşlemek için DNS sunucunuzu yapılandırdıktan + sonra Apache HTTP sunucusunu farklı konak isimlerini tanıyacak şekilde + yapılandırmanız yeterli olur. İsme dayalı sanal barındırma ayrıca zaten + kıt olan IP adreslerine talebi de azaltır. Bu nedenle, IP’ye dayalı sanal + konakları kullanmanızı gerektiren donanım kullanmadıkça isme dayalı + sanal konaklar kullanmalısınız. İstemci uyumuna bağlı IP’ye dayalı + sanal barındırma için eskiden varolan sebepler genel amaçlı bir HTTP + sunucusu için artık uygulanabilir değildir.</p> + + <p>İsme dayalı sanal barındırma, IP'ye dayalı sanal barındırma seçim + algoritmasını kullanmaz, yani uygun sunucu ismini arama işlemi sadece en + iyi IP'ye dayalı adrese sahip sanal konaklar arasında gerçekleşir.</p> + +</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="section"> +<h2><a name="alg" id="alg">Sunucu isme dayalı sanal konaklardan uygun olanını nasıl seçer</a></h2> + + + <p>İsme dayalı sanal konak çözümlemesinin ilk adımının IP'ye dayalı + çözümleme olduğunun anlaşılması çok önemlidir. İsme dayalı sanal konak + çözümlemesi en uygun isme dayalı sanal konağı seçerken önce en iyi IP'ye + dayalı eşleşme adaylarının sayısını azaltır, sonra bunlar arasından en + uygununu seçer. Tüm <code>VirtualHost</code> yönergelerinde IP adresi + yerine joker kullanımı bu IP'ye dayalı eşlemeyi yersiz kılar.</p> + + <p>Bir istek geldiğinde, sunucu, istekte kullanılan IP adresi ve portu ile + en iyi eşleşen <code class="directive"><a href="../mod/core.html#virtualhost"><VirtualHost></a></code> bileşenini bulur. Bu IP adresi ve port çifti ile + eşleşen birden fazla sanal konak varsa, Apache httpd istekte kullanılan + sunucu ismini <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> ve + <code class="directive"><a href="../mod/core.html#serveralias">ServerAlias</a></code> yönergelerindeki + isimlerle karşılaştırır.</p> + + <p>Herhangi bir isme dayalı sanal konakta <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> yönergesini kullanmazsanız, sunucu + bu yönergeye sistem konak adından türetilmiş tam nitelenmiş alan adının + (FQDN) tanımlandığını varsayacaktır. Bu örtük atama sezgiselliğin + istenmediği bir sanal konak eşleşmesi ile sonuçlanabilir ve bu + önerilmez.</p> + + <h3><a name="defaultvhost" id="defaultvhost">Bir IP adresi ve port çifti için öntanımlı isme dayalı sankon</a></h3> + + <p><code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> ve + <code class="directive"><a href="../mod/core.html#serveralias">ServerAlias</a></code> yönergelerinde bir + eşleşme bulunamazsa, Apache httpd bu çift ile eşleşen <strong>sanal + konaklar listesindeki ilk sanal konağı</strong> kullanır.</p> + +</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="section"> +<h2><a name="using" id="using">İsme Dayalı Sanal Konakların Kullanımı</a></h2> + +<table class="related"><tr><th>İlgili Modüller</th><th>İlgili Yönergeler</th></tr><tr><td><ul><li><code class="module"><a href="../mod/core.html">core</a></code></li></ul></td><td><ul><li><code class="directive"><a href="../mod/core.html#documentroot">DocumentRoot</a></code></li><li><code class="directive"><a href="../mod/core.html#serveralias">ServerAlias</a></code></li><li><code class="directive"><a href="../mod/core.html#servername">ServerName</a></code></li><li><code class="directive"><a href="../mod/core.html#virtualhost"><VirtualHost></a></code></li></ul></td></tr></table> + + <p>İlk adım sunacağınız her konak için ayrı bir <code class="directive"><a href="../mod/core.html#virtualhost"><VirtualHost></a></code> bölümü oluşturmaktır. Her + <code class="directive"><a href="../mod/core.html#virtualhost"><VirtualHost></a></code> bölümü + içinde sunulan konağı belirtmek üzere en azından bir adet <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> yönergesine ve konak içeriğinin + dosya sisteminde bulunduğu yeri gösteren bir <code class="directive"><a href="../mod/core.html#documentroot">DocumentRoot</a></code> yönergesine ihtiyacınız + olacaktır.</p> + + <div class="note"><h3>Ana konağı unutmayın</h3> + <p>Mevcut <code class="directive"><a href="../mod/core.html#virtualhost"><VirtualHost></a></code> + yönergelerinin hiçbiriyle eşleşmeyen bir istek için, sunucu veya konak + ismine bakılmaksızın genel sunucu yapılandırmanız kullanılır.</p> + + <p>Mevcut sitenize isme dayalı bir sanal konak eklerseniz ve bu sanal + konak ana sunucunun IP adresi ve portuna sahipse, ana sunucuya yapılan + istekler için bu sanal konak kullanılır. Bu bakımdan, <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> yönergesi ana sunucununki ile aynı + olan bir <a href="#defaultvhost">öntanımlı sanal konak</a> oluşturmak + akıllıca olacaktır. Aynı arayüz ve portu kullanan fakat farklı + yapılandırmalara sahip diğer alan isimlerinin sanal konakları (yani + öntanımlı olmayanlar) bu öntanımlı sanal konağın sonrasına + yerleştirilmelidir.</p> + </div> + + <div class="note"><h3>ServerName miras alma</h3> + <p>İsme dayalı her sanal konak için daima bir <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> belirtmek en iyisidir.</p> + + <p>Eğer bir <code class="directive"><a href="../mod/core.html#virtualhost">VirtualHost</a></code> bölümü + içinde bir <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> + belirtilmezse, sunucu ismi olarak ana sunucu yapılandırmasındaki isim + kullanılır. Orada da bir sunucu ismi belirtilmemişse, başlatma sırasında + dinlenen ilk IP adresinden ters DNS araması ile elde edilen isim + kullanılır. Her iki durumda da miras alınan isim gereksiz yere isme + dayalı sanal konak ismi haline gelecektir; bu bakımdan isme dayalı her + sanal konak için daima bir <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> belirtmek en iyisidir.</p> + </div> + + <p>Örnek olarak, <code>site1.example.com</code> adresinden sitenizi + sunmakta olduğunuzu ve bunun yanına aynı IP adresini kullanan + <code>site2.example.com</code> sanal konağını eklemek istediğinizi + varsayalım. Bunun için <code>httpd.conf</code> dosyanıza basitçe şu + satırları ekleyebilirsiniz:</p> + + <pre class="prettyprint lang-config"><VirtualHost *:80> + #İlk sanal konak aynı zamanda *:80 için de öntanımlıdır. + ServerName site1.example.com + ServerAlias example.com + DocumentRoot "/siteler/site1" +</VirtualHost> + +<VirtualHost *:80> + ServerName site2.example.com + DocumentRoot "/siteler/site2" +</VirtualHost></pre> + + + <p>İsterseniz, <code class="directive"><a href="../mod/core.html#virtualhost"><VirtualHost></a></code> yönergesinde argüman olarak <code>*</code> + yerine doğrudan bir IP adresi belirtebilirsiniz. Hatta, daha sonra, isme + dayalı sanal konakları bir IP adresinden ve IP’ye dayalı olanları veya + isme dayalı diğer bir sanal konak grubunu diğer IP adreslerinden sunmak + isteyebilirsiniz.</p> + + <p>Çoğu sunucunun birden fazla isim ile erişilebilir olması istenir. Bu, + <code class="directive"><a href="../mod/core.html#virtualhost"><VirtualHost></a></code> bölümü + içine bir <code class="directive"><a href="../mod/core.html#serveralias">ServerAlias</a></code> yönergesi + yerleştirmek suretiyle mümkün olur. Örneğin yukarıdaki örnekte, + kullanıcıların aynı siteye farklı isimlerle erişmelerini mümkün kılmak + için bölüm içine şu satırı ekleyebilirsiniz:</p> + + <pre class="prettyprint lang-config">ServerAlias example.com *.example.com</pre> + + + <p>Böylece <code>example.com</code> alanındaki tüm konaklar için gelen + isteklere <code>www.example.com</code> sanal konağından hizmet sunulmuş + olur. Konak isimleriyle eşleşmek üzere dosya ismi kalıp karakterleri + <code>*</code> ve <code>?</code> kullanılabilir. Şüphesiz bu isimleri + sırf <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> veya + <code>ServerAlias</code> yönergesinde belirtmiş olmakla bu isimleri + erişilebilir kılamazsınız. Öncelikle, bu isimleri sunucunuzdaki IP + adresleriyle eşlemek üzere yapılandıracağınız bir DNS sunucunuz + olmalıdır.</p> + + <p>İsme dayalı sanal konaklardan en iyi eşleşme kümesinde olanlar + yapılandırmada göründükleri sıraya göre işleme sokulur. Joker + kullanımları arasında fark gözetilmeksizin <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> veya <code class="directive"><a href="../mod/core.html#serveralias">ServerAlias</a></code> yönergesi eşleşen ilk sanal konak + kullanılır.</p> + + <p><code>VirtualHost</code> içindeki isimlerin sırası (jokersiz) bir + <code>ServerAlias</code> gibi ele alınır (fakat hiçbir + <code>ServerAlias</code> yönergesi ile geçersiz kılınmaz).</p> + + <p>Son olarak, sanal konak yapılandırmanıza, <code class="directive"><a href="../mod/core.html#virtualhost"><VirtualHost></a></code> bölümlerinin içine başka yönergeler + yerleştirerek ince ayar çekebilirsiniz. Çoğu yönerge bu bölümlere + yerleştirilebilir ve sadece o sanal konakla ilgili yapılandırmayı + değiştirmek için kullanılabilir. Belli bir yönergenin sanal konak + bölümlerinde kullanılıp kullanılmayacağını yönergenin açıklamasında <a href="../mod/directive-dict.html#Context">Bağlam</a> satırına bakarak + öğrenebilirsiniz. <em>Ana sunucu bağlamındaki</em> (<code class="directive"><a href="../mod/core.html#virtualhost"><VirtualHost></a></code> bölümleri dışındaki) + yapılandırma yönergelerinden sadece sanal konak bölümlerinde geçersiz + kılınmamış olanlar kullanılacaktır.</p> + +</div></div> +<div class="bottomlang"> +<p><span>Mevcut Diller: </span><a href="../de/vhosts/name-based.html" hreflang="de" rel="alternate" title="Deutsch"> de </a> | +<a href="../en/vhosts/name-based.html" hreflang="en" rel="alternate" title="English"> en </a> | +<a href="../fr/vhosts/name-based.html" hreflang="fr" rel="alternate" title="Français"> fr </a> | +<a href="../ja/vhosts/name-based.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> | +<a href="../ko/vhosts/name-based.html" hreflang="ko" rel="alternate" title="Korean"> ko </a> | +<a href="../tr/vhosts/name-based.html" title="Türkçe"> tr </a></p> +</div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Yorumlar</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Libera.chat, or sent to our <a href="https://httpd.apache.org/lists.html">mailing lists</a>.</div> +<script type="text/javascript"><!--//--><![CDATA[//><!-- +var comments_shortname = 'httpd'; +var comments_identifier = 'http://httpd.apache.org/docs/2.4/vhosts/name-based.html'; +(function(w, d) { + if (w.location.hostname.toLowerCase() == "httpd.apache.org") { + d.write('<div id="comments_thread"><\/div>'); + var s = d.createElement('script'); + s.type = 'text/javascript'; + s.async = true; + s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier; + (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s); + } + else { + d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>'); + } +})(window, document); +//--><!]]></script></div><div id="footer"> +<p class="apache">Copyright 2023 The Apache Software Foundation.<br /><a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a> altında lisanslıdır.</p> +<p class="menu"><a href="../mod/">Modüller</a> | <a href="../mod/directives.html">Yönergeler</a> | <a href="http://wiki.apache.org/httpd/FAQ">SSS</a> | <a href="../glossary.html">Terimler</a> | <a href="../sitemap.html">Site Haritası</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!-- +if (typeof(prettyPrint) !== 'undefined') { + prettyPrint(); +} +//--><!]]></script> +</body></html>
\ No newline at end of file |