title: How to get a virtual host to work in OS X Lion?
body: <p>I'm trying to set up a virtual host on my Mac OS X 10.7 Installation.
  I'm using VirtualHostX to manage my /etc/hosts and httpd-vhosts.conf file.
  Currently, my httpd-vhosts.conf file looks like this:</p>
  
  <pre><code>NameVirtualHost *:80
  
  &lt;Directory "/Users/yuval/Sites/mysite/"&gt;
  Allow From All
  AllowOverride All
  &lt;/Directory&gt;
  &lt;VirtualHost *:80&gt;
      ServerName "mysite.dev"
      DocumentRoot "/Users/yuval/Sites/mysite"
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>and my /etc/hosts files has this in it:</p>
  
  <pre><code># VHX START
  127.0.0.1 mysite.dev
  fe80::1%lo0 mysite.dev
  # VHX STOP
  </code></pre>
  
  <p>I activated Web Sharing under System preferences, and I know apache is running. However, when I navigate to either 127.0.0.1 or to mysite.dev, I get the following:</p>
  
  <blockquote>
    <p>Forbidden</p>
    
    <p>You don't have permission to access / on this server.</p>
  </blockquote>
  
  <p>My permissions on /Users/yuval/Sites/mysite are 755. Trying to change them to 777 didn't help either. Note that this is happening with any folder I choose -- I do not have an .htaccess file in /Users/yuval/Sites/mysite.</p>
  
  <p><strong>Update</strong>: Checking the apache error, these are the logs that appear:</p>
  
  <pre><code>[Fri Dec 09 17:59:27 2011] [error] [client 127.0.0.1] (13)Permission denied:
      access to / denied
  [Fri Dec 09 17:59:27 2011] [error] [client 127.0.0.1] (13)Permission denied:
      access to /favicon.ico denied
  </code></pre>
  
  <p>It seems pretty obvious that the vhosts + hosts code is doing its job in actually determining that the address exists, but for some reason this isn't working. Any ideas?</p>