标签:
配置虚拟主机
配置域名为www.a1308.com的虚拟主机
1、C:\WINDOWS\system32\drivers\etc 目录下找 hosts 这个文件。
添加 127.0.0.1 www.a1308.com
2、httpd.conf //配置虚拟主机的辅配置文件
开启虚拟主机配置文件:
# Virtual hosts
Include conf/extra/httpd-vhosts.conf
3、修改httpd-vhosts.conf
将原先的两个配置虚拟主机的例子删掉,配上
<VirtualHost *:80>
DocumentRoot "E:/lamp/apache/htdocs"
ServerName localhost
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "E:/lamp/a1308"
ServerName www.a1308.com
<Directory "E:/lamp/a1308">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "/var/www/"
ServerName www.php268.com
<Directory "/var/www/">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
标签:
原文地址:http://www.cnblogs.com/jacko/p/4821228.html