Apache添加虚拟主机目录
1.httpd.conf打开Virtual hosts
2.修改httpd-vhosts.conf
<VirtualHost *:80> ServerAdmin webmaster@dummy-host.example.com DocumentRoot "D:\larwww\public" ServerName www.larwww.com ServerAlias larwww.com ErrorLog "logs/larwww.com-error.log" CustomLog "logs/larwww.com-access.log" common <Directory "D:\larwww\public"> Options Indexes FollowSymLinks AllowOverride All Require all granted </Directory> </VirtualHost>
注意:404的时候查看mod_rewrite.so是否打开