Skip to content

Haproxy configuration with docker integration and automatic ssl

License

Notifications You must be signed in to change notification settings

Dviejopomata/haproxy-letsencrypt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Haproxy configured via a cli with automatic SSL (Let's encrypt)

Run the example

cd examples
docker-compose build
docker-compose up

Build the binary

make install

Add a frontend

haproxy-letsencrypt frontend add --backend-url=http://localhost:6300  --port=80 --name=http

Add backend

 haproxy-letsencrypt backend add --backend-url=http://localhost:6300 --frontend=http --host=example.com -a=192.168.1.47:9000 

Backend with basic auth

printf "123456" | mkpasswd --stdin --method=md5
haproxy-letsencrypt backend add --backend-url=http://localhost:6300 --frontend=http --host=example.com -a=192.168.1.47:8080 --basic-auth="foo:\$1\$IBZn5tWj\$dJIVwHaK465qDTISvMFmK1"
curl --user foo:123456 -H 'Host:example.com' localhost -v

Now with ssl

haproxy-letsencrypt frontend add --backend-url=http://localhost:6300  --port=443 --name=https --ssl
haproxy-letsencrypt backend add --backend-url=http://localhost:6300 --frontend=https --host=example.com -a=192.168.1.47:9000

About

Haproxy configuration with docker integration and automatic ssl

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages