This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
log-forward syslog | |
# Accepts incoming TCP messages | |
bind 0.0.0.0:514 | |
# Accepts incoming UDP messages | |
dgram-bind 0.0.0.0:514 | |
# Sends outgoing messages via UDP | |
log 172.25.0.12:514 local0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ haproxy -vv | grep Lua | |
Built with Lua version : Lua 5.3.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
backend per_ip_rates | |
stick-table type ip size 1m expire 10m store http_req_rate(10s) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
frontend fe_ssh | |
bind *:2222 ssl crt /etc/haproxy/certs/ssl.pem | |
mode tcp | |
log-format "%ci:%cp [%t] %ft %b/%s %Tw/%Tc/%Tt %B %ts %ac/%fc/%bc/%sc/%rc %sq/%bq dst:%[var(sess.dst)] " | |
tcp-request content set-var(sess.dst) ssl_fc_sni | |
use_backend %[ssl_fc_sni] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ apt update | |
$ apt install apt-transport-https ca-certificates curl gnupg2 software-properties-common | |
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
$ add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | |
$ apt update | |
$ apt install docker-ce docker-ce-cli containerd.io |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
backend per_ip_and_url_rates | |
stick-table type binary len 8 size 1m expire 24h store http_req_rate(24h) | |
backend per_ip_rates | |
stick-table type ip size 1m expire 24h store gpc0,gpc0_rate(30s) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ curl --get --user admin:mypassword \ | |
http://localhost:5555/v2/services/haproxy/configuration/backends |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# This is the ultimate HAProxy 2.0 "Getting Started" config | |
# It demonstrates many of the features available which are now available | |
# While you may not need all of these things, this can serve | |
# as a reference for your own configurations. | |
# | |
# Have questions? Check out our community Slack: | |
# https://slack.haproxy.org/ | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A comment begins with a hash sign | |
static.example.com be_static | |
www.example.com be_static | |
# You can add additional comments, but they must be on a new line | |
example.com be_static | |
api.example.com be_api |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt install -y rsyslog |
NewerOlder