haproxy web通过根跳转

来源:互联网 发布:神魔诛天宠物进阶数据 编辑:程序博客网 时间:2024/06/06 05:20
frontend web_servicebind*:80modehttplogglobaloptionhttplogoptionhttpcloseoptionforwardforaclinside_src path_beg -i /insideuse_backendinside_servers if inside_srcdefault_backendexternal_serversbackend external_serversmodehttpbalanceroundrobinoptionhttpchk GET /index.htmlserverweb1 192.168.32.75:8080 cookie web1 check inter 2000 rise 2 fall 3 weight 1serverweb2 192.168.32.74:80 cookie web2 check inter 2000 rise 2 fall 3 weight 1backend inside_serversmodehttpbalanceroundrobinserverweb3 192.168.32.73:80 check inter 1500 rise 3 fall 3haproxy 80跳转80:192.168.32.73 上的配置:demo:/root# cat /etc/httpd/conf/httpd.conf | grep 80#Listen 12.34.56.78:80Listen 80demo:/root# cat /etc/httpd/conf/httpd.conf | grep html# <URL:http://httpd.apache.org/docs/2.2/mod/directives.html># (available at <URL:http://httpd.apache.org/docs/2.2/mod/mpm_common.html#lockfile>);DocumentRoot "/var/www/html"<Directory "/var/www/html">如果haproxy 需要通过/inside访问, 那么192.168.32.73上需要建立inside目录demo:/var/www/html/inside# pwd/var/www/html/insidedemo:/var/www/html/inside# lsindex.html

0 0