-
-
Save astamicu/cb280fdd49e9c79fa23539db51331f99 to your computer and use it in GitHub Desktop.
Setting up Tiddlywiki behind Nginx (c.f. http://www.brool.com/post/setting-up-tiddlywiki-behind-nginx/)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
title: $:/config/tiddlyweb/host | |
$protocol$//$host$/tw/ | |
#create file in root/WIKINAME/tiddlers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#from https://grosinger.net/blog/2017-09-18-running-tiddlywiki/ | |
#create WIKINAME.service in /etc/systemd/system/ | |
[Unit] | |
Description=TiddlyWiki 5 Launcher | |
After=network.target | |
[Service] | |
ExecStart=/bin/sh -c "node /usr/local/bin/tiddlywiki /location/WIKINAME --server 8080 $:/core/save/all text/plain text/html USER PASS 0.0.0.0" | |
Type=simple | |
User=USER | |
Restart=on-failure | |
RestartSec=5 | |
StartLimitInterval=60s | |
StartLimitBurst=3 | |
[Install] | |
WantedBy=multi-user.target | |
#run | |
sudo systemctl enable WIKINAME.service | |
sudo systemctl start WIKINAME.service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tiddlywiki WIKINAME --server 8080 $:/core/save/all text/plain text/html username password 127.0.0.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#add in etc/nginx/sites-available/default | |
server { | |
# blah blah | |
location /tw/ { | |
proxy_pass http://127.0.0.1:9999/; | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
} | |
# blah blah | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment