Setup using NGINX base url
Opened this issue · 0 comments
I'm having trouble getting this to work in NGINX. (Already searched issues and google... tried some configs without sucess..)
I've followed the installation instructions, and i'm running the app with
node ./tiddlywiki.js Wikis/BobWiki --wsserver
I can't have subdomains in this machine so i using /wiki/ location on nginx
This is my latest config... I can see Bob tiddlers, but i can't save any new tiddlers.
location /wiki/ {
proxy_pass http://127.0.0.1:8080/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
On chrome i can see this errors:
$:/core/modules/utils/logger.js:52 performance: Execute $tw.perf.log(); to see filter execution timings
$:/core/modules/utils/dom/http.js:74 HEAD https://mydomain.com/wiki/ 404 (Not Found)
exports.httpRequest @ $:/core/modules/utils/dom/http.js:74
retrieveETag @ $:/core/modules/savers/put.js:26
PutSaver @ $:/core/modules/savers/put.js:63
exports.create @ $:/core/modules/savers/put.js:131
eval @ $:/core/modules/saver-handler.js:129
(anonymous) @ (index):12381
$tw.utils.each @ (index):11670
$tw.modules.forEachModuleOfType @ (index):12380
SaverHandler.initSavers @ $:/core/modules/saver-handler.js:127
SaverHandler @ $:/core/modules/saver-handler.js:31
exports.startup @ $:/core/modules/startup.js:134
$tw.boot.executeNextStartupTask @ (index):13926
$tw.boot.executeNextStartupTask @ (index):13930
$tw.boot.executeNextStartupTask @ (index):13930
$tw.boot.executeNextStartupTask @ (index):13930
$tw.boot.startup @ (index):13883
(anonymous) @ (index):14036
$tw.boot.decryptEncryptedTiddlers @ (index):13187
$tw.boot.boot @ (index):14034
_boot @ (index):14043
(anonymous) @ (index):14053
$:/plugins/OokTech/Bob/BrowserWSAdaptor.js:128 Opened socket
$:/plugins/OokTech/Bob/BrowserWSAdaptor.js:141 GET https://mydomain.com/api/status 404 (Not Found)
BrowserWSAdaptor.$tw.Bob.getSettings @ $:/plugins/OokTech/Bob/BrowserWSAdaptor.js:141
openSocket @ $:/plugins/OokTech/Bob/BrowserWSAdaptor.js:136
(index):1 Uncaught (in promise) SyntaxError: Unexpected token < in JSON at position 0
Promise.then (async)
BrowserWSAdaptor.$tw.Bob.getSettings @ $:/plugins/OokTech/Bob/BrowserWSAdaptor.js:143
openSocket @ $:/plugins/OokTech/Bob/BrowserWSAdaptor.js:136
(index):11729 Uncaught TypeError: Cannot read property 'fields' of undefined
$tw.utils.error @ (index):11729
window.onerror @ (index):11756
error (async)
_boot @ (index):11755
(anonymous) @ (index):14053
$:/plugins/OokTech/Bob/BrowserWSAdaptor.js:702 Uncaught TypeError: Cannot read property 'fields' of undefined
at BrowserWSAdaptor.isReady ($:/plugins/OokTech/Bob/BrowserWSAdaptor.js:702)
at Syncer.processTaskQueue ($:/core/modules/syncer.js:471)
at Function.eval ($:/core/modules/syncer.js:91)
at $tw.Wiki.exports.dispatchEvent ($:/core/modules/wiki.js:134)
at eval ($:/core/modules/wiki.js:167)
BrowserWSAdaptor.isReady @ $:/plugins/OokTech/Bob/BrowserWSAdaptor.js:702
Syncer.processTaskQueue @ $:/core/modules/syncer.js:471
eval @ $:/core/modules/syncer.js:91
exports.dispatchEvent @ $:/core/modules/wiki.js:134
eval @ $:/core/modules/wiki.js:167
setTimeout (async)
exports.nextTick @ $:/core/modules/utils/utils.js:570
exports.enqueueTiddlerEvent @ $:/core/modules/wiki.js:162
addTiddler @ (index):12642
FieldManglerWidget.handleAddFieldEvent @ $:/core/modules/widgets/fieldmangler.js:108
eventListeners.<computed> @ $:/core/modules/widgets/widget.js:412
Widget.dispatchEvent @ $:/core/modules/widgets/widget.js:429
Widget.dispatchEvent @ $:/core/modules/widgets/widget.js:435
Widget.dispatchEvent @ $:/core/modules/widgets/widget.js:435
Widget.dispatchEvent @ $:/core/modules/widgets/widget.js:435
Widget.dispatchEvent @ $:/core/modules/widgets/widget.js:435
SendMessageWidget.invokeAction @ $:/core/modules/widgets/action-sendmessage.js:77
Widget.invokeActions @ $:/core/modules/widgets/widget.js:543
Widget.invokeActions @ $:/core/modules/widgets/widget.js:548
Widget.invokeActions @ $:/core/modules/widgets/widget.js:548
eval @ $:/core/modules/widgets/button.js:75
The first 404 i don't know why is happening, but then i can see a call to /api that doesn't have the /wiki base url.
I've tried to add "proxyprefix" : "wiki" to the settings.json file also with no visible changes.
Could someone please point me in the right direction?
Thanks
I am running (check any that apply, put an x inside the [ ] to check a box, like this: [x]):
- Windows
- OSX
- [x ] Linux
- Other
and using
- [x ] The nodejs version
- The single file executable
Before posting I read issue guidelines and:
- I am using the newest version
- The answer to my question isn't listed in the documentation or this isn't
a question - This is not a duplicate issue
- I have not done anything that required me to set acceptance to
I Will Not Get Tech Support For This