HAproxy

Wildcard in subdomain for ACL in HAPROXY

谁都会走 提交于 2019-12-12 08:54:14
问题 Trying to match the following in haproxy: acl instagiveweb hdr_beg(host) -i foo*.something.com where the url could be foo-staging.something.com or foo.something.com I've looked through the docs at https://www.haproxy.com/doc/aloha/7.0/haproxy/acls.html#data-types-and-matching-between-samples-and-patterns but having a hard time finding the pattern matching that I need. Any help appreciated! 回答1: You want hdr_reg() ("reg"ex), not hdr_beg() (literal string prefix/"beg"inning). acl instagiveweb

How to redirect URL with HAProxy

本秂侑毒 提交于 2019-12-12 08:23:20
问题 I need redirect www.foo.com and foo.com to www.bar.com in haproxy, this is my configuration: frontend http-in bind *:80 acl bar.com hdr(host) -i www.bar.com ... use_backend bar.com_cluster if bar.com ... redirect prefix http://foo.com code 301 if { hdr(host) -i www.bar.com } redirect prefix http://www.foo.com code 301 if { hdr(host) -i www.bar.com } ... backend bar.com_cluster balance roundrobin option httpclose option forwardfor server bar 10.0.0.1:80 check I have tried with redirect prefix

Reverse proxying HTTP/2 from h2 to h2c

冷暖自知 提交于 2019-12-12 08:07:17
问题 We have a java web server which is able to serve content over h2c (HTTP/2 clear text) We would like to reverse proxy connections established using h2 (i.e. standard HTTP/2 over SSL) to the java server in h2c. Enabling HTTP/2 on nginx is simple enough and handling incoming h2 connections works fine. How do we tell nginx to proxy the connection using h2c rather than http/1.1 ? Note: a non-nginx solution may be acceptable server { listen 443 ssl http2 default_server; server_name localhost; ssl

HAproxy subdirectory

孤街醉人 提交于 2019-12-12 05:48:37
问题 I've been scouring the depths of the internet trying to get HAProxy to behave but im not sure it can accomplish what I want. I tried following this: https://www.haproxy.com/blog/howto-write-apache-proxypass-rules-in-haproxy/ Here is my scenario: I've got a VM that is running app1 on port 8999. When I go to https://PUBLIC-IP-ADDRESS/app1 HAProxy should bring up root of app1 at http://backend-ip:8999/ . The issue I'm facing is that I can get HAProxy to proxy the initial connection but all

HAProxy Fails to Start

荒凉一梦 提交于 2019-12-12 04:08:56
问题 I can't seem to get my HAProxy to start, any ideas whats causing the problem? root@haproxy-www:/# service haproxy restart root@haproxy-www:/# service haproxy status haproxy.service - HAProxy Load Balancer Loaded: loaded (/lib/systemd/system/haproxy.service; enabled; vendor preset: enabled) Active: inactive (dead) since Mon 2017-10-02 17:21:11 AEDT; 4s ago Docs: man:haproxy(1) file:/usr/share/doc/haproxy/configuration.txt.gz Process: 11014 ExecStart=/usr/sbin/haproxy-systemd-wrapper -f $

Redirect to new domain from an existing domain (Apache / haproxy)

谁说我不能喝 提交于 2019-12-12 01:46:01
问题 DESCRIPTION: We have two apache servers and one is behind haproxy. Our NEW server is behind the haproxy box, the OLD one is on a different network. I am going to create an apache rewrite rule to point this oldsite.com/some/thing to the new haproxy box (as seen below). This will redirect to newsite/some/other thing. QUESTION: Is it possible to make this transparent to the user? I would like the user to only see oldsite.com/some/thing and not newsite/some/other/thing ? Is this achieveable with

Linux 部署 RabbitMQ 集群

不羁的心 提交于 2019-12-11 23:29:10
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> Linux 部署 RabbitMQ 集群 rabbitmq centos7 阅读约 13 分钟 一般情况下,如果只是为了探究 RabbitMQ 或者验证业务工程的正确性那么在本地环境或者测试环境上使用其单实例部署就可以了,但是出于 MQ 中间件本身的可靠性、并发性、吞吐量和消息堆积能力等问题的考虑,在生产环境上一般都会考虑使用 RabbitMQ 的集群方案。 本文档旨在介绍 RabbitMQ 集群的工作原理以及在 CentOS 7 系统上安装配置具备高可用性和具备一定负载能力的 RabbitMQ 集群。 RabbitMQ 集群工作原理介绍 RabbitMQ 这款消息队列中间件产品本身是基于 Erlang 编写,Erlang 语言天生具备分布式特性(通过同步 Erlang 集群各节点的 magic cookie 来实现)。因此,RabbitMQ 天然支持 Clustering。这使得 RabbitMQ 本身不需要像ActiveMQ、Kafka 那样通过 ZooKeeper 分别来实现 HA 方案和保存集群的元数据。集群是保证可靠性的一种方式,同时可以通过水平扩展以达到增加消息吞吐量能力的目的。 RabbitMQ 集群有两种模式: 默认模式 ,以两个节点 mq1 和 mq2 为例来进行说明。对于 Queue 来说

Modifying HAProxy Lua Library Path

Deadly 提交于 2019-12-11 17:51:23
问题 I am trying to load Lua script from HAProxy. In the Lua script, the following line is causing an error: local http = require("socket.http") Intially I gathered from journalctl -xe output that the library was not installed. I installed it using luarocks install luasocket . This did not solve the issue. The new error is module "socket.http" not found . Following the comment in this post I realized that I must change the settings for Lua library path in order to resolve this issue. Now, I want

HAProxy 1.9.2 Adds gRPC Support

守給你的承諾、 提交于 2019-12-11 16:37:15
HAProxy provides end-to-end proxying of HTTP/2 traffic. Use HAProxy to route, secure, and observe gRPC traffic over HTTP/2. Read on to learn more. HAProxy 1.9 introduced the Native HTTP Representation (HTX). Not only does this allow you to use HTTP/2 end-to-end, it also paves the way for HAProxy to support newer versions of HTTP-based technologies and protocols at a faster pace. Today, with the release of version 1.9.2 , we’re excited to announce that HAProxy fully supports gRPC. This moment solidifies the vision we had when creating HTX. The gRPC protocol allows your services to communicate

Is it possible to write a script that would intercept HTTP requests on HAproxy with the purpose of appending client side pki certificates?

与世无争的帅哥 提交于 2019-12-11 15:45:04
问题 I am a test engineer that is new to the game - 3 years experience - so sorry if I am not coming across as a technical wizard :) Would ask that you be patient with me, I'm also here to learn so happy to be corrected/ridiculed. Due to the sensitivity of our applications, we are working with client side PKI certificates. These need to be loaded by the user into the browser if the application can be accessed. I was wondering if it would be possible that instead of having to import test