Erros de análise do HAProxy

Erros de análise do HAProxy

eu tenho 3 servidores

--> haproxy - server1(uk)
            - server2(ru)

eu seguieste tutoriale criei ip para ru.subnets

agora no meu /etc/haproxy eu tenho estes arquivos:

haproxy.conf
ru.subnets

no meu haproxy.conf:

frontend http-frontend
    bind  *:80
    mode http
    reqadd X-Forwarded-Proto:\ http

    acl blog_acl path_beg /wp-admin

    acl ru_acl  src -f  RU.subnets

   use_backend wwwru  if ru_acl
    use_backend wwwbackend if !ru_acl

    use_backend wwwru  if blog_acl

    default_backend wwwbackend

tudo parece bem, mas quando tento carregar o arquivo de configuração no meu haproxy, recebo estes erros:

[ALERT] 170/084453 (4661) : parsing [/etc/haproxy/haproxy.cfg:37] : error detected while parsing ACL 'ru_acl'.
[ALERT] 170/084453 (4661) : parsing [/etc/haproxy/haproxy.cfg:39] : error detected while parsing switching rule.
[ALERT] 170/084453 (4661) : parsing [/etc/haproxy/haproxy.cfg:40] : error detected while parsing switching rule.
[ALERT] 170/084453 (4661) : Error(s) found in configuration file : /etc/haproxy/haproxy.cfg
[ALERT] 170/084453 (4661) : Fatal errors found in configuration.

Responder1

Em vez disso, tente isso :-)

frontend http-frontend
    bind  *:80
    mode http
    reqadd X-Forwarded-Proto:\ http

    acl blog_acl path_beg /wp-admin

    use_backend wwwru  if { src -f RU.subnets }
    use_backend wwwbackend { src -f RU.subnets }

    use_backend wwwru  if blog_acl

    default_backend wwwbackend

informação relacionada