凡品【FanPin】文档
首页文档中心关于我们
首页文档中心关于我们
  1. Haproxy
  • 概述
  • 笔记
    • ProxmoxVE
      • ProxmoxVE 8.4 常见问题
      • ProxmoxVE 9.0 常见问题
      • Ceph 相关
    • MySQL
      • MySQL
      • Git存储方式实现
    • Debian
      • Debian 12 常见问题
      • Debian 13 常见问题
    • Nginx
      • Nginx 调优
      • Nginx 安装
    • APISIX
      • APISIX部署
      • APISIX常见问题
    • Haproxy
      • Haproxy 3.2 本地
      • Haproxy 3.0.10-r1
      • Haproxy 3.2 公网
    • SD-WAN
      • Tinc
        • TINC常见问题
        • 虚拟局域网
      • Frrouting
        • Frrouting安装
      • Netmaker
        • Netmaker部署
    • iStoreOS
      • 安装部署
    • Redis
      • Redis集群
  • 文档
    • 接口规则
      • 基本规则
      • HTTP状态码
      • 签名
    • 网关相关
      • 路由与注册
      • 自动删除弃用接口
      • 分页数据
    • 平台相关
      • 文章相关
        • 分类列表
        • 分类详情
        • 文章列表
        • 文章详情
      • 基础信息
    • 其他接口
    • 工具类【Free】
      • 网络相关
        • 获取IP信息
        • Home入口
      • 图片相关
      • 文本相关
      • 游戏相关
  1. Haproxy

Haproxy 3.0.10-r1


iStoreOS本配置
# Example configuration file for HAProxy 2.0, refer to the url below for
# a full documentation and examples for configuration:
# https://cbonte.github.io/haproxy-dconv/2.0/configuration.html


# Global parameters
global

	# Log events to a remote syslog server at given address using the
	# specified facility and verbosity level. Multiple log options 
	# are allowed.
	#log 10.0.0.1 daemon info

	# Specifiy the maximum number of allowed connections.
	maxconn 32000

	# Raise the ulimit for the maximum allowed number of open socket
	# descriptors per process. This is usually at least twice the
	# number of allowed connections (maxconn * 2 + nb_servers + 1) .
	ulimit-n 65535

	# Drop privileges (setuid, setgid), default is "root" on OpenWrt.
	uid 0
	gid 0

	# Perform chroot into the specified directory.
	#chroot /var/run/haproxy/

	# Daemonize on startup
	daemon

	nosplice
	# Enable debugging
	#debug

	# Spawn given number of processes and distribute load among them,
	# used for multi-core environments or to circumvent per-process
	# limits like number of open file descriptors. Default is 1.
	#nbproc 2


defaults
    log     global
    mode    tcp
    option  dontlognull
    timeout connect 5000ms
    timeout client  50000ms
    timeout server  50000ms

listen stats
    bind :::8000 v4v6
    mode http
    http-request use-service prometheus-exporter if { path /metrics }
    stats enable
    stats uri /stats
    stats realm HAProxy-04\ Statistics
    stats auth admin:admin
    stats admin if TRUE

frontend fe_http
    bind :::6688 v4v6
    mode tcp
    default_backend be_http

frontend fe_https
    bind :::6689 v4v6
    mode tcp
    default_backend be_https


backend be_http
    mode tcp
    server haproxy102 192.168.20.102:6688 send-proxy check

backend be_https
    mode tcp
    server haproxy102 192.168.20.102:6689 send-proxy check
修改于 2025-09-02 18:29:25
上一页
Haproxy 3.2 本地
下一页
Haproxy 3.2 公网
Built with