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.

Hello I want to deploy two sites. One called drupal, and another site called drupal-gh. Currently, I can only make one site only work at a time - but I need both. This is because when I deploy a site, it uses my server IP address.

I want to make my drupal site have a url of http://"IP address"/drupal and I want my drupal-gh site to have a url of http://"IP address"/drupal-gh. So this way they can both be used.

<VirtualHost *:80>
    ServerAdmin test@test
    DocumentRoot /var/www/drupal
    ServerName localhost
    ErrorLog /var/log/httpd/drupal-error-log
    CustomLog /var/log/httpd/drupal-acces-log common
</VirtualHost>

<VirtualHost *:80>
    ServerAdmin test@test
    DocumentRoot /var/www/drupal-gh
    ServerName localhost
    ErrorLog /var/log/httpd/drupal-gh-error-log
    CustomLog /var/log/httpd/drupal-gh-acces-log common
</VirtualHost>
share|improve this question
    
The objective you have described is one site with two directories (you can setup multiple installs of Drupal on the same site - or just use multi-site). If that isn't what you want either use different domains (subdomains or TLDs) or different IP addreses or different ports to access your 'sites'. –  cyberx86 Jan 3 '12 at 10:08
    
@cyberx86 Yes I have one site with two directories. How do I use multiple installs of Drupal or use multi-site? –  Shehzad009 Jan 3 '12 at 10:18
    
There shouldn't be much difficulty installing two copies of Drupal - create your two folders, use different databases (or different table prefixes), and run your install in the folder. Drupal multi-site accomplishes the same thing (two copies of Drupal) without duplicating the code. See the documentation for details. –  cyberx86 Jan 3 '12 at 10:35
    
In order to run Drupal in a subdirectory with Clean URLs, you'll need to enable the RewriteBase parameter in the .htaccess file. –  BMDan Feb 6 '12 at 20:15
add comment

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.