I'm not sure what you mean by initialised. I did re-install nodejs from the Node.js repository and am now running node v15.9.0/npm v7.5.4, and I installed Tiddlywiki via the directions given at tiddlywiki.com, with the global flag. tiddlywiki is installed in /usr/bin. My testwiki is still installed in /var/www/html and is owned by, and runs as www-data:www-data. I have it configured to start with the host IP:8080, so that it's not open to everywhere, and Nginx is running on the same server. It doesn't seem like the host should need to be set to 0.0.0.0. I am able access the wiki at the host IP:8080, and it seems to work fine. It's only when I try to access it through Nginx where it throws all the 400s.
On Thursday, February 18, 2021 at 12:00:59 AM UTC-8 Petri M. wrote: > Hi, > > Is your tiddlywiki initialised in the /usr/local/bin/tiddlywiki/ folder OR > is it at /usr/local/bin/tiddlywik/testwiki/? The first case is not correct, > so check this. Also you should double check that the wiki actually works > from local network before trying to get nginx in the mix. If it is running > on a vps or somewhere where you do not have local connection to then use > the host=0.0.0.0 command so you can connect to it via vps_ip:port from your > own computer. > > -Petri > > On Thursday, February 18, 2021 at 2:00:00 AM UTC+2 joshua....@gmail.com > wrote: > >> The TiddlyWeb syncadaptor plugin calls those URLs to interact with the >> node server. The node server loads tiddlers marked as "module-type: route" >> and maps them as handlers to those urls. The browser should be calling >> "/var/www/html/recipes/*default*/tiddlers.json" in order to get handled. >> If your wiki is loading, but the calls to "/status", etc are not getting >> back to the node server, then I'm not sure where the block would be. >> >> Hope that helps, >> Joshua Fontany >> >> On Wednesday, February 17, 2021 at 2:28:25 PM UTC-8 eirich...@gmail.com >> wrote: >> >>> Also, in the Nginx logs I see the following: >>> >>> 2021/02/17 14:22:32 [error] 4740#4740: *9 open() "/var/www/html/status" >>> failed (2: No such file or directory) >>> 2021/02/17 14:22:32 [error] 4740#4740: *13 open() >>> "/var/www/html/recipes/undefined/tiddlers.json" failed (2: No such file or >>> directory) >>> >>> I can definitely say there are no "status" or "recipies" directories or >>> files in /var/www/html, so this seems like the obvious reason for the 400 >>> errors, but why are they being looked for? >>> >>> On Wednesday, February 17, 2021 at 2:19:40 PM UTC-8 Charles Anderson >>> wrote: >>> >>>> Honestly, I didn't know 0.0.0.0 could be used. I did try changing my >>>> startup command, but it didn't change the errors I get. Thanks for the >>>> info, though. >>>> >>>> On Monday, February 15, 2021 at 1:19:20 AM UTC-8 Petri M. wrote: >>>> >>>>> Hi, >>>>> >>>>> I think your "host" command might be wrong when starting the wiki. See >>>>> here >>>>> https://tiddlywiki.com/static/WebServer%2520Parameter%253A%2520host.html. >>>>> For instance, I have a Docker + Caddy setup and I am starting the wiki >>>>> with >>>>> "host=0.0.0.0" command. >>>>> >>>>> -Petri >>>>> On Sunday, February 14, 2021 at 2:42:45 AM UTC+2 eirich...@gmail.com >>>>> wrote: >>>>> >>>>>> I'm trying to run TiddlyWiki in node.js, behind Nginx such that I can >>>>>> spin up various wikis, all accessible by appending the name of the wiki >>>>>> to >>>>>> the end of the URL. >>>>>> >>>>>> - My test install is using Debian 10.8, Nginx 1.14.2-2+deb10u3, >>>>>> TiddlyWiki 5.1.23. >>>>>> - I'm running my testwiki from /var/www/html, as >>>>>> www-data:www-data. >>>>>> - I've created a unit file for it to run from systemd. >>>>>> - It is basically set to start as follows: node >>>>>> /usr/local/bin/tiddlywiki testwiki --listen host=192.168.1.212 >>>>>> port=8080 >>>>>> >>>>>> I've used the following links for information: >>>>>> >>>>>> - https://www.npmjs.com/package/tiddlywiki >>>>>> - http://www.brool.com/post/setting-up-tiddlywiki-behind-nginx/ >>>>>> - https://ssine.ink/posts/tiddlywiki-setup/ >>>>>> - >>>>>> https://blog.joshsullivan.io/2019/02/20/creating-online-tiddlywiki/ >>>>>> >>>>>> I've even tried looking at different posts in this group but either >>>>>> my setup is not like what I'm reading about, or the fixes for others are >>>>>> just not working for me. >>>>>> >>>>>> I seem to have no problem running the wiki on it's own. It is >>>>>> accessible via port 8080, and works as expected. However, when I try to >>>>>> put it behind Nginx, I can access it over port 80, but I immediately get >>>>>> 3 >>>>>> errors from syncer-browser-tiddlyweb: >>>>>> >>>>>> - XMLHttpRequest error code: 404 >>>>>> - Error retrieving skinny tiddler list: XMLHttpRequest error >>>>>> code: 404 >>>>>> - Sync error while processing save of '$:/StoryList': >>>>>> XMLHttpRequest error code: 404 >>>>>> >>>>>> Right now, my Nginx site file looks like this: >>>>>> >>>>>> server { >>>>>> listen 80; >>>>>> listen [::]:80; >>>>>> >>>>>> server_name _; >>>>>> >>>>>> root /var/www/html; >>>>>> index index.html; >>>>>> >>>>>> location /testwiki/ { >>>>>> try_files $uri $uri/ @proxy =404; >>>>>> proxy_pass "http://192.168.1.212:8080/"; >>>>>> proxy_set_header Host $host; >>>>>> proxy_set_header X-Real-IP $remote_addr; >>>>>> proxy_set_header X-Forwarded-For >>>>>> $proxy_add_x_forwarded_for; >>>>>> proxy_set_header X-Forwarded-Proto $scheme; >>>>>> } >>>>>> } >>>>>> >>>>>> I've changed this often while troubleshooting. I've just stuck with >>>>>> this configuration because I'm not longer seeing errors in the Nginx >>>>>> logs, >>>>>> so I'm starting to think Nginx is not the problem, but maybe the way I'm >>>>>> running the tw. >>>>>> >>>>>> Any help would be greatly appreciated. >>>>>> >>>>> -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/fd55beff-ea05-4365-a26c-4ef5e816ca2an%40googlegroups.com.