apache 虛擬主機配置

WBOY
發布: 2016-07-29 08:55:27
原創
1022 人瀏覽過

原文: http://blog.csdn.net/ReadyYes/article/details/51038192
進入C:Apache24confhttpd.conf
apache 虚拟主机配置
把那個「#」號去掉

進入C:Apache24confextrahttpd-vhosts.conf 配置如下

<code><span>#*代表当前服务器的所有IP地址</span><span><VirtualHost *:80></span><span>#主机名</span><span><span>ServerName</span></span> www.zy.com
    <span>#主机别名 多个主机别名用空格分开</span><span>ServerAlias</span> zy.com xy.com
    <span>ServerAdmin</span> admin@zy.com

    <span><span>DocumentRoot</span></span><span>"E:/phptest"</span><span>#Directory 中的路径要和DocumentRoot的路径一致,Directory配置访问权限</span><span><Directory "E:/phptest"></span><span><span>Options</span></span> Indexes FollowSymLinks
        <span>#默认主页</span><span>DirectoryIndex</span> test.php
        <span>#自定义后缀php处理 </span><span>AddType</span> application/x-httpd-php .php .ppp .phtml
        <span>AllowOverride</span><span>all</span><span>Require</span><span>all</span> granted
    <span></Directory></span><span>#配置虚拟目录</span><span>Alias</span> /abc <span>"E:/php100"</span><span>#配置虚拟目录权限</span><span><Directory "E:/php100"></span><span><span>Options</span></span> Indexes FollowSymLinks
       <span>AllowOverride</span><span>all</span><span>Require</span><span>all</span> granted
    <span></Directory></span><span>ErrorLog</span><span>"logs/dummy-www.zy.com-error.log"</span><span>CustomLog</span><span>"logs/dummy-www.zy.com-access.log"</span> common
<span></VirtualHost></span><span><VirtualHost *:80></span><span><span>DocumentRoot</span></span><span>"C:\Apache24\htdocs"</span><span><Directory "C:\Apache24\htdocs"></span><span><span>Options</span></span> Indexes FollowSymLinks
            <span>#默认主页</span><span>DirectoryIndex</span> index.html
            <span>#自定义后缀php处理 </span><span>AddType</span> application/x-httpd-php .php .ppp .phtml
            <span>AllowOverride</span><span>all</span><span>Require</span><span>all</span> granted
        <span></Directory></span><span><span>ServerName</span></span> localhost

<span></VirtualHost></span></code>
登入後複製
').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i ').text(i)); }; $numbering.fadeIn(1700); }); });

以上就介紹了apache 虛擬主機配置,包含了方面的內容,希望對PHP教學有興趣的朋友有幫助。

相關標籤:
來源:php.cn
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板
關於我們 免責聲明 Sitemap
PHP中文網:公益線上PHP培訓,幫助PHP學習者快速成長!