nginx代理PostgreSQL

创建日期:2024-06-21
更新日期:2024-12-18

打开 nginx\conf\nginx.conf ,添加以下配置即可。

http {
}

stream {
    upstream vastbase {
        server 127.0.0.1:5432;
    }
    server {
        listen 15432;
        allow all;
        proxy_connect_timeout 60s;
        proxy_socket_keepalive on;
        proxy_pass vastbase;
    }
}