我在OSX(El Capitan)上,使用XAMPP并尝试为我的项目使用本地URL。我们的想法是在浏览器中运行http://projectname.local
并看到它指向Programma's/XAMPP/xamppfiles/htdocs/projectname/public
,如果我输入http://localhost/projectname/public
则相同。
我已经编辑过我的主机文件,如下所示:
127.0.0.1 projectname.local
我已按照this tutorial中的步骤操作(启用vhost并设置一个)
这是我的vhost配置:
<VirtualHost *:80>
ServerAdmin myemail@gmail.com
ServerName projectname.local
ServerAlias www.projectname.local
DocumentRoot "/Programma's/XAMPP/xamppfiles/htdocs/projectname/public"
ErrorLog "/Programma's/XAMPP/xamppfiles/htdocs/projectname/storage/logs/laravel.log"
CustomLog "/Programma's/XAMPP/xamppfiles/htdocs/projectname/storage/logs/laravel_custom.log"
</VirtualHost>
我已使用dscacheutil -flushcache
刷新缓存并运行apachectl restart
但是当我去http://projectname.local
时,我得到了XAMPP仪表板而不是我项目的Laravel欢迎路线。
我错过了什么吗?