step 1. Firstly you must create virtualhost directory at other that you want.
such as /home/redcrow/workspace/atstand
step 2. Go to /etc/ then edit file name's hosts
(add ip address and hostname that you want) such as
i'am add ip address 127.0.0.1(reference own computer) and host name's atstand.dear.dev(URL website)
step 3. Go to /etc/apache2/site-available/
and copy file name's default and paste
then rename file that you want(but extension must as .conf)
such as atstand.dear.dev.conf
edit it following
ServerAdmin is contact email of administrator
ServerName is hostname or URL that you want.
ServerAlias is second name of URL
DocumentRoot is virtualhost directory that you create in step 1.
step 4. at /etc/apache2/site-available/
type the following command for enable virtualhost
you will see atstand.dear.dev.conf into /etc/apache2/site-enable
step 5. restart web server(apache2) by use following command
$sudo service apache2 restart
step 6. testing
open firefox then put URL(atstand.dear.dev)
you will see result(i use php frameworks name's yii framework)