To set up a Virtualhost for Elefant development on your desktop, you can use the following steps:
1. Create a folder for the site in your Sites folder. Let's call it mytestsite.
Sites
mytestsite
2. Edit the file /etc/hosts and add this line:
/etc/hosts
127.0.0.1 www.mytestsite.lo
Note: .lo represents a local site in this example. It's a simple convention that helps you quickly see that you're on your local development machine.
.lo
3. Edit your Apache configuration (/etc/apache2/users/me.conf where me is your username) and add:
/etc/apache2/users/me.conf
me
NameVirtualHost www.mytestsite.lo <VirtualHost www.mytestsite.lo> DocumentRoot /Users/me/Sites/mytestsite ServerName www.mytestsite.lo </VirtualHost>
4. Restart Apache
sudo apachectl restart
You should now be able to go to http://www.mytestsite.lo/ and see an empty Apache site directory if all went well.
http://www.mytestsite.lo/
There was an error while loading. Please reload this page.