Assigning a local domain to a project

I’m currently using Apache’s mod_userdir on OS X Snow Leopard so I’m accessing the localhost like this: http://localhost/~myusername/ProjectName.

What I need to accomplish is accessing ProjectName via http://projectname.loc.

I tried the following with no success:

Added this like to /etc/hosts:
    127.0.0.2 projectname.loc
Created a VirtualHost in /private/etc/apache2/extra/httpd-vhosts.conf like this:
    <VirtualHost *:80>
    ServerName projectname.loc
    DocumentRoot /Users/myusername/Sites/ProjectName
    </VirtualHost>

What I’m missing?

Your help would be greatly appreciated.

It should be 127.0.0.1, not 127.0.0.2 :slight_smile:

Thanks :slight_smile: