summaryrefslogtreecommitdiff
path: root/docs/manual/vhosts
diff options
context:
space:
mode:
Diffstat (limited to 'docs/manual/vhosts')
-rw-r--r--docs/manual/vhosts/details.html.en71
-rw-r--r--docs/manual/vhosts/details.html.tr.utf879
2 files changed, 65 insertions, 85 deletions
diff --git a/docs/manual/vhosts/details.html.en b/docs/manual/vhosts/details.html.en
index b6135ec0..bd5952d8 100644
--- a/docs/manual/vhosts/details.html.en
+++ b/docs/manual/vhosts/details.html.en
@@ -54,49 +54,49 @@
sections.</p>
<p>The directives
- <code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code>,
- <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code>,
- <code class="directive"><a href="../mod/core.html#serverpath">ServerPath</a></code>,
- and <code class="directive"><a href="../mod/core.html#serveralias">ServerAlias</a></code>
+ <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> and
+ <code class="directive"><a href="../mod/core.html#serverpath">ServerPath</a></code>
can appear anywhere within the definition of a server. However,
each appearance overrides the previous appearance (within that
server).</p>
- <p>The default value of the <code>Listen</code> field for
- main_server is 80. The main_server has no default
+ <p>The main_server has no default
<code>ServerPath</code>, or <code>ServerAlias</code>. The
default <code>ServerName</code> is deduced from the server's IP
address.</p>
- <p>The main_server Listen directive has two functions. One
- function is to determine the default network port Apache will
- bind to. The second function is to specify the port number
- which is used in absolute URIs during redirects.</p>
-
- <p>Unlike the main_server, vhost ports <em>do not</em> affect
- what ports Apache listens for connections on.</p>
-
+ <p>Port numbers specified in the <code>VirtualHost</code> directive do
+ not influence what port numbers Apache will listen on, they only discriminate between
+ which <code>VirtualHost</code> will be selected to handle a request.</p>
+
<p>Each address appearing in the <code>VirtualHost</code>
directive can have an optional port. If the port is unspecified
- it defaults to the value of the main_server's most recent
- <code>Listen</code> statement. The special port <code>*</code>
+ it is treated as a wildcard port. The special port <code>*</code>
indicates a wildcard that matches any port. Collectively the
entire set of addresses (including multiple <code>A</code>
record results from DNS lookups) are called the vhost's
<em>address set</em>.</p>
<p>Unless a <code class="directive"><a href="../mod/core.html#namevirtualhost">NameVirtualHost</a></code>
- directive is used for a specific IP address the first vhost
- with that address is treated as an IP-based vhost. The IP
- address can also be the wildcard <code>*</code>.</p>
-
- <p>If name-based vhosts should be used a
+ directive is used for the exact IP address and port pair in the
+ <code>VirtualHost</code> directive, Apache selects the best match
+ only on the basis of the IP address (or wildcard) and port number.
+ If there are multiple identical best matches, the first <code>VirtualHost</code>
+ appearing in the configuration file will be selected.</p>
+
+ <p>If you want Apache to <em>further</em> discriminate on the basis of the
+ HTTP <code>Host</code> header supplied by the client, the
<code>NameVirtualHost</code> directive <em>must</em> appear
- with the IP address set to be used for the name-based vhosts.
- In other words, you must specify the IP address that holds the
- hostname aliases (CNAMEs) for your name-based vhosts via a
- <code>NameVirtualHost</code> directive in your configuration
- file.</p>
+ with the exact IP address (or wildcard) and port pair used in a correspnding
+ set of <code>VirtualHost</code> directives.</p>
+
+ <p>The name-based virtual host selection occurs only after a single IP-based
+ virtual host has been selected, and only considers the set of virtual hosts
+ that carry an identical IP address and port pair.</p>
+
+ <p>Hostnames can be used in place of IP addresses in a virtual host definition,
+ but it is resolved at startup and is not recommended.</p>
+
<p>Multiple <code>NameVirtualHost</code> directives can be used
each with a set of <code>VirtualHost</code> directives but only
@@ -158,18 +158,6 @@
<p>(To aid the readability of your configuration you should
prefer the left variant.)</p>
- <p>After parsing the <code>VirtualHost</code> directive, the
- vhost server is given a default <code>Listen</code> equal to the
- port assigned to the first name in its <code>VirtualHost</code>
- directive.</p>
-
- <p>The complete list of names in the <code>VirtualHost</code>
- directive are treated just like a <code>ServerAlias</code> (but
- are not overridden by any <code>ServerAlias</code> statement)
- if all names resolve to the same address set. Note that
- subsequent <code>Listen</code> statements for this vhost will not
- affect the ports assigned in the address set.</p>
-
<p>During initialization a list for each IP address is
generated and inserted into an hash table. If the IP address is
used in a <code>NameVirtualHost</code> directive the list
@@ -347,8 +335,7 @@
configuration file has the highest priority for its
corresponding address set.</li>
- <li>For security reasons the port number given in a
- <code>Host:</code> header field is never used during the
+ <li>The <code>Host:</code> header field is never used during the
matching process. Apache always uses the real port to which
the client sent the request.</li>
@@ -373,7 +360,9 @@
<code>Listen</code> by default. A wildcard port can be
specified (<em>i.e.</em>, <code>_default_:*</code>) to catch
requests to any available port. This also applies to
- <code>NameVirtualHost *</code> vhosts.</li>
+ <code>NameVirtualHost *</code> vhosts. Note that this is simply an
+ extension of the "best match" principle, as a specific and exact match
+ is favored over a wildcard.</li>
<li>The main_server is only used to serve a request if the IP
address and port number to which the client connected is
diff --git a/docs/manual/vhosts/details.html.tr.utf8 b/docs/manual/vhosts/details.html.tr.utf8
index a3393622..ca525203 100644
--- a/docs/manual/vhosts/details.html.tr.utf8
+++ b/docs/manual/vhosts/details.html.tr.utf8
@@ -49,45 +49,45 @@
tanımlardan bahsederken <em>ana_sunucu</em>, <code class="directive"><a href="../mod/core.html#virtualhost">&lt;VirtualHost&gt;</a></code> bölümlerindeki tanımlamalardan
bahsederken <em>sankonlar</em> diyeceğiz.</p>
- <p><code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code>,
- <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code>,
- <code class="directive"><a href="../mod/core.html#serverpath">ServerPath</a></code> ve
- <code class="directive"><a href="../mod/core.html#serveralias">ServerAlias</a></code> yönergeleri bir sunucu
+ <p><code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> ve
+ <code class="directive"><a href="../mod/core.html#serverpath">ServerPath</a></code> yönergeleri bir sunucu
yapılandırmasının her yerinde karşımıza çıkabilir. Bununla birlikte,
sunucu dahilinde son göründükleri yerlerde önceki eşdeğerlerini geçersiz
kılarlar.</p>
- <p><code>Listen</code> yönergesinin ana_sunucu için öntanımlı değeri
- 80’dir. <code>ServerPath</code> ve <code>ServerAlias</code>
+ <p><code>ServerPath</code> ve <code>ServerAlias</code>
yönergelerinin ana_sunucu için öntanımlı değerleri yoktur. Öntanımlı
<code>ServerName</code> değeri ise sunucunun IP adresinden elde
edilir.</p>
- <p>Ana_sunucu <code>Listen</code> yönergesinin iki işlevi vardır. Biri
- Apache’nin dinleyeceği öntanımlı ağ portunu belirlemek, diğeri ise
- yönlendirmeler sırasında mutlak URI’lerde kullanılan port numarasını
- belirlemektir.</p>
-
- <p>Ana_sunucunun aksine sankonların portları Apache‘nin dinleyeceği
- portlar üzerinde etkili değildir.</p>
+ <p><code>VirtualHost</code> yönergesinde belirtilen port numaraları
+ Apache'nin dinleyeceği port numaraları olarak değerlendirilmez. Bunlar
+ sadece, bir isteği işleme sokmak üzere seçilecek
+ <code>VirtualHost</code>'lar arasında ayrım yapabilmek için kullanılır.</p>
<p><code>VirtualHost</code> yönergesinde görünen her adresin seçimlik bir
- portu olabilir. Eğer bir port belirtilmemişse öntanımlı olarak
- ana_sunucunun son <code>Listen</code> yönergesinin değeri kullanılır.
- Port olarak <code>*</code> belirtildiği takdirde bütün portlar dinlenir.
- Adreslerin tamamını (DNS sorgularındaki çoklu A kayıtları dahil) içeren
- kümeye sankonların <em>adres kümesi</em> denir.</p>
-
- <p><code class="directive"><a href="../mod/core.html#namevirtualhost">NameVirtualHost</a></code> yönergesi ilk
- sankonun IP adresi için kullanılmadığı takdirde bu IP adresine sahip ilk
- sankon IP’ye dayalı sankon olarak ele alınır. IP adresi olarak
- <code>*</code> belirtmek de mümkündür.</p>
-
- <p>Eğer isme dayalı sankonlar kullanılacaksa <code>NameVirtualHost</code>
- yönergesinin bu isme dayalı sankonların IP adresi kümesini içermesi
- <em>gerekir</em>. Başka bir deyişle, yapılandırma dosyanızın
- <code>NameVirtualHost</code> yönergesine sankonların sunucu isimlerinin
- karşı düştüğü IP adresini yazmalısınız.</p>
+ portu olabilir. Eğer bir port belirtilmemişse <code>*</code> belirtildiği
+ varsayılır. Port olarak <code>*</code> belirtildiği takdirde bütün portlar
+ dinlenir. Adreslerin tamamını (DNS sorgularındaki çoklu A kayıtları dahil)
+ içeren kümeye sankonların <em>adres kümesi</em> denir.</p>
+
+ <p><code class="directive"><a href="../mod/core.html#namevirtualhost">NameVirtualHost</a></code> yönergesi,
+ <code>VirtualHost</code> yönergesindeki IP adresini ve portu aynen
+ içermediği takdirde, Apache bu çiftle en iyi eşleşeni seçer. Eğer çok
+ sayıda eşleşen varsa yapılandırma dosyasında ilk eşleşen
+ <code>VirtualHost</code> seçilir.</p>
+
+ <p>Eğer Apache'nin istemci tarafından sağlanan HTTP <code>Host</code>
+ başlığına dayanarak ayrım yapmasını istiyorsanız
+ <code>NameVirtualHost</code> yönergesindeki IP adresi ve portun
+ <code>VirtualHost</code> yönergesindeki ile tamamen eşleşmesi gerekir.</p>
+
+ <p>İsme dayalı sanal konak seçimi sadece tek bir IP'ye dayalı sanal konak
+ seçildikten sonra ve bu sanal konaklar aynı IP-port çiftini taşıyorlarsa
+ mümkün olabilir.</p>
+
+ <p>Bir sanal konak tanımında IP adresi yerine konak ismi de kullanılabilirse
+ de çözümleme işlemi sunucu başlatılırken yapılacağından bu önerilmez. </p>
<p>Çok sayıda <code>NameVirtualHost</code> yönergesi belirtebilirse de her
IP:port çifti için birden fazla <code>NameVirtualHost</code> yönergesi
@@ -148,17 +148,6 @@
<p>(Okuma kolaylığı bakımından soldaki sürümü tercih etmenizi öneririz.)
</p>
- <p><code>VirtualHost</code> yönergesi çözümlendikten sonra sankon
- sunucusuna yönergedeki ilk isme atanmış portun öntanımlı olduğu bir
- <code>Listen</code> verilir.</p>
-
- <p>Eğer tüm <code>VirtualHost</code> isimlerinin listesi aynı adres
- kümesine çözümleniyorsa bu isimler birer <code>ServerAlias</code> gibi
- ele alınırlar (bir <code>ServerAlias</code> yönergesi ile geçersiz
- kılınmadıkça). Bir sankon tanımından sonra gelen <code>Listen</code>
- satırlarının o sankonun adres kümesine atanmış portlara bir etkisinin
- olmayacağına dikkat ediniz.</p>
-
<p>İsim listeleri IP adreslerine göre gruplanır ve bir çiftler tablosuna
kaydedilir. Eğer IP adresi bir <code>NameVirtualHost</code> yönergesinde
kullanılmışsa, liste bu IP adresi için tanımlanmış tüm sankonları
@@ -321,9 +310,9 @@
yapılandırma dosyasında ilk sırada yer alanı en yüksek önceliğe
sahiptir.</li>
- <li>Güvenlik saikiyle, eşleştirme işlemi sırasında <code>Host:</code>
- başlık alanında belirtilen port asla kullanılmaz. Apache daima
- istemcinin bağlantı kurduğu gerçek portu kullanır.</li>
+ <li><code>Host:</code> başlık alanı eşleştirme işlemi sırasında asla
+ kullanılmaz. Apache istemcinin bağlantı kurduğu gerçek portu
+ kullanır.</li>
<li>Değeri başka bir <code>ServerPath</code> yönergesinin değeri için
önek olan bir <code>ServerPath</code> yönergesi yapılandırma
@@ -342,7 +331,9 @@
port ile sankon için belirtilen port eşleşmelidir. Olası tüm portlarla
eşleşmeyi sağlamak üzere yıldız imi (<code>_default_:*</code>
şeklinde) kullanılabilir. Aynı şey <code>NameVirtualHost *</code>
- sankonlarına da uygulanır.</li>
+ sankonlarına da uygulanır. Bunun, "en iyi eşleşme" kuralının bir uzantısı
+ olarak bir basitleştirme oluşuna dikkat ediniz; belirgin ve tıpatıp bir
+ eşleşme yıldız imine göre önceliklidir.</li>
<li>Ana_sunucunun bir isteğe hizmet sunabilmesi için istemcinin
bağlandığı IP adresi ve port hiçbir yerde belirtilmemiş ve