My environment is Ubuntu 8.1 Intrepid Ibex. I also written a guide on how to set up virtual hosts in Windows XP or Windows Vista.
0. Introduction
Sometimes, we have multiple projects and we would like to access the Project 1′s website by typing ‘http://project1/’ in the browser address bar. And Project 2 may be at ‘http://project2/’. Virtual hosts are what you need for your development work. This guide requires you to have basic knowledge of Apache. This guide assumes you haven’t done additional configuration to your Apache. You must have already got Apache2 installed.
Also remember that you should always do a backup of every configuration file you change.
1. Add a new host in Ubuntu
You should only be adding new hosts if you want to develop multiples sites in your local computer. Skip this section to go to Section 2 if you just want to add virtual hosts to a remote server.
Type in the following command into your terminal, you need to sudo here: (more…)