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
http { | |
server { | |
listen 80; | |
location / { | |
proxy_pass http://my_upstream; | |
} | |
location /api/ { | |
proxy_pass http://api_servers; | |
} |
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 myproxy | |
filter spoe [engine <name>] config <spoe-config-file> |
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 update | |
sudo apt install -y git ca-certificates gcc libc6-dev liblua5.3-dev libpcre3-dev libssl-dev libsystemd-dev make wget zlib1g-dev | |
git clone https://github.com/haproxy/haproxy.git | |
cd haproxy | |
make TARGET=linux-glibc USE_LUA=1 USE_OPENSSL=1 USE_PCRE=1 USE_ZLIB=1 USE_SYSTEMD=1 USE_PROMEX=1 | |
sudo make install-bin |
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
global | |
stats socket ipv4@127.0.0.1:9999 level admin | |
stats socket /var/run/hapee-lb.sock mode 666 level admin | |
stats timeout 2m |
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 -y unzip | |
$ wget -O ./terraform.zip https://releases.hashicorp.com/terraform/0.11.13/terraform_0.11.13_linux_amd64.zip | |
$ unzip ./terraform.zip -d ./terraform | |
$ cp ./terraform/terraform /usr/local/bin |
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 stats | |
mode http | |
bind *:8404 | |
stats enable | |
stats uri /stats | |
stats refresh 10s | |
stats admin if LOCALHOST |
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
TotalBufferSizeMB: 0 | |
Concurrency: 8 | |
Region: "us-east-2" | |
Endpoint: "" | |
Socket: | |
UDPAddress: "127.0.0.1:2000" | |
TCPAddress: "127.0.0.1:2000" | |
Logging: | |
LogRotation: true | |
LogLevel: "prod" |
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
log stdout local0 | |
log fd@1 local0 | |
log stdout format raw local0 |