The procedure of creation VirtualHost in Linux is very simple.
I try to make it more simple for me. The result of this work is .sh script that you can download below. Just untar this archive
tar xvf vhosts.sh.tar.gz
and run this script in terminal with sudo.
Example of usage:
IP = 127.0.0.1
ServerName = example.com
ServerAdmin email = firstname.lastname@example.org
Your username in System = user
htdocs directory path = /home/user/htdocs/
If we located in same directory that vhosts.sh script command in terminal will be:
sudo ./vhosts.sh 127.0.0.1 example.com email@example.com user /home/user/htdocs/
Now open your browser and type the adress http://example.com .If allright you will see phpinfo();
hope it’s will be useful for you.
Download the script. For more tutorial information look in script file.