apache 虚拟主机配置

WBOY
Lepaskan: 2016-07-29 08:55:27
asal
1034 orang telah melayarinya

原文: http://blog.csdn.net/ReadyYes/article/details/51038192
进入C:\Apache24\conf\httpd.conf
apache 虚拟主机配置
把那个“#”号去掉

进入C:\Apache24\conf\extra\httpd-vhosts.conf 配置如下

<code><span>#*代表当前服务器的所有IP地址</span><span><virtualhost></virtualhost></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></directory></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></span><span>#配置虚拟目录</span><span>Alias</span> /abc <span>"E:/php100"</span><span>#配置虚拟目录权限</span><span><directory></directory></span><span><span>Options</span></span> Indexes FollowSymLinks
       <span>AllowOverride</span><span>all</span><span>Require</span><span>all</span> granted
    <span></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></span><span><virtualhost></virtualhost></span><span><span>DocumentRoot</span></span><span>"C:\Apache24\htdocs"</span><span><directory></directory></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></span><span><span>ServerName</span></span> localhost

<span></span></code>
Salin selepas log masuk
').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i ').text(i)); }; $numbering.fadeIn(1700); }); });

以上就介绍了apache 虚拟主机配置,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。

Label berkaitan:
sumber:php.cn
Kenyataan Laman Web ini
Kandungan artikel ini disumbangkan secara sukarela oleh netizen, dan hak cipta adalah milik pengarang asal. Laman web ini tidak memikul tanggungjawab undang-undang yang sepadan. Jika anda menemui sebarang kandungan yang disyaki plagiarisme atau pelanggaran, sila hubungi admin@php.cn
Tutorial Popular
Lagi>
Muat turun terkini
Lagi>
kesan web
Kod sumber laman web
Bahan laman web
Templat hujung hadapan