This short tutorial will guide you in using virtual hosts with XAMPP.
XAMPP is an easy to install Apache distribution containing MySQL, PHP and Perl.
This tutorial is written in Ubuntu and XAMPP for Linux 1.6.6, 2008/2/11.
First we have to activate virtual hosts in httpd.conf.
1.$ sudo vim /opt/lampp/etc/httpd.confUncomment this line in httpd.conf.
1.Include etc/extra/httpd-vhosts.confNext you have to add your virtual hosts to httpd-vhosts.conf.
1.$ sudo vim /opt/lampp/etc/extra/httpd-vhosts.confAdd your vhost project to httpd-vhosts.conf
1.<VirtualHost *:80>2. DocumentRoot /opt/lampp/htdocs/vhostdemo3. ServerName vhostdemo4.</VirtualHost>Add a test-file
1.$ sudo vim /opt/lampp/htdocs/vhostdemo/index.phpAdd some dummy content to test
Add vhostdemo to your hosts file
1.$ sudo vim /etc/hostsAdd a line with 127.0.0.1 and the name of your vhost project
1.127.0.0.1 vhostdemo(Re)start your XAMPP server
1.$ sudo /opt/lampp/lampp restartStart your browser to test if your virtual host works
1.$ firefox http://vhostdemo