summaryrefslogtreecommitdiffstats
path: root/create-a-wiki
diff options
context:
space:
mode:
authorGustav Eek <gustav.eek@fripost.org>2019-10-04 10:29:19 +0200
committerGustav Eek <gustav.eek@fripost.org>2019-10-04 10:36:45 +0200
commitfc1b4261751d9ee6578a7119a41a70c5af5c0982 (patch)
tree17a9ea3a5025a5fe46c6bfc7ee933b33e8a230e7 /create-a-wiki
parentadf391ec2933ebebf594b849c4f42bb7972cbf78 (diff)
[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.
Diffstat (limited to 'create-a-wiki')
-rw-r--r--create-a-wiki/additional.mdwn64
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.