Question
I am attempting to run multiple "instances" of twiki on my webserver. This is for security reasons. I have one wiki that is wide open for everyone and another instance that is more restricted because of the nature of its content.
I have set these up in normal user directories on my RH Linux box as follows:
Openwiki
/home/~openwiki/public_html/cgi-bin/twki
/home/~openwiki/public_html/pub
/home/~openwiki/twiki/data
/home/~openwiki/twiki/templates
Closed
/home/~closedwiki/public_html/cgi-bin/twki
/home/~closedwiki/public_html/pub
/home/~closedwiki/twiki/data
/home/~closedwiki/twiki/templates
Unfortunately links for each site are corrupting links for the other. Basically the two sites are stepping on each other. I've created new installs and edited the TWiki.cfg, but to no avail. I've double and triple checked my cfg file. The one closed site has been up and running for 4 months, but I added the other site and everything has gone to hell.
Thanks
- TWiki version:TWiki 01 Sep 2001
- Web server:Apache
- Server OS:Linux RH 7.2
- Web browser: Any
- Client OS: Any
--
JamesHarrison - 16 Nov 2001
Answer
It is possible to install TWiki multiple times on one server, I did that several times. Make sure that there is no conflict in the Perl module search path, the TWiki scripts look for libraries in . and ../lib. The TWiki.cfg file currently needs to be in the library directory, so you need to duplicate the TWiki related libraries for each installation. Other then that not sure what could go wrong.
--
PeterThoeny - 18 Nov 2001
OK, I've reinstalled both wikis. I've verified that each ../lib/TWiki.cfg file is configured to direct all paths and URL's appropriately. Unfortunately it still is not working. If I edit
WebHome on /home/~closedwiki and click the "Preview Changes" button. All the links in the preview are pointing to /home/~openwiki and the /home/~openwiki
WebHome page is the one that gets edited.
--
JamesHarrison - 20 Nov 2001
Do you run under mod_perl? that may be the problem...
--
ColasNahaboo - 22 Nov 2001
Why is it a problem running TWiki using mod_perl?
I have also set up 2 separate TWiki installations on one machine (Redhat 7.2, TWiki 1Sep2001). Apache has been set up with 2 name-based virtual hosts. The 2 TWiki installations are totally separated, and in the beginning everything worked fine.
I then added the lines to .htaccess of site 1 to make it use mod_perl as shown on the
ModPerl page. I tested and benchmarked it and site 1 still worked fine. I then added the relevant lines to site 2, and then site 2 did not show the right pages. I removed the lines from site 2 again and everything worked well again.
I now have the situation where site 1 is running
with mod_perl and site 2 is running
without mod_perl. I guess I ought to try and see what happens if I switch site 1 to be running
without mod_perl and site 2
with mod_perl.
But why is it a problem running more than one site with mod_perl. Is there a configuration issue somewhere after all?
--
BjornGraabek - 08 Dec 2001
Hi Bjorn - my guess is that mod_perl loads in the TWiki.cfg variable values once and keeps them in memory - the use of mod_perl is global, so once the module is loaded the variables will persist across all TWiki CGI script invocations (though I have not tried this). So having two installations using the same Apache+mod_perl installation would seem to be the problem. It would be useful to run
testenv on both installations, with and without mod_perl, to see what is happening.
--
RichardDonkin - 10 Dec 2001
Exactly. The workaround would be to run 2 separate apache web servers, or, if possible, 2 different mod_perl instances... or one under mod_perl and one under fastcgi
http://www.fastcgi.com/
, or under 2 fastcgi processes if that is possible.
The real solution would involve recoding TWiki to use config variables in a different way, but I have no obvious solution...
--
ColasNahaboo - 11 Dec 2001
For your info, this problem is under discussion (March 2002) on
ModPerl and
ModPerlStickyPages. Hopefully there will be a patch soon.
--
AndyPryke - 24 Mar 2002
Hi, all. Just to let you know this problem still exists in the latest Beta & Alpha (Jan 03). I'm running into it, and it is very annoying. So those of you in the future that are wanting to know if it has been fixed yet, the answer's 'no'
--
AdamTheo - 08 Jan 2003
I have found a workaround: use
SpeedyCGI ! You can have multiple separate instances of perl running concurrently with it
--
ColasNahaboo - 09 Aug 2003
I'm searching my memory here, but I'm sure we've done this at work before using something like Apache virtual servers.
Even if this is not the case then the problem existing with config global variables, not globals used elsewhere in TWiki as these are (should be) initialised for each separate http call.
--
JohnTalintyre - 12 Sep 2003
--
JohnTalintyre - 12 Sep 2003