Can someone provide me with Apache reverse proxy config for neo4j. The browser is loading fine , but no luck connecting to the DB using the connect url.
What should be the proxy config, specifically the one to connect to the Database.
Neo4j Browser uses a BOLT connection to your server's port 7687. I guess you need to proxy that as well. Be aware this port is not http, so you need a tcp proxy.
I tried reverse proxying 7687. Everything work fine on the internal network. But from external network/internet - the neo4j browser page loads. But when I enter the Connect URL and try login in ..its failing..its not even hitting the proxy. Do you have a config file for apache?
and if I try just the url it showin -
Firefox can’t establish a connection to the server at wss://portal.cac.queensu.ca:7687/
In Chrome these are the errors
vendors~main.chunkhash.bundle.js:86 Mixed Content: The page at 'Neo4j Browser' was loaded over HTTPS, but requested an insecure resource 'http://portal.cac.queensu.ca:7474/db/data/transaction'. This request has been blocked; the content must be served over HTTPS.
(anonymous) @ vendors~main.chunkhash.bundle.js:86
e
If I try just the url -
vendors~main.chunkhash.bundle.js:84 WebSocket connection to 'wss://portal.cac.queensu.ca:7687/' failed: Error in connection establishment: net::ERR_CERT_AUTHORITY_INVALID
Hey,
This is a pretty important unanswered question that is the top result for Googling "using Neo4J browser with Apache".
Answering the question with a link to a tutorial about how to do this in nginx is not helpful and a little insulting. Many of us are still using apache for good reasons, so asking us to switch to nginx so that we can use neo4j is the same thing as saying "you cannot use neo4j web browser".
Also, trying to debug njs8 specific configuration is really not helpful. What is needed is a tutorial on how to set this up correctly on a fresh installation of Apache, on a fresh installation of neo4j, both on Ubuntu. Then njs8 could just see how his setup deviates from the working example. I do not understand why there not just a link to how to do this for both nginx and apache2 as part of the default documentation for neo4j. This is a super-common use case.
If it cannot be made to work.. fine.. then please tell us that. But lots of people need this configuration, so if this is merely a question of priorities.. well this is a show-stopper for me, and there are likely to be many people coming here from the google search with the same "show stopping" relationship with this configuration problem.
For folks who are still thinking about this years on, I have conceived of a horrible no good very bad way ™ of doing this which involves running two domains out of an Apache install. It works for a small project I'm doing over the summer with a very limited number of people; I am sure that a brain much larger than mine would improve it. As such, here it is for good or ill.
Context
The VPS on which I did this blocks many ports. I had to find a way to proxy the websocket/Bolt connection such that I could essentially connect to the same server from a remote connection outside the network on which the server lives. This turned out to be complicated, as /browser is served on one of the few open ports. Because I setup an SSL on the server, that's two ports down (80, and 443). Unfortunately, the last remaning open port, 22, is reserved for SSH folderol. This was a major limitation that spurred this solution.
Ok, just get to the goods
If you came here for configs -- go no further. However, this mess probably needs a bit of qualification. Read on!
The concept here is that I can access the HTTPS port of sub.subdomain.domain.com from subdomain.domain.com. Adding SSL configuration to neo4j (discussed here) ensures that the websockets don't run afoul of security policy. Due to this proxy, we also have to connect on sub.subdomain.domain.com:443 as our bolt+s:// connection.
There's probably a more elegant expression of this, but the idea surprisingly works.