[pmwiki-users] Why doesn't this installation sequence work?
H. Fox
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
FarmSecurity page...
This is just PmWiki, unpacked into a directory with pub/ moved out and
a farmconfig.php created in local/:
/usr/local/pmwiki/
|-- pmwiki.php
|-- wikilib.d/ (default pages)
|-- cookbook/ (farm-wide cookbook)
|-- docs/
|-- scripts/
`-- local/
`-- farmconfig.php (farm-wide configuration file)
Here are the farm's pub/ directory and two wikis, created from scratch:
/var/www/ Webroot
|
|-- pub/ (wikis' publicly-accessible files)
|
|-- wiki1/
| |-- 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)
|
`-- wiki2/
|-- 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";
$FarmPubD="/var/www/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
and index.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
<?php
# Disable the home wiki for this farm.
header('HTTP/1.0 403 Forbidden');
exit('<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD><TITLE>403 Forbidden</TITLE></HEAD>
<BODY><H1>403 Forbidden</H1>
<P>You don't have permission to access the requested file.
</BODY></HTML>');
> Now I have to go polish the stein in my beer mug collection.
You wouldn't want a stained stein, now would you?
Hagan
More information about the pmwiki-users
mailing list