Windows服务器下Apache基于域名的虚拟主机配置 |
下面我想记录下Windows服务器下Apache基于域名的虚拟主机配置,仅做参考 此配置是在Windows服务器下Apache的安装步骤 基础之上的。 配置思路:修改f,Include 一个基于域名的主机配置文件,配置文件中 指定域名,主机,www.lu0.com网站根目录等内容,重启测试即可。本例子用 作为域名 配置httpd.conf ---------------------------------- # Virtual hosts begin ---------------------------------- ---------------------------------- 配置 ---------------------------------- 需要修改Directory,否则会无法打开网站,域名需要解析到服务器的ip地址上, 最后我们可以编辑一个<?php phpinfo(); ?>来校验我们安装是否成功!如下图: |