December 09, 2012

December 09, 2012
In this article, I'm going to explain about, How to create virtual Hosts for Drupal On Linux Ubuntu. By Using virtual host settings, we can access site as a domain like instead of access like localhost/sitename. Here are the steps to create a virtual host for Drupal on Linux Ubuntu.

Step 1:

Assume your Drupal codes placed at /var/www/testDrupal

Step 2:

Access your Drupal site by using http://localhost/testDrupal

Step 3:

If you want to access the same site using to solve path issues and wysiywig editor images, and files link issues.

Step 4:

Open the below file in your editor.


Step 5:

Edit the file and add the below code in your vhosts.conf file.

<VirtualHost *:80>
DocumentRoot /var/www/testDrupal

Step 6:

Open the file /etc/hosts in your editor and add the below code.

Step 7:

Restart your apache server by running below command using console.

sudo /etc/init.d/apache2 restart

Step 8:

Now you can access the site using to view drupal instance in direct domain.


  1. Hello friends,

    Now you can send 5000 FREE emails per month using our email marketing servers with multiple IPs to get your campaign to

    inbox.Get great inbox deliveries and land your 95% emails to inbox.

    With our userfriendly and beautiful web-app you would be able to track every movement of your campaign. You would be able

    to see the users who have opened, clicked, unsubscribed, bounced and marked as spam.

    You can register here for your FREE account:


    * You must have access to your own opt-in list of your subscribers.You must be compliant with the ICANN-SPAM ACT of anti

    spamming.We do not sell email lists.