0
我(对亲约塞米蒂10.10.5一台MacBook运行),具有包括以下的hosts文件:点我的主机用户/用户名/从库网站/ Web服务器/文件
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot “/Users/samir/Sites/theblog/”
ServerName theblog.dev
ServerAlias www.theblog.dev
ErrorLog "/usr/local/var/log/apache2/dummy-host2.example.com-error_log"
CustomLog "/usr/local/var/log/apache2/dummy-host2.example.com-access_log" common
</VirtualHost>
,为文件夹位于/ Users/samir/Sites/theblog /,我希望能够通过访问http://theblog.dev访问它,但现在访问/ theblog的唯一方法是如果我将它复制并粘贴到/ Library/WebServer/Documents,如何将位置更改为Users/samir/Sites?我如何使网址的工作?
我正在使用laravel 5。
预先感谢您!
与**了NameVirtualHost *启用virtualhosts? –
对不起?你是什么意思,在哪里? –
Apache需要NameVirtualHost指令来启用虚拟主机 –