Apache VirtualHost running very slow on OS X 10.7 (Lion)
- by jwerre
I've set up a few virtual hosts in Lion and it's running very slowly.
NameVirtualHost *:80
<VirtualHost *:80>
ServerName localhost
DocumentRoot "/Library/WebServer/Documents"
</VirtualHost>
<VirtualHost *:80>
ServerName dev.local
DocumentRoot "/Users/me/mysite"
<Directory /Users/me/mysite>
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
then in /etc/hosts I added 127.0.0.1 dev.local
Everything works fine but it's sooooo slow — 5 or so second to reload a simple "Hello World" html page.
Here's is the strange part. If I make a symbolic link of the site in my ~/Sites folder (ln -s ~/mysite ~/Sites/mysite) and navigate to http://localhost/~me/mysite It's nice and fast the way it should be.