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.


Post a Comment