You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been using traefik to proxy an nginx docker container and all works perfectly. When i try neo4j container it doesn't work giving me a 404 page not found. I curl'd the URL and interestingly it responds with
I think its something to do with the Content Type being application/json. Have i got the config wrong or is this something anyone has encountered. Setup is on WIndows 10 running docker for WIndows.
The text was updated successfully, but these errors were encountered:
@siharris You are using a PathStrip rule to route requests to your neo4j backend, so I guess that you try to use the URL : http://localhost/neo4j the problem is that neo4j tries to redirect you to the web console : http://localhost/browser but this URL can' be routed by Traefik.
There is may be a workaround in neo4j configuration to make him aware that it's public URL use the /neo4j prefix.
But the simplest solution is to use hostname based routing :
replace "traefik.frontend.rule=PathStrip: /neo4j" with "traefik.frontend.rule=Host:neo4j.localhost"
make sure that the name neo4j.localhost is resolved to your machine
I've been using traefik to proxy an nginx docker container and all works perfectly. When i try neo4j container it doesn't work giving me a 404 page not found. I curl'd the URL and interestingly it responds with
StatusCode : 200
StatusDescription : OK
Content : {
"management" : "http://localhost/db/manage/",
"data" : "http://localhost/db/data/"
}
RawContent : HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Length: 90
Content-Type: application/json; charset=UTF-8
Date: Fri, 25 Nov 2016 06:28:35 GMT
Server: Jetty(9.2.9.v20150224)
Forms : {}
Headers : {[Access-Control-Allow-Origin, *], [Content-Length, 90], [Content-Type, application/json;
charset=UTF-8], [Date, Fri, 25 Nov 2016 06:28:35 GMT]...}
Images : {}
InputFields : {}
Links : {}
ParsedHtml : mshtml.HTMLDocumentClass
RawContentLength : 90
I then ran a non-proxyed docker instance of neo4j and it works fine and also returns the same response as above , although 10 bytes larger
StatusCode : 200
StatusDescription : OK
Content : {
"management" : "http://localhost:7474/db/manage/",
"data" : "http://localhost:7474/db/data/"
}
RawContent : HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Length: 100
Content-Type: application/json; charset=UTF-8
Date: Fri, 25 Nov 2016 06:29:11 GMT
Server: Jetty(9.2.9.v20150224)
Forms : {}
Headers : {[Access-Control-Allow-Origin, *], [Content-Length, 100], [Content-Type, application/json;
charset=UTF-8], [Date, Fri, 25 Nov 2016 06:29:11 GMT]...}
Images : {}
InputFields : {}
Links : {}
ParsedHtml : mshtml.HTMLDocumentClass
RawContentLength : 100
I used the test docker compose example setup on the traefik site as a basis config and added the sections below :-
neo4j:
image: neo4j:2.3
labels:
- "traefik.backend=neo4j"
- "traefik.frontend.rule=PathStrip: /neo4j"
- "traefik.port=7474"
- "traefik.frontend.entryPoints=http"
nginx2:
image: nginx
labels:
- "traefik.backend=nginx2"
- "traefik.frontend.rule=PathStrip: /nginx2"
- "traefik.port=80"
- "traefix.port=443"
- "traefik.frontend.entryPoints=http"
I think its something to do with the Content Type being application/json. Have i got the config wrong or is this something anyone has encountered. Setup is on WIndows 10 running docker for WIndows.
The text was updated successfully, but these errors were encountered: