Tags:
create new tag
view all tags

SID-00114: Multiple twikis on one host

Status: Answered Answered TWiki version: 4.2.4 Perl version: 5.008006
Category: CategoryInstallation Server OS: Mac OS X 10.4.11 Last update: 17 years ago

I have just set up a second twiki installation for a new project on the same server as my original twiki. When I login to one twiki, it logs me out of the other twiki. What can I do so they do not have this conflict. One is running 4.2.2 and the new one is 4.2.4.

Thanks,

[at

-- PatrickHarris - 17 Feb 2009

Discussion and Answer

In most installations (i.e., with {UseClientSessions} = 1), the server sets a cookie in the browser called TWIKISID (for TWiki Session ID). This helps protect your password, and improves performance by not having to re-authenticate for the rest of the session. That cookie is only valid for one application instance: when you connect to the second instance, it doesn't recognize that session ID, and so you have to log in again and it creates a new one. But that new cookie has the same name, so it clobbers the old one.

A way around this is create a virtual host name for your web server (see the Apache documentation). That way you can access the one server with two different domain names, and the namespaces of the cookies will be separate. You'll need a new DNS entry for the second name (or temporarily add it to your local /etc/hosts file). You will also need to update the configure variables {DefaultUrlHost} and {PermittedRedirectHostUrls}.

-- SeanCMorgan - 17 Feb 2009

Unfortunately, in this situation, I cannot move the new twiki to a different domain name. Any reason I can't just change the name of the cookie? I just did a quick search and TWIKISID only shows up in a couple of file.

lib/TWiki/LoginManager.pm data/TWiki/TWikiLoginManagerDotPm.txt data/TWiki/SourceCode.txt

Of those three only the first looks like it will need to be changed where it sets up the session name.

-- PatrickHarris - 17 Feb 2009

You'll probably want to change all three files, where the cookie is created, and where it is used.

Another possibility is to disable {UseClientSessions} for the second instance. Then only the first one will use the cookie. I think that puts the session ID in the URL, which can get a bit ugly.

-- SeanCMorgan - 17 Feb 2009

There were two cookies being set by TWiki, TWIKISID and TWIKIPREF. I have changed the name of both of them any place they were referenced in the second installation and everything looks good. If I have created a whole new can of worms or there may be unforeseen problems with doing this, please let me know.

p.s. I started writing this before your last response. I did change all working references to those cookies. But in bad form I did not change the documentation references. wink

Thanks for the help,

pat

-- PatrickHarris - 17 Feb 2009

hmm... this suggests, the cookie name should be configurable through LocalSite.cfg - or may be have Realm kind of stuff

-- SopanShewale - 19 Feb 2009

Realm seams like a more flexible approach.

-- PeterThoeny - 19 Feb 2009

The cookies' path is set to / (i.e., root). If you made that single value customizable, you wouldn't have to customize the name of two cookies.

-- SeanCMorgan - 20 Feb 2009

      Change status to:
ALERT! If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
SupportForm
Status Answered
Title Multiple twikis on one host
SupportCategory CategoryInstallation
TWiki version 4.2.4
Server OS Mac OS X 10.4.11
Web server Apache/1.3.41
Perl version 5.008006
Edit | Attach | Watch | Print version | History: r8 < r7 < r6 < r5 < r4 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r8 - 2009-02-20 - SeanCMorgan
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.