Mobile app version of vmapp.org
Login or Join
Frith620

: Subdomain in Drupal to an already existing site I would like to add to an existing site, which wasn't written in Drupal, a sub site, which is in Drupal. The existing site already has a domain,

@Frith620

Posted in: #Domains #Subdomain #Webserver

I would like to add to an existing site, which wasn't written in Drupal, a sub site, which is in Drupal. The existing site already has a domain, and this would be a sub domain. I'm using Apache2 and Ubuntu 12.04. How should I do this?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Frith620

1 Comments

Sorted by latest first Latest Oldest Best

 

@Twilah146

There are several prerequisites for running Drupal. You can install these with apt-get:

sudo apt-get install apache2 php5-mysql php5-gd libapache2-mod-php5 mysql-server


Previously installed packages will be skipped.

Unzip Drupal in its own directory. Assuming your top-level site is in /var/www and Drupal is in /var/www/drupal, you would only need to set the $base_url in Drupal's settings.php to the subdirectory, e.g.:

$base_url = 'http://www.example.com/drupal';


If you need to place the Drupal installation outside of the domain's directory, you can add an Alias directive to the top-level domain definition in /etc/apache2/apache2.conf (likely a VirtualHost container). If Drupal is located in /usr/local/drupal, then:

Alias /drupal /usr/local/drupal


This will direct Apache to use the physical directory as a site subdirectory.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme