examples.xml.ja revision 400473f1f7ae704b5bbe761ce6d5485dd96d190d
<?xml version='1.0' encoding='iso-2022-jp' ?>
<!-- English Revision: 105989:123368 (outdated) -->
<!--
Copyright 2002-2004 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<manualpage metafile="examples.xml.meta">
<parentdocument href="./">$B%P!<%A%c%k%[%9%H(B</parentdocument>
<title>$B%P!<%A%c%k%[%9%H$NNc(B</title>
<summary>
<p>$B$3$NJ8=q$O!"%P!<%A%c%k%[%9%H$N@_Dj$N:]$K(B
$B$h$/$"$k<ALd$KEz$($k$b$N$G$9!#A[Dj$7$F$$$kBP>]$O(B <a
$B0l$D$N%5!<%P$GJ#?t$N%&%'%V%5%$%H$r1?MQ$7$F$$$k>u67$G$9!#(B
$B0l$D$N%W%m%-%7%5!<%P$N8e$m$GJ#?t$N%5!<%P$r1?MQ$9$k%5%$%H8~$1$N(B
$B@bL@$O6a!9=q$+$l$k$O$:$G$9!#(B</p>
</summary>
<section id="purename"><title>$B0l$D$N(B IP $B%"%I%l%9$G$$$/$D$+$NL>A0%Y!<%9$N(B
$B%&%'%V%5%$%H$r<B9T$9$k(B</title>
<p>$B%5!<%P$O(B IP $B%"%I%l%9$r0l$D3d$jEv$F$i$l$F$$$F!"(BDNS $B$G%^%7%s$K(B
$BJ#?t$NL>A0(B (CNAME) $B$,;XDj$5$l$F$$$^$9!#$3$N%^%7%s$G(B
<code>www.example.com</code> $B$H(B <code>www.example.org</code>
$B$N$?$a$N%&%'%V%5!<%P$r<B9T$5$;$?$$$H$7$^$9!#(B</p>
<note><title>$BCm(B</title><p>
Apache $B%5!<%P$N@_Dj$G%P!<%A%c%k%[%9%H$N@_Dj$r$7$?$@$1$G!"(B
$BCN$i$J$$4V$K$=$N%[%9%HL>$KBP1~$9$k(B DNS $B$N%(%s%H%j$,(B
$B:n@.$5$l$?$j$O$7$^$;$s!#$=$N%5!<%P$N(B IP $B%"%I%l%9$K2r7h$5$l$k(B
$B$h$&$K(B DNS $B$KL>A0$rEPO?$7$J$1$l$P(B<em>$B$J$j$^$;$s(B</em>$B!#(B
$B$=$&$G$J$$$HC/$b$"$J$?$N%&%'%V%5%$%H$r8+$k$3$H$O$G$-$^$;$s!#(B
$B%m!<%+%k$G$N%F%9%H$N$?$a$K(B <code>hosts</code> $B%U%!%$%k$K(B
$B%(%s%H%j$rDI2C$9$k$3$H$b$G$-$^$9$,!"$3$N>l9g$O$=$N(B
hosts $B%(%s%H%j$N$"$k%^%7%s$+$i$7$+F0:n$7$^$;$s!#(B</p>
</note>
<example>
<title>$B%5!<%P@_Dj(B</title>
# Ensure that Apache listens on port 80<br />
Listen 80<br />
<br />
# Listen for virtual host requests on all IP addresses<br />
NameVirtualHost *:80<br />
<br />
<VirtualHost *:80><br />
<indent>
ServerName www.example.com<br />
<br />
# Other directives here<br />
<br />
</indent>
</VirtualHost><br />
<br />
<VirtualHost *:80><br />
<indent>
ServerName www.example.org<br />
<br />
# Other directives here<br />
<br />
</indent>
</VirtualHost>
</example>
<p>$B%"%9%?%j%9%/$O$9$Y$F$N%"%I%l%9$K%^%C%A$7$^$9$N$G!"<g%5!<%P$O(B
$B%j%/%(%9%H$r07$$$^$;$s!#(B<code>www.example.com</code> $B$O(B
$B:G=i$K$"$k$?$a!"M%@h=g0L$O0lHV9b$/$J$j!"(B<cite>default</cite> $B$b$7$/$O(B
<cite>primary</cite> $B$N%5!<%P$H9M$($k$3$H$,$G$-$^$9!#$D$^$j!"%j%/%(%9%H$,(B
$B$I$N(B <code>ServerName</code> $B%G%#%l%/%F%#%V$K$b%^%C%A$7$J$$>l9g!"(B
$B0lHV:G=i$N(B <code>VirtualHost</code> $B$K$h$j07$o$l$^$9!#(B</p>
<note><title>$BCm(B</title>
<p><code>*</code> $B$r%7%9%F%`$N<B:]$N(B IP $B%"%I%l%9$KCV$-49$($k(B
$B$3$H$b$G$-$^$9!#$=$N>l9g$O(B <code>VirtualHost</code> $B$N0z?t$O(B
<code>NameVirtualHost</code> $B$N0z?t$HF1$8$K(B<em>$B$7$J$1$l$P$J$j$^$;$s(B
</em>:</p>
<example>
NameVirtualHost 172.20.30.40<br />
<br />
<VirtualHost 172.20.30.40><br />
# etc ...
</example>
<p>$B$7$+$7!"(BIP $B%"%I%l%9$,M=B,IT2DG=$J%7%9%F%`(B
$B!=!=Nc$($P%W%m%P%$%@$+$iF0E*$K(B IP $B%"%I%l%9$r<hF@$7$F2?$i$+$N(B
$B%@%$%J%_%C%/(B DNS $B$r;H$C$F$$$k>l9g$J$I!=!=$K$*$$$F$O!"(B<code>*</code>
$B;XDj$O$5$i$KJXMx$G$9!#(B<code>*</code> $B$O$9$Y$F$N(B IP $B%"%I%l%9$K(B
$B%^%C%A$7$^$9$N$G!"$3$N@_Dj$K$7$F$*$1$P(B IP $B%"%I%l%9$,JQ99$5$l$F$b(B
$B@_DjJQ99$;$:$KF0:n$7$^$9!#(B</p>
</note>
<p>$BL>A0%Y!<%9$N%P!<%A%c%k%[%9%F%#%s%0$G$O$[$\$9$Y$F$N>u67$G!"(B
$B>e5-$N@_Dj$G4uK>$N@_Dj$K$J$C$F$$$k$3$H$G$7$g$&!#(B
$B<B:]$3$N@_Dj$,F0:n$7$J$$$N$O!"(BIP $B%"%I%l%9$d%]!<%H$N0c$$$K$h$C$F(B
$B0c$&%3%s%F%s%D$rAw$k$H$-$@$1$G$9!#(B</p>
</section>
<section id="twoips"><title>$BJ#?t$N(B IP $B%"%I%l%9$N$"$k%[%9%H$GL>A0%Y!<%9$N(B
$B%[%9%F%#%s%0$r9T$J$&(B</title>
<note>
<title>$BCm(B</title><p>$B$3$3$G@bL@$5$l$F$$$kJ}K!$O(B IP $B%"%I%l%9$,(B
$B2?8D$"$C$F$bF1MM$K$G$-$^$9!#(B</p>
</note>
<p>$B%5!<%P$K$OFs$D(B IP $B%"%I%l%9$,$D$$$F$$$^$9!#0l$DL\(B
(<code>172.20.30.40</code>) $B$G$O<g%5!<%P(B
<code>server.domain.com</code> $B$r07$$!"$b$&0lJ}(B
(<code>172.20.30.50</code>) $B$G$OFs$D$+$=$l0J>e$N?t$N(B
$B%P!<%A%c%k%[%9%H$r07$$$^$9!#(B</p>
<example>
<title>$B%5!<%P$N@_Dj(B</title>
Listen 80<br />
<br />
# This is the "main" server running on 172.20.30.40<br />
ServerName server.domain.com<br />
DocumentRoot /www/mainserver<br />
<br />
# This is the other address<br />
NameVirtualHost 172.20.30.50<br />
<br />
<VirtualHost 172.20.30.50><br />
<indent>
ServerName www.example.com<br />
<br />
# Other directives here ...<br />
<br />
</indent>
</VirtualHost><br />
<br />
<VirtualHost 172.20.30.50><br />
<indent>
ServerName www.example.org<br />
<br />
# Other directives here ...<br />
<br />
</indent>
</VirtualHost>
</example>
<p><code>172.20.30.50</code> $B0J30$N%"%I%l%9$X$N%j%/%(%9%H$O<g%5!<%P(B
$B$,07$$$^$9!#(B<code>172.20.30.50</code> $B$X$N!"L$CN$N%[%9%HL>$^$?$O(B
<code>Host:</code> $B%X%C%@$J$7$N%j%/%(%9%H$O(B <code>www.example.com</code>
$B$,07$$$^$9!#(B</p>
</section>
<section id="intraextra"><title>$B0c$&(B IP $B%"%I%l%9(B ($BNc$($P!"FbIt$H30It%"%I%l%9(B)
$B$GF1$8%3%s%F%s%D$rAw$k(B</title>
<p>$B%5!<%P%^%7%s$O(B IP $B%"%I%l%9$rFs$D(B (<code>192.168.1.1</code>
$B$H(B <code>172.20.30.40</code>) $B;}$C$F$$$^$9!#$3$N%^%7%s$OFbIt(B
($B%$%s%H%i%M%C%H(B) $B$H(B $B30It(B ($B%$%s%?!<%M%C%H(B) $B$N%M%C%H%o!<%/$N4V$K(B
$B$"$j$^$9!#(B<code>server.example.com</code> $B$O%M%C%H%o!<%/$N30$+$i$O(B
$B30It%"%I%l%9(B (<code>172.20.30.40</code>) $B$H$7$F2r7h$5$l$^$9$,!"(B
$B%M%C%H%o!<%/$NCf$+$i$OFbIt%"%I%l%9(B (<code>192.168.1.1</code>)
$B$H$7$F2r7h$5$l$^$9!#(B</p>
<p><code>VirtualHost</code> $B0l$D$@$1$G%5!<%P$,FbIt$N%j%/%(%9%H$H(B
$B30It$N%j%/%(%9%H$NN>J}$KF1$8%3%s%F%s%D$G1~Ez$9$k$h$&$K$G$-$^$9!#(B</p>
<example>
<title>$B%5!<%P$N@_Dj(B</title>
NameVirtualHost 192.168.1.1<br />
NameVirtualHost 172.20.30.40<br />
<br />
<VirtualHost 192.168.1.1 172.20.30.40><br />
<indent>
ServerName server.example.com<br />
ServerAlias server<br />
</indent>
</VirtualHost>
</example>
<p>$B$3$l$G$I$A$i$N%M%C%H%o!<%/$+$i$N%j%/%(%9%H$bF1$8(B <code>VirtualHost</code>
$B$G07$o$l$k$h$&$K$J$j$^$9!#(B</p>
<note><title>$BCm(B:</title><p>$BFbIt%M%C%H%o!<%/$G$O40A4$J%[%9%HL>$N(B
<code>server.example.com</code> $B$NBe$o$j$K!"C1$K(B <code>server</code>
$B$r;H$&$3$H$,$G$-$^$9!#(B</p>
<p>$B>e$NNc$G$O!"(BIP $B%"%I%l%9$N%j%9%H$r!"$9$Y$F$N%"%I%l%9$K(B
$BF1$8%3%s%F%s%D$G1~Ez$9$k(B <code>*</code> $B$KCV$-49$($i$l$^$9!#(B</p>
</note>
</section>
<section id="port"><title>$B0c$&%]!<%H$G0c$&%5%$%H$r1?1D$9$k(B</title>
<p>$BF1$8(B IP $B$KJ#?t$N%I%a%$%s$,$"$j!"$5$i$KJ#?t$N%]!<%H$r;H$C$F(B
$B%j%/%(%9%H$r07$$$?$$$H$-$,$"$j$^$9!#(B"NameVirtualHost" $B%?%0$NCf$G(B
$B%]!<%H$rDj5A$9$k$3$H$G!"$3$l$rF0:n$5$;$i$l$^$9!#(B
NameVirtualHost name:port $BL5$7$d(B Listen $B%G%#%l%/%F%#%V$G(B
<VirtualHost name:port> $B$r;H$*$&$H$7$F$b!"$=$N@_Dj$OF0:n$7$^$;$s!#(B</p>
<example>
<title>$B%5!<%P$N@_Dj(B</title>
Listen 80<br />
Listen 8080<br />
<br />
NameVirtualHost 172.20.30.40:80<br />
NameVirtualHost 172.20.30.40:8080<br />
<br />
<VirtualHost 172.20.30.40:80><br />
<indent>
ServerName www.example.com<br />
</indent>
</VirtualHost><br />
<br />
<VirtualHost 172.20.30.40:8080><br />
<indent>
ServerName www.example.com<br />
DocumentRoot /www/domain-8080<br />
</indent>
</VirtualHost><br />
<br />
<VirtualHost 172.20.30.40:80><br />
<indent>
ServerName www.example.org<br />
DocumentRoot /www/otherdomain-80<br />
</indent>
</VirtualHost><br />
<br />
<VirtualHost 172.20.30.40:8080><br />
<indent>
ServerName www.example.org<br />
DocumentRoot /www/otherdomain-8080<br />
</indent>
</VirtualHost>
</example>
</section>
<section id="ip"><title>IP $B%Y!<%9$N%P!<%A%c%k%[%9%F%#%s%0(B</title>
<p>$B%5!<%P$O(B <code>www.example.com</code> $B$H(B <code>www.example.org</code>
$B$K$=$l$>$l2r7h$5$l$k!"Fs$D$N(B IP $B%"%I%l%9(B (<code>172.20.30.40</code> $B$H(B
<code>172.20.30.50</code>) $B$,$"$j$^$9!#(B</p>
<example>
<title>$B%5!<%P$N@_Dj(B</title>
Listen 80<br />
<br />
<VirtualHost 172.20.30.40><br />
<indent>
ServerName www.example.com<br />
</indent>
</VirtualHost><br />
<br />
<VirtualHost 172.20.30.50><br />
<indent>
ServerName www.example.org<br />
</indent>
</VirtualHost>
</example>
<p><code><VirtualHost></code> $B%G%#%l%/%F%#%V$N$I$l$G$b(B
$B;XDj$5$l$F$$$J$$%"%I%l%9(B ($BNc$($P(B <code>localhost</code>) $B$O!"(B
$B<g%5!<%P$,$"$l$P$=$3$K9T$-$^$9!#(B</p>
</section>
<section id="ipport"><title>$B%]!<%H%Y!<%9$H(B IP $B%Y!<%9$N:.$6$C$?(B
$B%P!<%A%c%k%[%9%H(B</title>
<p>$B%5!<%P%^%7%s$O$=$l$>$l(B <code>www.example.com</code> $B$H(B
<code>www.example.org</code> $B$K$=$l$>$l2r7h$5$l$k!"(BIP $B%"%I%l%9$rFs$D(B
(<code>192.168.1.1</code> $B$H(B <code>172.20.30.40</code>) $B;}$C$F$$$^$9!#(B
$B$I$A$i$b%]!<%H(B 80 $B$H(B 8080 $B$G%[%9%H$rAv$i$;$^$9!#(B</p>
<example>
<title>$B%5!<%P$N@_Dj(B</title>
Listen 172.20.30.40:80<br />
Listen 172.20.30.40:8080<br />
Listen 172.20.30.50:80<br />
Listen 172.20.30.50:8080<br />
<br />
<VirtualHost 172.20.30.40:80><br />
<indent>
DocumentRoot /www/example1-80<br />
ServerName www.example.com<br />
</indent>
</VirtualHost><br />
<br />
<VirtualHost 172.20.30.40:8080><br />
<indent>
DocumentRoot /www/example1-8080<br />
ServerName www.example.com<br />
</indent>
</VirtualHost><br />
<br />
<VirtualHost 172.20.30.50:80><br />
<indent>
DocumentRoot /www/example2-80<br />
ServerName www.example.org<br />
</indent>
</VirtualHost><br />
<br />
<VirtualHost 172.20.30.50:8080><br />
<indent>
DocumentRoot /www/example2-8080<br />
ServerName www.example.org<br />
</indent>
</VirtualHost>
</example>
</section>
<section id="mixed"><title>$BL>A0%Y!<%9$H(B IP $B%Y!<%9$r:.$<$?(B
$B%P!<%A%c%k%[%9%H(B</title>
<p>$B$$$/$D$+$N%^%7%s$G$OL>A0%Y!<%9$N!"$=$NB>$G$O(B IP $B%Y!<%9$N%P!<%A%c%k(B
$B%[%9%H$r$7$^$9!#(B</p>
<example>
<title>$B%5!<%P$N@_Dj(B</title>
Listen 80<br />
<br />
NameVirtualHost 172.20.30.40<br />
<br />
<VirtualHost 172.20.30.40><br />
<indent>
ServerName www.example.com<br />
</indent>
</VirtualHost><br />
<br />
<VirtualHost 172.20.30.40><br />
<indent>
ServerName www.example.org<br />
</indent>
</VirtualHost><br />
<br />
<VirtualHost 172.20.30.40><br />
<indent>
ServerName www.example3.net<br />
</indent>
</VirtualHost><br />
<br />
# IP-based<br />
<VirtualHost 172.20.30.50><br />
<indent>
ServerName www.example4.edu<br />
</indent>
</VirtualHost><br />
<br />
<VirtualHost 172.20.30.60><br />
<indent>
ServerName www.example5.gov<br />
</indent>
</VirtualHost>
</example>
</section>
<section id="default"><title><code>_default_</code> $B$N%P!<%A%c%k%[%9%H$r(B
$B;H$&(B</title>
<section id="defaultallports"><title>$B$9$Y$F$N%]!<%H$KBP$9$k(B
<code>_default_</code> $B%P!<%A%c%k%[%9%H(B</title>
<p>$BL$;XDj$N(B IP $B%"%I%l%9$H%]!<%H!"(B<em>$B$D$^$j(B</em>$BB>$N%P!<%A%c%k%[%9%H$K(B
$B;H$o$l$F$$$J$$%"%I%l%9$H%]!<%H$NAH$_9g$o$;!"$X$N(B<em>$B$9$Y$F$N(B</em>$B%j%/%(%9%H$r(B
$B<u$1<h$j$^$9!#(B</p>
<example>
<title>$B%5!<%P$N@_Dj(B</title>
<VirtualHost _default_:*><br />
<indent>
</indent>
</VirtualHost>
</example>
<p>$B$3$N$h$&$K%o%$%k%I%+!<%I$N%]!<%H$G%G%U%)%k%H$N%P!<%A%c%k%[%9%H$r(B
$B;XDj$9$k$H!"<g%5!<%P$K%j%/%(%9%H$,9T$/$N$rKI$2$^$9!#(B</p>
<p>$B%G%U%)%k%H$N%P!<%A%c%k%[%9%H$OL>A0%Y!<%9$N%P!<%A%c%k%[%9%H$K(B
$B;H$o$l$F$$$k%"%I%l%9$H%]!<%H$NAH$KAw$i$l$?%j%/%(%9%H$r07$&$3$H$O(B
$B$"$j$^$;$s!#%j%/%(%9%H$,ITL@$J(B <code>Host:</code> $B%X%C%@$d$=$N(B
$B%X%C%@$,$J$+$C$?$j$9$k>l9g$O4pK\L>A0%Y!<%9%P!<%A%c%k%[%9%H(B ($B$=$N(B
$B%"%I%l%9$H%]!<%H$G@_Dj%U%!%$%kCf$G:G=i$N%P!<%A%c%k%[%9%H(B) $B$K$h$j(B
$B07$o$l$^$9!#(B</p>
<p>$B$I$s$J%j%/%(%9%H$G$b(B <directive module="mod_alias">AliasMatch</directive>
$B$d(B <directive module="mod_rewrite">RewriteRule</directive> $B$r;H$C$F(B
$BC10l$N>pJs%Z!<%8(B ($B$d%9%/%j%W%H(B) $B$K=q$-49$($k$3$H$,$G$-$^$9!#(B</p>
</section>
<section id="defaultdifferentports"><title>$B0c$&%]!<%H$N$?$a$N(B
<code>_default_</code> $B%P!<%A%c%k%[%9%H(B</title>
<p>$B0l$D$a$N@_Dj$H$[$\F1$8$G$9$,!"%5!<%P$OJ#?t$N%]!<%H$r(B listen $B$7$F$*$j!"(B
80 $BHV%]!<%H$KBP$7$FFs$D$a$N(B <code>_default_</code> $B%P!<%A%c%k%[%9%H$r(B
$B@_Dj$7$?$$>l9g$G$9!#(B</p>
<example>
<title>$B%5!<%P$N@_Dj(B</title>
<VirtualHost _default_:80><br />
<indent>
# ...<br />
</indent>
</VirtualHost><br />
<br />
<VirtualHost _default_:*><br />
<indent>
# ...<br />
</indent>
</VirtualHost>
</example>
<p>80 $BHV%]!<%H$N%G%U%)%k%H%P!<%A%c%k%[%9%H(B ($B%o%$%k%I%+!<%I%]!<%H$N(B
$B%G%U%)%k%H%P!<%A%c%k%[%9%H$h$j$bA0$K=q$+$l$F$$$J$1$l$P$J$j$^$;$s(B) $B$O(B
$BL$;XDj$N(B IP $B%"%I%l%9$KAw$i$l$?$9$Y$F$N%j%/%(%9%H$r07$$$^$9!#(B
$B<g%5!<%P$O%j%/%(%9%H$r07$$$^$;$s!#(B</p>
</section>
<section id="defaultoneport"><title>$B0l$D$N%]!<%H$KBP$7$F$@$1$N(B
<code>_default_</code> $B%P!<%A%c%k%[%9%H(B</title>
<p>80 $BHV%]!<%H$K$O%G%U%)%k%H$N%P!<%A%c%k%[%9%H$,I,MW$G!"B>$N(B
$B%P!<%A%c%k%[%9%H$O%G%U%)%k%H$,I,MW$J$$>l9g$G$9!#(B</p>
<example>
<title>$B%5!<%P$N@_Dj(B</title>
<VirtualHost _default_:80><br />
...<br />
</VirtualHost>
</example>
<p>80 $BHV%]!<%H$X$N%"%I%l%9L$;XDj$N%j%/%(%9%H$O%G%U%)%k%H$N%P!<%A%c%k(B
$B%[%9%H$+$iAw$i$l$^$9!#B>$NL$;XDj$N%"%I%l%9$H%]!<%H$X$N%j%/%(%9%H$O(B
$B<g%5!<%P$+$iAw$i$l$^$9!#(B</p>
</section>
</section>
<section id="migrate"><title>$BL>A0%Y!<%9$N%P!<%A%c%k%[%9%H$+$i(B IP $B%Y!<%9$N(B
$B%P!<%A%c%k%[%9%H$K0\9T$9$k(B</title>
<p>$B%[%9%HL>$,L>A0(B <code>www.example.org</code> $B$N%P!<%A%c%k%[%9%H(B
(<a href="#name">$BL>A0%Y!<%9(B</a>$B$NNc$N(B 2 $BHVL\$N@_Dj(B) $B$,@lMQ$N(B IP $B%"%I%l%9$r(B
$BF@$?$H$7$^$9!#L>A0%Y!<%9$N%P!<%A%c%k%[%9%H$N8E$$(B IP $B%"%I%l%9$r(B
$B%-%c%C%7%e$7$F$$$k%M!<%`%5!<%P$d%W%m%-%7$N$?$a$K0\9T4|4VCf$ON>J}$N(B
$B%P!<%A%c%k%[%9%H$rDs6!$7$?$$$H$7$^$9!#(B</p>
<p>$BEz$O4JC1$G$9!#C1$K?7$7$$(B IP $B%"%I%l%9(B (<code>172.20.30.50</code>)
$B$r(B <code>VirtualHost</code> $B%G%#%l%/%F%#%V$KDI2C$9$k$3$H$G(B
$B$G$-$^$9!#(B</p>
<example>
<title>$B%5!<%P@_Dj(B</title>
Listen 80<br />
ServerName www.example.com<br />
<br />
NameVirtualHost 172.20.30.40<br />
<br />
<VirtualHost 172.20.30.40 172.20.30.50><br />
<indent>
ServerName www.example.org<br />
# ...<br />
</indent>
</VirtualHost><br />
<br />
<VirtualHost 172.20.30.40><br />
<indent>
ServerName www.example.net<br />
ServerAlias *.example.net<br />
# ...<br />
</indent>
</VirtualHost>
</example>
<p>$B$3$N%P!<%A%c%k%[%9%H$O?7$7$$%"%I%l%9(B (IP $B%Y!<%9$N%P!<%A%c%k%[%9%H$H$7$F(B)
$B$H8E$$%"%I%l%9(B($BL>A0%Y!<%9$N%P!<%A%c%k%[%9%H$H$7$F(B) $B$NN>J}$+$i(B
$B%"%/%;%9$G$-$^$9!#(B</p>
</section>
<section id="serverpath"><title><code>ServerPath</code> $B%G%#%l%/%F%#%V$r(B
$B;H$&(B</title>
<p>$BL>A0%Y!<%9$N%P!<%A%c%k%[%9%H$,Fs$D$"$k%5!<%P$,$"$k$H$7$^$9!#(B
$B@5$7$$%P!<%A%c%k%[%9%H$rF@$k$?$a$K$O%/%i%$%"%s%H$O@5$7$$(B
<code>Host:</code> $B%X%C%@$rAw$i$J$1$l$P$J$j$^$;$s!#(B
$B$I$N%P!<%A%c%k%[%9%H$r0U?^$7$?$N$+$5$C$Q$j$o$+$j$^$;$s(B
($B$J$N$G!"<g%P!<%A%c%k%[%9%H$G%j%/%(%9%H$r07$$$^$9(B)$B!#(B
$B2DG=$J8B$j$N2<0L8_49@-$rF@$k$?$a!"L>A0%Y!<%9$N%P!<%A%c%k%[%9%H$N(B
URL $B@\F,<-$X$N%j%s%/$N=q$+$l$?%Z!<%8$rJV$9!"(B
$B<g%P!<%A%c%k%[%9%H$,:n@.$5$l$^$9!#(B</p>
<example>
<title>$B%5!<%P$N@_Dj(B</title>
NameVirtualHost 172.20.30.40<br />
<br />
<VirtualHost 172.20.30.40><br />
<indent>
# primary vhost<br />
RewriteEngine On<br />
RewriteRule ^/.* /www/subdomain/index.html<br />
# ...<br />
</indent>
</VirtualHost><br />
<br />
<VirtualHost 172.20.30.40><br />
<indent>
ServerName www.sub1.domain.tld<br />
ServerPath /sub1/<br />
RewriteEngine On<br />
# ...<br />
</indent>
</VirtualHost><br />
<br />
<VirtualHost 172.20.30.40><br />
<indent>
ServerName www.sub2.domain.tld<br />
ServerPath /sub2/<br />
RewriteEngine On<br />
# ...<br />
</indent>
</VirtualHost>
</example>
<p><directive module="core">ServerPath</directive> $B%G%#%l%/%F%#%V$N@_Dj$K(B
$B$h$j!"(BURL <code>http://www.sub1.domain.tld/sub1/</code> $B$O(B
<em>$B>o$K(B</em> sub1-vhost $B$K$h$j07$o$l$^$9!#(BURL
<code>http://www.sub1.domain.tld/</code> $B$X$N%j%/%(%9%H$O(B
$B%/%i%$%"%s%H$,@5$7$$(B <code>Host:</code> $B%X%C%@$rAw$C$?$H$-$K$N$_(B
sub1-vhost $B$+$iAw$i$l$^$9!#(B<code>Host:</code> $B%X%C%@$,$J$1$l$P(B
$B%/%i%$%"%s%H$O<g%[%9%H$N>pJs%Z!<%8$rF@$^$9!#(B</p>
<p>$B0l$D4qL/$JF0:n$r$9$kE@$,$"$k$3$H$O3P$($F$*$$$F$/$@$5$$!#(B
<code>http://www.sub2.domain.tld/sub1/</code> $B$X$N%j%/%(%9%H$b(B
<code>Host:</code> $B%X%C%@$,$J$1$l$P(B sub1-vhost $B$K$h$j07$o$l$^$9!#(B</p>
<p>$B@5$7$$(B <code>Host:</code> $B%X%C%@$rAw$C$?%/%i%$%"%s%H$O$I$A$i$N(B
URL$B!"(B<em>$B$D$^$j(B</em>$B@\F,<-$,$"$kJ}$bL5$$J}$b;H$($k$h$&$K(B
<directive module="mod_rewrite">RewriteRule</directive> $B%G%#%l%/%F%#%V$,(B
$B;H$o$l$F$$$^$9!#(B</p>
</section>
</manualpage>