Hello everybody,

I wanted to see how i can have 2 drupal sites with different themes run on the same server?

Is it possible?

Please do let me know..

Thanks,
Smita

Comments

rplanteigne’s picture

Yes, do a search for "drupal multisite" to get started.

smita_drupal’s picture

thank you..

Kaumil’s picture

Why not just have two different installations of Drupal?

Clustered Drupal Hosting powered by Uptimehost's Cloud.

smita_drupal’s picture

ok what i have done is - i have one drupal site already installed . its in /var/www/sites/abc.com which run as http://localhost

i copied the same abc.com folder and renamed it to xyz.com and placed it /var/www/sites/xyz.com.then i changed the settings and copied the same DB and renamed it and pointed it in the settings file

next i did was added xyz.localhost in the hosts file adn then added virtualhost in the httpd.conf file

after doing that i am able to access this new site by doing xyz.localhost.

But the problem is that my http://localhost is also now accessing the same Database which xyz.com is pointing to.

I am still stuck in the same problem.any ideas?suggestions?

ludo1960’s picture

Check database defined in each sites settings.php file

smita_drupal’s picture

my settings file for abc.com point to db called les_abc while the db of xyz.com points to les_xyz

base_url for abc.com points to http://localhost while base_url for other one points to http://xyz.localhost

ludo1960’s picture

What's the content of your apache.conf file?

smita_drupal’s picture

this is what my httpd.conf file has:


DocumentRoot /var/www/sites/abc.com
ServerName http://localhost


DocumentRoot /var/www/sites/xyz.com
ServerName http://xyz.localhost

ludo1960’s picture

What version of apache are you using? As far as I know virtual hosts should be defined in the apache.conf file and not the http.conf file

smita_drupal’s picture

i am using Red hat [RHEL] 5.0

ludo1960’s picture

I don't know anything about RHEL but I assume that the virtual host is incorrectly configured somehow, sorry I can't help anymore

smita_drupal’s picture

Apache/2.2.3 (Red Hat) .thats what the version is.

smita_drupal’s picture

no problem.i will may be find out more abt how to configure virtual hosts in RHEL.thanks for all your help.

ludo1960’s picture

Now I know that it is apache2, check out the apache2 directory for .conf files maybe allowedhosts or includedhost files and define your virtual host there and it should work a treat (don't forget to restart the apache server! and remove entries made in the http.conf)

smita_drupal’s picture

ok wait i will try it..:)

ludo1960’s picture

Post the contents of your main apache directory, the actual name of the file requiring the definition of the virtual host escapes me (possibly age related :-))

smita_drupal’s picture

hey i couldnt find apache2 directory.Its usually under /usr/local/apache2 .But i dont have apache 2 directory ..all i have is /etc/httpd/conf/httpd.conf file..:(

ludo1960’s picture

Gotta be an apache2 folder somewhere.....what WHM software are you running? PM me if you want..

smita_drupal’s picture

what is WHM and what is PM???

is whm -web host manager?

I dont have that since this server is in the office itself...

ludo1960’s picture

WHM = wweb host manager

PM = personal message i.e contact me :-)

stompersly’s picture

The apache config file is in /etc/httpd/conf/httpd.conf