Chia Sẽ Kinh Nghiệm Về IT



Tìm Kiếm Với Google
-


Gởi Ðề Tài Mới  Gửi trả lời
 
Công Cụ Xếp Bài
Tuổi 24-02-2016, 04:14 PM   #1
hoctinhoc
Guest
 
Trả Lời: n/a
File cấu hình HAproxy mẩu
File cấu hình HAproxy mẩu

Tham khảo bài viết:http://www.server-world.info/en/note...OS_7&p=haproxy


Trích dẫn:
# create new

global


# for logging section



log 127.0.0.1 local2 info
chroot /var/lib/haproxy
pidfile /var/run/haproxy.pid
# max per-process number of connections


maxconn 5000

# process' user and group


user haproxy

group haproxy

# makes the process fork into background


daemon

defaults

# running mode

mode http


# use global settings
log global


# get HTTP request log


option httplog

# timeout if backends do not reply


timeout connect 10s

# timeout on client side


timeout client 30s

# timeout on server side


timeout server 30s

# define frontend ( set any name for "http-in" section )



frontend http-in
# listen 80

bind *:80

# set default backend

default_backend backend_servers
# send X-Forwarded-For header


option forwardfor # define backend


backend backend_servers

# balance with roundrobin

balance roundrobin

# define backend servers



server www01 10.0.0.31:80 check
server www02 10.0.0.32:80 check

  Trả lời ngay kèm theo trích dẫn này
Gửi trả lời


Công Cụ
Xếp Bài

Quyền Hạn Của Bạn
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is Mở
Hình Cảm xúc đang Mở
[IMG] đang Mở
Mã HTML đang Tắt




Bây giờ là 03:03 PM. Giờ GMT +7



Diễn đàn tin học QuantriNet
quantrinet.com | quantrimang.co.cc
Founded by Trương Văn Phương | Developed by QuantriNet's members.
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.