aboutsummaryrefslogtreecommitdiff
path: root/network/haproxy/README.SLACKWARE
blob: b83472439e73e843a864212d9de01667489ee896 (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
--------
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

--------
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