blob: 53e8a8fd211e638b7ab1e1911721e8f4505e6a58 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
|
--------
Compiling, optional dependencies and variables
--------
This SlackBuild script supports additional variables.
1) Lua support
Lua is an optional dependency. Pass LUA=yes to this script
to enable Lua support.
2) Custom Perl Compatible Regular Expressions
Perl Compatible Regular Expressions version 2 without JIT
support is enabled by default. You can change this by passing
PCRE= to this script.
Currently supported settings are listed in the Makefile.
For example:
* Use PCRE=PCRE2_JIT to use libpcre2 with JIT support.
* Use PCRE=PCRE to use libpcre version 1.
You can also use the variables as they're written in the
Makefile, such as PCRE=USE_PCRE_JIT or PCRE=USE_PCRE=1.
The script will parse them correctly.
3) QUIC support (experimental)
Starting with version 2.6.0, HAProxy supports HTTP/3 over QUIC.
The QUIC support is currently experimental and requires QUICTLS.
OpenSSL package shipped with Slackware 15.0 is not compatible
with QUIC.
Pass QUIC=yes to this script to enable HTTP/3 support.
Check out these links for more information:
* https://github.com/quictls/
* https://www.haproxy.com/blog/announcing-haproxy-2-6/
--------
Logging
--------
If you want to enable logging, please first refer to HAProxy manual
on how to enable logging and how to select which events to log.
HAProxy log forwarding works fine with Slackware's sysklogd.
There are example files located in /usr/doc/haproxy-*/examples
The files are called syslog.example and logrotate.example.
You might want to add something like this to your haproxy.cfg file:
global
log /dev/log local0
Note that rotating logs does not require restarting HAProxy.
Instead, logrotate script should send a HUP signal to syslogger
when rotating. Example script is included in syslog.example.
Rotating has been tested with sysklogd (Slackware default) and
syslog-ng.
--------
Automatic starting/stopping upon system start/shutdown
--------
To start HAProxy automatically when system is booted,
add the following lines to /etc/rc.d/rc.local:
if [ -x /etc/rc.d/rc.haproxy ]; then
/etc/rc.d/rc.haproxy start
fi
To stop HAProxy on system shutdown, add following lines
to /etc/rc.d/rc.local_shutdown
if [ -x /etc/rc.d/rc.haproxy ]; then
/etc/rc.d/rc.haproxy stop
fi
--------
Privileges
--------
Like with the most rc scripts /etc/rc.d/rc.haproxy should be
run as root. You can easily drop process privileges by specifying
another user (and group) in the main configuration file.
Add something like this to haproxy.cfg:
global
user nobody
group nogroup
|