[pmwiki-users] Why doesn't this installation sequence work?
haganfox at users.sourceforge.net
Tue Mar 21 15:35:19 CST 2006
On 3/21/06, Neil Herber <nospam at eton.ca> wrote:
> The structure you drew looks way too complicated. Every wiki admin
> needs FTP access to 2 directories.
I agree it seems like there's unnecessary complication. The ASCII art
is a good idea for visually presenting an outside-the-webroot
installation though. I created another diagram to put in the
This is just PmWiki, unpacked into a directory with pub/ moved out and
a farmconfig.php created in local/:
|-- wikilib.d/ (default pages)
|-- cookbook/ (farm-wide cookbook)
`-- farmconfig.php (farm-wide configuration file)
Here are the farm's pub/ directory and two wikis, created from scratch:
|-- pub/ (wikis' publicly-accessible files)
| |-- index.php (wrapper script)
| |-- wiki.d/ (wiki's page storage)
| |-- local/ (wiki's local configuration)
| | |-- config.php (...for the entire wiki)
| | |-- Group.php (...for the Group wikigroup)
| | `-- Group.Name.php (...for the Group.Name page)
| |-- cookbook/ (wiki's recipes)
| |-- uploads/ (wiki's page attachments)
| `-- pub/ (wikis' publicly-accessible files)
|-- index.php (wrapper script)
|-- wiki.d/ (wiki's page storage)
|-- local/ (wiki's local configuration)
| |-- config.php (...for the entire wiki)
| |-- Group.php (...for the Group wikigroup)
| `-- Group.Name.php (...for the Group.Name page)
|-- cookbook/ (wiki's recipes)
|-- uploads/ (wiki's page attachments)
`-- pub/ (wikis' publicly-accessible files)
It works with my tiny patch to skins.php and this farmconfig.php,
where the last line is new:
<?php if (!defined('PmWiki')) exit();
$FarmPubDirUrl = "http://example.com/pub";
> I have a very easy way to create a farm with every wiki in the farm
> able to have its own totally private skins etc.
> 1) Do a standard, full install to directory1
> 2) Add the farmconfig file to directory1
> 3) In the .htaccess file for directory1, deny access to pmwiki.php
Easier and better than that is to put this in both local/config.php
<?php header('HTTP/1.0 403 Forbidden'); exit;
That gets the job done. It's easy to understand and works on servers
where you can't use .htaccess.
If you want to present something besides a blank page, use something like
# Disable the home wiki for this farm.
header('HTTP/1.0 403 Forbidden');
exit('<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<P>You don't have permission to access the requested file.
> Now I have to go polish the stein in my beer mug collection.
You wouldn't want a stained stein, now would you?
More information about the pmwiki-users