Skip to content

Commit

Permalink
Item255: detox side files, example conf and scripts, and some more do…
Browse files Browse the repository at this point in the history
…c topics

git-svn-id: http://svn.foswiki.org/trunk@877 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
CrawfordCurrie authored and CrawfordCurrie committed Nov 23, 2008
1 parent 06bc5db commit 404eae3
Show file tree
Hide file tree
Showing 13 changed files with 53 additions and 71 deletions.
16 changes: 8 additions & 8 deletions core/bin/.htaccess.txt
@@ -1,6 +1,6 @@
# bin/.htaccess.txt
#
# Controls access to TWiki scripts - to make Apache use it, rename this
# Controls access to Foswiki scripts - to make Apache use it, rename this
# file to '.htaccess' and REPLACE THE FOLLOWING STRINGS WHEREVER YOU SEE
# THEM IN THIS FILE WITH PATHS SPECIFIC TO YOUR INSTALLATION.
# Most required values can be seen in the Path Settings section of
Expand All @@ -14,12 +14,12 @@
# e.g. admin root superhero

# We set an environment variable called anonymous_spider
# Setting a BrowserMatchNoCase to ^$ is important. It prevents TWiki from
# including its own topics as URLs and also prevents other TWikis from
# Setting a BrowserMatchNoCase to ^$ is important. It prevents Foswiki from
# including its own topics as URLs and also prevents other Foswikis from
# doing the same. This is important to prevent the most obvious
# Denial of Service attacks.
# You can expand this by adding more BrowserMatchNoCase statements to
# block evil browser agents trying the impossible task of mirroring a twiki
# block evil browser agents trying the impossible task of mirroring a Foswiki
# Example:
# BrowserMatchNoCase ^SiteSucker anonymous_spider
BrowserMatchNoCase ^$ anonymous_spider
Expand All @@ -34,7 +34,7 @@ Deny from env=anonymous_spider
# if your web hosting provider permits this. Remove if using mod_perl.
SetHandler cgi-script

# Password file for TWiki users
# Password file for Foswiki users
#

# Authentication type (htpasswd file) (comment out this if you configure htpasswd / LDAP support)
Expand Down Expand Up @@ -62,8 +62,8 @@ AuthType Basic

# File to return on access control error (e.g. wrong password)
# By convention this is the UserRegistration page, that allows users
# to register with the TWiki. Apache requires this to be a *local* path.
# Comment this out if you setup TWiki to completely deny access to WikiGuest
# to register with the Foswiki. Apache requires this to be a *local* path.
# Comment this out if you setup Foswiki to completely deny access to WikiGuest
# in all webs or change the path to a static html page.
ErrorDocument 401 {ScriptUrlPath}/view/Foswiki/UserRegistration
# Alternatively if your users are all known to be registered you may want
Expand Down Expand Up @@ -97,7 +97,7 @@ Options ExecCGI FollowSymLinks
# They do their own validation of the user and therefore
# should not use "require valid-user"

# When using Apache type login the following defines the TWiki scripts
# When using Apache type login the following defines the Foswiki scripts
# that makes Apache ask the browser to authenticate. It is correct that
# scripts such as view, resetpasswd & passwd are not authenticated.
# (un-comment to activate)
Expand Down
2 changes: 1 addition & 1 deletion core/bin/LocalLib.cfg.txt
Expand Up @@ -10,7 +10,7 @@
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# LocalLib.cfg: local path settings for TWiki
# LocalLib.cfg: local path settings for Foswiki

use vars qw( $twikiLibPath $CPANBASE );

Expand Down
12 changes: 6 additions & 6 deletions core/data/System/InstallationGuide.txt
Expand Up @@ -2,17 +2,17 @@
%STARTINCLUDE%
---+ Installation Guide

*The following is installation instructions for the TWiki 4.2 production release on an Apache web server on Linux.* Visit TWiki:Support.SupplementalDocuments for supplemental information for installing or upgrading TWiki, including notes on installing TWiki on different platforms, environments and web hosting sites.
*The following is installation instructions for the Foswiki 1.0.0 production release on an Apache web server on Linux.* Visit Foswiki:Support.SupplementalDocuments for supplemental information for installing Foswiki or upgrading from TWiki, including notes on installing Foswiki on different platforms, environments and web hosting sites.

If you are upgrading from a previous version of TWiki, you probably want to read =UpgradeGuide= instead.
If you are upgrading from TWiki, you are recommended to upgrade your TWiki to at least version 4.2.1 for upgrading to Foswiki.

Both this document and the !UpgradeGuide are also available in the root of the distribution as HTML files. For this reason links to pages inside your own TWiki are written like =%SYSTEMWEB%.WebHome= and not like live web links.
These installation instructions are also available online by following links from Foswiki:Support.Foswiki01x00x00.

%TOC%

---++ Preparing to install TWiki
---++ Preparing to install

Before attempting to install TWiki, you are encouraged to review the TWiki:System.AdminSkillsAssumptions. This guide assumes the person installing TWiki has, at a minimum, basic knowledge of server administration on the system on which TWiki is to be installed. While it is possible to install TWiki with FTP access alone (for example, on a hosted site), it is tricky and may require additional support from your hosting service (for example, in setting file ownership and installing missing perl CPAN libraries).
Before attempting to install Foswiki, you are encouraged to review the Foswiki:System.AdminSkillsAssumptions. This guide assumes the person installing TWiki has, at a minimum, basic knowledge of server administration on the system on which TWiki is to be installed. While it is possible to install TWiki with FTP access alone (for example, on a hosted site), it is tricky and may require additional support from your hosting service (for example, in setting file ownership and installing missing perl CPAN libraries).

To help setup a correct Apache configuration, you are very much encouraged to use the automatic tool Foswiki:Support.ApacheConfigGenerator which generates the contents for an Apache config file for TWiki based on your inputs.

Expand Down Expand Up @@ -290,7 +290,7 @@ The TWiki standard installation has relatively low browser requirements:

CSS and Javascript are used in most skins, although there is a low-fat skin (Classic skin) available that minimises these requirements. Some skins will require more recent releases of browsers. The default skin (Pattern) is tested on IE 6, Safari, and Mozilla 5.0 based browsers (such as Firefox).

You can easily select a balance of browser capability versus look and feel. Try the installed skins at =TWiki/SkinBrowser= and more at TWiki:Plugins.SkinPackage.
You can easily select a balance of browser capability versus look and feel. Try the installed skins in the [[skin browser]] and more at Foswiki:Extensions.SkinPackage.

---+++ Important note about TWiki Plugins

Expand Down
2 changes: 1 addition & 1 deletion core/data/System/InstantEnhancements.txt
Expand Up @@ -7,7 +7,7 @@ Many of these tips are based on setting some special [[WebPreferencesHelp][prefe

%S% We recommend implementing at least __some__ of these enhancements __right after installation__ to get a taste for what is possible. Some of these tips and enhancements _should_ be implemented before or during initial roll-out.

This may spark your imagination to *really* customize your site so that it's optimal for *your* users. Slightly more advanced customization tips can be found in Foswiki:Support.SupplementalDocumentation.
This may spark your imagination to *really* customize your site so that it's optimal for *your* users. Slightly more advanced customization tips can be found in Foswiki:Support.SupplementalDocuments.

%TOC%

Expand Down
17 changes: 4 additions & 13 deletions core/data/System/Plugins.txt
Expand Up @@ -121,7 +121,6 @@ Foswiki:Codev/StepByStepRenderingOrder helps you decide which rendering handler
* Keep the main plugin package as small as possible; create other packages that are loaded if and only if they are used. For example, create sub-packages of !BathPlugin in =lib/Foswiki/Plugins/BathPlugin/=.
* Avoid using preferences in the plugin topic; set =$NO_PREFS_IN_TOPIC= if you possibly can, as that will stop Foswiki from reading the plugin topic for every page. Use [[#ConfigSpec][Config.spec]] instead.
* Use registered tag handlers
* [[#MeasurePerformance][Measure the performance]] to see the difference

---+++ Version Detection

Expand All @@ -140,8 +139,8 @@ To eliminate the incompatibility problems that are bound to arise from active op
* Badly written plugins can open huge security holes in Foswiki. This is especially true if care isn't taken to prevent execution of arbitrary commands on the server.
* Don't allow sensitive configuration data to be edited by users. it is better to add sensitive configuration options to the =%Foswiki::cfg= hash than adding it as preferences in the plugin topic.
* [[#ConfigSpec][Integrating with <code>configure</code>]] describes the steps
* Foswiki:Plugins.MailInContrib has an example
* Foswiki:Plugins.BuildContrib can help you with this
* Foswiki:Extensions.MailInContrib has an example
* Foswiki:Extensions.BuildContrib can help you with this
* Always use the Foswiki::Sandbox to execute commands.
* Always audit the plugins you install, and make sure you are happy with the level of security provided. While every effort is made to monitor plugin authors activities, at the end of the day they are uncontrolled user contributions.

Expand All @@ -162,7 +161,7 @@ In particular, files that should be web-accessible (graphics, Java applets ...)

The plugin API handles the details of connecting your Perl module with main Foswiki code. When you're familiar with the [[#PluginAPI][Plugin API]], you're ready to develop plugins.

_The Foswiki:Plugins.BuildContrib module provides a lot of support for plugins development, including a plugin creator, automatic publishing support, and automatic installation script writer. If you plan on writing more than one plugin, you probably need it_.
_The Foswiki:Extensions.BuildContrib module provides a lot of support for plugins development, including a plugin creator, automatic publishing support, and automatic installation script writer. If you plan on writing more than one plugin, you probably need it_.

---+++ Creating the Perl Module

Expand All @@ -189,7 +188,6 @@ The plugin documentation topic contains usage instructions and version details.
* paste &amp; save new plugin topic on your site
1. *Customize* your plugin topic.
* Important: In case you plan to publish your plugin on Foswiki.org, use Interwiki names for author names and links to Foswiki.org topics, such as Foswiki:Main/%WIKINAME%. This is important because links should work properly in a plugin topic installed on any Foswiki, not just on Foswiki.org.
1. *Document* the performance data you gathered while [[#MeasurePerformance][measuring the performance]]
1. *Save* your topic, for use in [[#CreatePluginPackage][packaging]] and [[#PublishPlugin][publishing]] your plugin.

<blockquote style="background-color:#f5f5f5">
Expand All @@ -212,7 +210,7 @@ Check the plugins web on Foswiki.org for the latest plugin doc topic template. H
#CreatePluginPackage
---+++ Packaging for Distribution

The Foswiki:Plugins.BuildContrib is a powerful build environment that is used by the Foswiki project to build Foswiki itself, as well as many of the plugins. You don't *have* to use it, but it is highly recommended!
The Foswiki:Extensions.BuildContrib is a powerful build environment that is used by the Foswiki project to build Foswiki itself, as well as many of the plugins. You don't *have* to use it, but it is highly recommended!

If you don't want (or can't) use the !BuildContrib, then a minimum plugin release consists of a Perl module with a WikiName that ends in =Plugin=, ex: =MyFirstPlugin.pm=, and a documentation page with the same name(=MyFirstPlugin.txt=).

Expand All @@ -225,13 +223,6 @@ If you don't want (or can't) use the !BuildContrib, then a minimum plugin releas
* =data/Foswiki/MyFirstPlugin.txt=
* =pub/Foswiki/MyFirstPlugin/uparrow.gif=

#MeasurePerformance
---+++ Measuring and Improving the Plugin Performance

A high quality plugin performs well. You can use the Foswiki:Plugins.PluginBenchmarkAddOn to measure your Foswiki:Plugins.PluginBenchmarks. The data is needed as part of the Documentation Topic.

See also [[#FastPluginHints][Hints on Writing Fast Plugins]].

#PublishPlugin
---+++ Publishing for Public Use

Expand Down
2 changes: 1 addition & 1 deletion core/data/System/UserAuthentication.txt
Expand Up @@ -220,7 +220,7 @@ Template Login degrades to url re-writing when you use a client like dillo that

Finally, it would be really neat if someone was to work out how to use certificates to identify users.....

See Foswiki:Support.SupplementalDocumentation for more information.
See Foswiki:Support.SupplementalDocuments for more information.

%STOPINCLUDE%
__Related Topics:__ AdminDocumentationCategory, AccessControl
2 changes: 1 addition & 1 deletion core/data/System/WebAtomBase.txt
Expand Up @@ -8,7 +8,7 @@ There are several ways to find out what's new in each web:
1. Subscribed in WebNotify get notified of recent changes by e-mail
1. Use a news readers such as Foswiki:Extensions.HeadlinesPlugin to display the recent changes
* The source can be a RSS 1.0 feed (WebRss) or ATOM 1.0 feed (WebAtom)
* Learn more at WebRssBase and Foswiki::Support.SupplementalDocumentation
* Learn more at WebRssBase and Foswiki::Support.SupplementalDocuments

---++ ATOM Feed Usage

Expand Down
34 changes: 17 additions & 17 deletions core/foswiki_httpd_conf.txt
@@ -1,11 +1,11 @@
# Example httpd.conf file for TWiki.
# Example httpd.conf file for Foswiki.
#
# You are recommended to take a copy of this file and edit
# the paths to match your installation. Then add:
# include "/home/httpd/twiki/twiki_httpd.conf"
# to the end of your main httpd.conf file.
#
# See also http://twiki.org/cgi-bin/view/TWiki.ApacheConfigGenerator
# See also http://foswiki.org/Support/ApacheConfigGenerator
# that helps you configure Apache

# The first parameter will be part of the URL to your installation e.g.
Expand All @@ -24,28 +24,28 @@ ScriptAlias /twiki/bin/ "/home/httpd/twiki/bin/"
Alias /twiki/ "/home/httpd/twiki/"

# Block access to typical spam related attachments (.htm and .html files)
# Except the TWiki directory which is read only and does have attached html files.
# You should uncomment the two lines below if the TWiki is on the public Internet
# Except the Foswiki directory which is read only and does have attached html files.
# You should uncomment the two lines below if the Foswiki is on the public Internet
#SetEnvIf Request_URI "twiki/pub/.*\.[hH][tT][mM]?$" blockAccess
#SetEnvIf Request_URI "twiki/pub/TWiki/.*\.[hH][tT][mM]?$" !blockAccess
#SetEnvIf Request_URI "twiki/pub/Foswiki/.*\.[hH][tT][mM]?$" !blockAccess

# We set an environment variable called blockAccess.
#
# Setting a BrowserMatchNoCase to ^$ is important. It prevents TWiki from
# including its own topics as URLs and also prevents other TWikis from
# Setting a BrowserMatchNoCase to ^$ is important. It prevents Foswiki from
# including its own topics as URLs and also prevents other Foswikis from
# doing the same. This is important to prevent the most obvious
# Denial of Service attacks.
#
# You can expand this by adding more BrowserMatchNoCase statements to
# block evil browser agents trying the impossible task of mirroring a TWiki.
# http://twiki.org/cgi-bin/view/TWiki.ApacheConfigGenerator has a good list
# block evil browser agents trying the impossible task of mirroring a Foswiki.
# http://foswiki.org/Support/ApacheConfigGenerator has a good list
# of bad spiders to block.
#
# Example:
# BrowserMatchNoCase ^SiteSucker blockAccess
BrowserMatchNoCase ^$ blockAccess

# This specifies the options on the TWiki scripts directory. The ExecCGI
# This specifies the options on the Foswiki scripts directory. The ExecCGI
# and SetHandler tell apache that it contains scripts. "Allow from all"
# lets any IP address access this URL.

Expand All @@ -59,20 +59,20 @@ BrowserMatchNoCase ^$ blockAccess
Options ExecCGI FollowSymLinks
SetHandler cgi-script

# Password file for TWiki users
# Password file for Foswiki users
AuthUserFile /home/httpd/twiki/data/.htpasswd
AuthName 'Enter your WikiName: (First name and last name, no space, no dots, capitalized, e.g. JohnSmith). Cancel to register if you do not have one.'
AuthType Basic

# File to return on access control error (e.g. wrong password)
# By convention this is the UserRegistration page, that allows users
# to register with the TWiki. Apache requires this to be a *local* path.
# Comment this out if you setup TWiki to completely deny access to WikiGuest
# to register with the Foswiki. Apache requires this to be a *local* path.
# Comment this out if you setup Foswiki to completely deny access to WikiGuest
# in all webs or change the path to a static html page.
ErrorDocument 401 /twiki/bin/view/TWiki/UserRegistration
ErrorDocument 401 /twiki/bin/view/Foswiki/UserRegistration
# Alternatively if your users are all known to be registered you may want
# to redirect them to the ResetPassword page.
# ErrorDocument 401 /twiki/bin/view/TWiki/ResetPassword
# ErrorDocument 401 /twiki/bin/view/Foswiki/ResetPassword

# Limit access to configure to specific IP addresses and or users.
# Make sure configure is not open to the general public.
Expand All @@ -89,7 +89,7 @@ BrowserMatchNoCase ^$ blockAccess
Satisfy Any
</FilesMatch>

# When using Apache type login the following defines the TWiki scripts
# When using Apache type login the following defines the Foswiki scripts
# that makes Apache ask the browser to authenticate. It is correct that
# scripts such as view, resetpasswd & passwd are not authenticated.
# (un-comment to activate)
Expand All @@ -105,7 +105,7 @@ BrowserMatchNoCase ^$ blockAccess
# user installing a .htaccess file that overrides these options.
# Finally all execution of PHP and other scripts is disabled.

# Note that files in pub are *not* protected by TWiki Access Controls,
# Note that files in pub are *not* protected by Foswiki Access Controls,
# so if you want to control access to files attached to topics, you may
# need to add your own .htaccess files to subdirectories of pub. See the
# Apache documentation on .htaccess for more info.
Expand Down
6 changes: 3 additions & 3 deletions core/pub-htaccess.txt
@@ -1,9 +1,9 @@
# Sample '.htaccess' file for 'pub' subdirectory

# Controls access to TWiki 'pub' subdirectory - copy this into 'pub',
# Controls access to Foswiki 'pub' subdirectory - copy this into 'pub',
# naming it '.htaccess', to have Apache use it.

# This is useful if you install TWiki on a web host, or an intranet host
# This is useful if you install Foswiki on a web host, or an intranet host
# where you can't edit the Apache http.conf file. If you can edit the
# http.conf file, just set the 'Allow from all' there (or locate these
# directories outside the Web-visible directory tree.)
Expand All @@ -20,7 +20,7 @@ Allow from all
Options None

# We need to protect the entire pub directory tree against any kind of script execution
# TWiki has a renaming protection scheme that alters certain file names to prevent
# Foswiki has a renaming protection scheme that alters certain file names to prevent
# script execution but it may not be 100% safe only to rely on this. The safest
# protection is to disabled all scripting.

Expand Down

0 comments on commit 404eae3

Please sign in to comment.