一、双击打开httpd.conf文件找到 #Include conf/extra/httpd-vhosts.conf 起掉#
找到:
<Directory />
AllowOverride none
Require all denied
</Directory>
替换为
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Allow from all
</Directory>
二、httpd-vhosts.conf添加站点
<VirtualHost *:80>
DocumentRoot F:/lit_express
ServerName www.34.com
<Directory "F:/lit_express">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
三、host里面配置虚拟主机
127.0.0.2 www.34.com