【问题标题】:Node.js and haproxyNode.js 和 haproxy
【发布时间】:2012-03-23 04:27:14
【问题描述】:

我使用 node.js 和 socket.io。

我有一个在 IP 地址上运行的应用程序:31.31.69.79:3000

我有一个域名:zkus.eu - 我想把这个域名重定向到这个ip:31.31.69.79:3000

如何设置 haproxy config (haproxy.cfg)?

【问题讨论】:

    标签: node.js redirect socket.io haproxy


    【解决方案1】:

    haproxy 网站上有几个例子:http://haproxy.1wt.eu/download/1.4/doc/configuration.txt

    也就是说,一个相当简单的配置(取自该页面上的示例)是:

    global
        daemon
        maxconn 256
    
    defaults
        mode http
        timeout connect 5000ms
        timeout client 50000ms
        timeout server 50000ms
    
    listen http-in
        bind *:80
        server server1 127.0.0.1:3000 maxconn 32
    

    【讨论】:

      猜你喜欢
      • 2012-12-18
      • 2013-07-21
      • 2014-07-16
      • 1970-01-01
      • 2014-04-07
      • 2012-11-27
      • 1970-01-01
      • 2016-11-12
      • 1970-01-01
      相关资源
      最近更新 更多