⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 1296.html

📁 著名的linux英雄站点的文档打包
💻 HTML
📖 第 1 页 / 共 3 页
字号:
&lt;/VirtualHost&gt;<br>
同时,在DNS定义www.domain.tld指向111.22.33.44。<br>
注意:当在NameVirtualHost指令后使用IP时,任何使用IP的URL请求都是针对虚拟主机的,主服务器从不会响应一个使用IP的URL 请求。另外,有些服务器希望以多个名字被访问。例如,假设有某一IP的服务器,希望以名domain.tld、www2.domain.tld都能被访问,做法是在VirtualHost指令部分使用ServerAlias指令。如:ServerAlias domain.tld *.domain.tld<br>
另附一些虚拟主机的设置实例。<br>
 <br>
 <br>
附:虚拟主机设置实例<br>
IP型的虚拟主机配置<br>
Setup 1: 服务器有两个IP,<br>
111.22.33.44 server.domain.tld<br>
111.22.33.55 www.otherdomain.tld<br>
www.domain.tld 是server.domain.tld 的别名(CNAME),代表主服务器。<br>
服务器配置:<br>
...<br>
Port 80<br>
DocumentRoot /www/domain<br>
ServerName www.domain.tld<br>
&lt;VirtualHost 111.22.33.55&gt;<br>
DocumentRoot /www/otherdomain<br>
ServerName www.otherdomain.tld<br>
...<br>
&lt;/VirtualHost&gt;<br>
Setup 2: 基本同Setup1,但不设置专门的主服务器。<br>
服务器配置:<br>
...<br>
Port 80<br>
ServerName server.domain.tld<br>
&lt;VirtualHost 111.22.33.44&gt;<br>
DocumentRoot /www/domain<br>
ServerName www.domain.tld<br>
...<br>
&lt;/VirtualHost&gt;<br>
&lt;VirtualHost 111.22.33.55&gt;<br>
DocumentRoot /www/otherdomain<br>
ServerName www.otherdomain.tld<br>
...<br>
&lt;/VirtualHost&gt;<br>
这种设置只有当URLhttp://server.domain.tld时才击中主服务器<br>
Setup 3: 服务器有两个IP,<br>
111.22.33.44 server.domain.tld<br>
111.22.33.55 www-cache.domain.tld<br>
www.domain.tld 是server.domain.tld 的别名(CNAME),代表主服务器。<br>
www-cache.domain.tld是proxy-cache,端口是8080,Web服务器使用默认的80。<br>
服务器配置:<br>
...<br>
Port 80<br>
Listen 111.22.33.44:80<br>
Listen 111.22.33.55:8080<br>
ServerName server.domain.tld<br>
&lt;VirtualHost 111.22.33.44:80&gt;<br>
DocumentRoot /www/domain<br>
ServerName www.domain.tld<br>
...<br>
&lt;/VirtualHost&gt;<br>
&lt;VirtualHost 111.22.33.55:8080&gt;<br>
ServerName www-cache.domain.tld<br>
...<br>
&lt;Directory proxy:&gt;<br>
order deny,allow<br>
deny from all<br>
allow from 111.22.33<br>
&lt;/Directory&gt;<br>
&lt;/VirtualHost&gt;<br>
 <br>
名字型虚拟主机配置<br>
Setup 1: 服务器有一个IP,<br>
111.22.33.44 server.domain.tld.<br>
www.domain.tld和www.sub.domain.tld是别名(CNAMEs) 。<br>
服务器配置:<br>
...<br>
Port 80<br>
ServerName server.domain.tld<br>
NameVirtualHost 111.22.33.44<br>
&lt;VirtualHost 111.22.33.44&gt;<br>
DocumentRoot /www/domain<br>
ServerName www.domain.tld<br>
...<br>
&lt;/VirtualHost&gt;<br>
&lt;VirtualHost 111.22.33.44&gt;<br>
DocumentRoot /www/subdomain<br>
ServerName www.sub.domain.tld<br>
...<br>
&lt;/VirtualHost&gt;<br>
若使用IP访问服务器,由于 www.domain.tld 有最高优先级,被认为是默认服务器或<br>
第一服务器。<br>
Setup 2:服务器有两个IP,<br>
111.22.33.44 server1.domain.tld 用于主服务器<br>
111.22.33.55 server2.domain.tld 用于虚拟主机<br>
别名www.domain.tld用于主服务器,<br>
别名www.otherdomain.tld用于一个虚拟主机,<br>
别名www.sub.domain.tld,*.sub.domain.tld 用于另一虚拟主机,<br>
服务器配置:<br>
...<br>
Port 80<br>
ServerName www.domain.tld<br>
DocumentRoot /www/domain<br>
NameVirtualHost 111.22.33.55<br>
...<br>
&lt;VirtualHost 111.22.33.55&gt;<br>
DocumentRoot /www/otherdomain<br>
ServerName www.otherdomain.tld<br>
...<br>
&lt;/VirtualHost&gt;<br>
&lt;VirtualHost 111.22.33.55&gt;<br>
DocumentRoot /www/subdomain<br>
ServerName www.sub.domain.tld<br>
ServerAlias *.sub.domain.tld<br>
...<br>
&lt;/VirtualHost&gt;<br>
混合型(IP/名字)虚拟主机配置<br>
Setup:服务器有三个IP,<br>
111.22.33.44 server.domain.tld 用于名字型虚拟主机<br>
111.22.33.55 www.otherdomain1.tld 用于IP型虚拟主机<br>
111.22.33.66 www.otherdomain2.tld 用于IP型虚拟主机<br>
服务器配置:<br>
...<br>
Port 80<br>
ServerName server.domain.tld<br>
NameVirtualHost 111.22.33.44<br>
&lt;VirtualHost 111.22.33.44&gt;<br>
DocumentRoot /www/domain<br>
ServerName www.domain.tld<br>
...<br>
&lt;/VirtualHost&gt;<br>
&lt;VirtualHost 111.22.33.44&gt;<br>
DocumentRoot /www/subdomain1<br>
ServerName www.sub1.domain.tld<br>
...<br>
&lt;/VirtualHost&gt;<br>
&lt;VirtualHost 111.22.33.44&gt;<br>
DocumentRoot /www/subdomain2<br>
ServerName www.sub2.domain.tld<br>
...<br>
&lt;/VirtualHost&gt;<br>
&lt;VirtualHost 111.22.33.55&gt;<br>
DocumentRoot /www/otherdomain1<br>
ServerName www.otherdomain1.tld<br>
...<br>
&lt;/VirtualHost&gt;<br>
&lt;VirtualHost 111.22.33.66&gt;<br>
DocumentRoot /www/otherdomain2<br>
ServerName www.otherdomain2.tld<br>
...<br>
&lt;/VirtualHost&gt;<br>
端口型虚拟主机配置<br>
Setup: 服务器有一个IP,<br>
111.22.33.44 www.domain.tld<br>
不需要另外的别名或IP,采用端口型虚拟主机即可设置一个配置有别于主服务器的虚<br>
拟主机。<br>
服务器配置:<br>
...<br>
Listen 80<br>
Listen 8080<br>
ServerName www.domain.tld<br>
DocumentRoot /www/domain<br>
&lt;VirtualHost 111.22.33.44:8080&gt;<br>
DocumentRoot /www/domain2<br>
...<br>
&lt;/VirtualHost&gt; 
</FONT><br>
                                      </TD>
                                    </TR>
                                <TR>
                                <TD colSpan=2><FONT 
                                class=middlefont></FONT><BR>
                                        <FONT 
                                class=normalfont>全文结束</FONT> </TD>
                                    </TR>
                                <TR>
                                <TD background="images/dot.gif" tppabs="http://www.linuxhero.com/docs/images/dot.gif" colSpan=2 
                                height=10></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></DIV></TD>
                        <TD vAlign=top width="20%" 
                      background="images/line.gif" tppabs="http://www.linuxhero.com/docs/images/line.gif" rowSpan=2> 
                          <DIV align=center> 
                            <table class=tableoutline cellspacing=1 cellpadding=4 
                        width="100%" align=center border=0>
                              <tr class=firstalt> 
                                <td noWrap background="images/bgline.gif" tppabs="http://www.linuxhero.com/docs/images/bgline.gif" colspan=2 height=21>
                                <font class=normalfont><b>所有分类</b></font></td>
                              </tr>
<tr class=secondalt> <td noWrap width=27%> <font class=normalfont>1:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type1.html" tppabs="http://www.linuxhero.com/docs/type1.html">非技术类</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>2:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type2.html" tppabs="http://www.linuxhero.com/docs/type2.html">基础知识</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>3:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type3.html" tppabs="http://www.linuxhero.com/docs/type3.html">指令大全</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>4:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type4.html" tppabs="http://www.linuxhero.com/docs/type4.html">shell</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>5:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type5.html" tppabs="http://www.linuxhero.com/docs/type5.html">安装启动</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>6:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type6.html" tppabs="http://www.linuxhero.com/docs/type6.html">xwindow</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>7:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type7.html" tppabs="http://www.linuxhero.com/docs/type7.html">kde</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>8:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type8.html" tppabs="http://www.linuxhero.com/docs/type8.html">gnome</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>9:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type9.html" tppabs="http://www.linuxhero.com/docs/type9.html">输入法类</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>10:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type10.html" tppabs="http://www.linuxhero.com/docs/type10.html">美化汉化</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>11:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type11.html" tppabs="http://www.linuxhero.com/docs/type11.html">网络配置</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>12:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type12.html" tppabs="http://www.linuxhero.com/docs/type12.html">存储备份</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>13:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type13.html" tppabs="http://www.linuxhero.com/docs/type13.html">杂项工具</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>14:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type14.html" tppabs="http://www.linuxhero.com/docs/type14.html">编程技术</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>15:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type15.html" tppabs="http://www.linuxhero.com/docs/type15.html">网络安全</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>16:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type16.html" tppabs="http://www.linuxhero.com/docs/type16.html">内核技术</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>17:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type17.html" tppabs="http://www.linuxhero.com/docs/type17.html">速度优化</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>18:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type18.html" tppabs="http://www.linuxhero.com/docs/type18.html">apache</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>19:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type19.html" tppabs="http://www.linuxhero.com/docs/type19.html">email</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>20:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type20.html" tppabs="http://www.linuxhero.com/docs/type20.html">ftp服务</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>21:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type21.html" tppabs="http://www.linuxhero.com/docs/type21.html">cvs服务</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>22:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type22.html" tppabs="http://www.linuxhero.com/docs/type22.html">代理服务</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>23:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type23.html" tppabs="http://www.linuxhero.com/docs/type23.html">samba</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>24:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type24.html" tppabs="http://www.linuxhero.com/docs/type24.html">域名服务</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>25:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type25.html" tppabs="http://www.linuxhero.com/docs/type25.html">网络过滤</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>26:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type26.html" tppabs="http://www.linuxhero.com/docs/type26.html">其他服务</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>27:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type27.html" tppabs="http://www.linuxhero.com/docs/type27.html">nfs</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>28:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type28.html" tppabs="http://www.linuxhero.com/docs/type28.html">oracle</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>29:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type29.html" tppabs="http://www.linuxhero.com/docs/type29.html">dhcp</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>30:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type30.html" tppabs="http://www.linuxhero.com/docs/type30.html">mysql</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>31:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type31.html" tppabs="http://www.linuxhero.com/docs/type31.html">php</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>32:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type32.html" tppabs="http://www.linuxhero.com/docs/type32.html">ldap</a></font></td>    </tr>  </table></td></tr>                            </table>
                          </DIV></TD></TR>
                    <TR vAlign=top>
                        <TD width="80%"> 
                          <DIV align=center><BR>
                          </DIV>
                        </TD></TR></TBODY></TABLE></TD></TR>
                </TABLE></TD></TR>
          </TABLE>
      <TABLE cellSpacing=0 cellPadding=4 width="100%" bgColor=#eeeeee 
        border=0><TBODY>
        <TR>
          <TD width="50%">
              <P><FONT class=middlefont>版权所有 &copy; 2004 <A 
            href="mailto:bjchenxu@sina.com">linux知识宝库</A><BR>
                违者必究. </FONT></P>
            </TD>
          <TD width="50%">
              <DIV align=right><FONT class=middlefont>Powered by: <A 
            href="mailto:bjchenxu@sina.com">Linux知识宝库</A> Version 0.9.0 </FONT></DIV>
            </TD></TR></TBODY></TABLE>
      <CENTER></CENTER></TD></TR>
    </TABLE></CENTER></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -