Last active
August 9, 2020 22:21
Star
You must be signed in to star a gist
HTTP/2 curl
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
FROM haproxy:2.2.2 | |
COPY haproxy.cfg /usr/local/etc/haproxy/haproxy.cfg | |
COPY cert.pem /tmp/test.pem | |
COPY key.pem /tmp/test.pem.key |
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
#!/usr/bin/env sh | |
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 10000 -nodes -subj '/CN=127.0.0.1' |
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
defaults | |
timeout connect 5s | |
timeout client 1m | |
timeout server 1m | |
listen bad | |
mode tcp | |
bind *:1234 | |
listen https | |
mode http | |
bind *:443 ssl crt /tmp/test.pem alpn h2 | |
server bad 127.0.0.1:1234 |
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
#!/usr/bin/env sh | |
./generatekey.sh | |
docker build -t my-haproxy . | |
docker run -d -p 443:443 --name my-running-haproxy my-haproxy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment