문제

I am having trouble setting up a virtual host on Mavericks

First I have this uncommented:

# Virtual hosts
Include /private/etc/apache2/extra/httpd-vhosts.conf

I have my virtual host set up as like so:

<VirtualHost *:80>
    DocumentRoot "/Users/aaronhappe/Sites/learning-laravel/public"
    ServerName laravel.dev
</VirtualHost>

And this is my hosts file:

127.0.0.1   localhost
127.0.0.1   laravel.dev
255.255.255.255 broadcasthost
::1             localhost 
fe80::1%lo0 localhost

However, when I go to laravel.dev, instead, I see a directory structure exactly the same as if I would go to my local host, rather than my home view to laravel.

Any ideas as to what is wrong?

올바른 솔루션이 없습니다

다른 팁

Did you restart your local server?

sudo apachectl restart

You may try something like this:

<VirtualHost laravel.dev>
    DocumentRoot "/Users/aaronhappe/Sites/learning-laravel/public"
    ServerName laravel.dev
</VirtualHost>

Host file entry:

127.0.0.2   laravel.dev # or 127.0.0.3, an unique IP

Restart apache. Another similar answer.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top