单IP单端口:
C:\wamp\bin\apache\apache2.4.17\conf\httpd.conf
里面找到:LoadModule rewrite_module modules/mod_rewrite.so
Include conf/extra/httpd-vhosts.conf
去掉前面的#号开启
AllowOverride all
Require all granted
保存重启Apache
再打开:C:\wamp\bin\apache\apache2.4.17\conf\extra\httpd-vhosts.conf
ServerAdmin admin@hankblog.com
DocumentRoot "C:/wamp/www/Laravel/blog/public"
ServerName www.hankblog.com
ErrorLog "logs/www.hankblog.com-error.log"
CustomLog "logs/www.hankblog.com-access.log" common
C:\Windows\System32\drivers\etc\hosts
添加你定义的IP和域名
127.0.0.1 localhost
127.0.0.1 www.hankblog.com