TWiki dir: | >What it is: | >Where to copy: | >Example: | >
---|---|---|---|
twiki |
> start-up pages | >root TWiki dir | >/home/smith/twiki/ |
>
twiki/bin |
> CGI bin | >CGI-enabled dir | >/home/smith/twiki/bin |
>
twiki/lib |
> library files | > same level as twiki/bin |
> /home/smith/twiki/lib |
>
twiki/pub |
> public files | >htdoc enabled dir | >/home/smith/twiki/pub |
>
twiki/data |
> topic data | >dir secure from public access | >/home/smith/twiki/data |
>
twiki/templates |
> web templates | >dir secure from public access | >/home/smith/twiki/templates |
>
Redirect /urlpathto/twiki/index.html http://yourdomain.com/urlpathto/twiki/bin/view
AuthUserFile /filepathto/twiki/data/.htpasswd
ErrorDocument 401 /urlpathto/twiki/bin/oops/TWiki/TWikiRegistration?template=oopsauth
- %X% **NOTE:** If you had to add a `.cgi` or `.pl` file extension to the `bin` scripts, make sure to do the same for `edit`, `view`, `preview`, and all the other script names in `.htaccess`.
- %H% The browser should ask for login name and password when you click on the Edit link. In case `.htaccess` does not have the desired effect, you need to enable it: Add "AllowOverride All" to the Directory [[3]](http://httpd.apache.org/docs/mod/core.html#directory) section of `access.conf` for your `twiki/bin` directory.
- **This applies only if you have root access:** on hosted accounts, you shouldn't have this problem - otherwise, email tech support.
- %X% **NOTE:** In the TWiki distribution package, tje `twiki/data/.htpasswd.txt` file contains several TWiki core team user accounts and a guest user account. You probably want to remove those accounts by deleting the entries in `.htpasswd`. Do not remove the guest user if you want to allow guest logins.
2. **Copy** the [[TWikiRegistrationPub]] topic to [[TWikiRegistration]]. Do that by either editing the topics in theTWiki web, or by renaming the `.txt` and `.txt,v` files in the `twiki/data/TWiki` directory.
- %T% **HINT:** You can customize the registration form by deleting or adding input tags. The `name=""` parameter of the input tags must start with: `"Twk0..."` (if this is an optional entry), or `"Twk1..."` (if this is a required entry). This ensures that the fields are processed correctly.
- Register yourself in the [[TWikiRegistration]] topic.
- %X% **NOTE:** When a user registers, a new line with the username and encrypted password is added to the `data/.htpasswd` file. The `.htpasswd` file that comes with the TWiki installation includes user accounts for TWiki core team members that are used for testing on TWiki.org. You can edit the file and delete those lines.
- Create a new topic to check if authentication works.
- Edit the [[TWikiAdminGroup]] topic in the TWiki:Main web to include users with system administrator status.
- Edit the [[TWikiPreferences]] topic in the TWiki:TWiki web to set access privileges.
- Edit the [[WebPreferences]] topic in each web, if necessary: set access priviliges.
### Adding a New Web
To create a new web:
1. **Create** a new web data directory under `twiki/data` and check the file permission of the directory.
- Use a name consisting of characters `A..Z` , `a..z` but **_not_** in [[WikiNotation]]. (The name should start with one (or more) uppercase letters, but have no uppercase letters after the first group -- if it starts with a lowercase letter or is a [[WikiWord]], some features of TWiki will not work as expected.)
2. **Copy** all files from the `twiki/data/_default` directory to the new data directory, preserving the original files' owner, group and permissions (on Unix, use `cp -p`). The data files must be writable by the owner the CGI scripts are running on (usually, `nobody`).
- %T% **HINT:** You can set permissions of `.txt` and `.txt,v` files to `-rw-rw-rw-` (666) and then edit the topic using your browser; RCS will restore the file permissions correctly when saving the topic.
3. **Add** the new web to the web list (visible in the upper right corner of each topic) by editing the site-level preferences, [[TWikiPreferences]]:
- Add the new web to the `%WIKIWEBLIST%` variable.
4. **Update** the web settings by editing the WebPreferences topic of the new web:
- Customize the `%WEBTOPICLIST%` variable to contain the web-specific links you prefer.
- Set the WEBBGCOLOR variable to a color. The number represents the unique color for the web.
- Set Plugins, access privileges, custom variables, other web-level options (ex: `%WEBCOPYRIGHT%` can be set for an individual web).
5. **Add** the new web to the color-coded web directory table by editing the [[TWikiWebsTable]] topic.
6. **Test** the new web: view pages, create a new page.
That's it for a basic new web set-up!
Optionally, you can also:
- Create custom web-specific templates in a new `twiki/templates/Someweb` directory (otherwise, templates are inherited from `twiki/templates`).
- Add [[TWikiForms]] for form-based page input that's stored separately from the main free-form topic text.
%X% **NOTE:** User home topics are located in the %WIKITOOLNAME%.Main web - don't try to move them or create them in other webs. From any other web, user signatures have to point to %WIKITOOLNAME%.Main web, using a `Main.UserName` or `%MAINWEB%.UserName` format. (The `%MAINWEB%` variable is an advantage if you ever change the Main web name, but the standard `Main.UserName` is easier for users to enter, which is the bottom line!
## TWiki File System Info
See [[Appendix A: TWiki File System|Main/AppendixFileSystem]] for an installed system snapshot and descriptions of all files in the TWiki 01-Sep-2001 distribution.
-- [[PeterThoeny]] - 13 Sep 2001