一、修改httpd.conf文件web
啓用httpd-vhosts.conf配置文件ide
Include conf/extra/httpd-vhosts.confui
若是開啓僞靜態的話spa
#LoadModule rewrite_module modules/mod_rewrite.so 去掉#orm
找到「AllowOverride None」改成「AllowOverride All 」;2處ci
二、修改httpd-vhosts.conf,加入相似下面內容:it
<VirtualHost *:80>io
DocumentRoot "E:\web\test"test
ServerName www.test.linstream
ServerAlias www.test.lin
<Directory "E:\web\test">
Options FollowSymLinks
AllowOverride All
Order deny,allow
Require all granted
</Directory>
</VirtualHost>
3.修改hosts文件
127.0.0.1 www.test.lin