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 test.sitename.com 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 test.testDrupal.com to solve path issues and wysiywig editor images, and files link issues.
Step 4:
Open the below file in your editor.
/etc/apache2/sites-enabled/vhosts.conf
Step 5:
Edit the file and add the below code in your vhosts.conf file.
<VirtualHost *:80>
ServerName test.testDrupal.com
ServerAlias www.test.testDrupal.com
DocumentRoot /var/www/testDrupal
</VirtualHost>
Step 6:
Open the file /etc/hosts in your editor and add the below code.
127.0.0.1 test.testDrupal.com
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 http://test.testDrupal.com to view drupal instance in direct domain.
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 test.testDrupal.com to solve path issues and wysiywig editor images, and files link issues.
Step 4:
Open the below file in your editor.
/etc/apache2/sites-enabled/vhosts.conf
Step 5:
Edit the file and add the below code in your vhosts.conf file.
<VirtualHost *:80>
ServerName test.testDrupal.com
ServerAlias www.test.testDrupal.com
DocumentRoot /var/www/testDrupal
</VirtualHost>
Step 6:
Open the file /etc/hosts in your editor and add the below code.
127.0.0.1 test.testDrupal.com
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 http://test.testDrupal.com to view drupal instance in direct domain.







Hello friends,
ReplyDeleteNow 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:http://www.client.hostwiser.com/cart.php?a=view
HURRY!!
* 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.