带有反向代理和NGINX的Neo4j [英] Neo4j with a reverse proxy and NGINX

查看:361
本文介绍了带有反向代理和NGINX的Neo4j的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法通过NGINX的反向代理来处理Neo4j.

I'm having trouble addressing Neo4j via a reverse proxy with NGINX.

Web客户端可以正常工作,但是我对Bolt协议一无所知.

The web client works without problems, but I have no idea about the Bolt protocol.

以下是Web客户端的工作方式:

Here's how the web client works:

server {
    listen 80;
    server_name XXX;

    location / {
        proxy_pass http://YYY:7474/;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Host $http_host;
        proxy_redirect off;
        proxy_buffering off;
    }
}

但是端口7687上的Bolt协议如何工作?

But how does the Bolt protocol over port 7687 work?

谢谢.

PS:Google翻译ftw.

PS: Google translator ftw.

推荐答案

您需要使用通过--with-stream编译的nginx.然后,您可以将以下部分添加到您的nginx配置中

You need to use nginx compiled with --with-stream. Then you can add below section to your nginx config

stream {
  server {
    listen 7687;
    proxy_pass neo4j:7687;
  }
}

基本上,您需要使用tcp反向代理而不是http代理.上面的配置部分位于顶层,不在httpserver

Basically you need to use tcp reverse proxy and not http proxy. The above configuration section will be at top level and not inside http or server block

这篇关于带有反向代理和NGINX的Neo4j的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆