From fc1b4261751d9ee6578a7119a41a70c5af5c0982 Mon Sep 17 00:00:00 2001 From: Gustav Eek Date: Fri, 4 Oct 2019 10:29:19 +0200 Subject: [create-a-wiki] Add page on additional considerations Add the page *create-a-wiki/additional.mdwn* containing some additional not mandatory configurations of the preview wiki. With this all parts of the outdated *wiki-preivew.mdwn* are covered. --- create-a-wiki/additional.mdwn | 64 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 create-a-wiki/additional.mdwn diff --git a/create-a-wiki/additional.mdwn b/create-a-wiki/additional.mdwn new file mode 100644 index 0000000..3c912a8 --- /dev/null +++ b/create-a-wiki/additional.mdwn @@ -0,0 +1,64 @@ +--- +title: Additional considerations for a Fripost wiki preview +... + +Here follows a few additional configuration considerations. These are +not mandatory for a naked preview setup. To follow instructions, +however, a setup according +to [Create a Fripost wiki preview](/create-a-wiki-preview) is +presumed. + +[[!toc]] + +Absolute paths +============== + +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: + +``` +cat /etc/nginx/sites-available/localhost.fripost.conf \ + | sed 's/\.localhost/\.org/g' \ + | sudo tee /etc/nginx/sites-available/org.fripost.conf +sudo ln -s -r -t /etc/nginx/sites-enabled/ /etc/nginx/sites-available/org.fripost.conf +sudo nginx -t && sudo systemctl restart nginx.service +``` + +Modify the */etc/hosts* file: + +``` +sed -n '/fripost.localhost/ {s/\.localhost/.org/g; p}' < /etc/hosts | sudo tee /tmp/hosts +grep -q wiki.fripost.org /etc/hosts \ + || sudo sed -i '/::1.*fripost.localhost/ r /tmp/hosts' /etc/hosts +``` + +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. + + +Public www locations (userdir) +============================== + +For to be able to access `http://localhost/~user` the "userdir" +functionality is needed. For Nginx, put the following in e.g. +*/etc/nginx/sites-available/localhost*: + +``` +server { + location ~ ^/~(.+?)(/.*)?$ { + alias /home/$1/public_html$2; + index index.html index.htm + autoindex on; + } +} +``` + +This is of limited use in the context of Fripost's wiki. -- cgit v1.2.3