Tags:
create new tag
view all tags
Currently subject to TWiki.Refactoring into TWikiOnWindows by MartinCleaver

Twiki is istalled in 'C:\Twiki'.

I configured apache with it's httpd.conf in the following way:

The LoadModule statements were activated

Alias /twiki/ "C:/twiki/"
ScriptAlias /twiki/bin/ "C:/twiki/bin/"
<Directory  "C:/twiki/bin/">
    AllowOverride None
    Allow From All
    Options  ExecCGI
    SetHandler cgi-script 
</Directory>

Quick and Simple Windows Install

Notes from a lesser animal

These notes are additional to Svens - Im only a newbie at this and have never touched a Web Server before, so had to rely on some great help and encouragement from Sven and Peter to get my TWiki going ..

Destructions

a) go to the place where you installed perl

b) locate the 'conf' folder and the httpd.conf file within it

c) make a backup of this file BEFORE you edit it..

d) look for the section :-

#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "E:/perl/htdocs"

e) Since I installed TWiki at e:/twiki, this is what the 'DocumentRoot' Tag should read (if youre using Apache for other things as well, you'll have to figure out how to do this .... ), but for the meantime,

f) comment out (using'#') the original DocumentRoot Tag, and Enter a Tag pointing to where you installed Twiki, so you could end up with :-

#DocumentRoot "E:/perl/htdocs"
DocumentRoot "E:/twiki"

g) Now track down through httpd.conf, till you find :-

#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "E:/perl/htdocs">

and following the same reasoning as (f), you should end up with :-

# <Directory "E:/perl/htdocs">
<Directory "E:/twiki">

note that the brackets around the Directory Tags above are actually 'greater' and 'lesser' signs '<' and '>' , but I had to use '(' and ')' here because the Directory tags weren't displaying ...

  • [ RichardDonkin ] - I fixed this by using &lt; for the '<' symbol, which lets you use '>' unmodified.

h) now, back up, and then open up your perl\cgi-bin\wikicfg.pm

the $scriptURLPath and $PubUrlPath are now relative to the changes you just made in (f) ... which means you can specify

$scriptUrlPath = "/bin"
$pubUrlPath = "/pub"

again, for rank amateurs like me, I always comment out the original lines before making such changes (it helps backtrack if it gets messed up, and if worse comes to worse, you did make a backup didn't you?)

i) if the Apache is running, it will have to be stopped and restarted to make the above changes effective.

j) if your Wiki is not functioning quite as expected (mine was sort-of working, but not displaying graphics), a look at

perl\logs\error.log

will often highlight things (this is how I found out I was pointing to the wrong place and any change I made to those paths in wikicfg.pm wasnt pointing to the correct spot.....)

-- GarthLancaster - 30 May 2001

In case you are using Apache on Windows and login after registration does not work read ApachePasswords.

  1. Authentication Problems:
    1. had to hack register.pl to configure an unencrypted passwd as this is what apache seems to require.
    2. Is there a way to make it authenticate with encrypted ones? Apache docs talk of using MD5 but apache seems to use plaintext and TWiki writes as using crypt().
    3. On the Twiki site there are instructions as to how to get to use MD5.


NOTE: It seems from step (a) of Garth's instructions above, and later steps, that you installed Apache and Perl into the same directory, or at least that htdocs was created under Perl. For most standard Apache installs, step (a) should read:

  • Go to the Apache installation directory, e.g. c:\apache or c:\Program Files\Apache.

Most of the references above to Perl directories, e.g. c:\perl\cgi-bin, would normally refer to the Apache directory, e.g. c:\apache\cgi-bin. By the way, I'd recommend installing to c:\apache as this saves a lot of typing later!

I always copy any config file foo.conf to foo.conf.ori - this makes it easier to locate which config files I have changed at a later date. Installing Cygwin is recommended so you can run 'diff' on the .ori and new files.

I've just been setting up Apache on Windows for a non-TWiki project - the hardest thing to get right is the security, but at least by default Apache is fairly secure.

A useful command is apache -k restart - this tells the running Apache process to re-read the config. If it fails to accept the config, you will have to restart apache as normal via the Start menu.

-- RichardDonkin - 13 Aug 2001


Environment Variables

This note certainly applies to TWiki and on Windows 98, and probably applies to other Win32 installations.

When following the instructions in TWikiOnWindows for installing RCS, you are required to set up a number of environment variables to make it work:

  • TMP
  • TEMP
  • RCSINIT
  • TZ
Optionally:
  • RCS_LF_ONLY
  • LOGNAME

However Apache by default does not pass environment variables onto the script, this needs to be enabled in the httpd.conf file. This can be enabled by adding:

<IfModule mod_env.c>
   PassEnv TEMP TMP RCSINIT RCSLOAD RCS_LF_ONLY TZ LOGNAME
</IfModule>

This can be placed anywhere outside of any other conditional statement. I placed mine after the mod_dir check for DirectoryIndex In Apache binary distribution 1.3.19 mod_env is bound in by default, however it may be worth checking this with a 'print $ENV{'TEMP'} statement in testenv. If this doesn't work (maybe you have ClearModuleList set) then try:

AddModule mod_env.c

Up with the AddModule sections.

Note: There there is no point in passing PATH through to the script, as TWiki 'Make(s) %ENV safer for CGI' in wiki::initialise.

I have made an additional note about the use of PATH and LOGNAME in TWikiOnWindows

-- AndyYelland - 17 Aug 2001

I've just upgraded the TWiki install from my 98 machine onto our 2000 server and encountered an additional problem with the above note.

For some reason Apache running as a service on Windows 2000 does not pass the environment variables through to the CGI even with the above line. To combat this I now define the environement variables in the httpd.conf file as follows:

<IfModule mod_env.>
   SetEnv TZ GMT0BST
   SetEnv RCSINIT -x,v/
   SetEnv TEMP e:/rcs/rcstemp
   SetEnv TMP e:/rcs/rcstemp
   SetEnv LOGNAME nobody
   SetEnv HOME e:/twiki
</IfModule>
I have not got NT 4 here to know whether the same applies, and have not tried running Apache in a console under 2000 with debugging prints to see what happens. -- AndyYelland - 21 Aug 2001

I've added SetEnv HOME ... above. This avoid errors from Net::Config.pm

-- JohnTalintyre - 05 Sep 2001

From testing for WindowsInstallCookbook (which I recommend if you want an easy install on Windows using Apache!), and from the Apache docs - you only need PassEnv to pass through an externally-set environment variable; SetEnv sets and passes through the variable (like setenv in the C shell).

I've fixed this in Andy's config above.

-- RichardDonkin - 29 Mar 2002

Another alternative to the outlines above is to use the TWikiUnixInstaller which now supports cygwin/apache.

-- MichaelSparks - 20 Jul 2003

Topic attachments
I Attachment History Action Size Date Who Comment
Perl source code filepl WinNTSetup.pl r2 r1 manage 3.3 K 2001-12-07 - 14:22 UnknownUser  
Microsoft Executable fileexe egrep.exe   manage 80.0 K 2001-06-02 - 13:34 UnknownUser  
Microsoft Executable fileexe fgrep.exe   manage 80.0 K 2001-06-02 - 13:34 UnknownUser  
Edit | Attach | Watch | Print version | History: r15 < r14 < r13 < r12 < r11 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r15 - 2003-07-29 - RichardDonkin
 
  • 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.