By aprice42 on
Hi,
I am new to drupal... I am working on a mac osx 10.5....
I have a working copy of Drupal 6.x installed using MAMP locally on my mac. I have my site living in /Users/myusername/Sites/drupal
I have read through a number of posts on setting up multisites. All of them seem to be written for either users in a windows environment, or in a web server environment, and I cannot get the solutions to work for me.
Is there anyone out there that can offer advice for mac users and multisites?
Thanks,
Andy
Comments
I have two Drupal
I have two Drupal installations running on a mac with MAMP. Each one is under the directory Applications/MAMP/htdocs. So I have...
Applications/MAMP/htdocs/drupal5
Applications/MAMP/htdocs/drupal6
I set up each one in the same way as if I was just setting up one installation. I created a database called drupal5 for the drupal5 site, another database called drupal6 for the drupal6 site from the phpMyAdmin page linking off http://localhost:8888/MAMP/. I also set up a user called admin who has privileges to both databases. After that I just went to /install.php for both sites and did the Drupal install, made the settings.php file, sites/default/files folder and what not.
On occasions, I've got stuck in an install loop where Drupal won't accept the the database and password details, but there's a way to get around that. What kind of problems are you having?
Thanks for the quick
Thanks for the quick response...
Of course, that works great, however...
I was actually hoping to set this up a bit more cleanly as directed in the multisite installation instructions on drupal.org, setting up each site within drupal/sites/ directory
the directions I have found direct me to create directories for each site (ie. site1.com, site2.com) and then modify the settings.php file to point to the appropriate database. This makes sense on a webserver, however, I am working locally not with domains, so that will not work for me...
my site currently lives at http://localhost, so my thought was that I could set it up to have dev sites at
http://localhost/dev1
http://localhost/dev2
http://localhost/dev3
however, trying to set it up this way didn't seem to work, as I kept getting 404 errors when navigating to those urls...
Your solution will definitely work for me if I can't get the multisite install figured out, but I would love to figure out the multisite thing :-)
To make this work, you need
To make this work, you need to do two things:
Step 1. Make the URL http://localhost/dev1 go to the same directory as the URL http://localhost, that is, to the directory where Drupal is installed. This is necessary because Drupal's index.php file *must* be accessed. (More about how to do this, later)
Step 2. When Drupal's index.php runs, it well check the requested URL, will compare that with the names of the directories under drupal/sites, and will bring up the right site. In your case, these directories must be named sites/localhost.dev1 and sites/localhost.dev2. This is explained in the INSTALL.txt file.
Back to Step 1: You have Drupl installed in /Users/myusername/Sites/drupal, right? You will need to create two symlinks under that directory, named dev1 and dev2:
So, whenever a browser goes to dev1 or dev2 it will always end up in drupal, while the requested URL will be retained. That is all. Browse to the new sites and they will be installed.
I got that to work...
it all seems to be working :-)
Thank You!
all seems to be working
all seems to be working well, except for the clean urls...
I enabled those by adding the following to my httpd.conf file
do I need to update that to somehow reflect the other sites added?
I am not sure. Can't clean
I am not sure. Can't clean URLs be enabled at all for the other sites? Or are they enabled but they give wrong menu links?
First, I would check if
Options +FollowSymlinksis enabled.Or, if that doesn't solve the problem, I would try removing the
RewriteBase /line.Or, if that doesn't work, and it breaks the first site too, keep the
RewriteBase /line and try adding a couple of blocks for the subdirectories to override their inherited RewriteBase, such as:Or, if its a matter of wrong menu links, then set the $base_url in each site's settings.php file. What needs to be done depends on whether PHP is installed as an apache module or as a cgi binary, among other things, but some smart trial-and-error usually solves the problem.
Sorry, to go back a step...
Sorry, to go back a step... I was trying to setup another computer with dev3 site following the same directions but now when I navigate to http://localhost/nav3 all I get is a blank page...
I set up a symlink for the drupal directory called dev3 and placed it in the drupal directory
I created a directory in sites called localhost.dev3
I copied a fresh copy of settings.php into that directory
and upon navigating to the page http://localhost/dev3 i just a get a blank page...
any thoughts?
Thanks for your time and patience... Andy
You don't need to use
You don't need to use symlink on mac when using mamp
here's one way to set it up
put drupal inside Users/yourname/Sites, you may have to change document root of you using the regular mamp
ie Sites/drupal
this directory is where you'll point each of your virtual host domains to
Then in drupal under drupal/sites/ you'll create your multi-sites
ie drupal/sites/default
drupall/sites/test.dev
I'm using Mamp Pro which takes care of all the virtual hosts and makes this easy via a user interface,
A blank screen may mean
A blank screen may mean insufficient php memory (among other things - see http://drupal.org/node/158043). Also check you apache logs just in case there is some helpful error message there.
Or, you could try darumaki's suggestion to use subdomains instead of subdirectories in your URLs (such as http://localhost.dev1), and create additional virtual hosts for the other sites instead of symlinks. One benefit of that is that if you wanted to move your site to some host, internal paths for images etc would remain the same.
I tried the sub domain route
I tried the sub domain route with MAMP pro and I am still getting the WPOD. I went through my memory config and that is more than plenty, and none of the other comments on the WPOD page seemed to apply, any other thoughts?
Can't get this to work on Mac OS X server, apache 2.2
My configuration is that my drupal site is located in:
http://localhost/~myusername/ESPlannerWeb/
I've defined a new site:
sites/bu.esplanner.com
and put a link into my Sites directory as:
ln -s ~/Sites/ESPlannerWeb bu
I then put a copy of default.settings.php into sites/bu.esplanner.com
and a link:
ln -s ~/Sites/ESPlannerWeb/sites/bu.esplanner.com sites/localhost.bu
I then use my web browser to access:
http://localhost/~myusername/bu
and get the page that is served as if I had requested:
http://localhost/~myusername/ESPlannerWeb
As I understand it I should have seen the configuration process for bu.esplanner.com.
When I look in the access_log I see the request for ~/dickmunroe/bu but all the pages requests actually get directed through sites/all rather than through sites/localhost.bu
So, what am I doing wrong? This all looks right but it ain't working...
Best,
Dick Munroe
Figured it out...
The directory in sites has to include the ~myusername, thus the link to the bu.esplanner.com directory must be:
ln -s ~/Sites/ESPlanner/sitest/bu.esplanner.com sites/localhost.~myusername.bu
and the configuration directory came up.
Best,
Dick Munroe
Same system, same things
Same system, same things installed
I encountered a lot of difficulties with browsing from one site to the other.. it would always give problems so what I've done is:
1. each site has a user with dedicated privileges
2. if I want to switch to another site I'll go in the MAMP preferences and switch the Document root under the Apache tab.
for me this approach makes me happy though my MAMP is very slow, my online server is much faster, why is that? Should it be like that?
Authentically,
BassPlaya
One thing I should also note
One thing I should also note is for localhost setup I made sure to use base_url in the settings.php, I also removed the :8888 and can use regular testdomain.dev instead of .dev:8888
mamp pro
darumaki:
how you set it up with mamp pro? I'm using the trial version, but something's wrong with my setup. trying to get a dev.mysite going in the sites folder, and couldn't get this done with normal MAMP. Problem's with me, but i'm missing something essential.
Using virtual hosts? Have
Using virtual hosts? Have you set the DocumentRoot of all your sites to Drupal's main directory?
Figured it out.
thanks, cog.
I was incorrectly setting the document root AND my new virtual host both to the main drupal directory, 'mysite', whereas virtual host should be 'dev.mysite.com'.
correct settings for anyone else with MAMP:
127.0.0.1 dev.mysite.comafter the last line. Close the file.
# NameVirtualHost **** dont put PHP tags there, i did it so the vhost tags would show up.
Restart your MAMP servers and voila, you'll get the new site install screen at http://dev.mysite.com:8888/install.php?profile=default
Instead or <?php ... ?> tags
Instead or
<?php ... ?>tags you can use<code> ... </code>tags to avoid displaying the tags themselves.i know that. you're right.
i know that. you're right. first time i previewed it i could swear the brackets around the
<Virtualhost>tags disappeared. i think my eyes were playing tricks. up too long. thanx anyways for the original response.