Yep, the 212 IP belongs to the server where I have Nginx and TiddlyWiki
installed, so that's why I set the same IP in the host parameter.  The
server is headless, so with this configuration I can access the web page
from any other computer on the same network.  As for the "try_files $uri
$uri/ @proxy =404;" line, I think I picked this up from one of the various
pages I used to research the configuration.  According to the default nginx
file the, concerning "try_files" line:  First attempt to serve request as
file, then as directory, then fall back to displaying a 404.  @proxy was a
later addition.

On Fri, Feb 19, 2021 at 3:25 AM Petri M. <demoniwa...@gmail.com> wrote:

> This 192.168.1.212 is the IP of the server where the nginx and TW are
> running? The thing is that the docs say that the "host" parameter is "...
> *host* is the IP address on which the server listens" and " *n.n.n.n* -
> listens for connections on the network interface with the specified IP
> address". Afaik usually this is just 127.0.0.1 if you are connecting from
> the same computer and it should be the same 127.0.0.1 in nginx as well.
> Though I don't know, I guess it does not make a difference.
>
> Though I am curious about the try_files $uri $uri/ @proxy =404; command
> you have there. I do not know about nginx but are you sure you need this?
> What is this @proxy? You might want to take a peek at how that works.
>
> -Petri
> On Friday, February 19, 2021 at 12:24:34 AM UTC+2 eirich...@gmail.com
> wrote:
>
>> 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 a topic in the
> Google Groups "TiddlyWiki" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/tiddlywiki/SyQq-Xr8TR4/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> tiddlywiki+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/tiddlywiki/22fd3dca-b972-4e73-9ca9-26b3bafcc49an%40googlegroups.com
> <https://groups.google.com/d/msgid/tiddlywiki/22fd3dca-b972-4e73-9ca9-26b3bafcc49an%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CAGR0pQiOjRpBUdBifYgDFOLe%3Dn_%3DrgmZ7%3DuMYdWKTQHJMXZQ0Q%40mail.gmail.com.

Reply via email to