From 4bdcc9c1d9e22958d0ee208280f8099204941f20 Mon Sep 17 00:00:00 2001 From: Gustav Eek Date: Fri, 24 Apr 2015 21:58:19 +0200 Subject: Wiki-preview discriptions completed with some notes The descritpion on how to set up a wiki preview is completed with how to handle the need for to test absolute links through update the */etc/hosts* file. --- create-a-wiki.mdwn | 2 +- wiki-preview.mdwn | 35 ++++++++++++++++++++++++++++++++++- 2 files changed, 35 insertions(+), 2 deletions(-) diff --git a/create-a-wiki.mdwn b/create-a-wiki.mdwn index 14fb760..f47a881 100644 --- a/create-a-wiki.mdwn +++ b/create-a-wiki.mdwn @@ -7,7 +7,7 @@ with git. The components needed are * Ikiwiki -* Apache2 web server +* Apache2 or Nginx web server * Git **Table of Contents** diff --git a/wiki-preview.mdwn b/wiki-preview.mdwn index 05757c7..6334217 100644 --- a/wiki-preview.mdwn +++ b/wiki-preview.mdwn @@ -13,7 +13,12 @@ The basic idea is something like the following: . The Preview Ikiwiki Web Part . ~/public_html/fripost-wiki-preview -Where *~/git/fripost/wiki* is a local git repository with remote tracking of the main bare wiki repository *git.fripost.org:fripost-wiki.git*. A command will cause a local compiled version to be created, that is accessed by pointing the browser to *http\://localhost/~/fripost-wiki-preview/*. +Where *~/git/fripost/wiki* is a local git repository with remote +tracking of the main bare wiki repository +*git.fripost.org:fripost-wiki.git*. I define an alias command for +recompilation of the local version of the. The local preview version is accessed +by pointing the browser to +*http\://localhost/~/fripost-wiki-preview/*. First the basics. According to [[Create a Wiki|create-a-wiki]] do the following: @@ -43,3 +48,31 @@ You can also create an alias for to refresh the preview command. $ alias fripost-wiki-preview-refresh='ikiwiki -setup /home/gustav/lab-wiki/fripost-wiki.setup -refresh' +Many links on the Fripost wiki are absolute. That means that you +sometimes will not be able to follow homepage page and wiki page links +between your local preview wiki. For testing purposes, that can +sometimes be necessary. The best strategy is to edit your */etc/hosts* +table and make *fripost.org* and *wiki.fripost.org* point to +*localhost*. Of course your web server need to be configured to serve +those pages. This is my Nginx configuration: + + # fripost.org + server { + server_name fripost.org; + location / { + root /home/gustav/public_html/fripost-wiki/website; + location /static { root /home/gustav/public_html/fripost-wiki; } + } + } + + # wiki.fripost.org + server { + server_name wiki.fripost.org; + location / { + root /home/gustav/public_html/fripost-wiki; + } + } + +You might experience strange effects from that the web-browser has +cached DNS information. Search Internet for how to flush your +browser's DNS cache. -- cgit v1.2.3