I have a tiddlywiki nodejs service running in my personal server in order to manage my notes anywhere. Tiddlywiki has easily become part of my daily life and has come to replace propietary software that compromises my privacy like google docs. However, it is quite risky to run your own services because you must maintain you server updated and be aware of the latest vulnerabilities, so in terms of usability, a propietary software might just be better because it would just work. But for those of us that like to just DIY, TW is a great tool that can be self hosted.
After installing some plugins and themes and adding some notes, my tiddlywiki notebook has grown to about 5 MB. Sometimes loading time for this is a bit slow, of about 23 seconds or so in a normal connection and some more with mobile internet. Now, this is not that much, I mean, I can wait a few seconds without dying. But since we live in a fast changing environment rushing through life just to go online and get stuff done, I figured I could lower this time by putting this service behind nginx so it is compressed on the server side.
So doing some research, I found this nginx module that does compression.
I added the following server configuration:
server {
listen 1234;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_pass http://127.0.0.1:1005;
gzip on;
gzip_proxied expired no-cache no-store private auth;
}
}
I had to do some proxy configuring with proxy_set_header and proxy_pass so it copies the connection remote address (this is the client) and the host name to the local host address. Since we are using a proxy configuration and it handles basic authentication, I've added gzip_proxied with some options that avoids the content to be cached.
By doing this I managed to improve loading time to about 6 seconds, which is a big difference.
Next thing I want to do with this is to put a SSL certificate and enable the secure http protocol by using letsencrypt.
Posted on Utopian.io - Rewarding Open Source Contributors
Thank you for the contribution. It has been approved.
You can contact us on Discord.
[utopian-moderator]
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Thanks !
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Hey @elguille I am @utopian-io. I have just upvoted you!
Achievements
Suggestions
Get Noticed!
Community-Driven Witness!
I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!
Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit