配置虚拟主机
例如:配置域名为www.xxxxx.com的虚拟主机
1、C:WINDOWSsystem32driversetc 目录下找 hosts 这个文件。
添加 127.0.0.1 www.a1308.com
2、wampapacheconf 目录下找 httpd.conf 这个文件
httpd.conf //配置虚拟主机的辅配置文件
开启虚拟主机配置文件:
# Virtual hosts
Include conf/extra/httpd-vhosts.conf
3、修改httpd-vhosts.conf(wampapacheconfextra)
将原先的两个配置虚拟主机的例子删掉,配上
<VirtualHost *:80>
DocumentRoot "E:/wamp/apache/htdocs"
ServerName localhost
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "E:/lamp/a1308"
ServerName www.a1308.com
<Directory "E:/wamp/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>