Need help with multisite installtion on Mac OS X v10.5 Leopard!

Events happening in the community are now at Drupal community events on www.drupal.org.
aaronchristian's picture

Hello,

I am completely exhausted with all my attempts at trying to get this to work. I have recently been building up several different multiple site installations. As it was getting to be a hassle with updating every site's modules, core etc, I wanted to start and test out a multisite installation. I am also currently running XAMPP, not MAMP like most of the other solutions out there. I currently have my http://localhost pointing to "/Users/aaronchristian/Sites/htdocs" instead of the default #DocumentRoot "/Applications/xampp/xamppfiles/htdocs".

I have been following this guide to setting up my multisite install; http://drupal.org/node/238805 and am currently stuck at Step #3.

What I've done so far

I've gone ahead and uncommented the line on my httpd.conf file -> (/etc/apache2/httpd.conf);

#Include /private/etc/apache2/extra/httpd-vhosts.conf

I continued to my httpd-vhosts.conf file -> /etc/apache2/extra/httpd-vhosts.conf, and uncommented the line;

NameVirtualHost *:80

I then added the following lines to the bottom of the document;

<VirtualHost *:80>
    DocumentRoot "/Library/WebServer/Documents"
    ErrorLog "/private/var/log/apache2/error_log"
    CustomLog "/private/var/log/apache2/access_log" common
</VirtualHost>

<VirtualHost *:80>
    DocumentRoot "/Users/aaronchristian/Sites/htdocs/drupal/6"
    ServerName drupal.local
    ServerAlias *.drupal.local
    ErrorLog "/private/var/log/apache2/drupal.local-error_log"
    CustomLog "/private/var/log/apache2/drupal.local-access_log" common
</VirtualHost>

My host file -> (private/etc/hosts) contains both;

127.0.0.1 drupal.local
127.0.0.1  test.drupal.local

As soon as I navigate to http://drupal.local I am redirected to the equivalent address; http://localhost. Now am I not correct that when I type in http://drupal.local, I should be redirected to http://drupal.local/drupal/6? I found another article from someone here; http://drupal.org/node/111710#comment-1268862 that suggested I enable "Web Sharing" from my System Preferences. After enabling, I get redirected to the correct root folder (/Users/aaronchristian/Sites/htdocs/drupal/6) except it no longer executes the php correctly, all I can see is the file structure listing all the files. Clicking on the install.php file just displays the php as plain text.

What am I missing? Thank you in advance for your help!

Comments

First, turn off "Web

Garrett Albright's picture

First, turn off "Web Sharing." That's Mac OS X's built-in web server (which is also a copy of Apache), and that's going to cause conflicts with XAMPP. Also make sure you aren't running any other web servers on your system.

Second, unless I'm missing something, you probably want to re-comment out that Include statement for virtual hosts as well. Virtual hosts is a feature which lets you serve content from different directories, but the whole point of a multisite Drupal installation is that everything's being served from a single Drupal directory. The instructions on the page you linked to tell you to do this, but they seem to also be using OS X's built-in Apache as well. For *AMP programs, it shouldn't be necessary at all. Set the default DocumentRoot statement to the path of your Drupal installation.

Then check back and let us know if you seem to have made any progress.

rggoode's picture

I'm trying to set up a multi-site installation of Drupal alongside some existing WordPress development installs on a Mac OS X 10.5 MAMP platform. So I want to have more than just the multi-site installation of Drupal running. So far I haven't had any luck getting it to work. Looking at your comment here, I'm wondering if running the multi-site Drupal is only possible working from that ONE directory. Is that the reason I can't get the multi-site to work?

I've named the directories (both WordPress and Drupal sites) in the etc/hosts file, and then set up the virtual servers as follows in httpd.cong file:

# NameVirtualHost *

# WordPress installations

ServerName preschool
ServerAlias *.preschool
DocumentRoot /applications/mamp/htdocs/

ServerName sandbox
ServerAlias *.sandbox
DocumentRoot /applications/mamp/htdocs/

ServerName wordpress
ServerAlias *.wordpress
DocumentRoot /applications/mamp/htdocs/

# Drupal Multisite installations

ServerName drupal.local
ServerAlias *.drupal.local
DocumentRoot /applications/mamp/htdocs/drupal6

ServerName site1.drupal.local
ServerAlias *.site1.drupal.local
DocumentRoot /applications/mamp/htdocs/drupal6

ServerName site2.drupal.local
ServerAlias *.site2.drupal.local
DocumentRoot /applications/mamp/htdocs/drupal6

This lets me continue to access the Wordpress installs, but I can't get to the Drupal install. And one odd thing is--if I change the order and name the Drupal installs BEFORE the WordPress sites, then I can ONLY access the Drupal install. (Except that I'm only getting to the DEFAULT Drupal setup, I can't get to site1 or site2).

I've search through a number of articles on the Drupal site and haven't found any solutions. Any idea what it is I'm doing wrong?

I've wondered if part of the problem is either how I'm entering the URL in the browser "http://localhost:8888/site2.drupal.local" or if the fact that I'm using the default port that MAMP uses "localhost:8888" ...might be the problem

Roger

_________________

Art has gone to the dogs
GoodeGallery.com

I'm not entirely sure, but

Garrett Albright's picture

I'm not entirely sure, but one thing to try would be making it so the Drupal web root isn't a subdirectory of the WordPress web root. In other words, keep your Drupal files in /applications/mamp/htdocs/drupal6, but move your WordPress files to /applications/mamp/htdocs/wordpress or something like that, and adjust your Apache config file accordingly.

All directories are separate in htdocs

rggoode's picture

Thanks Garrett. That's how I've had it setup thus far. I'd been developing in WordPress and had a couple WP installations for some experimentation. Then more recently I've been learning to use Drupal and added an installation for Drupal 6. So I had in my htdocs folder directories for: WordPress1, WordPress2, WordPress3, and Drupal.

The server environment was created with MAMP, and everything has worked fine set up that way. Where I'm running into trouble is trying to set up my Drupal installation as a multi-site install (with separate directories containing their own settings.php file) so that I could work on a couple of projects without having to install Drupal and all the modules for each one.

I've found a number of threads discussing this same goal, but so far, none of the solutions I've reviewed has worked for me. I'm now considering upgrading to MAMP Pro, which claims to make the management of Virtual Servers easy. If that's actually true, it'll be worth the price.

Roger

_________________

Art has gone to the dogs
GoodeGallery.com

Hello

jebernier's picture

I'm trying to do basically the same as you. I just want Drupal & Wordpress on my Mac using MAMP. How ddid you get it to work? Did you need to purchase MAMP Pro?

Thanks,

John
jebernier@gmail.com

i did get mamp pro but

dotman's picture

i did get mamp pro but haven't had time to play with it. I was under deadline and just used the acquia's lamp environment. btw, when using acquia, i don't use their version of drupal. I always download the latest version of core, rename the folder and choose "import", so i'm at the same version as my host. the site, folders, subthemes, etc transferred nicely to my host runnning multi-site.

It does look at first glace that mamp pro makes it quite easy to manage virtual hosts. i'll play with it this weekend and let you know. it does come with a trial period, so give it a shot and let me know what you find out.

Doug

VirtualHostX

shrop's picture

I use a tool (commercial, but very inexpensive), VirtualHostX, to setup vhosts on a Mac. http://clickontyler.com/virtualhostx/

It works great, but setting up MAMP or Apache conf files, /etc/hosts and then restarting apache all from one single GUI. Just makes it easier and faster to manage your dev environment and is much cheaper than MAMP Pro last I checked.

Also, the developer provides great support.

Hope that helps.
Shrop

cool shrop, thanks. i will

dotman's picture

cool shrop, thanks. i will definitely grab that. looks like one for the toolkit.

Doug

Successfully installed my drupal 6 multisite

aaronchristian's picture

Hey guys,

Just thought I'd share with everyone my successful installation process for setting up my drupal 6 multisite. You can view the how-to/tutorial at our companies website (New Wave Media).

I posted it in our blog section titled "Setting up a Drupal 6 Multisite on your local MAMP environment".

thanks for the tutorial. the

dotman's picture

thanks for the tutorial. the problem I kept running into was that drupal took over localhost. so if I had other directories with installs or wordpress, concrete 5 or whatever, I was always redirected back to localhost/install.php.

I may have missed a step in adding a virtual host for those projects. just couldn't get it to work. Do you run into the same problem? grab wordpress and see if you are able to install it with your setup as a test. I'd be interested to know.

Doug

Multisite

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: