Discussion:
[tw] [TW5] XMLHttpRequest error code: 404
JimyKK
2014-11-19 03:48:45 UTC
Permalink
Hello again,

So I am using Nginx to host my Tiddlywiki Node.js install in a subdriectory
i.e. https://mysite.com/wiki/

It works fine and I can access, edit and save everything but every-time I
load the wiki I get a XMLHttpRequest error code: 404 popup (See attached
image)

From my understanding nginx isn't passing the XMLHttpRequest properly.
Anyone know the appropriate configuration to fix this? My Google-fu has
failed me on this one.

My simplistic config setup:
location /wiki/ {

proxy_pass http://127.0.0.1:8001/;

}


<Loading Image...>
--
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+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.
Jeremy Ruston
2014-11-23 15:58:36 UTC
Permalink
Hi JimyKK

Apologies for the late reply.
every-time I load the wiki I get a XMLHttpRequest error code: 404 popup
(See attached image)

The image hasn't come through. What's the URL that fails? Do you see any
useful information in your browser developer tools "network" tab?

Best wishes

Jeremy
Hello again,
So I am using Nginx to host my Tiddlywiki Node.js install in a
subdriectory i.e. https://mysite.com/wiki/
It works fine and I can access, edit and save everything but every-time I
load the wiki I get a XMLHttpRequest error code: 404 popup (See attached
image)
From my understanding nginx isn't passing the XMLHttpRequest properly.
Anyone know the appropriate configuration to fix this? My Google-fu has
failed me on this one.
location /wiki/ {
proxy_pass http://127.0.0.1:8001/;
}
<https://lh4.googleusercontent.com/-XOeFfsqVXvo/VGwRauCRnUI/AAAAAAAAEJU/Z2mzMn3Gyec/s1600/Untitled.png>
--
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
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.
--
Jeremy Ruston
mailto:***@gmail.com
--
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+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.
JimyKK
2014-11-24 01:11:34 UTC
Permalink
<Loading Image...>
Sorry, I accidentally deleted the image (damn thing synced to my phone
grumble grumble google+ rant...) Here is an imgur copy.

No url's actually "fail" it's a yellow error box generated by tiddly wiki
not the browser. From the developer network tools it looks like it's
atempting to connect to https://mysite.com/status/
instead of https://mysite.com/wiki/status/

I paused when writing and just had a play around with rewrites:

location /wiki/ {

proxy_pass http://127.0.0.1:8001/;

}

location /status {
rewrite ^/status $scheme://$server_name/wiki$uri permanent;
}

location /recipes/ {
rewrite ^/recipes/ $scheme://$server_name/wiki$uri
permanent;
}

This looks like it's working. I am a bit of a noob when it comes to writing
this stuff and I have no doubt there is a better way of doing this.
Post by Jeremy Ruston
Hi JimyKK
Apologies for the late reply.
every-time I load the wiki I get a XMLHttpRequest error code: 404 popup
(See attached image)
The image hasn't come through. What's the URL that fails? Do you see any
useful information in your browser developer tools "network" tab?
Best wishes
Jeremy
Hello again,
So I am using Nginx to host my Tiddlywiki Node.js install in a
subdriectory i.e. https://mysite.com/wiki/
It works fine and I can access, edit and save everything but every-time I
load the wiki I get a XMLHttpRequest error code: 404 popup (See attached
image)
From my understanding nginx isn't passing the XMLHttpRequest properly.
Anyone know the appropriate configuration to fix this? My Google-fu has
failed me on this one.
location /wiki/ {
proxy_pass http://127.0.0.1:8001/;
}
<https://lh4.googleusercontent.com/-XOeFfsqVXvo/VGwRauCRnUI/AAAAAAAAEJU/Z2mzMn3Gyec/s1600/Untitled.png>
--
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
<javascript:>.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.
--
Jeremy Ruston
--
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+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.
JimyKK
2014-11-28 02:11:57 UTC
Permalink
Just an update for anyone else looking for this solution I had to also add
the bags directory to the rewrite:

location /bags/ {
rewrite ^/bags/ $scheme://$server_name/wiki$uri permanent;
}
Post by JimyKK
Hello again,
So I am using Nginx to host my Tiddlywiki Node.js install in a
subdriectory i.e. https://mysite.com/wiki/
It works fine and I can access, edit and save everything but every-time I
load the wiki I get a XMLHttpRequest error code: 404 popup (See attached
image)
From my understanding nginx isn't passing the XMLHttpRequest properly.
Anyone know the appropriate configuration to fix this? My Google-fu has
failed me on this one.
location /wiki/ {
proxy_pass http://127.0.0.1:8001/;
}
<https://lh4.googleusercontent.com/-XOeFfsqVXvo/VGwRauCRnUI/AAAAAAAAEJU/Z2mzMn3Gyec/s1600/Untitled.png>
--
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+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.
Continue reading on narkive:
Loading...