1.开启服务
在httpd.conf中开启服务
DocumentRoot "D:/wamp/www/"
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Allow from al
</Directory>
开启 mod_rewrite.so
LoadModule rewrite_module modules/mod_rewrite.so服务
开启host
LoadModule authz_host_module modules/mod_authz_host.so
2.配置主机地址
在httpd-vhosts.conf中配置主机地址
<VirtualHost *:80>
ServerName www.blog.com
DocumentRoot "D:\code\laravel"
<Directory "D:\code\laravel">
Options Indexes FollowSymLinks
AllowOverride all
Order Allow,Deny
Allow from all
</Directory>
</VirtualHost>
3.在host文件中配置
127.0.0.1 www.blog.com