multiple domain/subdomain in localhost

ubuntu server

# create file config for virtualhost

$ sudo nano /etc/apache2/conf.d/virtual.conf

input script to file virtual.conf

# localhost
<VirtualHost *:80>
DocumentRoot "/media/sf_sandbox/"
ServerName localhost

# propertynco virtual host
<VirtualHost *:80>
DocumentRoot "/media/sf_sandbox/propertynco"
ServerName propertynco

edit file /etc/hosts

$ sudo nano /etc/hosts

insert this code to file hosts       localhost       propertynco

restart/reload apache service

$ sudo service apache2 reload

ping or open website with browser

$ w3m propertynco



Published by


just to remember what i had known :)

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s