Hi all,
I have a multisite setup that works great. It allows me two different sites using one Drupal core codebase just as promised. It works better and easier than redirecting to different domain names using Apache Virtual Hosts. However, I have one issue with it. When I create a symbolic link, in the sites folder, for each site (i.e. sitename linked to sitename.domain.tld) so that I can visit it not only by sitename, I am directed to a different site in my browser.
In my browser, when I go to http://sitename and log in, then visit http://sitename.domain.tld I'm not logged in! But they're the same thing, one's just a symbolic link to the other! I really am confused and wondering if this is proper behavior because it doesn't seem like it.
Thanks!
Quoting Jacob Roufa jacob.roufa@gmail.com:
Hi all,
I have a multisite setup that works great. It allows me two different sites using one Drupal core codebase just as promised. It works better and easier than redirecting to different domain names using Apache Virtual Hosts. However, I have one issue with it. When I create a symbolic link, in the sites folder, for each site (i.e. sitename linked to sitename.domain.tld) so that I can visit it not only by sitename, I am directed to a different site in my browser.
In my browser, when I go to http://sitename and log in, then visit http://sitename.domain.tld I'm not logged in! But they're the same thing, one's just a symbolic link to the other! I really am confused and wondering if this is proper behavior because it doesn't seem like it.
Maybe because you don't have your virtual site setup properly. Is http://sitename an alias of http://sitename.domain.tld? Are you using the exact same database tables or different database tables for your multiple sites?
Earnie -- http://for-my-kids.com/ -- http://give-me-an-offer.com/
Yes, in my sites folder sitename1 is a symlink of sitename1.domain.tld and the same for sitename2. Sitename1 and sitename2 use different databases. And I'm assuming that because sitename1 is just an alias for sitename1.domain.tld they use the same database, and the same with sitename2 and its host sitename2.domain.tld. I hope this is clear. I set up multisite according to the guides on d.o.
On Mon, Apr 14, 2008 at 2:49 PM, Earnie Boyd earnie@users.sourceforge.net wrote:
Quoting Jacob Roufa jacob.roufa@gmail.com:
Hi all,
I have a multisite setup that works great. It allows me two different
sites
using one Drupal core codebase just as promised. It works better and
easier
than redirecting to different domain names using Apache Virtual Hosts. However, I have one issue with it. When I create a symbolic link, in the sites folder, for each site (i.e. sitename linked to
sitename.domain.tld) so
that I can visit it not only by sitename, I am directed to a different
site
in my browser.
In my browser, when I go to http://sitename and log in, then visit http://sitename.domain.tld I'm not logged in! But they're the same
thing,
one's just a symbolic link to the other! I really am confused and
wondering
if this is proper behavior because it doesn't seem like it.
Maybe because you don't have your virtual site setup properly. Is http://sitename an alias of http://sitename.domain.tld? Are you using the exact same database tables or different database tables for your multiple sites?
Earnie -- http://for-my-kids.com/ -- http://give-me-an-offer.com/
-- [ Drupal support list | http://lists.drupal.org/ ]
Quoting Jacob Roufa jacob.roufa@gmail.com:
On Mon, Apr 14, 2008 at 2:49 PM, Earnie Boyd earnie@users.sourceforge.net wrote:
Quoting Jacob Roufa jacob.roufa@gmail.com:
Hi all,
I have a multisite setup that works great. It allows me two different
sites
using one Drupal core codebase just as promised. It works better and
easier
than redirecting to different domain names using Apache Virtual Hosts. However, I have one issue with it. When I create a symbolic link, in the sites folder, for each site (i.e. sitename linked to
sitename.domain.tld) so
that I can visit it not only by sitename, I am directed to a different
site
in my browser.
In my browser, when I go to http://sitename and log in, then visit http://sitename.domain.tld I'm not logged in! But they're the same
thing,
one's just a symbolic link to the other! I really am confused and
wondering
if this is proper behavior because it doesn't seem like it.
Maybe because you don't have your virtual site setup properly. Is http://sitename an alias of http://sitename.domain.tld? Are you using the exact same database tables or different database tables for your multiple sites?
Yes, in my sites folder sitename1 is a symlink of sitename1.domain.tld and the same for sitename2. Sitename1 and sitename2 use different databases. And I'm assuming that because sitename1 is just an alias for sitename1.domain.tld they use the same database, and the same with sitename2 and its host sitename2.domain.tld. I hope this is clear. I set up multisite according to the guides on d.o.
You're not logged in to http://sitename.domain.tld because it is a different session cookie than http://sitename. If you wish the same session cookies then in the settings.php file set the $base_url.
$base_url = http://sitename.domain.tld
Earnie -- http://for-my-kids.com/ -- http://give-me-an-offer.com/
I think what you're looking for is this patch:
It's against Drupal 6/7, but one of the earlier files is against D5, give or take some bad line endings that you can easily fix up. :-) I'm using it quite successfully on a D5 site now.
On Monday 14 April 2008, Jacob Roufa wrote:
Hi all,
I have a multisite setup that works great. It allows me two different sites using one Drupal core codebase just as promised. It works better and easier than redirecting to different domain names using Apache Virtual Hosts. However, I have one issue with it. When I create a symbolic link, in the sites folder, for each site (i.e. sitename linked to sitename.domain.tld) so that I can visit it not only by sitename, I am directed to a different site in my browser.
In my browser, when I go to http://sitename and log in, then visit http://sitename.domain.tld I'm not logged in! But they're the same thing, one's just a symbolic link to the other! I really am confused and wondering if this is proper behavior because it doesn't seem like it.
Thanks!
On Mon, Apr 14, 2008 at 7:31 PM, Jacob Roufa jacob.roufa@gmail.com wrote:
Hi all,
I have a multisite setup that works great. It allows me two different sites using one Drupal core codebase just as promised. It works better and easier than redirecting to different domain names using Apache Virtual Hosts. However, I have one issue with it. When I create a symbolic link, in the sites folder, for each site (i.e. sitename linked to sitename.domain.tld) so that I can visit it not only by sitename, I am directed to a different site in my browser.
In my browser, when I go to http://sitename and log in, then visit http://sitename.domain.tld I'm not logged in! But they're the same thing, one's just a symbolic link to the other! I really am confused and wondering if this is proper behavior because it doesn't seem like it.
If the cookie domains are different, it doesn't matter that the two sites are the same thing.By default the cookie domain depend on the the request URL used to go to the site, which in your case is different. Try to set the same $cookie_domain in both sites' settings.php files and see what happens. (You may need to clear your browser's cookies.)
Thanks!
--
Jake Roufa Web Consultant http://jacobroufa.com -- [ Drupal support list | http://lists.drupal.org/ ]