apache windows配置
- 使用管理员模式打开编辑器
- 修改:C:\Windows\System32\drivers\etc\hosts文件
添加域名:127.0.0.1 dac
- 打开:httpd.conf,搜索
Virtual hosts
去掉:Include conf/extra/httpd-vhosts.conf的注释 - 修改:C:\xampp\apache\conf\extra\httpd-vhosts.conf文件
添加路径授权:<VirtualHost 127.0.0.1:80> ServerName dac DocumentRoot "C:/xampp/htdocs/dac/public" <Directory "C:/xampp/htdocs/dac/public"> Options FollowSymLinks IncludesNOEXEC Indexes DirectoryIndex index.html index.htm default.htm index.php default.php index.cgi default.cgi index.pl default.pl index.shtml AllowOverride All Order Deny,Allow Allow from all </Directory> </VirtualHost>
- 打开浏览器访问:dac/