To set up a Virtualhost for Elefant development on your desktop, you can use the following steps:
Create a folder for the site in your Sites
folder. Let's call it mytestsite
.
Edit the file /etc/hosts
and add this line:
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.
/etc/apache2/users/me.conf
where me
is your username) and add:NameVirtualHost www.mytestsite.lo
<VirtualHost www.mytestsite.lo>
DocumentRoot /Users/me/Sites/mytestsite
ServerName www.mytestsite.lo
</VirtualHost>
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.
This assumes you've installed Apache, PHP, and MySQL via the WAMP server platform.
Create a folder for the site in your C:wampwww
folder. Let's call it mytestsite
.
Edit the file C:WINDOWSsystem32driversetchosts
and add this line:
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.
Edit your Apache configuration and uncomment this line (remove the #
to uncomment):
Now open the file C:wampinpacheApache2.2.21confextrahttpd-vhosts.conf
and add:
NameVirtualHost www.mytestsite.lo
<VirtualHost www.mytestsite.lo>
DocumentRoot ""C:/wamp/www/mytestsite""""
ServerName www.mytestsite.lo
</VirtualHost>
You should now be able to go to http://www.mytestsite.lo/
and see an empty Apache site directory if all went well.