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

来源:互联网 发布:软件开发工程师 金融 编辑:程序博客网 时间:2024/06/05 15:59

通过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文件中的页面

 

0 0
原创粉丝点击