diff options
-rw-r--r-- | create-a-wiki/additional.mdwn | 64 |
1 files changed, 64 insertions, 0 deletions
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. |