How to create virtual hosts in a Bitnami AMI hosting server?

November 30, 2012 - 15:20

Many Drupal users using Bitnami wanted to know how to create virtual hosts in a Bitnami AMI hosting server. If you are facing the same question with Bitnami for your Drupal site then read on to find out the solution.

Bitnami is an open source software project that produces installers for web applications. Bitnami also produces solutions stacks and virtual appliances. Follows the steps below to configure Bitnami to create virtual hosts

  • First we need to configure Apache to create Virtual hosts
  • This is done by adding the Bitnami configuration file to the main Apache settings file located at
  • We need to include the following config file in the main Apache settings file using the directive below
    Include "/opt/bitnami/apps/virtualhost.conf"
  • This file will be used as the new Apache virtual hosts configuration file for all of our applications.
  • We need to create this file and make it writable for the bitnami user
    sudo touch /opt/bitnami/apps/virtualhost.conf
    sudo chown bitnami /opt/bitnami/apps/virtualhost.conf
  • Next we need to include application-specifi configuration directives in the virtualhost.conf file as follows
    NameVirtualHost *:80
    your site configuration ###
    DocumentRoot "/opt/bitnami/apps/{your_site_files_folder}" 
    ServerName {your_site_name}
    ServerAlias www.{your_site_name}
    ErrorLog "logs/{your_site_name}-error_log" 
    CustomLog "logs/{your_site_name}-access_log" common
    Options Indexes MultiViews +FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
  • Finally restart the Apache Web Server for the changes to take effect.
    sudo /opt/bitnami/ restart apache

Get Drupal updates straight to your inbox

To prevent automated spam submissions leave this field empty.

Post your comments / questions