This file contains hidden or 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 hidden or 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
| kubectl apply -f https://raw.githubusercontent.com/haproxytech/kubernetes-ingress/master/deploy/haproxy-ingress.yaml |
This file contains hidden or 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 be_servers | |
| balance roundrobin | |
| server s1 server1:80 maxconn 10 | |
| server s2 server2:80 maxconn 10 | |
| server s3 server3:80 maxconn 10 |
This file contains hidden or 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 www.mysite.com | |
| bind 10.0.0.3:80 | |
| bind 10.0.0.3:443 ssl crt /etc/ssl/certs/mysite.pem | |
| default_backend web_servers |
This file contains hidden or 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 autoconf automake build-essential git libcurl4-openssl-dev libev-dev libpthread-stubs0-dev pkg-config | |
| $ git clone https://github.com/haproxytech/spoa-mirror | |
| $ cd spoa-mirror | |
| $ ./scripts/bootstrap | |
| $ ./configure | |
| $ make all | |
| $ sudo cp ./src/spoa-mirror /usr/local/bin/ |
This file contains hidden or 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 servers | |
| server s1 192.168.30.10:80 check maxconn 30 | |
| server s2 192.168.31.10:80 check maxconn 30 | |
| server s3 192.168.31.10:80 check maxconn 30 |
This file contains hidden or 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
| _service._proto.name. TTL class SRV priority weight port target |
This file contains hidden or 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 www | |
| bind :80 | |
| # Add a response header | |
| http-response add-header X-XSS-Protection "1; mode=block" | |
| # Remove a response header | |
| http-response del-header X-Powered-By | |
| # Change a response header |
This file contains hidden or 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 hidden or 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 | |
| h1-case-adjust content-length Content-Length |