Newest haproxy Questions

Q&A for system and network administrators

configure HA Proxy to allow some requests certain application servers

I have a setup with HaProxy where each haproxy server routes traffic to a number of application servers. The routing for normal http traffic is based on a hash of the request url. Now I want to ...

HaProxy does not redirect http to https

In my centOS 7 LAMP server configuration seems that my HaProxy (v 1.7) load balancer is not able to redirect http request to https binding port 80. Here is my haproxy.cfg: global maxconn 32000 ...

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 ...

How to use Haproxy to forward https requests via http

I have an haproxy setup, with a several of haproxy servers that route to a cluster of application servers. I'd like haproxy to do all the ssl termination. Right now https requests are forwarded to ...

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 ...

HAproxy not working for multiple sites

I'm trying to use single HAproxy Loadbalancer for multiple sites, but only one site is working for me cp_nodes, when I try to access second website it redirects to first website only. global log /...

HAProxy configuration for blocking IPs for sub URLs

I am new to HAProxy. I want to restrict all to access a sub URL but not for access from few IPs. My Implementation of HAProxy is below and it is not block any IPs/URLs # Listen to port 80. Throw a ...

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 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 ...

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 ...

Looking for a server/proxy that can dynamically route requests to back-end servers depending on client's IP

When a request comes to the proxy/server, depending upon the requester's IP, the request will be routed to a specific back-end. It is a requirement of the system that the proxy needs to get the ...

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 ...

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 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 ...

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 ...

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 ...

Force Apache2 web server to listen on a single external IP

I'm trying to force Apache2 web server to listen on a single external IP which belongs to a HAProxy (192.168.50.30) so the users have to go through HAProxy to consume Apache2 web server. At the moment ...

HAProxy override backend cookie using query parameter

Based on this answer, I can successfully override the backend with a query parameter: backend servers balance roundrobin cookie SERVERID insert indirect nocache use-server web1 if { urlp(...

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 ...

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 uses one server at a time only

I use haproxy in front of several servers to failover. My purpose is at one time, haproxy sticks to one online server only. I can do this with option "check backup" likes below. frontend web_front ...

Config Error in HAproxy

I'm having an HAproxy as a loadbalancer on top of 2 backend servers. I installed the SSL certificate and this is my config which gives me tons of errors when reloading HAproxy. Please help! This is ...

How to set up a reverse proxy to map dynamically URLs to TCP ports?

This is the use case: I have a server which will have Docker containers which will be created and destroyed on demand. The idea is be able to configure a reverse proxy and associate an URL with the ...

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 ...

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&...

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 ...

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 configuration file. can't view frontend.

my /etc/haproxy/haproxy.conf global log 127.0.0.1 local2 chroot /var/lib/haproxy pidfile /var/run/haproxy.pid maxconn 4000 user root group root daemon # turn on ...

How do I hide “index.php” from URL on HAProxy

Here I have install HAProxy-1.7 on linux machine and backend forward request to varnish cache server then apache2 web server handle. All application install on single machine. Flow: ---443--> | ...

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 ...

Throttling with HAProxy by IP

We use HAProxy for load balancing on our site. The site is highly dependent on cached data; when we take the site down for maintenance, most of those caches become stale. When we turn the site back ...

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....

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 ...

nginx only loads root / file nothing else even index.php

I've a HAProxy LB,and one Local LEMP stack server I set the LB to redirect requests to the given path like: www.example.com/here/is/myLEMPstack to my local VM with local IP(192.168.0.8). HAProxy: ...

Blocking client IP in HAProxy

I need to block certain client IP address say 1.2.3.4 and 2.3.4.5 to access "example.com/abc/def", but both can access example.com/. The client IPs are behind the CloudFlare. Client IP ==> ...

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 nbsrv acl not working

The following acl doesn't work for me: acl no_waf nbsrv(to_waf) lt 1 use_backend back-www if no_waf default_backend to_waf I keep getting error 503 (No server is available to handle this request.) ...

Remove from URL haproxy

I have an haproxy server and I need it to rewrite the URL. For example, I have a url that is like this: http://myserver.com/UserName/signalr/connect... and I need to remove the UserName, so when ...

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 ...

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 ...

Connect to upstream/backend via socks5 proxy in NginX/HAProxy

I'm trying to make NginX or HAProxy use proxies while connecting to upstream URLs, something like this: Browser -> Nginx/HAProxy -- SOCKS5 Tunnel --> Remote I wonder if it's possible? Edited: ...

Haproxy / Nginx headers

having an issue with haproxy / nginx. If i set the domain straight to nginx i can use sites such as gtmetrix.com however if i go via haproxy sites such as gtmetrix are no longer able to find the ...

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 ...

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 directing connections to the correct server

I have two servers behind pfsense haproxy and I need to make sure users land on the same server based on a part of the url. http://mydomain/<location>/..../.... In my case the is always the ...

How to redirect public ip through VPN tunnel

I'm new to this and I have looked through many other similar questions but I couldn't find an answer. I have two server at SoYouStart and on one server I have a HAProxy VM. Both servers are connected ...

HAProxy not working with ALPN

I need to use ALPN in order to configure HAProxy for HTTP/2 support. After configuring HAProxy I tried to restart but it failed. Even upgrading openssl to 1.0.2 did not help. Wikipedia states tat ALPN ...

HAProxy is it possible to force basic auth then select AD server based on user IP?

Here is my context: I have a web application (using HTTPS) which needs users to be authenticated prior to contacting it The application expects an HTTP header to be set (let's name it HEADER) There ...
Translating... 0%