Questions tagged haproxy

Explore the latest questions and answers asked by our top developers.

Docker Registry behind HAProxy not working properly

I have configured Docker Registry using htpasswd authentication as docker service. I use a port mapping 443:5000 and it works perfectly. "docker login :443" works, "docker pull <mydomain:433/myimage" works. The container service looks like this: myhub: image: myhub ports: – "443:5000" environment: – REGISTRY_HTTP_ADDR=0.0.0.0:5000 – REGISTRY_HTTP_TLS_KEY=/certs/efimeridopolis.privkey.pem – REGISTRY_HTTP_TLS_CERTIFICATE=/certs/efimeridopolis.fullchain.pem – REGISTRY_AUTH=htpasswd – REGISTRY_AUTH_HTPASSWD_REALM=’Registry Realm’ – REGISTRY_AUTH_HTPASSWD_PATH=/auth/registry.htpasswd […]

By Alexandros Gougousis
Published
Categorised as docker, docker-registry, haproxy Tagged , ,

Docker HaProxy behind Cloudflare exposes server ip by 443 port (SSL)

So, i have an ubuntu server where i run haproxy in docker behind cloudflare to handle my domaines with using their certificate. My problem is when i start haproxy the port 443 which is responsible for the https-ssl expose my server ip. My haproxy docker-compose.yml looks like this: version: ‘3.5’ services: haproxy: image: haproxy:2.3.10 container_name: […]

By SNAF
Published
Categorised as cloudflare, docker, haproxy, ssl Tagged , , ,

Set HAProxy stats auth credentials from Docker Secrets

I am trying to pull credentials for HAProxy’s stats page from Docker Secrets (instead of hard-coding them in the configuration file). I would use an environment variable, but I can’t modify the Docker container to set it using a script that reads the secrets file. Does anyone have other ideas of how to make this […]

By Steven P
Published
Categorised as docker, docker-secrets, haproxy Tagged , ,

Keepalived: check if a process of a Docker Container is healthy

I have two Docker containers: 1 for Keepalived 1 for Haproxy The problem is that my track_script killall -0 haproxy (to check if haproxy is still alive) can’t reach the process of haproxy (because it is in another container..) What should I do ? Thanks! Source: Docker Questions

By Theo Cerutti
Published
Categorised as docker, haproxy, keepalived, process Tagged , , ,

HAProxy backup howto

frotnend fe_web … acl no_srv_available nbsrv(http_in) eq 0 use_backend backupsrv if no_srv_available backend http_in balance roundrobin server-template refrontend 6 refrontend:80 check resolvers docker init-addr libc,none backend backupsrv option allbackups server backupsrv:80 check resolvers docker init-addr libc,none backup http-errors myerrors errorfile 503 /usr/local/etc/haproxy/errors/503.http I am trying to divert traffic to a backup server if the servers […]

By CodeWeed
Published
Categorised as docker, haproxy, reverse-proxy Tagged , ,

I can’t run a new container using dockerhub image of haproxy:2.5.0 with my original config file

After I pull the latest docker image of latest (2.5.0) label, I can’t run a new container with my original config file… However, it works on 2.4.8. I list my logs below: [NOTICE] (1) : haproxy version is 2.5.0-f2e0833 [NOTICE] (1) : path to executable is /usr/local/sbin/haproxy [WARNING] (1) : config : missing timeouts for […]

By auxo
Published
Categorised as configuration, docker, haproxy Tagged , ,

Grafana Embed (iframe) via XHR throught HAProxy : Grafana has failed to load its application files

We are trying to develop a solution which allows to see grafana iframes (embed) in a web app (angular). Front-End context : We are logged-in in the web page for security purpose. We want to display element with grafana source (our grafana server). We want the iframe to display some grafana dashobards while being authentified […]

By Sonny Jayet
Published
Categorised as docker, embed, grafana, haproxy, iframe Tagged , , , ,

PureFTPd loadbalancing with HAProxy & Docker

I am using docker to run 2 or more pure-ftpd containers ftpd1: image: "ftpd:1.0.0" container_name: pure-ftpd1 working_dir: /home restart: on-failure environment: PUBLICHOST: 0.0.0.0 FTP_PASSIVE_PORTS: "30000:31000" FTP_MAX_CLIENTS: 999 volumes: – ./pure-ftpd-common:/etc/default/pure-ftpd-common – ../shared_storage/ftpd/home/ftpusers/:/home/ftpusers/ – ./pure-ftpd:/etc/pure-ftpd/ networks: – frontend command: "/run.sh -l puredb:/etc/pure-ftpd/pureftpd.pdb -E -j -R -0 -4 -A -C 10 -G -H -x -X -o –bind […]

By Cybergei
Published
Categorised as docker, ftp, haproxy, load-balancing, pureftpd Tagged , , , ,

Kubernetes haproxy load balancer with tcp services not forwarded

I’m currently trying to autoscale my tcp services with kubernetes. I’m not using cloud infrastructure(amazon, aws..etc) so i use haproxy for load balancing. my tcp service isn’t http protocol so i added my services with –configmap-tcp-services argument. apiVersion: apps/v1 kind: Deployment metadata: name: prokittest spec: replicas: 1 selector: matchLabels: app: prokit-server-label template: metadata: labels: app: […]

By ChuYong
Published
Categorised as docker, haproxy, kubernetes, yaml Tagged , , ,

How to stop HAProxy converting my POST to GET

For some reason, haproxy is converting my request. Below is the log output. wc_haproxy | 172.29.0.1:35296 [03/Nov/2021:22:03:44.901] http http/<NOSRV> 0/-1/-1/-1/0 302 134 – – LR– 1/1/0/0/0 0/0 "POST /register HTTP/1.1" wc_haproxy | 172.29.0.1:58040 [03/Nov/2021:22:03:44.906] http~ app/app1 0/0/1/0/1 404 130 – – —- 1/1/0/0/0 0/0 "GET /register HTTP/1.1" Below is my configuration: global log stdout format […]

By Mitesh
Published
Categorised as docker, haproxy Tagged ,
1 5

Still Have Questions?


Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us
faq