您的位置:首页 > 其它

虚拟主机配置方案(二)通过ServerName端,来区分不同的域名

2014-12-25 19:37 411 查看
通过ServerName端,来区分不同的域名:
步骤:

1. 开发新的站点

2.在httpd-vhost.conf文件中添加配置:(此时配置和以前不同)

<VirtualHost *:80>
DocumentRoot "E:/the_third_grade/Apache_workspace/text03"
#这里指定域名
ServerName www.songjs3.com
DirectoryIndex my.html index.html index.htm index.php
<Directory />
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>


·添加了ServerName 一项

此时通过www.songjs3.com即可访问text03文件中的页面
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: