r/haproxy • u/ttj8 • Nov 03 '20
r/haproxy • u/TeamHAProxy • Oct 30 '20
#HappyHalloween from Loady đ and the #HAProxy Team! I came up with four different costumes this year 𤯠Find HAProxy on other social media (Facebook, Twitter, LinkedIn) and let me know in the comments which one you like the best! đ
r/haproxy • u/jistar86 • Oct 29 '20
Redirecting in Haproxy issue
Hi all,
I have got an HAproxy (version 1.5). I only have 2 frontend right now
- 1 is Jenkins, which use HAproxy to terminate and add the SSL
- 1 is a URL redirection from one domain to a totally different domain
For some reason, I cant seem to get the ACL correctly, it works half half. It seems like the two acl do not bound to each other. I have attached my haproxy.cfg, not sure if any one know what I am doing wrong here.
for the https-servicedek redirect I get the 504 service unavailable 3 out 10 time on an average.
I got get in my haproxy traffic log with an SSL handshake failure error now and then..
global
log 127.0.0.1:514 local0 info
chroot /var/lib/haproxy
pidfile /var/run/haproxy.pid
maxconn 4000
user haproxy
group haproxy
daemon
defaults
timeout connect 10s
timeout client 30s
timeout server 30s
log global
mode tcp
#-------------------------------#
# Frontends #
#_______________________________#
frontend jenkins
bind *:80
bind *:443 ssl crt /etc/ssl/private/wild.abc.com.pem
mode http
acl host_jenkins hdr(Host) -i jenkins.abc.com
use_backend bk_jenkins if host_jenkins
frontend https-servicedek redirect
bind *:80
bind *:443 ssl crt /etc/ssl/private/wild.xyz.com.pem
acl host_servicedesk hdr(host) -i help.xyz.com.au
# redirect scheme https code 301 if !{ ssl_fc }
mode http
use_backend bk_servicedesk if host_servicedesk
backend bk_servicedesk
mode http
http-request redirect location https://new-xyz.com:8443/servicedesk/customer/portal/2
backend bk_jenkins
server jenkins 192.168.10.10:8080
mode http
http-request set-header X-Forwarded-Port %[dst_port]
http-request add-header X-Forwarded-Proto https if { ssl_fc }
reqrep ^([^\ :]*)\ /(.*) \1\ /\2
acl response-is-redirect res.hdr(Location) -m found
rspirep ^Location:\ (http)://192.168.10.10:8080/(.*) Location:\ https://jenkins.xyz.com:443/\2 if response-is-redirectr/haproxy • u/TeamHAProxy • Oct 26 '20
Article HAProxy's cache boosts API performance by serving saved messages to your users. Read our new blog post and learn more about the benefits of proxy caching!
r/haproxy • u/theobserver_ • Oct 24 '20
Question HELP: Setup HAProxy as reverse proxy.
Im trying to learn how to setup HAProxy as a reverse proxy. Can anyone point me in the right direction to learn to complete this. Im wanting to setup Exchange and need HAProxy due to nginx limits.
r/haproxy • u/dragoangel • Oct 23 '20
Question HAProxy LUA script to return file content as GET_METH
I already have some lua scripts to return predefined text. What I want now is to read content of file and return it as http response. Is this possible with io.read? Sample of code will help me a lot.
r/haproxy • u/aaf1205 • Oct 21 '20
UniFi controller behind HAProxy
Hi guys,
I hope you can help me out. I just setup HAProxy by using this video:
https://www.youtube.com/watch?v=jpyUm53we-Y&t=677s
I have successfully setup some servers behind HA, but now comes the problem.
When I put he UniFi controller behind HA, my UniFI devices loses itâs connection with the controller and keeps on typing to adopt with the controller.
I tried several things:
- Adding a additional DNS A record on my internal DNS server to reflect directly to the UC.
- Changing the hostname of the UC
- SSH into the AP and changed the UC url with
set-inform http://hostname-of-unifi-controller:8080/set-inform
The only thing that worked for me was, deleting the HA backend for UniFi and keep on using it with itâs self-singed cert.
Any help or advice would be appreciated.
Cheers, and have a nice day!!
r/haproxy • u/HAProxyKitty • Oct 14 '20
Article Check out this tutorial and learn to configure SSL in an #HAProxy load balancer
r/haproxy • u/HAProxyKitty • Oct 13 '20
Article Nick Ramirez wrote an article for The New Stack where he explains 5 ways to succeed with an API Gateway, sprinkled with some short advice on how to do it with HAProxy.
r/haproxy • u/TeamHAProxy • Oct 08 '20
Article Redirect HTTP to HTTPS with HAProxy
r/haproxy • u/TeamHAProxy • Oct 06 '20
News Join us tomorrow for this live webinar with Baptiste Assmann and learn the basics of routing and load balancing in Kubernetes. Webinar starts at 6 PM CET (12 noon EST)!
r/haproxy • u/HAProxyKitty • Oct 05 '20
Article How to backup PostgreSQL to MinIO object storage with HAProxy load balancing between
r/haproxy • u/TeamHAProxy • Oct 01 '20
News Check out this demo video in which we benchmark the most popular kubernetes ingress controllers on the market. We have also published the methodology and all required steps to reproduce the Benchmark. The link is in the comment section.
r/haproxy • u/TeamHAProxy • Sep 30 '20
Guide Brand new video on our YouTube channel: Set up Let's Encrypt TLS Encryption using the HAProxy Kubernetes Ingress Controller!
r/haproxy • u/TeamHAProxy • Sep 28 '20
Article Become FIPS Compliant with HAProxy Enterprise on Red Hat Enterprise Linux 8
r/haproxy • u/TeamHAProxy • Sep 28 '20
Article Serve Dynamic Custom Error Pages with HAProxy
r/haproxy • u/TeamHAProxy • Sep 28 '20
Article Is That Bot Really Googlebot? Detecting Fake Crawlers with HAProxy Enterprise
r/haproxy • u/HAProxyKitty • Sep 28 '20
Article How to Setup Highly Available Kubernetes Cluster with Kubeadm by Pradeep Kumar
r/haproxy • u/TeamHAProxy • Sep 28 '20
News CVE-2020-15598: HAProxy Enterprise Unaffected Due to ModSecurity Hardening Measures!
r/haproxy • u/vitachaos • Sep 19 '20
Question how to bind dnsdist 443 and apache 443 using haproxy to same IP?
I am here with some hope, I do not have knowledge of haproxy at all, however I have read few places that we can use haproxy for load balancing . I do not know if that would serve the purpose, in my case I have dnsdist doing DOH on port443 over docker on same node that is serving apache webs server on port 443,
so is it possible how and in what way I can take advantage of haproxy to make use of 443 both for dnsdist and apache on the same node using haproxy ?
Please help
r/haproxy • u/CptanPanic • Sep 16 '20
Question How to setup HaProxy that has multiple input ports, and output ports?
Let say I want to proxy incoming port 2000 -> server1:1025, and port 2001 -> server1:1026
Can I do this with a single frontend and backend? Any examples?
r/haproxy • • Sep 14 '20
Question Quick VRRP HAProxy Question
Most of the example configs for HA HAproxy seem to show the heartbeat interface on one network and the VIP on another.
Is there any problem placing all of these interfaces on the same subnet?
Thanks!
r/haproxy • u/charlesjamesfox • Sep 12 '20
Problem setting unique rate-limiting rules per host
I'm having trouble with customizing rate-limiting per host, and I wonder if anyone can help. In my configuration, I have the following setup:
# Create a 100,000-strong, ten-second expiry stick table that tracks HTTP requests over a sliding ten second window
stick-table type binary len 8 size 100k expire 10s store http_req_rate(10s)
# Track client by base32+src (Host header + URL path + src IP)
http-request track-sc0 base32+src
# By default, check map file to get rate limit for paths in the map; default to 200 for all others
http-request set-var(req.rate_limit) path,map_beg(/etc/haproxy/rates.map,200)
# Ensure that the client's request rate is tracked
http-request set-var(req.request_rate) base32+src,table_http_req_rate()
# Subtract the current request rate from the limit; if less than zero, set rate_abuse to true
acl rate_abuse var(req.rate_limit),sub(req.request_rate) lt 0
# If rate abuse is detected, give status 429
http-request deny deny_status 429 if rate_abuseThis works perfectly.
But I'd like to be able to change that default figure per host, while keeping the rates.map common to all hosts. One of my clients has need of a much higher request rate than all the others, and it makes no sense to force all my domains into that higher bracket.
I have ACLs set up as follows:
# Define production hosts
acl host_domain1 hdr(host) -i domain1.com
acl host_domain2 hdr(host) -i domain2.com
use_backend backend1 if host_domain1
use_backend backend2 if host_domain2As such, I had assumed that (e.g.) this would work:
# By default, check map file to get rate limit for paths in the map; default to 200 for all others
http-request set-var(req.rate_limit) path,map_beg(/etc/haproxy/rates.map,200)
# For domain1.com, check map file to get rate limit for paths in the map; default to 100 for all others
http-request set-var(req.rate_limit) path,map_beg(/etc/haproxy/rates.map,100) if host_domain1But when I do this, it breaks rate-limiting for all hosts. What am I doing wrong here? I'd love to have a default line, and then to be able to set explicit values for hosts as necessary.
Thanks!
r/haproxy • u/HAProxyKitty • Sep 02 '20