Hi Fraj,

You need to re-order your configuration and slightly update it:
 acl white_list src 127.0.0.1 192.168.1.0/24
 acl restricted_page path_beg /images
 http-request allow if restricted_page
 http-request allow if white_list
 http-request deny


Baptiste

On Wed, Mar 25, 2015 at 10:18 AM, Fraj KALLEL <[email protected]> wrote:
> Hello,
>
>
> below my haproxy configuration.
>
> how can i make the images directory accessible for all clients?
>
>
> Thanks.
>
> global
>         log 127.0.0.1   local0
>         log 127.0.0.1   local1 notice
>         #log loghost    local0 info
>         maxconn 4096
>         #debug
>         #quiet
>         user haproxy
>         group haproxy
>
> defaults
>         log     global
>         mode    http
>         option  httplog
>         option  dontlognull
>         retries 3
>         option  redispatch
>         maxconn 2000
>         timeout connect      5000ms
>         timeout queue        5000ms
>         timeout client       25m
>         timeout server       25m
>
> listen webfarm 192.168.1.28:80
>        mode http
>        stats enable
>        stats auth stelb:abcder
>        balance roundrobin
>        appsession PHPSESSID len 64 timeout 3h request-learn prefix
>        option httpclose
>        option forwardfor
>        option httpchk HEAD /check.txt HTTP/1.0
>
>        acl white_list src 127.0.0.1 192.168.1.0/24
>        http-request allow if white_list
>        http-request deny
>
>        acl restricted_page path_beg /images
>
>        server webA 192.168.1.23:80 cookie A check
>        server webB 192.168.1.24:80 cookie B check
>
> Sincerly yours,
> Fraj KALLEL

Reply via email to