Chinaunix

标题: haproxy配置问题 [打印本页]

作者: lm35189952    时间: 2011-02-11 14:24
标题: haproxy配置问题
按照网上的配置方法,我把haproxy安装起了,配置好以后,负载静态文件没有问题,但是负载动态的文件就不行了,在haproxy后端我是用的NGXIN+PHP-FPM。
我把配置贴出来,麻烦大家帮我看下什么地方设置不对
    global
        user    www
        group   www
        chroot  /www/haproxy

        daemon
        quiet
        nbproc  4

        maxconn 40000
        log 127.0.0.1 local0 notice
        spread-checks 2

defaults
         timeout server  15s
         timeout connect 15s
         timeout client  120s
         timeout http-request 15s
         timeout queue   15s
   
         option  httpchk   GET /index.html
         option  httpchk   GET /
         http-check disable-on-404


frontend http_proxy
        mode http
        maxconn 100000
        bind :80
        default_backend web_php
        option  forwardfor

backend web_php
        #balance  leastconn
        balance roundrobin
        mode    http
        cookie  SLB insert indirect
        option  abortonclose
        server  web1       192.168.1.200:8080  check cookie web1 rise 2  fall 3
        server  web2       192.168.1.201:80  check cookie web2 rise 2  fall 3
作者: zhengsenlin888    时间: 2011-04-21 14:49
index.html 改为index.php就可以了吧。




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2