0

I have a virtual host setup to host a Drupal website. This is replacing our center's old website. However, a portion of that website (which is completely static) needs to still live on and have the same linkage as it did previously.

To elaborate further the root of the Drupal site is http://my.drupal.com/ and the root of the static website is http://my.drupal.com/vislab. How would I configure Apache to differentiate between the two sites?

Lester Peabody
  • 205
  • 1
  • 2
  • 9

1 Answers1

1

Just set up a VirtualHost for my.drupal.com and configure its DocumentRoot to point to the directory in which you've installed Drupal. Then configure an Alias inside that DocumentRoot to point /vislab to the root location of the static content (which is in a separate folder from the Drupal files).

Here's a brief example:

<VirtualHost *:80>
   ServerName my.drupal.com
   DocumentRoot /var/www/my.drupal.com

   Alias /vislab /var/www/vislab
   <Directory "/var/www/vislab">
      Order allow,deny
      Allow from all
   </Directory>
</VirtualHost>
Brian Showalter
  • 1,069
  • 9
  • 13
  • Seems pretty straightforward. I'm still getting used to Apache, though I'm told you never actually get "used" to it. I'll give it a try. – Lester Peabody Mar 19 '12 at 22:01
  • So I just tried this. It doesn't work entirely. It works for the first page of the site (index.php) but all the relative links are broken after that, so no images load, no stylesheets load, etc. – Lester Peabody Mar 20 '12 at 15:33
  • `rsync` epicly failed was the reason... not sure what happened really, reran and all was well. This worked perfectly, thank you. – Lester Peabody Mar 20 '12 at 15:59