修改配置文件 conf/httpd.conf
1.加入下面两句
NameVirtualHost *:80
Include conf/vhosts
2.在conf目录中建立vhosts目录
然后在 vhosts 目录下面建立相应的站点配置文件
如建立 hhj.uoften.com.conf 文件
内容:

复制代码 代码如下:

<VirtualHost *:80>
ServerAdmin hhj@live.it
ServerName www.hhj.uoften.com
ServerAlias hhj.uoften.com
DocumentRoot "F:\wwwroot\hhj.uoften.com"
DirectoryIndex index.html index.htm index.php
ErrorLog logs/hhj.uoften.com-error_log.log
CustomLog logs/hhj.uoften.com-access_log.log common
<Directory "F:\wwwroot\hhj.uoften.com">
AllowOverride All
Options FollowSymLinks
Order Deny,Allow
Allow from all
</Directory>
</VirtualHost>

3.重启apache服务

点赞(58)

评论列表共有 0 条评论

立即
投稿
返回
顶部