Newest haproxy Questions

Q&A for system and network administrators

Send PROXY protocol header from HAProxy

I've probably got lost in the masses of documentation on this subject, but I'm trying to configure my HAProxy process to send the PROXY protocol header as described at http://www.haproxy.org/download/...

haproxy for routing to specific web servers

I have a haproxy server with two nics running ip addresses 192.168.1.99(connected to router) and 192.168.2.1(to a switch connected with web servers). The haproxy is nat-ed also. We have two servers ...

HAProxy as reverse proxy for AWS API Gateway

As the title suggest, I have an AWS API Gateway endpoint that I want to put behind HAProxy. This is my current HAProxy configuration defaults mode http log ...

Haproxy ldap session persistance?

Is it possible to implement session stickiness in haproxy when using it to load balance to ldap servers? Example: I have an lb that load balances to two backend ldap servers. This works fine for ...

HAProxy -> nginx -> Fast CGI: epoll_wait() reported that client prematurely closed connection

I have been successful in setting up an PHP fast CGI application fronted by nginx. If I hit nginx directly everything works as expected. However, in production the traffic is routed through a HAProxy ...

Haproxy timers - total session duration

I was looking at the Haproxy timers in the haproxy logs to deduce the response time.And for some reason, i don't seem to understand why the haproxy timers don't add up to give me the total session ...

HAProxy 1.7 not resolving docker 1.13.1 container

docker ps -a: de09facf7c91 x/x:x "/usr/bin/supervisord" 51 minutes ago Up 24 minutes 8080/tcp ...

Url should not change while getting response using haproxy

I am using haproxy for load balancing. I have a load balancer(the server having haproxy) which I hit in the address bar (e.g. loadbalancer.other.com) the load balancer gets the response from another ...

HAProxy create new sessions in Tomcat

I'am using HAProxy 1.5.18 on CentOS 7.3 and Tomcat 8. HAProxy create a lot of sessions (more 350) on my Tomcat Server! Every 10 seconds, a new session is created. I think it is this line : option ...

HAProxy Interface/eth aware binding as non root user

I have 2 network interfaces on my instance (eth0 and eth1) I am trying to setup HAProxy to be interface aware and have separate frontends per interface. The config below works as root (ie. i do not ...

HAProxy not forwarding requests inside container

I have setup the following three containers: Application Container (A) Maintenance Container (B) Proxy Container (C) I'm trying to configure the proxy container to follow these rules: Route all ...

Best architect for web cluster with tomcat

I'm trying to figure out the best way to go with this is. First time trying to setup a web cluster. Requirements: SSL for multiple domains Tomcat High Availability HAProxy site: 192.168.1.1 ...

HAProxy: Prevent 503 errors on failover [duplicate]

I'm trying to setup HAProxy as an highly available reverse proxy. We're running it on a cluster of 3 nodes, where all nodes are identical. When a service is down on one of the node, any of the other ...

HAProxy redirect multiple domain

I have only one public IP address, and three Web server in LAN. I want to redirect the traffic from WAN to the Web server like this, must support SSL/TLS traffic redirect: https://www.example.com (A ...

Configuring NGINX as a mail proxy server with load balancing based on user

I'm currently looking at options for a mail server proxy that will select an upstream server based on the user that was authenticated. I didn't see anything like that mentioned in the NGINX guide for ...

Pariameter value find and replace with map in HAProxy

I am very new to HAPRoxy. I have 100 of URI paths in a map file. I need to replace the parameter value. Say, below is the path: /call/landingPage?callType=INBOUND&phoneCalledFrom=1111111111&...

haproxy to 3rd party server via GET params

I am trying to configure haproxy to accept a connection from a client - parse a URL from GET params and then proxy that connection. So this was the client IP is hidden from the 3rd party and headers ...

How to move sessions from a disabled backend server to a live backend server in Haproxy?

A fragment from the rolling update script we use to deploy a new version of our webapp echo "Haproxy:Disabling www1" hactl disable server servers/www1 # Restart www1 restartServer www1 echo "...

Firewall Ports + HaProxy

Using HaProxy as a SSH load balancer, We have HaProxy running in IP1:2222 and redirecting to IP1:2223-2233 and IP2:2223-2233. In this case, do I need to open Firewall Ports from Source IP:2222,2223-...

SSL offloading for multiple domains (multiple certs) on Haproxy

Let's say that we have haproxy in front of 2 apache: +----> Apache (10.0.0.2) Haproxy (10.0.0.1) --| +----> Apache (10.0.0.3) Haproxy is configured to ...

How to give restrictions to subdirectories with HA Proxy?

I am trying to make my Kibana more secure ( ofcourse for free :) ) so that I wanted to use HA Proxy in order to use as a load balancer too. The use case that I have; I have two user groups; dev ...

How to bind haproxy on all interfaces except localhost without mentioning each interface separately?

I've two hosts, host1 and host2. There's HAProxy on both hosts that is currently listening on an ip:port. This does SSL termination for a service listening at localhost:port on both hosts. Now, we've ...

WSS Load Balancing with SSL Termination at layer 4

Should it be possible to terminate SSL for wss (secure websockets) at a layer 4 load balancer? Seems to me that wss (and ws) in general would require TCP routing since an HTTP reverse proxy wouldn't ...

failover / clustering for apps not designed to be in cluster

I need to fail over an appplication that is was not designed to be in cluster. I'm on CentOS/RHEL 7, and would like to use keepalived + haproxy for failover. I've two nodes, if node one is shutdown, ...

HAProxy time-out error for SSL in AWS

I tried to run HAProxy inside a docker container which run with the AWS ECS. As per a requirement I received the container is run behind a classic load-balancer. I managed the mentioned setup to ...

Load balancing for many domains with TLS termination

What would be an appropriate way of load balancing a CMS with about 50000 domains, considering that SSL termination should take place on the LB-side? Having multiple LB sets with each a bunch of SSL ...

dockercloud/haproxy Timeout After 50 Seconds With Nginx/PHP-FPM

Currently, I am trying to load-balance nginx and PHP-FPM connections using HAProxy using Docker, and so far all is going well. However, this particular cluster response to API calls. One of the API ...

HAProxy / Heartbeat - multiple floating IPs

I have successfully PoC'd the use of two HAProxy servers w/ heartbeat to load balance traffic between two squid servers with pass through Kerberos authentication in our shared services office. I've ...

How to configure HAProxy according to request based on ports on same IP?

I Have Two Background server Website-1. 192.168.1.10:80 Website-2. 192.168.1.10:8080 I have to use haproxy as gateway for accessing it through same URL, Difference is that website-2 access through ...

AWS ELB with HAProxy setup

We want to use a single ELB to handle the AWS free SSL/TLS certificate with wild card. For example we have n servers app1.example.com app2.example.com ... appn.example.com Each app has its own ...

How do I use HAProxy with environment variables when running as service

I am new to Linux and are trying to configure HAProxy with environment variables. I am running Debian 8 (Jessie) and HAProxy 1.5.8 that I installed using apt-get as per https://haproxy.debian.net/#?...

Haproxy 1.7 url rewriting reqrep doesn't work

I'm currently trying to rewrite url based on extensions and subdomains, but my update doesn't work, so I will try to explain my procedure: I would like to rewrite this kind of url https://mydomain....

Explanation of HAProxy Stats Page Backend Queue Values

As shown in the image below, I have a HAProxy backend with two (x2) servers which have the following settings : maxconn 64 check inter 5s fastinter 2s downinter 2s My question regards the Queue ...

HAProxy Active FTP Loadbalancing in NATed environment

How to configure HAProxy LB in NATed environment(under Vcloud) for ActiveFTP and PassiveFTP? Current HAProxy config tried: global log /dev/log local0 log /dev/log local1 notice ...

Can HAProxy do httpchk and observe layer4?

I'm running HAProxy 1.5.18 (CentOS 7.3 standard) as an application server proxy to a Percona 5.6 cluster. The Percona nodes are running pyclustercheck on port 9200. While this HTTP check works in ...

haproxy server check %[dst_port]

I want to load balance requests to the same port on three backends. I have about 20 ports to forward, so I need a way to make it dynamic. This is for load balancing our prod, pre-prod, qa, dev, unit ...

How to mark Haproxy server initially down

I have an haproxy.cfg that is dynamically updated when new servers are added, however at the time a new server is added the server may still be coming up. (Servers are not initially healthy). Due to ...

Haproxy redirects with port

Apache serve mysite.com on 127.0.0.1:8080. The site is working. I have haproxy in frontend, listening the port 80. When accessing to mysite.com, I'm redirected to mysite.com:8080 and it is not ...

Can haproxy be configured to load balance requests to external / third party APIs, using round robin over multiple local interfaces?

I have a server with N network interfaces, with each local address routed through a distinct external ip address. I would like to setup haproxy so that our application can make http requests using the ...

What is the best way to configure a large number of SSL certificates when using LetsEncrypt, HAProxy, Nginx, and Rails?

I am working on a multi-tenant web application that is hosted on AWS. It is written in Ruby on Rails, and each app server runs Nginx. We have an EC2 instance that runs HAProxy. We originally set up ...

HAProxy to host returned by REST enpoint

we want to setup HAProxy in front of Marathon, but NOT to proxy to containers inside Marathon, but to Marathon itself. We want to setup HAProxy instance proxying to the current leader. The /v2/...

HAProxy Docker Container Doing L4 Load Balancing Not Being Transparent

Using the official latest HAProxy Docker container and the following config file: frontend logging_frontend bind *:1514 mode tcp timeout client 1m default_backend logging_backend ...

Configure HAProxy with Apache and Tomcat servers

I want to configure HAProxy with Apache and Tomcat Servers. My current application structure is Apache -> Tomcat. I need to configure HAProxy above Apache which is HAProxy -> Apache -> Tomcat like ...

dockerized HAProxy+Keepalived for HA

I have one host with HAProxy running as docker container using docker compose . I want to scale out our HAProxy horizontally to make it highly available across multiple hosts. I read few tutorials ...

HAproxy - SSL and virtual hosts issues

HAProxy Config: frontend https-proxy bind *:443 ssl crt /path/to/certs default_backend web backend web balance roundrobin option httpchk option forwardfor option ...

How to secure HAProxy TCP stats socket? Needed for remote operation

I would like to control my HAproxy remotely during deploy of applications. E.g. before stopping apps on "app-server1" I want to instruct the HA-proxy to disable the backend server "app-server1". When ...

How to log requests from HAProxy?

I am setting up HAProxy as a load balancer and I can get it working (it is forwarding requests to backends). However, I cannot get it to log each request to a file. I can see system type messages like ...

Segregate http and tcp logs files in haproxy

My haproxy config has two log options: tcplog and httplog. Everything is logged to one file through syslog. Is there a way to segregate them? I want tcp logs going to /var/log/haproxy-tcp.log and ...

I need to configure haproxy with multiple ssl ports

I have two servers which have the same URL but the port number may change. I want to redirect these two URLs HTTPS. If I enter my first URL (http://example.com) then I want to it will redirect to ...

HAProxy server check option causes 503

First time posting so please be genial :) I'm having trouble with the server check option for haproxy. I'm running HA-Proxy version 1.5.2 with two RHEL 7.2 backend web servers. There is currently no ...
Translating... 0%