开发者

haproxy - which configuration files

I have an HAProxy install which was configured by someone who left the company. It runs on Ubuntu 10.04 and it seems to use 3 configuration files in the directory /etc/haproxy

  • haproxy.cfg
  • haproxy.http.cfg
  • haproxy.https.cfg

I don't see the point in using the haproxy.https.cfg file as I believe (in our configuration) it ca开发者_运维问答n all be configured from a single haproxy.http.cfg file but when I remove that httpS file it complains bitterly and refuses to run. My question

Is this the standard configuration haproxy uses or if not, I can't find a reference to the "S" file anywhere. Can anyone suggest how HAProxy concludes it should use it?

Thanks


The very answer to your question: your haproxy is simply launched with those three config files ( -f haproxy.cfg -f haproxy.http.cfg -f haproxy.https.cfg, maybe from /etc/init.d/haproxy but mileage varies depending on your distribution ).

If you remove the file, of course it will complain.

This is not particularly standard, but ain't bad either, it helps structuring the conf rather than having a very long file.

The task of the .https version will certainly be to redirect the https traffic towards a service that can handle HTTPS (stunnel or nginx usually), since haproxy cannot terminate ssl connections. (stunnel has to be patched, see on the haproxy page)

If you want you can merge those files into one or two, just find out how haproxy is launched (check for init.d or let us know which distribution) and fix it appropriately.


I believe that it is only /etc/haproxy/haproxy.cfg that is used by default.

This may be of use to you (1.4 configuration reference): http://haproxy.1wt.eu/download/1.4/doc/configuration.txt

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜