[Pmwiki-users] Single wiki, multiple hostnames; restricting group access based on hostname
Thu Jan 22 21:46:31 CST 2004
The following is my solution to running multiple sites (currently 4)
First, I created a directory - PmWiki-MS - that is outside of public_html
Everything related to PmWiki that applies to all sites goes in this
directory. That would include PmWiki.php, etc. New versions of PmWiki are
Second, for each individual site I created a directory - PmWiki-VS - that
is within the public_html access area. Within this directory, I created
the following sub-directories:
local, wiki.d, and templates(a special directory I use for
FormTemplates). The directories for images and uploads are maintained
within the individual site directories at the same level as PmWiki-VS.
These directories contain files that are specific to the individual
sites. If I want to use a file contained in PmWiki-MS within a specific
site I just create a symbolic link from the individual site to the
PmWiki-MS directory using an appropriate local file name.
To gain access to PmWiki.php and its related files, I just create a
symbolic link from the individual sites to the PmWiki-MS directory. For
example, each site has a symbolic link to PmWiki.php in the PmWiki-MS
The symbolic links can be created for both directories and individual
files as needed.
If you need more info, let me know.
BTW, I use HtmlKit ( http://www.chami.com/html-kit/ ) to manage all this
remotely via a builtin FTP program. It works great even on my 26.4 modem
On Thu, 22 Jan 2004 20:19:15 -0800 (PST), Niall Durham
<niall_durham at yahoo.com> wrote:
> On our shared hosting server we have it setup where a single PmWiki
> installation powers several different PmWiki groups tied to different
> hostnames. E.g.,
> There are several benefits to this setup. However, one drawback is
> that one can access another group (another site, usually) from the
> "incorrect" host:
> Since the graphics and stylesheet are stored under the
> going-coastal.com host, the page is not rendered properly (as you can
> plainly see). Some of the web crawlers even index sites under the
> wrong hostname:
> The best solution I have come up with (I'm planning on coding it up
> tomorrow/next week) is to make a script that contains a mapping of
> PmWiki groups to (correct) hostnames. E.g. (pseudo markup),
> "GC" => "going-coastal.com",
> "TDS" => "thunderdata1.com",
> This script will check the REQUEST_URI to make sure the group and
> hostname match. If they don't, it will reformat the request with the
> proper hostname and return a 301 w/ the corrected URL.
> We want something that's easy to maintain as we add more sites and
> allows pre-existing incorrect hostname URLs will still work. With
> this approach, we only have to add one line to this "group ->
> hostname" script for each new site/group we add, and add an
> include_once() line to each customized group script.
> So... The reason I'm spamming everyone is to see if someone has
> already solved this problem and/or has a better solution/idea than
> I'm planning to implement.
> Thanks for reading this far,
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free web site building tool. Try it!
More information about the pmwiki-users