Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

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>
share|improve this answer
    
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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.