Installer capabilities & overview

This installer script is designed to install Foswiki in an .htaccess-controlled Apache environment, typical of shared hosting servers. This installer sets up a secured system along with speed optimizations such as automatic FastCGI web accelerator support, mod_deflate for improved network performance, and optional cookie-free domain support for pub attachments (optimizations are dependent on which features your hosting provider has enabled in Apache, and are automatically enabled and disabled based on services available).



info Although this script was developed on a dreamhost server, it is designed to be generic enough to work on any "typical" shared hosting setup with the caveat that "there is no such thing as portable code, only code that has been ported." So, please provide feedback if modifications are required to get this working on your web host!

Installation overview

Installation is quick and straightforward: cd to the directory which you would like to locate Foswiki ( ~/ or ~/, for example), download and untar the script, then run the script. To complete installation, all that you need to do is follow the prompts and answer two questions: domain name and the wiki webmaster email address (because that's required for registration).

Perform the installation

warning Make sure you run the script from the directory path you want to become the root of the Foswiki installation, as the distribution will be extracted in that directory. Nothing above the current directory will be modified, and the script avoids overwriting existing files.

$ wget ''
$ tar xzf Foswiki-1.0.10-SharedHosting-3.tgz
$ perl

Installation screenshots

Installation process

After running the script, proceed to configure to complete the installation:

Access configure with the generated password screen capture 2010-2-9-3-28-11.png
Configuration (should see no warnings or errors) screen capture 2010-2-9-3-34-46.png
Save with same password used to access configure screen capture 2010-2-9-3-38-36.png
Changes saved screen capture 2010-2-9-3-39-20.png
Your wiki, ready to go!

What this script does

For those interested in the technical details of what this script does, it performs the following actions:
  • unpacks and installs the Foswiki 1.0.10 distribution files
  • creates lib/LocalLib.cfg: sets up directory configuration
  • generates a secure password to use for both configure and for sudo Administrator login within the wiki
  • seeds data/.htpasswd with the admin account for configure
  • (foswiki root)/.htaccess: sets up an apache Redirect to the wiki ( /bin/view)
  • bin/.htaccess: sets up url's, directory names, cofigure user, FastCGI support, mod_deflate support for the .html, .xml, and text files that are generated by the scripts in the bin directory
  • unpacks and installs Foswiki:Extensions.FastCGIEngineContrib
  • pub/.htaccess: turns on mod_deflate (if present) and configures Apache's mod_expire to cache pub files, which are static files such as CSS, JavaScript, and images.
  • configures .htaccess for data, lib, locale, templates, tools, and working directories to prevent web-based access
  • creates lib/LocalSite.cfg: sets directories, wiki webmaster email, and configure password
If any of the files already exist, that step will be skipped. This means it is generally pretty safe to rerun after the install installation (perhaps first deleting lib/LocalSite.cfg in order to have it automatically (re)generated).

-- WillNorris - 09 Feb 2010, 13 Sep 2010


Please let us know which web hosting providers you've successfully used this with, or let us know about modifications that you had to make to get it working for your particular web hoster.

Fails due to lacking WWW:Mechanize. This looks like its used to set the admin password on the configure page. Can this be skipped or made optional? Installing on

Update: I commented out all the portions regarding WWW::Mechanize, and had to manually create my .htpasswd file because Drak doesn't have the htpasswd utility installed. Once performed it seemed to work. I'm configuring my new foswiki now!

-- RussellAdams - 20 Apr 2010

Fails due to lacking WWW:Mechanize on a plain debian installation. Works after installing this module. Maybe the script should check what's missing first...

-- AlexanderNicolovius - 02 May 2010

Isn't it about time to upgrade this to 1.1.3?

-- KennethLavrsen - 20 Apr 2011

I am using
  • cd /home/user/www/cgi-bin/foswiki/
  • wget the tgz file
  • tar the tgz file
  • perl
    • Have problem with WWW::Mechanize, but support installed it
    • Have problem with htpasswd, and support told that it's not available to hosted user, so I create it myself locally and drop it to foswiki/data
  • Static content can not be served from cgi-bin directory, fix it:
    • Move /home/user/public_html/cgi-bin/foswiki/pub -> /home/user/public_html/foswiki/pub
    • {PubUrlPath} = /foswiki/pub
    • {PubDir} = /home/user/public_html/foswiki/pub
  • Still testing ...

-- LeoSusanto - 24 Apr 2011


BasicForm edit

TopicClassification SupplementalDoc
Topic Summary Describes an experimental approach to installing Foswiki on shared hosting environments
Interested Parties
Related Topics SharedHosting
Topic revision: r16 - 15 Mar 2012, PaulHarvey - This page was cached on 20 Sep 2017 - 20:50.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License