How to compare two haproxy.cfg files?
I'm converting from haproxy.cfg files generated by one system to ones that are generated by a very different system. As part of the process, I want to compare the old and new haproxy.cfg files to make sure they are equivalent. diff isn't useful because the sections are in different orders, and the subcommands within the sections are not ordered the same. I'd like to normalize the old and new files so that diff comparisons are easier. I am writing a program to do so. (I'll open source it when it is done). The first step is to put the sections in a fixed order: First general, the defaults, then each listen/frontend/backend sorted by name. That works fine and has been a big help. The next step is to sort the subcommands within a section. This will make the subsections easier to compare. However I can not simply sort them lexicographically, however ACLs and other subcommands are depend on the order they are declared. My hunch is that if I keep the following subcommands in the order they appear in the original file, all the other subcommands can be sorted alphabetically and put at the top of that section: acl capture http-request redirect req* rsp* tcp-request use-server use_backend Is this hunch correct? Are there other subcommands that are order dependent? Thanks! Tom
Sharing configuration between multiple backends
Hi, again. Looks like I forgot to put a subject header last time I sent this, so I'm guessing it was lost in the spam. Original: Hi, all. Is there a way to share configuration between multiple backends? The use case for this is that we would like to configure different response headers for different parts of our application, based on the request URL, but otherwise route traffic the same way. Specifically, we want to specify 'X-Frame-Options: ALLOW-FROM some site' across most of the application, but just use 'X-Frame-Options: DENY' on the admin area. We could do this, of course, by sending the admin traffic to a different backend, and setting the response header differently in that backend, but then we'd need to repeat our server configuration, hich is otherwise the same. Something like this: frontend foo listen x.x.x.x acl admin url_beg /admin default_backend foo use_backend foo_admin if admin backend foo rspadd X-Frame-Options: ALLOW-FROM some-trusted-server.com potentially complex configuration goes here backend foo_admin rspadd X-Frame-Options: DENY same configuration goes here To reduce the duplication, is it possible to have one backend delegate to another, or specify a named list of servers that can be referenced from different places? Thanks in advance. Thrawn
Re: wanxinyuan aluminum sheetcoil, deserves your choice!
Dear Director, nice to meet you and thanks for sending inquiry last Saturday. i am Mr.Jack, general manager of Wanxinyuan Aluminum Industry Co., Limited, from Shenzhen city, China. Wanxinyuan Aluminum Industry Co., Limited has been exporting our aluminum sheetcoil to overseas market in the past 10 years, and we had many clients in different countries and regions around the world,like U.S, Netherland, Italy, Australia, New Zealand, South Africa, Middle East and Southeast Asia,etc. our products mainly aluminum sheetcoils/aluminum mirror sheetcoil/Aluminum sheetcoil for curtain wall/Aluminum sheetcoil for bottle cap/Aluminum embossed/pattern/Checkered sheetcoil,etc. including alloy:1050/1060/1070/1100/3003/3004/3103/3104/5005/5052/5083/5182/5754/6005/6061/6063/7021/8011,etc. thickness:0.2mm-6mm8mm-30mm Width:1000/1220/1250/1300/1350/1500/2000mm(maximum),and other special width.Length:2000/2400/2440/2500/3000/4000/5000/6000mm, or, coils, etc.Thicknesstolerance: +0mm, -0.03mm the above-mentioned aluminum sheet+coilending use/application: they are mainly used for Construction, decoration, electronic products, wall Cladding, Truck body, Signboard, Insulation, Ceiling,aerospace,aviation, household appliance, lighting, and some other areas,etc. We have obtainedISO9001 verificationin year2010, andwe can supply mill certificatefor all above-mentioned aluminum sheetcoils if you buy from us, besides, we supply standard international export packing for all materials. Wanxinyuan Aluminum Industry Co., Limited is a reliable/professional/responsible supplier, we will try everything we can to make a satisfied service for you if you choose to work with us, and any further information, please contact us at anytime when it's essential, we think it will be our great honor to service your side. hope to hear from you soon and wish we will have chance to cooperate in near future. regards! Mr.Jack(General Manager) SHENZHEN WANXINYUAN ALUMINUM INDUSTRY CO.,LTD http://wanxinyuanaluminum.en.made-in-china.com/ E-mailjack...@gdwanxin.com Mobile: 0086-18502085515 Fax:0086-0755-23033800 Skype: jackwxy88