-1

I am trying to setup what I would call a multisite configuration on my local development server, which currently looks like this. I'm using Xampp in a windows environment so my root is Xampp\htdocs. Any site I'm working on is created under a folder here; for example, for \devsite this gives me the following Drupal structure: \sites\all\themes\devsite.

In my browser, I can go to http://localhost/devsite, and it launches my Drupal site. If I go to http://localhost, I get redirected to the Xampps install site.

My hosts file is altered to include these two entries.

  • 127.0.0.1 devsite.com
  • 127.0.0.1 m.devsite.com

Browsing to http://devsite.com/devsite, or http://m.devsite.com/devsite now launches my site.

I copy the content of the \devsite\sites\all directory to the \devsite\sites\m.devsite.com directory (I make some CSS changes so it would be obvious), and setup a \devsite\sites\sites.php file with these entries.

$sites = array(
  'devsite.com' => 'all',
  'm.devsite.com' => 'm.devsite.com',
);

If I browse to either hostname, both load the site configuration which is in All. I can't seem to get it to load anything within m.devsite.com? I've tried copying the settings.php file into each stucture which produces an error message. I've tried renaming All to devsite in folder and sites.php but then I get a blank page when browsing.

Do you have any idea on how can I achieve what I am trying to do?

2

2 Answers 2

0

You're just trying to create a new theme on the subdomain right?

I got this working recently on a CentOS server; all I had to do was added a folder in the sites directory called "m.mydomain.com" with a copy of the settings.php file from "sites/default" with the following line appended:

$conf['theme_default'] = 'fusion_mobile';

Come to think of it, I should probably include the other settings.php file to keep things organized, but that was all I needed for the basic functionality you're describing (beyond the DNS setup). I didn't have to create a sites.php file, or copy the entire file structures across.

-1

I use Omega for that. It's based on CSS media queries.

1
  • 2
    I'm pretty sure she/he's looking for a multi-site solution.
    – chrisjlee
    Sep 21, 2011 at 15:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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