Re: HTTP body manipulation

2013-05-10 Thread Baptiste
Hi, No, it's not possible. HAProxy can manipulate only URLs and headers, in both requests and responses. Baptiste On Fri, May 10, 2013 at 7:21 AM, Nathan Reilly narama...@gmail.com wrote: Hello all, Is content manipulation is possible with haproxy, similar to mod_sed or mod_ext_filter, not

Re: Peer/Failover options for HAProxy

2013-05-10 Thread Baptiste
Hi Zack, The peers in HAProxy are available only for synchronizing data content from stick tables. If you want a failover to occur you must use a tool to force an IP failover, like keepalived's vrrp ability. Baptiste On Thu, May 9, 2013 at 9:56 PM, Connelly, Zachary (CGI Federal)

Re: keep alive on both client and server side and x-forwarded-for

2013-05-10 Thread Baptiste
Hi, No, there is no way for this for now. If you need to know client IP, you can switch to Transparent proxy or to the Proxy protocol (but this option may ask you to rewrite some code on your server). Baptiste On Thu, May 9, 2013 at 4:10 PM, hapr...@serverphorums.com wrote: Hi All, I have

Re: log X-Forwarded-For in haproxy log

2013-05-10 Thread Baptiste
Hi Pedro, You can use the log-format statement available in HAProxy 1.5. Everything is explained in the doc. If you need more help, please let us know. Baptiste On Thu, May 9, 2013 at 3:21 PM, Pedro Mata-Mouros pedro.matamou...@sapo.pt wrote: Hi, Picking up this old thread, is there a way of

Re: Peer/Failover options for HAProxy

2013-05-10 Thread Thomas Mangin
Hi Zack, Or you can use a routing protocol to route the traffic to another host on failure detection. http://thomas.mangin.com/data/pdf/SYSADMIN%204%20-%20Mangin%20-%20BGP%20for%20sysadmin.pdf Thomas Sent from my iPad On 10 May 2013, at 07:15, Baptiste bed...@gmail.com wrote: Hi Zack,

Fwd: haproxy configuration to use forwardfor with websockets

2013-05-10 Thread Peter Saitz
I am having problem where my app server is not able to retrieve X-FORWARDED-FOR being behind haproxy and using websockets. It works when websockets are not used, only plain http. The haproxy cfg is pretty simple, but I guess there is a problem I do not see in the config file. I am attaching my

Re: keep alive on both client and server side and x-forwarded-for

2013-05-10 Thread Willy Tarreau
Hi, On Fri, May 10, 2013 at 09:36:26AM +0200, hapr...@serverphorums.com wrote: Hi Baptiste, thnx for the answer. I assume switch to Proxy protocol means using TCP instead of HTTP mode? Regarding Transparent proxy, from the manual: Note that contrary to a common belief, this option

Re: keep alive on both client and server side and x-forwarded-for

2013-05-10 Thread haproxy
Thnx Willy, understand now. I am afraid this not an option for my case. But generally, could this feature be added in the future? I think, from the usage point of view, that is reasonable request: I would like to know the client IP on my server, not the IP of the machine HAProxy is running on.

Re: haproxy configuration to use forwardfor with websockets

2013-05-10 Thread Baptiste
Hi, Websocket is not HTTP. So HAProxy can't insert a HTTP header in somthing which is not HTTP. There is an HTTP phase, the websocket establishment in which HAProxy can insert the client IP, but after, this is not possible. Your only failover is transparent proxy, in my humble opinion. More

AW: documentation for stats webinterface

2013-05-10 Thread Wolfgang Routschka
Hi, thanks your answer Greetings Wolfgang Hi! Whats the explicit difference between Disable/Enable/SoftStop/SoftStart/KillSessions functions? Disable/Enable matches the disable/enable server x on the unix socket, see documentation at [1] and [2]. SoftStop set the servers weight to

pre-define ACLs for header rule

2013-05-10 Thread Wolfgang Routschka
Hi, today a question about pre defined acl for additional header that not works for me. frontend ssl-to-http bind IP:443 ssl crt CERTIFICATE bind IP:80 mode http option httpclose reqidel ^X-Forwarded-For:.* option forwardfor reqadd X-Forwarded-Proto:\ https

Re: HTTP body manipulation

2013-05-10 Thread Nathan Reilly
Thanks for confirming. Cheers, On Fri, May 10, 2013 at 4:10 PM, Baptiste bed...@gmail.com wrote: Hi, No, it's not possible. HAProxy can manipulate only URLs and headers, in both requests and responses. Baptiste On Fri, May 10, 2013 at 7:21 AM, Nathan Reilly narama...@gmail.com wrote:

AW: pre-define ACLs for header rule

2013-05-10 Thread Wolfgang Routschka
Hi, for me works now following acl frontend ssl-to-http bind IP:443 ssl crt CERTIFICATE bind IP:80 mode http option httpclose reqidel ^X-Forwarded-For:.* option forwardfor acl ssl ssl_fc reqadd X-Forwarded-Proto:\ https if ssl reqadd X-Forwarded-Proto:\

Re: log X-Forwarded-For in haproxy log

2013-05-10 Thread Pedro Mata-Mouros
Hi Baptiste, Thanks for referring that. I was hoping there was some way of picking a specific captured header (X-Forwarded-For in this case) and use it, but it seems %hr just gives you everything and puts it inside {}. In my case I'd just like to use the X-Forwarded-For as the client IP, if it

syslog timestamp with millisecond

2013-05-10 Thread Patrick Hemmer
The current syslog implementation (via UDP) sends log entries with the millisecond portion of the timestamp stripped off. Our log collector is capable of handling timestamps with millisecond accuracy and I would like to have it do so. Is there any way to accomplish this? I know you can add an

build with static openssl

2013-05-10 Thread Bryan Talbot
What's required to build haproxy and statically link with openssl libs like can be done with pcre? It would be a nice option to have when running on OS with older openssl (like RHEL 5.x) but still allow haproxy to use latest openssl. -Bryan

Re: keep alive on both client and server side and x-forwarded-for

2013-05-10 Thread Willy Tarreau
On Fri, May 10, 2013 at 10:37:38AM +0200, hapr...@serverphorums.com wrote: Thnx Willy, understand now. I am afraid this not an option for my case. But generally, could this feature be added in the future? I think, from the usage point of view, that is reasonable request: I would like to

Re: pre-define ACLs for header rule

2013-05-10 Thread Willy Tarreau
On Fri, May 10, 2013 at 10:15:59AM +, Wolfgang Routschka wrote: Hi, for me works now following acl frontend ssl-to-http bind IP:443 ssl crt CERTIFICATE bind IP:80 mode http option httpclose reqidel ^X-Forwarded-For:.* option forwardfor acl ssl

Re: build with static openssl

2013-05-10 Thread Willy Tarreau
Hi Bryan, On Fri, May 10, 2013 at 01:06:50PM -0700, Bryan Talbot wrote: What's required to build haproxy and statically link with openssl libs like can be done with pcre? It would be a nice option to have when running on OS with older openssl (like RHEL 5.x) but still allow haproxy to use

Re: haproxy configuration to use forwardfor with websockets

2013-05-10 Thread Baptiste
euh That's what I said. You can only insert it during the websocket establishment phase. I think Peter wants to have the IP information for each data sent by the client on the websocket. which is not doable. Well, that's my understanding. Baptiste On Fri, May 10, 2013 at 10:30 PM, Willy

Re: haproxy configuration to use forwardfor with websockets

2013-05-10 Thread Willy Tarreau
On Fri, May 10, 2013 at 10:56:48PM +0200, Baptiste wrote: euh That's what I said. You can only insert it during the websocket establishment phase. That's why I said I partially disagreed. I disagreed with the sentence that the only solution was the transparent proxy. The only solution

RE: build with static openssl

2013-05-10 Thread Lukas Tribus
Hi Bryan, What's required to build haproxy and statically link with openssl libs like can be done with pcre? The following procedure will install a static build of latest openssl in a directory of your choice without interfering with your OS headers and libraries: export

Re: haproxy configuration to use forwardfor with websockets

2013-05-10 Thread Peter Saitz
Thank you guys, I think you pretty much explained and cover it to such depth that it is quite clear to me now. I use haproxy as a load balancer, not sure it I want it to be a transparent proxy. I will try to capture and retain ip upon the upgrade/handshake request. On Fri, May 10, 2013 at 2:14

Re: build with static openssl

2013-05-10 Thread Willy Tarreau
Hi Lukas, On Sat, May 11, 2013 at 02:24:09AM +0200, Lukas Tribus wrote: Hi Bryan, What's required to build haproxy and statically link with openssl libs like can be done with pcre? The following procedure will install a static build of latest openssl in a directory of your choice