Cookbook /
FarmSetupByExample-Talk
Summary: Talk page for Farm Setup By Example.
Maintainer: Hagan Fox
This space is for User-contributed commentary and notes. Please include your name and a date along with your comment.
Comments
- 15-Jun-2008 DaveG: Excellent tutorial. Since the context of the article is 'security' then you might want to add a section describing the permissions on the main directories and files.
- tamouse February 09, 2013, at 12:20 PM : I liked this write-up as well. Very informative. I've been implementing wiki farms for a while, and went off in another direction as driven by WikiFarmAlternative, then came back to doing it "standard" way. Still wanting to make the contents innaccessible to direct download (planning on implementing these under either lighttpd or nginx, which don't do .htaccess files) by putting them outside the field's DocumentRoot, I experimented a bit and came up with the following configuration:
- Farm is installed at
/var/farm/pmwiki-latest
→/var/farm/pmwiki-2.2.45
- Field is installed at
~/public_html/testfield
- contains:
- Farm is installed at
testfield/ |-- index.php `-- local/ `-- config.php `-- pub/
testfield/index.php
:
<?php include_once("/var/www/newfarm/pmwiki-latest/pmwiki.php");
testfield/local/config.php
:
<?php if (!defined('PmWiki')) exit(); // testfield config.php -- testing if everything for wiki can be set outside DocumentRoot define('tw_root','/home/tamara/testfield.data'); $WikiDir = new PageStore(tw_root.'/{$FullName}'); $WorkDir = tw_root."/workdir/"; $WikiLibDir = array(&$WikiDir, new PageStore(tw_root.'/wikilib2.d/{$FullName}'), new PageStore('$FarmD/wikilib.d/{$FullName}')); include_once(tw_root.'/local/config.php');
- Set up the out-of-root data area in
~/data/testfield.data
:
- Set up the out-of-root data area in
testfield.data/ |-- wiki.d/ |-- wikilib.d/ |-- workdir/ `-- local/ `-- config.php
testfield.data/local/config.php
:
<?php if(!defined('PmWiki')) exit(); //-- $WikiTitle is the name that appears in the browser's title bar. $WikiTitle = 'Testfield'; $WikiTag = "See if I can put a wiki's data outside the document root"; include_once("$FarmD/scripts/xlpage-utf-8.php"); // ... the rest of the standard field config stuff goes here
- For reference,
/var/www/newfarm/pmwiki-latest/local/farmconfig.php
contains:
- For reference,
<?php if(!defined('PmWiki')) exit("Must be run inside PmWiki"); $FarmPubDirUrl = '/pub/'; // symlinked from /var/www/newfarm/pmwiki-latest/pub to /var/www/htdocs/pub
Talk page for the Farm Setup By Example recipe (users).