Questions tagged [haproxy]

HAProxy is an open source, very fast and reliable solution offering high availability, load balancing, and proxying for TCP and HTTP-based applications. It is particularly suited for web sites crawling under very high loads while needing persistence or Layer7 processing.

See also:

2099 questions
6
votes
4 answers

haproxy NOSRV issue with redirected port

I am attempting to catch http traffic on one port (8080) and redirect it to an internal port (12345). I have the following in my haproxy.cfg frontend rest_front bind *:8080 #reqadd X-Forwarded-Proto:\ http #reqadd X-Forwarded-Port:\ 12345 …
user16349
6
votes
3 answers

Why is ab erroring with: apr_socket_recv: Connection reset by peer (54) on OSX?

I'm trying to use ab to benchmark a cluster of 4 ubuntu boxes running nginx that are load balanced by another ubuntu box running haproxy. For those interested I'm following along with the sysadmincasts tutorial series. I'm not able to successfully…
mbigras
  • 289
  • 1
  • 3
  • 11
6
votes
1 answer

HAProxy rate limiting - ban abuser for 30 minutes

I have the following config, that works OK for rate limiting connections. If an abuser is authenticated and he also accesses the defined regex location more than 30 times per minute, rate limiting is initiated and he is forwarded to the…
Tony
  • 269
  • 4
  • 15
6
votes
2 answers

Can I use HAProxy's new 'capture' feature to save the remote address in a TCP frontend, and use it as the `X-Forwarded-For` header in an HTTP backend?

Using HAProxy 1.6 and a clever hack, I now have an HAProxy tcp mode frontend, that detects if the browser is capable of SNI, and based on that, routes to a strongly ciphered SSL termination backend, or a weaker one. This ensures A+ grading on SSL…
kvz
  • 402
  • 4
  • 15
6
votes
1 answer

how to configure HAProxy as a reverse proxy?

I have multiple web servers, hosting multiple domains. Occasionally, I need to move a domain from one web server to another. Rather than have to update the DNS for the domain to point at the new server location, I would like to set all the…
radio_babylon
  • 73
  • 1
  • 1
  • 3
6
votes
2 answers

ngx_http_auth_request_module equivance for HAProxy

Does an equivalent module to nginx's ngx_http_auth_request_module exist for HAProxy or Apache? This module allows support for custom authentication through HTTP. I quote: The ngx_http_auth_request_module module (1.5.4+) implements client…
Klaus
  • 181
  • 1
  • 6
6
votes
2 answers

Haproxy - selecting backend dynamically from subdomain

I discovered recently that you can match a backend dynamically, based on the request hostheader, like this: use_backend %[req.hdr(host),lower] However, does anyone know any way I could use the subdomain of the request hostheader to match the…
UpTheCreek
  • 1,628
  • 10
  • 32
  • 48
6
votes
2 answers

ERROR 2006 (HY000): MySQL Server Has Gone Away... (HaProxy / Galera)

I setup a cluster of 3 MariaDB servers in a multi-master setup which is working fine. I added a 4th server for HaProxy to load balance and round robin so that we can have a little redundancy which is also working, except for 1 issue. I am logged…
Hatem Jaber
  • 163
  • 1
  • 7
6
votes
2 answers

HaProxy giving - 503 Service Unavailable

I am using below configuring for performing loadbalancing for two Tomcat servers. And I configured HAProxy to perform SSL/TLS bridging/re-encryption. #--------------------------------------------------------------------- # Example configuration for…
Narendra
  • 121
  • 1
  • 3
6
votes
1 answer

HA Proxy and Websockets

I'm setting up my first HAProxy reverse proxy server. It's going to be a proxy for an HTML5 app running on tomcat from a different server. I was able to get it to proxy out via HTTP, redirect all requests to HTTPS, and implement HSTS. However,…
JoeInVT
  • 95
  • 1
  • 5
6
votes
2 answers

Haproxy Resolvers Section + Amazon ELB

I'm currently using Haproxy-1.6-dev2 in front of an amazon ELB, and I'm running into DNS resolution issues. I'm working with the dev version of haproxy because of the new resolvers feature, but haven't been able to have Haproxy trigger a change in…
Madison May
  • 181
  • 1
  • 5
6
votes
3 answers

HAProxy: Redirect Root Site Root to Subsite

I would like to redirect the root of my website to a subsite by default. Like http://www.domain.com/ ---> http://www.domain.com/subsite I have tried this, but this matches all the URLs anyway: acl is_root path_beg -i / acl is_domain hdr(host) -i…
6
votes
2 answers

Weird interaction with systemctl with Haproxy on CentOS 7

Running haproxy through systemctl is different than running it manually. on manual start, everything works. starting through systemctl, haproxy is not able to find the service it proxies, and answers with a 503. Here's the output when starting…
Magnar
  • 1,047
  • 2
  • 11
  • 15
6
votes
1 answer

redirect rewritten url using haproxy

Using haproxy version 1.4.24 on Ubuntu 14.04 I would like to use haproxy to rewrite and redirect urls which are no longer valid to their new equivalent. I am already using haproxy as the reverse proxy and load balancer. I have the rewrite working…
hatch
  • 241
  • 1
  • 2
  • 7
6
votes
1 answer

How can I use environment variables in haproxy.conf

My haproxy.cfg file has one backend servers using hostnames: backend servers server myapp ${PORTAL_PORT_3000_TCP_ADDR}:${PORTAL_PORT_3000_TCP_PORT} maxconn 32 myapp is running in other docker container linked to haproxy docker container. The…
Montells
  • 165
  • 2
  • 7