Serving TiddlyWiki alongside other projects?

129 views
Skip to first unread message

kodomohimari

unread,
Sep 3, 2017, 4:55:46 PM9/3/17
to TiddlyWiki
Just discovered TiddlyWiki and I'm trying to set it up with nodejs on my Raspberry Pi (which I use for multiple purposes, including as a web development server).

The Pi is setup so that a folder named www in its Desktop corresponds to the landing folder when reached from a browser (i.e. pointing a browser at my IP reaches the Apache top page, from where I can access various projects stored in folders in www i.e. www/project1).

I'm trying to set up a situation where www/tdnotes is where the TiddlyWiki lives, and it can be reached as any other project on the Pi through [IP]/tdnotes. Two obstacles on my path:

- The folder location. If I just aim for [IP], I'm landing on my Apache top page (which is normal). If I aim for [IP]/tdnotes, I reach it through the Apache interface (i.e. I don't enter the TiddlyWiki, I just see its file structure externally).
- The port number. Is there a way to get rid of it i.e. just type [IP]/tdnotes instead of [IP]:8080/tdnotes? (For instance, I suppose changing the port number served by the TiddlyWiki server could work, but can it serve the same port as HTTP i.e. 80?)

I have a feeling the issues are interconnected, but I'm clueless as to how to proceed forward. Any hint would be greatly appreciated.

RichardWilliamSmith

unread,
Sep 3, 2017, 6:41:58 PM9/3/17
to TiddlyWiki
Hi,

You have Apache running on port 80 to serve static files. The Tiddlywiki server needs to run as a separate process alongside that, on a different port, and they are accessed as two different services.

If you really need to be able to access both services from the same port, I guess you will need to configure apache to pass requests to the other port (your google is as good as mine - https://stackoverflow.com/questions/8541182/apache-redirect-to-another-port ?) but I doubt it's worth the trouble.

Do you have the tiddlywiki process actually started on the Pi? Are you able to access it through :8080/tdnotes ?

Regards,
Richard

TonyM

unread,
Sep 3, 2017, 6:43:41 PM9/3/17
to TiddlyWiki
kodomohimari

Did you rename your tiddlywiki, in the folder to index.html so as to make it the default?

Tony


On Monday, September 4, 2017 at 6:55:46 AM UTC+10, kodomohimari wrote:

kodomohimari

unread,
Sep 3, 2017, 7:24:38 PM9/3/17
to tiddl...@googlegroups.com
At the current time, the TiddlyWiki runs in a node I start manually by going to www in CLI and is accessed through localhost:8080 (edit and save work well). localhost:8080/tdnotes gives a 404 (which I assume is because Apache isn't grabbing the 8080 port which means localhost:8080/tdnotes actually points to an entirely different location).

Having to add the :8080 is not "the" breaking issue, though (thanks for clarifying the ports thing) - I'm completely unable to reach the TiddlyWiki through any other computer than the Pi itself (i.e. through its own browser). Both [home-network-IP]:8080 [external-IP]:8080 seems to fall in an absolute limbo on my other computers.

Ultimately, I'd like to be able to setup multiple instances (for instance: :8080/tdnotes, :8080/project, etc.), but at the current time I can't reach any instance at all from outside the Pi.

Regards,
kodomohimari

kodomohimari

unread,
Sep 3, 2017, 7:29:37 PM9/3/17
to TiddlyWiki
Hmm... I have no such file in www/tdnotes, there is only the tiddlywiki.info file, a folder called tiddlers and in that folder a file called $__StoryList.tid. Which does seem odd now that I think about it, I don't even see the welcome screen here even though it's displayed when I access the TiddlerWiki through localhost:8080. Is there some aliasing going on?

RichardWilliamSmith

unread,
Sep 3, 2017, 10:08:23 PM9/3/17
to TiddlyWiki
is accessed through localhost:8080 (edit and save work well). localhost:8080/tdnotes gives a 404

Even though the files for your wiki may be in the path being served by Apache (at localhost:80/tdnotes or leave the 80 off altogether) but the wiki, as a wiki, is being served on a different process altogether - localhost:8080 and the root of what its serving is the tdnotes folder.

Just to be clear - the Tiddlywiki server would work even without Apache - they are completely independent things.

When you're accessing your Pi from another computer, it is no longer the "localhost". You need to use its ip address instead (probably assigned to it by your router). You should be able to find if by running ``ifconfig``

RichardWilliamSmith

unread,
Sep 3, 2017, 10:15:34 PM9/3/17
to TiddlyWiki
Sorry, I somehow missed this

Both [home-network-IP]:8080 [external-IP]:8080 seems to fall

The first one should work, assuming you mean the ip of the Pi itself (and not your router). 

If it doesn't connect and the numbers are all correct, it's probably something blocking the port. Presumably you are able to access the Apache server from the other computer just fine? You could try stopping Apache and running Tiddlywiki on port 80, since you know that's open, to see if the problem persists. 

kodomohimari

unread,
Sep 4, 2017, 7:07:06 AM9/4/17
to TiddlyWiki
Okay, trying again after a good night's sleep solved most/all of the problems. I can access the TiddlyWiki through [home-network-IP]:8080 and I've setup port forwarding on my router to be able to reach it through [external-IP]:8080 as well (the Pi already has a fixed home-network-IP because I needed its connections to be able to survive rebooting from outside the home). It looks like the problem was mostly that I was pointing my browser at [home-network-IP]:8080/tdnotes instead.

Guess next step is to setup an autolaunch in the cron-tables so the TiddlyWiki instance also survives rebooting (instead of having to manually boot it every time).

Any hint towards running multiple instances, in case I decide to dig in that direction? (The whole [IP]:8080/folder1 existing concurrently to [IP]:8080/folder2 thing.)

Thanks a lot for your help,
kodomohimari

Arlen Beiler

unread,
Sep 4, 2017, 7:26:49 AM9/4/17
to TiddlyWiki
One thing you may be interested in is a small nodeJS application called TiddlyServer which I wrote to handle this use case. It is a static file server, but if you open a folder that contains a tiddlywiki.info file, it automatically loads the folder into tiddlywiki and mounts it at that location.


If you run into any trouble or have ideas for additional features, feel free to open an issue.

Enjoy!



--
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+unsubscribe@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/055ba9d6-e42d-4d06-9d18-bc88aeaff941%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages