diff options
Diffstat (limited to '')
-rw-r--r-- | docs/manual/mod/mod_vhost_alias.html | 13 | ||||
-rw-r--r-- | docs/manual/mod/mod_vhost_alias.html.en | 361 | ||||
-rw-r--r-- | docs/manual/mod/mod_vhost_alias.html.fr.utf8 | 385 | ||||
-rw-r--r-- | docs/manual/mod/mod_vhost_alias.html.tr.utf8 | 354 |
4 files changed, 1113 insertions, 0 deletions
diff --git a/docs/manual/mod/mod_vhost_alias.html b/docs/manual/mod/mod_vhost_alias.html new file mode 100644 index 0000000..d4e6a55 --- /dev/null +++ b/docs/manual/mod/mod_vhost_alias.html @@ -0,0 +1,13 @@ +# GENERATED FROM XML -- DO NOT EDIT + +URI: mod_vhost_alias.html.en +Content-Language: en +Content-type: text/html; charset=UTF-8 + +URI: mod_vhost_alias.html.fr.utf8 +Content-Language: fr +Content-type: text/html; charset=UTF-8 + +URI: mod_vhost_alias.html.tr.utf8 +Content-Language: tr +Content-type: text/html; charset=UTF-8 diff --git a/docs/manual/mod/mod_vhost_alias.html.en b/docs/manual/mod/mod_vhost_alias.html.en new file mode 100644 index 0000000..2523f62 --- /dev/null +++ b/docs/manual/mod/mod_vhost_alias.html.en @@ -0,0 +1,361 @@ +<?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>mod_vhost_alias - 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> +<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="./">Modules</a></div> +<div id="page-content"> +<div id="preamble"><h1>Apache Module mod_vhost_alias</h1> +<div class="toplang"> +<p><span>Available Languages: </span><a href="../en/mod/mod_vhost_alias.html" title="English"> en </a> | +<a href="../fr/mod/mod_vhost_alias.html" hreflang="fr" rel="alternate" title="Français"> fr </a> | +<a href="../tr/mod/mod_vhost_alias.html" hreflang="tr" rel="alternate" title="Türkçe"> tr </a></p> +</div> +<table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>Provides for dynamically configured mass virtual +hosting</td></tr> +<tr><th><a href="module-dict.html#Status">Status:</a></th><td>Extension</td></tr> +<tr><th><a href="module-dict.html#ModuleIdentifier">Module Identifier:</a></th><td>vhost_alias_module</td></tr> +<tr><th><a href="module-dict.html#SourceFile">Source File:</a></th><td>mod_vhost_alias.c</td></tr></table> +<h3>Summary</h3> + + <p>This module creates dynamically configured virtual hosts, by + allowing the IP address and/or the <code>Host:</code> header of + the HTTP request to be used as part of the pathname to + determine what files to serve. This allows for easy use of a + huge number of virtual hosts with similar configurations.</p> + + <div class="note"><h3>Note</h3> + <p>If <code class="module"><a href="../mod/mod_alias.html">mod_alias</a></code> or <code class="module"><a href="../mod/mod_userdir.html">mod_userdir</a></code> are + used for translating URIs to filenames, they will override the + directives of <code class="module"><a href="../mod/mod_vhost_alias.html">mod_vhost_alias</a></code> described below. For + example, the following configuration will map <code> + /cgi-bin/script.pl</code> to <code> + /usr/local/apache2/cgi-bin/script.pl</code> in all cases:</p> + + <pre class="prettyprint lang-config">ScriptAlias "/cgi-bin/" "/usr/local/apache2/cgi-bin/" +VirtualScriptAlias "/never/found/%0/cgi-bin/"</pre> + + </div> +</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><h3>Topics</h3> +<ul id="topics"> +<li><img alt="" src="../images/down.gif" /> <a href="#interpol">Directory Name Interpolation</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#examples">Examples</a></li> +</ul><h3 class="directives">Directives</h3> +<ul id="toc"> +<li><img alt="" src="../images/down.gif" /> <a href="#virtualdocumentroot">VirtualDocumentRoot</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#virtualdocumentrootip">VirtualDocumentRootIP</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#virtualscriptalias">VirtualScriptAlias</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#virtualscriptaliasip">VirtualScriptAliasIP</a></li> +</ul> +<h3>Bugfix checklist</h3><ul class="seealso"><li><a href="https://www.apache.org/dist/httpd/CHANGES_2.4">httpd changelog</a></li><li><a href="https://bz.apache.org/bugzilla/buglist.cgi?bug_status=__open__&list_id=144532&product=Apache%20httpd-2&query_format=specific&order=changeddate%20DESC%2Cpriority%2Cbug_severity&component=mod_vhost_alias">Known issues</a></li><li><a href="https://bz.apache.org/bugzilla/enter_bug.cgi?product=Apache%20httpd-2&component=mod_vhost_alias">Report a bug</a></li></ul><h3>See also</h3> +<ul class="seealso"> +<li><code class="directive"><a href="../mod/core.html#usecanonicalname">UseCanonicalName</a></code></li> +<li><a href="../vhosts/mass.html">Dynamically configured mass + virtual hosting</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="interpol" id="interpol">Directory Name Interpolation</a></h2> + + + <p>All the directives in this module interpolate a string into + a pathname. The interpolated string (henceforth called the + "name") may be either the server name (see the <code class="directive"><a href="../mod/core.html#usecanonicalname">UseCanonicalName</a></code> + directive for details on how this is determined) or the IP + address of the virtual host on the server in dotted-quad + format. The interpolation is controlled by specifiers inspired + by <code>printf</code> which have a number of formats:</p> + +<table> + +<tr><td><code>%%</code></td> +<td>insert a <code>%</code></td></tr> + +<tr><td><code>%p</code></td> +<td>insert the port number of the virtual host</td></tr> + +<tr><td><code>%N.M</code></td> +<td>insert (part of) the name</td></tr> + +</table> + + <p><code>N</code> and <code>M</code> are used to specify + substrings of the name. <code>N</code> selects from the + dot-separated components of the name, and <code>M</code> + selects characters within whatever <code>N</code> has selected. + <code>M</code> is optional and defaults to zero if it isn't + present; the dot must be present if and only if <code>M</code> + is present. The interpretation is as follows:</p> + + <table> + + <tr><td><code>0</code></td> + <td>the whole name</td></tr> + + <tr><td><code>1</code></td> + <td>the first part</td></tr> + + <tr><td><code>2</code></td> + <td>the second part</td></tr> + + <tr><td><code>-1</code></td> + <td>the last part</td></tr> + + <tr><td><code>-2</code></td> + <td>the penultimate part</td></tr> + + <tr><td><code>2+</code></td> + <td>the second and all subsequent parts</td></tr> + + <tr><td><code>-2+</code></td> + <td>the penultimate and all preceding parts</td></tr> + + <tr><td><code>1+</code> and <code>-1+</code></td> + <td>the same as <code>0</code></td></tr> + </table> + + <p>If <code>N</code> or <code>M</code> is greater than the number + of parts available a single underscore is interpolated. </p> + +</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="section"> +<h2><a name="examples" id="examples">Examples</a></h2> + + + <p>For simple name-based virtual hosts you might use the + following directives in your server configuration file:</p> + + <pre class="prettyprint lang-config">UseCanonicalName Off +VirtualDocumentRoot "/usr/local/apache/vhosts/%0"</pre> + + + <p>A request for + <code>http://www.example.com/directory/file.html</code> will be + satisfied by the file + <code>/usr/local/apache/vhosts/www.example.com/directory/file.html</code>. + </p> + + <p>For a very large number of virtual hosts it is a good idea + to arrange the files to reduce the size of the + <code>vhosts</code> directory. To do this you might use the + following in your configuration file:</p> + + <pre class="prettyprint lang-config">UseCanonicalName Off +VirtualDocumentRoot "/usr/local/apache/vhosts/%3+/%2.1/%2.2/%2.3/%2"</pre> + + + <p>A request for + <code>http://www.domain.example.com/directory/file.html</code> + will be satisfied by the file + <code>/usr/local/apache/vhosts/example.com/d/o/m/domain/directory/file.html</code>.</p> + + <p>A more even spread of files can be achieved by hashing from the + end of the name, for example: </p> + +<pre class="prettyprint lang-config">VirtualDocumentRoot "/usr/local/apache/vhosts/%3+/%2.-1/%2.-2/%2.-3/%2"</pre> + + + <p>The example request would come from + <code>/usr/local/apache/vhosts/example.com/n/i/a/domain/directory/file.html</code>.</p> + + <p>Alternatively you might use: </p> + +<pre class="prettyprint lang-config">VirtualDocumentRoot "/usr/local/apache/vhosts/%3+/%2.1/%2.2/%2.3/%2.4+"</pre> + + + <p>The example request would come from + <code>/usr/local/apache/vhosts/example.com/d/o/m/ain/directory/file.html</code>.</p> + +<p> A very common request by users is the ability to point multiple domains to multiple +document roots without having to worry about the length or number of parts of the +hostname being requested. If the requested hostname is <code>sub.www.domain.example.com</code> + instead of simply <code>www.domain.example.com</code>, then using %3+ will result in the document +root being <code>/usr/local/apache/vhosts/domain.example.com/...</code> instead of the +intended <code>example.com</code> directory. In such cases, it can be beneficial to use +the combination <code>%-2.0.%-1.0</code>, which will always yield the domain name and the +tld, for example <code>example.com</code> regardless of the number of subdomains appended +to the hostname. As such, one can make a configuration that will direct all first, second +or third level subdomains to the same directory: +</p> +<pre class="prettyprint lang-config">VirtualDocumentRoot "/usr/local/apache/vhosts/%-2.0.%-1.0"</pre> + +<p> +In the example above, both <code>www.example.com</code> as well as <code>www.sub.example.com</code> +or <code>example.com</code> will all point to <code>/usr/local/apache/vhosts/example.com</code>. +</p> + + <p>For IP-based virtual hosting you might use the following in + your configuration file:</p> + + <pre class="prettyprint lang-config">UseCanonicalName DNS +VirtualDocumentRootIP "/usr/local/apache/vhosts/%1/%2/%3/%4/docs" +VirtualScriptAliasIP "/usr/local/apache/vhosts/%1/%2/%3/%4/cgi-bin"</pre> + + + <p>A request for + <code>http://www.domain.example.com/directory/file.html</code> + would be satisfied by the file + <code>/usr/local/apache/vhosts/10/20/30/40/docs/directory/file.html</code> + if the IP address of <code>www.domain.example.com</code> were + 10.20.30.40. A request for + <code>http://www.domain.example.com/cgi-bin/script.pl</code> would + be satisfied by executing the program + <code>/usr/local/apache/vhosts/10/20/30/40/cgi-bin/script.pl</code>.</p> + + <p>If you want to include the <code>.</code> character in a + <code>VirtualDocumentRoot</code> directive, but it clashes with + a <code>%</code> directive, you can work around the problem in + the following way:</p> + +<pre class="prettyprint lang-config">VirtualDocumentRoot "/usr/local/apache/vhosts/%2.0.%3.0"</pre> + + + <p>A request for + <code>http://www.domain.example.com/directory/file.html</code> + will be satisfied by the file + <code>/usr/local/apache/vhosts/domain.example/directory/file.html</code>.</p> + + <p>The <code class="directive"><a href="../mod/mod_log_config.html#logformat">LogFormat</a></code> + directives <code>%V</code> and <code>%A</code> are useful + in conjunction with this module.</p> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="VirtualDocumentRoot" id="VirtualDocumentRoot">VirtualDocumentRoot</a> <a name="virtualdocumentroot" id="virtualdocumentroot">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Dynamically configure the location of the document root +for a given virtual host</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>VirtualDocumentRoot <em>interpolated-directory</em>|none</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>VirtualDocumentRoot none</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_vhost_alias</td></tr> +</table> + + <p>The <code class="directive">VirtualDocumentRoot</code> directive allows you to + determine where Apache HTTP Server will find your documents based on the + value of the server name. The result of expanding + <em>interpolated-directory</em> is used as the root of the + document tree in a similar manner to the <code class="directive"><a href="../mod/core.html#documentroot">DocumentRoot</a></code> directive's argument. + If <em>interpolated-directory</em> is <code>none</code> then + <code class="directive">VirtualDocumentRoot</code> is turned off. This directive + cannot be used in the same context as <code class="directive"><a href="#virtualdocumentrootip">VirtualDocumentRootIP</a></code>.</p> + +<div class="warning"><h3>Note</h3> +<code class="directive">VirtualDocumentRoot</code> will override any <code class="directive"><a href="../mod/core.html#documentroot">DocumentRoot</a></code> directives you may have put in the same +context or child contexts. Putting a <code class="directive">VirtualDocumentRoot</code> +in the global server scope will effectively override <code class="directive"><a href="../mod/core.html#documentroot">DocumentRoot</a></code> directives in any virtual hosts defined later +on, unless you set <code class="directive">VirtualDocumentRoot</code> to <code>None</code> +in each virtual host. +</div> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="VirtualDocumentRootIP" id="VirtualDocumentRootIP">VirtualDocumentRootIP</a> <a name="virtualdocumentrootip" id="virtualdocumentrootip">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Dynamically configure the location of the document root +for a given virtual host</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>VirtualDocumentRootIP <em>interpolated-directory</em>|none</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>VirtualDocumentRootIP none</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_vhost_alias</td></tr> +</table> + +<p>The <code class="directive">VirtualDocumentRootIP</code> directive is like the + <code class="directive"><a href="#virtualdocumentroot">VirtualDocumentRoot</a></code> + directive, except that it uses the IP address of the server end + of the connection for directory interpolation instead of the server + name.</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="VirtualScriptAlias" id="VirtualScriptAlias">VirtualScriptAlias</a> <a name="virtualscriptalias" id="virtualscriptalias">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Dynamically configure the location of the CGI directory for +a given virtual host</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>VirtualScriptAlias <em>interpolated-directory</em>|none</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>VirtualScriptAlias none</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_vhost_alias</td></tr> +</table> + + <p>The <code class="directive">VirtualScriptAlias</code> directive allows you to + determine where Apache httpd will find CGI scripts in a similar + manner to <code class="directive"><a href="#virtualdocumentroot">VirtualDocumentRoot</a></code> does for other documents. It matches + requests for URIs starting <code>/cgi-bin/</code>, much like <code class="directive"><a href="../mod/mod_alias.html#scriptalias">ScriptAlias</a></code> + <code>/cgi-bin/</code> would.</p> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="VirtualScriptAliasIP" id="VirtualScriptAliasIP">VirtualScriptAliasIP</a> <a name="virtualscriptaliasip" id="virtualscriptaliasip">Directive</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Dynamically configure the location of the CGI directory for +a given virtual host</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>VirtualScriptAliasIP <em>interpolated-directory</em>|none</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>VirtualScriptAliasIP none</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr> +<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_vhost_alias</td></tr> +</table> + + <p>The <code class="directive">VirtualScriptAliasIP</code> directive is like the + <code class="directive"><a href="#virtualscriptalias">VirtualScriptAlias</a></code> + directive, except that it uses the IP address of the server end + of the connection for directory interpolation instead of the server + name.</p> + + +</div> +</div> +<div class="bottomlang"> +<p><span>Available Languages: </span><a href="../en/mod/mod_vhost_alias.html" title="English"> en </a> | +<a href="../fr/mod/mod_vhost_alias.html" hreflang="fr" rel="alternate" title="Français"> fr </a> | +<a href="../tr/mod/mod_vhost_alias.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/mod/mod_vhost_alias.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/mod/mod_vhost_alias.html.fr.utf8 b/docs/manual/mod/mod_vhost_alias.html.fr.utf8 new file mode 100644 index 0000000..6f7562d --- /dev/null +++ b/docs/manual/mod/mod_vhost_alias.html.fr.utf8 @@ -0,0 +1,385 @@ +<?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>mod_vhost_alias - 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> +<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="./">Modules</a></div> +<div id="page-content"> +<div id="preamble"><h1>Module Apache mod_vhost_alias</h1> +<div class="toplang"> +<p><span>Langues Disponibles: </span><a href="../en/mod/mod_vhost_alias.html" hreflang="en" rel="alternate" title="English"> en </a> | +<a href="../fr/mod/mod_vhost_alias.html" title="Français"> fr </a> | +<a href="../tr/mod/mod_vhost_alias.html" hreflang="tr" rel="alternate" title="Türkçe"> tr </a></p> +</div> +<table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>Permet de configurer dynamiquement l'hébergement virtuel de +masse</td></tr> +<tr><th><a href="module-dict.html#Status">Statut:</a></th><td>Extension</td></tr> +<tr><th><a href="module-dict.html#ModuleIdentifier">Identificateur de Module:</a></th><td>vhost_alias_module</td></tr> +<tr><th><a href="module-dict.html#SourceFile">Fichier Source:</a></th><td>mod_vhost_alias.c</td></tr></table> +<h3>Sommaire</h3> + + <p>Ce module permet de créer des serveurs virtuels configurés + dynamiquement, en autorisant l'utilisation de l'adresse IP et/ou de + l'en-tête <code>Host:</code> de la requête HTTP comme partie du nom + de chemin afin de déterminer les fichiers à servir. Ceci facilite la + gestion d'un grand nombre de serveurs virtuels possèdant des + configurations similaires.</p> + + <div class="note"><h3>Note</h3> + <p>Si les modules <code class="module"><a href="../mod/mod_alias.html">mod_alias</a></code> ou + <code class="module"><a href="../mod/mod_userdir.html">mod_userdir</a></code> sont utilisés pour traduire les URIs + en noms de fichiers, ils l'emportent sur les directives du module + <code class="module"><a href="../mod/mod_vhost_alias.html">mod_vhost_alias</a></code> décrites ci-dessous. Par + exemple, la configuration suivante fera correspondre <code> + /cgi-bin/script.pl</code> à <code> + /usr/local/apache2/cgi-bin/script.pl</code> dans tous les cas :</p> + + <pre class="prettyprint lang-config">ScriptAlias "/cgi-bin/" "/usr/local/apache2/cgi-bin/" +VirtualScriptAlias "/never/found/%0/cgi-bin/"</pre> + + </div> +</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><h3>Sujets</h3> +<ul id="topics"> +<li><img alt="" src="../images/down.gif" /> <a href="#interpol">Interpolation du nom de répertoire</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#examples">Exemples</a></li> +</ul><h3 class="directives">Directives</h3> +<ul id="toc"> +<li><img alt="" src="../images/down.gif" /> <a href="#virtualdocumentroot">VirtualDocumentRoot</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#virtualdocumentrootip">VirtualDocumentRootIP</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#virtualscriptalias">VirtualScriptAlias</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#virtualscriptaliasip">VirtualScriptAliasIP</a></li> +</ul> +<h3>Traitement des bugs</h3><ul class="seealso"><li><a href="https://www.apache.org/dist/httpd/CHANGES_2.4">Journal des modifications de httpd</a></li><li><a href="https://bz.apache.org/bugzilla/buglist.cgi?bug_status=__open__&list_id=144532&product=Apache%20httpd-2&query_format=specific&order=changeddate%20DESC%2Cpriority%2Cbug_severity&component=mod_vhost_alias">Problèmes connus</a></li><li><a href="https://bz.apache.org/bugzilla/enter_bug.cgi?product=Apache%20httpd-2&component=mod_vhost_alias">Signaler un bug</a></li></ul><h3>Voir aussi</h3> +<ul class="seealso"> +<li><code class="directive"><a href="../mod/core.html#usecanonicalname">UseCanonicalName</a></code></li> +<li><a href="../vhosts/mass.html">Configuration dynamique de +l'hébergement virtuel de masse</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="interpol" id="interpol">Interpolation du nom de répertoire</a></h2> + + + <p>Toutes les directives de ce module insèrent une chaîne dans un + nom de chemin. La chaîne insérée (que nous appellerons maintenant le + "nom") peut être soit le nom du serveur (voir la directive + <code class="directive"><a href="../mod/core.html#usecanonicalname">UseCanonicalName</a></code> pour les + détails sur la manière dont il est déterminé), soit l'adresse IP du + serveur virtuel hébergé par le serveur sous la forme d'un quadruplet + d'octets séparés par des points. L'insertion est contrôlée par des + spécificateurs inspirés de <code>printf</code> et possèdant de + nombreux formats :</p> + +<table> + +<tr><td><code>%%</code></td> +<td>insère un <code>%</code></td></tr> + +<tr><td><code>%p</code></td> +<td>insère le numéro de port du serveur virtuel</td></tr> + +<tr><td><code>%N.M</code></td> +<td>insère le nom (en partie)</td></tr> + +</table> + + <p><code>N</code> et <code>M</code> permettent de spécifier des + sous-chaînes du nom. <code>N</code> sélectionne un des composants du + nom séparés par des points, et <code>M</code> sélectionne des + caractères à l'intérieur de ce que <code>N</code> a sélectionné. + <code>M</code> est optionnel et sa valeur par défaut est 0 s'il + n'est pas spécifié ; le point doit être présent si et seulement si + <code>M</code> l'est aussi. Les modes d'insertion sont les suivants + :</p> + + <table> + + <tr><td><code>0</code></td> + <td>le nom en entier</td></tr> + + <tr><td><code>1</code></td> + <td>la première partie</td></tr> + + <tr><td><code>2</code></td> + <td>la seconde partie</td></tr> + + <tr><td><code>-1</code></td> + <td>la dernière partie</td></tr> + + <tr><td><code>-2</code></td> + <td>l'avant-dernière partie</td></tr> + + <tr><td><code>2+</code></td> + <td>toutes les parties à partir de la seconde</td></tr> + + <tr><td><code>-2+</code></td> + <td>toutes les parties jusqu'à l'avant-dernière</td></tr> + + <tr><td><code>1+</code> et <code>-1+</code></td> + <td>identique à <code>0</code></td></tr> + </table> + + <p>Si <code>N</code> ou <code>M</code> est plus grand que le nombre + de parties disponibles, seul un caractère de soulignement est + insé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="examples" id="examples">Exemples</a></h2> + + + <p>Pour des serveurs virtuels simples à base de nom, utilisez les + directives suivantes dans le fichier de configuration de votre + serveur :</p> + + <pre class="prettyprint lang-config">UseCanonicalName Off +VirtualDocumentRoot "/usr/local/apache/vhosts/%0"</pre> + + + <p>Une requête pour + <code>http://www.example.com/repertoire/fichier.html</code> + concernera alors la ressource + <code>/usr/local/apache/vhosts/www.example.com/repertoire/fichier.html</code>. + </p> + + <p>Pour un très grand nombre de serveurs virtuels, il est avantageux + d'organiser les fichiers de façon à réduire la taille du répertoire + <code>vhosts</code>. Pour ce faire, insérez les lignes suivantes + dans votre fichier de configuration :</p> + + <pre class="prettyprint lang-config">UseCanonicalName Off +VirtualDocumentRoot "/usr/local/apache/vhosts/%3+/%2.1/%2.2/%2.3/%2"</pre> + + + <p>Une requête pour + <code>http://www.domaine.example.com/repertoire/fichier.html</code> + concernera alors la ressource + <code>/usr/local/apache/vhosts/example.com/d/o/m/domaine/repertoire/fichier.html</code>.</p> + + <p>Une répartition plus régulière des fichiers peut être obtenue en + partant de la fin d'un composant du nom, comme dans l'exemple + suivant :</p> + +<pre class="prettyprint lang-config">VirtualDocumentRoot "/usr/local/apache/vhosts/%3+/%2.-1/%2.-2/%2.-3/%2"</pre> + + + <p>La requête précédente concernerait alors + <code>/usr/local/apache/vhosts/example.com/e/n/i/domaine/repertoire/fichier.html</code>.</p> + + <p>Vous pouvez également utiliser : </p> + +<pre class="prettyprint lang-config">VirtualDocumentRoot "/usr/local/apache/vhosts/%3+/%2.1/%2.2/%2.3/%2.4+"</pre> + + + <p>La requête précédente concernerait alors + <code>/usr/local/apache/vhosts/example.com/d/o/m/aine/repertoire/fichier.html</code>.</p> + + <p>Une demande très courante des utilisateurs concerne la possibilité de + faire correspondre plusieurs racines de documents à plusieurs + domaines, sans avoir à se préoccuper de la longueur ou du nombre de + parties du nom d'hôte faisant partie de la requête. Si le nom d'hôte + de la requête est <code>sub.www.domain.example.com</code> au lieu de + simplement <code>www.domain.example.com</code>, alors en utilisant + %3+, la racine des documents sera + <code>/usr/local/apache/vhosts/domain.example.com/...</code> au + lieu du répertoire <code>example.com</code> attendu. Dans ce genre + de situation, il peut s'avérer préférable d'utiliser la combinaison + <code>%-2.0.%-1.0</code> qui fournira toujours le nom de domaine et + le tld, par exemple <code>example.com</code> sans tenir compte du + nombre de sous-domaines ajoutés au nom d'hôte. Dans ces conditions, + il est possible d'élaborer une configuration qui associera les + sous-domaines de premier, second et troisième niveau au même + répertoire : +</p> +<pre class="prettyprint lang-config">VirtualDocumentRoot "/usr/local/apache/vhosts/%-2.0.%-1.0"</pre> + +<p> +Dans l'exemple ci-dessus, <code>www.example.com</code>, +<code>www.sub.example.com</code> ou <code>example.com</code> +correspondront tous au répertoire +<code>/usr/local/apache/vhosts/example.com</code>. +</p> + + + + <p>Pour l'hébergement virtuel à base d'adresse IP, vous pouvez + insérer les lignes suivantes dans votre fichier de configuration + :</p> + + <pre class="prettyprint lang-config">UseCanonicalName DNS +VirtualDocumentRootIP "/usr/local/apache/vhosts/%1/%2/%3/%4/docs" +VirtualScriptAliasIP "/usr/local/apache/vhosts/%1/%2/%3/%4/cgi-bin"</pre> + + + <p>Si l'adresse IP de <code>www.domaine.example.com</code> est + 10.20.30.40, une requête pour + <code>http://www.domaine.example.com/repertoire/fichier.html</code> + concernera la ressource + <code>/usr/local/apache/vhosts/10/20/30/40/docs/repertoire/fichier.html</code>. + Une requête pour + <code>http://www.domaine.example.com/cgi-bin/script.pl</code> + concernera la ressource + <code>/usr/local/apache/vhosts/10/20/30/40/cgi-bin/script.pl</code>.</p> + + <p>Si vous voulez insérer le caractère <code>.</code> dans une + directive <code>VirtualDocumentRoot</code>, et si cela crée un + conflit avec un spécificateur <code>%</code>, vous pouvez contourner + le problème de la manière suivante :</p> + +<pre class="prettyprint lang-config">VirtualDocumentRoot "/usr/local/apache/vhosts/%2.0.%3.0"</pre> + + + <p>Une requête pour + <code>http://www.domaine.example.com/repertoire/fichier.html</code> + concernera alors la ressource + <code>/usr/local/apache/vhosts/domaine.exemple/repertoire/fichier.html</code>.</p> + + <p>Les spécificateurs de format <code>%V</code> et <code>%A</code> + de la directive <code class="directive"><a href="../mod/mod_log_config.html#logformat">LogFormat</a></code> s'avèrent très utiles + lorsqu'ils sont utilisés en conjonction avec ce module.</p> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="virtualdocumentroot" id="virtualdocumentroot">Directive</a> <a name="VirtualDocumentRoot" id="VirtualDocumentRoot">VirtualDocumentRoot</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Permet une configuration dynamique de la racine des +documents d'un serveur virtuel donné</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>VirtualDocumentRoot <em>répertoire-interpolé</em>|none</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Défaut:</a></th><td><code>VirtualDocumentRoot none</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Extension</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_vhost_alias</td></tr> +</table> + + <p>La directive <code class="directive">VirtualDocumentRoot</code> vous + permet de spécifier où le serveur HTTP Apache pourra trouver vos + documents en se basant + sur le nom du serveur. Le résultat de l'expansion du + <em>répertoire-interpolé</em> est utilisé comme racine de + l'arborescence des documents d'une manière similaire à l'argument de + la directive <code class="directive"><a href="../mod/core.html#documentroot">DocumentRoot</a></code>. Si + <em>répertoire-interpolé</em> a pour valeur <code>none</code>, la + directive <code class="directive">VirtualDocumentRoot</code> est désactivée. + Cette directive ne peut pas être utilisée dans le même contexte que + la directive <code class="directive"><a href="#virtualdocumentrootip">VirtualDocumentRootIP</a></code>.</p> + +<div class="warning"><h3>Note</h3> +La directive <code class="directive">VirtualDocumentRoot</code> l'emporte sur +toute directive <code class="directive"><a href="../mod/core.html#documentroot">DocumentRoot</a></code> +définie dans le même contexte ou dans des contextes enfants. Le fait de +définir une directive <code class="directive">VirtualDocumentRoot</code> dans le +contexte du serveur principal va effectivement l'emporter sur toute +directive <code class="directive"><a href="../mod/core.html#documentroot">DocumentRoot</a></code> définie dans +un serveur virtuel quelconque, si vous n'avez pas défini +<code class="directive">VirtualDocumentRoot</code> à <code>None</code> dans ce +serveur virtuel. +</div> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="virtualdocumentrootip" id="virtualdocumentrootip">Directive</a> <a name="VirtualDocumentRootIP" id="VirtualDocumentRootIP">VirtualDocumentRootIP</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configuration dynamique de la racine des documents pour un +serveur virtuel donné</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>VirtualDocumentRootIP <em>répertoire-interpolé</em>|none</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Défaut:</a></th><td><code>VirtualDocumentRootIP none</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Extension</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_vhost_alias</td></tr> +</table> + +<p>La directive <code class="directive">VirtualDocumentRootIP</code> est +identique à la directive <code class="directive"><a href="#virtualdocumentroot">VirtualDocumentRoot</a></code> à l'exception +près qu'elle utilise l'adresse IP du serveur virtuel pour +l'interpolation du répertoire à la place du nom du serveur.</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="virtualscriptalias" id="virtualscriptalias">Directive</a> <a name="VirtualScriptAlias" id="VirtualScriptAlias">VirtualScriptAlias</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configuration dynamique du répertoire des scripts CGI pour +un serveur virtuel donné</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>VirtualScriptAlias <em>répertoire-interpolé</em>|none</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Défaut:</a></th><td><code>VirtualScriptAlias none</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Extension</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_vhost_alias</td></tr> +</table> + + <p>La directive <code class="directive">VirtualScriptAlias</code> vous + permet de spécifier où Apache httpd pourra trouver les scripts CGI selon une + méthode similaire à celle qu'utilise la directive <code class="directive"><a href="#virtualdocumentroot">VirtualDocumentRoot</a></code> pour les + autres documents. Elle recherche des requêtes dont l'URI commence + par <code>/cgi-bin/</code>, comme le ferait la directive <code class="directive"><a href="../mod/mod_alias.html#scriptalias">ScriptAlias</a></code>.</p> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="virtualscriptaliasip" id="virtualscriptaliasip">Directive</a> <a name="VirtualScriptAliasIP" id="VirtualScriptAliasIP">VirtualScriptAliasIP</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configuration dynamique du répertoire des scripts CGI pour +un serveur virtuel donné</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Syntaxe:</a></th><td><code>VirtualScriptAliasIP <em>répertoire-interpolé</em>|none</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Défaut:</a></th><td><code>VirtualScriptAliasIP none</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Contexte:</a></th><td>configuration globale, serveur virtuel</td></tr> +<tr><th><a href="directive-dict.html#Status">Statut:</a></th><td>Extension</td></tr> +<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_vhost_alias</td></tr> +</table> + + <p>La directive <code class="directive">VirtualScriptAliasIP</code> est + identique à la directive <code class="directive"><a href="#virtualscriptalias">VirtualScriptAlias</a></code> à + l'exception près qu'elle utilise l'adresse IP du serveur virtuel + pour l'interpolation du répertoire à la place du nom du serveur.</p> + + +</div> +</div> +<div class="bottomlang"> +<p><span>Langues Disponibles: </span><a href="../en/mod/mod_vhost_alias.html" hreflang="en" rel="alternate" title="English"> en </a> | +<a href="../fr/mod/mod_vhost_alias.html" title="Français"> fr </a> | +<a href="../tr/mod/mod_vhost_alias.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/mod/mod_vhost_alias.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/mod/mod_vhost_alias.html.tr.utf8 b/docs/manual/mod/mod_vhost_alias.html.tr.utf8 new file mode 100644 index 0000000..75674ab --- /dev/null +++ b/docs/manual/mod/mod_vhost_alias.html.tr.utf8 @@ -0,0 +1,354 @@ +<?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>mod_vhost_alias - 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> +<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="./">Modüller</a></div> +<div id="page-content"> +<div id="preamble"><h1>Apache Modülü mod_vhost_alias</h1> +<div class="toplang"> +<p><span>Mevcut Diller: </span><a href="../en/mod/mod_vhost_alias.html" hreflang="en" rel="alternate" title="English"> en </a> | +<a href="../fr/mod/mod_vhost_alias.html" hreflang="fr" rel="alternate" title="Français"> fr </a> | +<a href="../tr/mod/mod_vhost_alias.html" title="Türkçe"> tr </a></p> +</div> +<table class="module"><tr><th><a href="module-dict.html#Description">Açıklama:</a></th><td>Kitlesel sanal konakların devingen olarak yapılandırılmasını sağlar</td></tr> +<tr><th><a href="module-dict.html#Status">Durum:</a></th><td>Eklenti</td></tr> +<tr><th><a href="module-dict.html#ModuleIdentifier">Modül Betimleyici:</a></th><td>vhost_alias_module</td></tr> +<tr><th><a href="module-dict.html#SourceFile">Kaynak Dosyası:</a></th><td>mod_vhost_alias.c</td></tr></table> +<h3>Özet</h3> + + <p>Bu modül, hangi dosyaların sunulacağını saptamak için dosya yolunun + parçası olarak HTTP isteğinin <code>Host:</code> başlığının ve/veya IP + adresinin kullanılmasını mümkün kılarak devingen yapılandırmalı sanal + konaklar oluşturur. Böylece benzer yapılandırmaya sahip çok büyük sayıda + sanal konak kullanımı kolaşlaşır.</p> + + <div class="note"><h3>Bilginize</h3> + <p>URI’leri dosya isimlerine dönüştürmek için <code class="module"><a href="../mod/mod_alias.html">mod_alias</a></code> + veya <code class="module"><a href="../mod/mod_userdir.html">mod_userdir</a></code> kullanılmışsa bunlar + <code class="module"><a href="../mod/mod_vhost_alias.html">mod_vhost_alias</a></code> yönergeleri tarafından aşağıda + açıklandığı gibi geçersiz kılınırlar. Örneğin, aşağıdaki yapılandırma + her durumda <code>/cgi-bin/script.pl</code> betiğini <code> + /usr/local/apache2/cgi-bin/script.pl</code> betiğine eşleyecektir:</p> + + <pre class="prettyprint lang-config">ScriptAlias "/cgi-bin/" "/usr/local/apache2/cgi-bin/" +VirtualScriptAlias "/nerede/bilinmiyor/%0/cgi-bin/"</pre> + + </div> +</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><h3>Konular</h3> +<ul id="topics"> +<li><img alt="" src="../images/down.gif" /> <a href="#interpol">Dizin İsimlerinin Elde Edilmesi</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#examples">Örnekler</a></li> +</ul><h3 class="directives">Yönergeler</h3> +<ul id="toc"> +<li><img alt="" src="../images/down.gif" /> <a href="#virtualdocumentroot">VirtualDocumentRoot</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#virtualdocumentrootip">VirtualDocumentRootIP</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#virtualscriptalias">VirtualScriptAlias</a></li> +<li><img alt="" src="../images/down.gif" /> <a href="#virtualscriptaliasip">VirtualScriptAliasIP</a></li> +</ul> +<h3>Bulunan hatalar</h3><ul class="seealso"><li><a href="https://www.apache.org/dist/httpd/CHANGES_2.4">httpd günlüğü</a></li><li><a href="https://bz.apache.org/bugzilla/buglist.cgi?bug_status=__open__&list_id=144532&product=Apache%20httpd-2&query_format=specific&order=changeddate%20DESC%2Cpriority%2Cbug_severity&component=mod_vhost_alias">Bilinenler</a></li><li><a href="https://bz.apache.org/bugzilla/enter_bug.cgi?product=Apache%20httpd-2&component=mod_vhost_alias">Hata bildir</a></li></ul><h3>Ayrıca bakınız:</h3> +<ul class="seealso"> +<li><code class="directive"><a href="../mod/core.html#usecanonicalname">UseCanonicalName</a></code></li> +<li><a href="../vhosts/mass.html">Devingen olarak Yapılandırılan Kitlesel +Sanal Barındırma</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="interpol" id="interpol">Dizin İsimlerinin Elde Edilmesi</a></h2> + + + <p>Bu modüldeki tüm yönergeler bir dizgeyi bir dosya yoluna dönüştürerek + çalışırlar. Dönüşüm dizgesi (bundan sonra “isim” diyeceğiz) ya sunucu + ismi olur (bunun nasıl belirlendiğini öğrenmek için <code class="directive"><a href="../mod/core.html#usecanonicalname">UseCanonicalName</a></code> yönergesine bakınız) ya da + sunucu üzerindeki sanal konağın IP adresi olur. Dönüşümü, + <code>printf</code>’inkilerin benzeri birkaç biçem belirteci + denetler:</p> + +<table> + +<tr><td><code>%%</code></td> +<td>Bir <code>%</code> imi yerleştirir.</td></tr> + +<tr><td><code>%p</code></td> +<td>Sanal konağın IP adresini yerleştirir.</td></tr> + +<tr><td><code>%N.M</code></td> +<td>İsmin parçalarını yerleştirir.</td></tr> + +</table> + + <p><code>N</code> ve <code>M</code> ismin alt dizgelerini belirtmek için + kullanılır. <code>N</code>, ismin noktalarla ayrılmış bileşenlerinden + seçim yaparken <code>M</code>, <code>N</code> ile seçilen parçadan + karakter seçmekte kullanılır. <code>M</code> isteğe bağlı olup mevcut + olmaması halinde öntanımlı olarak sıfırdır. Noktanın varlığı + <code>M</code>’nin varlığına bağlıdır. Dönüşüm şöyle uygulanır:</p> + + <table> + + <tr><td><code>0</code></td> + <td>ismin tamamı</td></tr> + + <tr><td><code>1</code></td> + <td>ilk parça</td></tr> + + <tr><td><code>2</code></td> + <td>ikinci parça</td></tr> + + <tr><td><code>-1</code></td> + <td>son parça</td></tr> + + <tr><td><code>-2</code></td> + <td>sondan bir önceki parça</td></tr> + + <tr><td><code>2+</code></td> + <td>ikinci parça ve sonraki parçaların hepsi</td></tr> + + <tr><td><code>-2+</code></td> + <td>sondan bir önceki parça ve daha önceki parçaların hepsi</td></tr> + + <tr><td><code>1+</code> ve <code>-1+</code></td> + <td><code>0</code> ile aynı</td></tr> + </table> + + <p><code>N</code> veya <code>M</code> parça sayısından büyükse dönüşüm + dizgesi sadece alt çizgi karakterini içerir.</p> + +</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="section"> +<h2><a name="examples" id="examples">Örnekler</a></h2> + + + <p>Sunucu yapılandırma dosyanızda isme dayalı sanal konaklar için + aşağıdaki yönergeler kullanılıyor olsun:</p> + + <pre class="prettyprint lang-config">UseCanonicalName Off +VirtualDocumentRoot "/usr/local/apache/sankonlar/%0"</pre> + + + <p><code>http://example.com/dizin/dosya.html</code> için yapılan bir istek + <code>/usr/local/apache/sankonlar/example.com/dizin/dosya.html</code> + dosyası ile yerine getirilecektir.</p> + + <p>Çok büyük sayıda sanal konak için <code>sankonlar</code> dizininin + boyutlarını küçük tutmak amacıyla dosyalar düzenlenebilir. Bunu + yapılandırma dosyanızda şöyle yapabilirsiniz:</p> + + <pre class="prettyprint lang-config">UseCanonicalName Off +VirtualDocumentRoot "/usr/local/apache/sankonlar/%3+/%2.1/%2.2/%2.3/%2"</pre> + + + <p><code>http://falan.filan.example.com/dizin/dosya.html</code> için + yapılan bir istek + <code>/usr/local/apache/sankonlar/example.com/f/i/l/filan/dizin/dosya.html + </code> ile yerine getirilecektir.</p> + + <p>Bu sefer de parçaları ismin sonundan toplayalım: </p> + + <pre class="prettyprint lang-config">VirtualDocumentRoot "/usr/local/apache/sankonlar/%3+/%2.-1/%2.-2/%2.-3/%2"</pre> + + + <p>Bu durumda istek + <code>/usr/local/apache/sankonlar/example.com/n/a/l/filan/dizin/dosya.html + </code>ile karşılanırdı.</p> + + <p>Şöyle bir şey de yapabilirsiniz:</p> + + <pre class="prettyprint lang-config">VirtualDocumentRoot "/usr/local/apache/sankonlar/%3+/%2.1/%2.2/%2.3/%2.4+"</pre> + + + <p>Bu örnek için istek + <code>/usr/local/apache/sankonlar/example.com/f/i/l/an/dizin/dosya.html + </code> dosyasından karşılanırdı.</p> + + <p>Kullanıcıların çoğunun ortak isteği, istenen konak adının uzunluğu veya + sayısı için endişelenmeksizin çok sayıda belge köküne çok sayıda alan + adından erişilebilmesidir. Eğer istenen konak adı + <code>www.domain.example.com</code> değil de + <code>sub.www.domain.example.com</code> ise %3+ kullanımı, belge kök + dizininin düşünüldüğü gibi <code>example.com</code> değil + <code>/usr/local/apache/vhosts/domain.example.com/...</code> olmasını + sağlar. Böyle durumlarda, daima alan adı ve tld ile sonuçlanan + <code>%-2.0.%-1.0</code> birleşiminin kullanımı daha yararlı olabilir. + Böylece, tüm ilk, ikinci ve üçüncü seviye alt alan adlarını aynı dizine + yönlendirecek bir yapılandırma yapılabilir:</p> + + <pre class="prettyprint lang-config">VirtualDocumentRoot "/usr/local/apache/vhosts/%-2.0.%-1.0"</pre> + + + <p>Yukarıdaki örnekte, <code>example.com</code>, + <code>www.example.com</code> ve hatta <code>www.sub.example.com</code> + bile <code>/usr/local/apache/vhosts/example.com</code> dizinine + yönlendirilecektir.</p> + + <p>IP’ye dayalı sanal konaklar için yapılandırma dosyanızda şu satırlar + olabilirdi:</p> + + <pre class="prettyprint lang-config">UseCanonicalName DNS +VirtualDocumentRootIP "/usr/local/apache/sankonlar/%1/%2/%3/%4/belgeler" +VirtualScriptAliasIP "/usr/local/apache/sankonlar/%1/%2/%3/%4/cgi-bin"</pre> + + + <p><code>http://falan.filan.example.com/dizin/dosya.html</code> için + yapılan bir istek eğer <code>falan.filan.example.com</code>’un IP adresi + 10.20.30.40 olsaydı, + <code>/usr/local/apache/sankonlar/10/20/30/40/belgeler/dizin/dosya.html + </code> dosyası ile karşılanırdı. + <code>http://falan.filan.example.com/cgi-bin/betik.pl</code> için yapılan + bir istek ise + <code>/usr/local/apache/sankonlar/10/20/30/40/cgi-bin/betik.pl</code> + betiğinin çalıştırılması ile sağlanırdı.</p> + + <p>Bir <code>VirtualDocumentRoot</code> yönergesinin <code>.</code> + karakterini içermesini isterseniz, bir biçem belirteci ile karışıklığa + sebep olmaksızın bunu şöyle sağlayabilirsiniz:</p> + + <pre class="prettyprint lang-config">VirtualDocumentRoot "/usr/local/apache/sankonlar/%2.0.%3.0"</pre> + + + <p>Bu durumda <code>http://falan.filan.example.com/dizin/dosya.html</code> + için yapılan bir istek + <code>/usr/local/apache/sankonlar/filan.mesela/dizin/dosya.html</code> + dosyası ile karşılanacaktır.</p> + + <p><code class="directive"><a href="../mod/mod_log_config.html#logformat">LogFormat</a></code> yönergesinin + <code>%V</code> ve <code>%A</code> <a href="mod_log_config.html#formats">biçem belirteçleri</a> bu modülle + birlikte kullanıldığında çok yararlı olurlar.</p> +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="VirtualDocumentRoot" id="VirtualDocumentRoot">VirtualDocumentRoot</a> <a name="virtualdocumentroot" id="virtualdocumentroot">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>Bir sanal konağın belge kök dizinini devingen olarak yapılandırır. +</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>VirtualDocumentRoot <em>hesaplanan-dizin</em>|none</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Öntanımlı:</a></th><td><code>VirtualDocumentRoot none</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Eklenti</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>mod_vhost_alias</td></tr> +</table> + + <p><code class="directive">VirtualDocumentRoot</code> yönergesi sunucu ismine göre + belgelerin bulunacağı yeri Apache HTTP Sunucusunun saptamasını sağlar. + <code><em>hesaplanan-dizin</em></code>’in dönüşüm sonucu <code class="directive"><a href="../mod/core.html#documentroot">DocumentRoot</a></code> yönergesinin değeriymiş gibi + belge ağacının kök dizini olarak kullanılır. + <code><em>hesaplanan-dizin</em></code> yerine <code>none</code> + belirtilmişse <code class="directive">VirtualDocumentRoot</code> iptal edilmiş + olur. Bu yönerge <code class="directive"><a href="#virtualdocumentrootip">VirtualDocumentRootIP</a></code> yönergesinin kullanıldığı bağlamda + yer alamaz.</p> + + <div class="warning"><h3>Bilginize</h3> + <code class="directive">VirtualDocumentRoot</code> yönergesi aynı bağlamda veya + alt bağlamlarda da kullanılabilen <code class="directive"><a href="../mod/core.html#documentroot">DocumentRoot</a></code> yönergelerini geçersiz kılar. + Genel sunucu etki alanına bir <code class="directive">VirtualDocumentRoot</code> + konulması, daha sonra yer alan her sanal konak tanımı içinde + <code class="directive">VirtualDocumentRoot</code> yönergesine <code>None</code> + atamadıkça bu sanal konaklarda yapılmış <code class="directive"><a href="../mod/core.html#documentroot">DocumentRoot</a></code> atamalarını geçersiz kılacaktır. + </div> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="VirtualDocumentRootIP" id="VirtualDocumentRootIP">VirtualDocumentRootIP</a> <a name="virtualdocumentrootip" id="virtualdocumentrootip">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>Bir sanal konağın belge kök dizinini devingen olarak yapılandırır. +</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>VirtualDocumentRootIP <em>hesaplanan-dizin</em>|none</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Öntanımlı:</a></th><td><code>VirtualDocumentRootIP none</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Eklenti</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>mod_vhost_alias</td></tr> +</table> + + <p><code class="directive">VirtualDocumentRootIP</code> yönergesi, dizinin + saptanmasında sunucu ismi yerine bağlantının sonlandığı sunucunun IP + adresini kullanması dışında <code class="directive"><a href="#virtualdocumentroot">VirtualDocumentRoot</a></code> gibidir.</p> + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="VirtualScriptAlias" id="VirtualScriptAlias">VirtualScriptAlias</a> <a name="virtualscriptalias" id="virtualscriptalias">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>Bir sanal konağın CGI dizinini devingen olarak yapılandırır. +</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>VirtualScriptAlias <em>hesaplanan-dizin</em>|none</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Öntanımlı:</a></th><td><code>VirtualScriptAlias none</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Eklenti</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>mod_vhost_alias</td></tr> +</table> + + <p><code class="directive">VirtualScriptAlias</code> yönergesi, CGI betiklerinin + bulunacağı yeri Apache httpd’nin saptamasını sağlamak bakımından + <code class="directive"><a href="#virtualdocumentroot">VirtualDocumentRoot</a></code> + yönergesinin yaptığını yapar. <code>/cgi-bin/</code> ile başlayan + istekler için ise <code class="directive"><a href="../mod/mod_alias.html#scriptalias">ScriptAlias</a></code> + yönergesinin yaptığını yapar.</p> + + +</div> +<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="directive-section"><h2><a name="VirtualScriptAliasIP" id="VirtualScriptAliasIP">VirtualScriptAliasIP</a> <a name="virtualscriptaliasip" id="virtualscriptaliasip">Yönergesi</a></h2> +<table class="directive"> +<tr><th><a href="directive-dict.html#Description">Açıklama:</a></th><td>Bir sanal konağın CGI dizinini devingen olarak yapılandırır. +</td></tr> +<tr><th><a href="directive-dict.html#Syntax">Sözdizimi:</a></th><td><code>VirtualScriptAliasIP <em>hesaplanan-dizin</em>|none</code></td></tr> +<tr><th><a href="directive-dict.html#Default">Öntanımlı:</a></th><td><code>VirtualScriptAliasIP none</code></td></tr> +<tr><th><a href="directive-dict.html#Context">Bağlam:</a></th><td>sunucu geneli, sanal konak</td></tr> +<tr><th><a href="directive-dict.html#Status">Durum:</a></th><td>Eklenti</td></tr> +<tr><th><a href="directive-dict.html#Module">Modül:</a></th><td>mod_vhost_alias</td></tr> +</table> + + <p><code class="directive">VirtualScriptAliasIP</code> yönergesi, dizinin + saptanmasında sunucu ismi yerine bağlantının sonlandığı sunucunun IP + adresini kullanması dışında <code class="directive"><a href="#virtualscriptalias">VirtualScriptAlias</a></code> gibidir.</p> + + +</div> +</div> +<div class="bottomlang"> +<p><span>Mevcut Diller: </span><a href="../en/mod/mod_vhost_alias.html" hreflang="en" rel="alternate" title="English"> en </a> | +<a href="../fr/mod/mod_vhost_alias.html" hreflang="fr" rel="alternate" title="Français"> fr </a> | +<a href="../tr/mod/mod_vhost_alias.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/mod/mod_vhost_alias.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 |