create new tag
, view all tags
This is a supplement to TWiki:TWiki.TWikiInstallationGuide; see also: MacOSXInstallNotes
[What follows is a rough sketch based on my notes from the last couple of deployments. I have another under way during which I'll flesh this out some more. -- ToddJonker]

TWiki works very well on Mac OS X version 10.3.x.

  • It is necessary to install the Developer Tools, either from CD or from Apple's Developer web site. This provides the RCS executables.

  • I recommend installing TWiki at the path /Library/WebServer/twiki
    • A clean alternative I prefer is to create an unprivileged ordinary user named twiki and put the twiki files in ~twiki/Sites/ -- DickFurnas - 05 Jan 2004
      • ~twiki provides a natural holding pen for various TWiki related downloads For example, I unzipped the twiki distribution into ~twiki/Virgin/ to serve as a reference copy against which to run diff to compare with the live install. The command diff -r Sites Virgin gives you the works. -- DickFurnas - 05 Jan 2004
      • Most TWiki maintenence which cannot be done from the web interface can be done as the twiki user. -- DickFurnas - 05 Jan 2004
      • Apache Configuration can be done as described in my notes below in a way that avoids being clobbered by Apple system updates. -- DickFurnas - 05 Jan 2004

  • Remember that the Apache server runs as user www, so all of the file-permissions must be set accordingly (the easiest way to repair the permissions is to click on the relock button in testenv)

Apache configuration

The webserver configuration file is at /etc/httpd/httpd.conf, which you need to edit as root. [modifying /etc/httpd/httpd.conf invites it being clobbered by Apple system updates. Apple's httpd.conf includes files in /etc/httpd/users/ see my further notes below for details. -- DickFurnas - 05 Jan 2004] Here is my current configuration, which makes TWiki visible via a URL like http://foobar.com/wiki/view

    ScriptAlias /wiki/ "/Library/WebServer/twiki/bin/"
    <Directory "/Library/WebServer/twiki/bin">
        AllowOverride All
        Options ExecCGI
        Allow from all

    Alias /wikifiles/ "/Library/WebServer/twiki/pub/"
    <Directory "/Library/WebServer/twiki/pub">
        AllowOverride None
        Options None
        Allow from all

    <Directory "/Library/WebServer/twiki/data">
        Deny from all
    <Directory "/Library/WebServer/twiki/templates">
        Deny from all

[ I had to replace part of the line:
ScriptAlias /wiki/ "/Library/WebServer/twiki/bin/"
to say: ScriptAlias /twiki/bin/ "/Library/WebServer/twiki/bin/"
in case this helps anyone else.GeorgeHarnish - 05 Jan 2004]

[ Apple's httpd.conf includes files found in /private/etc/httpd/users/ which simplifies configuration in a way that will not be clobbered when Apple makes updates to the system files.

I created a file /private/etc/httpd/users/twiki.conf which contains:

Listen 11235
NameVirtualHost *:11235
<VirtualHost *:11235>
ServerName twiki.ref2.net
DocumentRoot "/Users/twiki/Sites"

ScriptAlias /twiki/bin/ "/Users/twiki/Sites/bin/"
<VirtualHost *>
  DocumentRoot  "/Users/twiki/Sites"
  ServerName twiki.ref2.net
 Alias /twiki "/Users/twiki/Sites"
 <Directory "/Users/twiki/Sites/bin">
    Options +ExecCGI
    SetHandler cgi-script
    AllowOverride All
    Allow from all
 <Directory "/Users/twiki/Sites/pub">
    Options FollowSymLinks +Includes
    AllowOverride None
    Allow from all
 <Directory "/Users/twiki/Sites/data">
    deny from all
 <Directory "/Users/twiki/Sites/templates">
    deny from all
Note: the configuration above, also provides for access on port 11235 in addition to the usual port 80 . My TWiki installation is used both internally and externally to a LAN and did not want to interfere with external use of port 80 through a firewall. -- DickFurnas - 05 Jan 2004]

TWiki configuration

Beyond the normal configuration in lib/TWiki.cfg, you'll need to make the following changes:

#                   Unix egrep command :
$egrepCmd         = "/usr/bin/egrep";
#                   Unix fgrep command :
$fgrepCmd         = "/usr/bin/fgrep";

Fixing the RCS user

Due to some security features in MacOSX (and some other OSes too), you also need to make slight modifications to TWiki's RCS support to ensure that the revision-control files are accessed under the correct user name.

In first section of lib/TWiki.cfg, add:

#                   User name of the web server (for RCS)
$serverUID        = "www";

In lib/TWiki.pm,

  • at the end of the use vars qw block, add: $serverUID
  • in initialize, before # Make %ENV safer for CGI (around line 156) add these two lines:

    $ENV{'USER'} = $TWiki::serverUID;
    $ENV{'LOGNAME'} = $TWiki::serverUID;

See RcsNonStrictLocking for more details and history of this issue. As of 19 August 2002, this fix hasn't been integrated with the code base.

is this still needed?

-- WillNorris - 21 Aug 2004

No, it is fixed in DakarRelease

-- AndreUlrich - 16 Sep 2005


  • Perhaps one can avoid installing the Developer's Tools (needed for RCS) by using RCSLite, but I haven't tried it.

-- ToddJonker - 20 Aug 2002

Edit | Attach | Watch | Print version | History: r7 < r6 < r5 < r4 < r3 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r7 - 2005-09-16 - AndreUlrich
  • 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-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.