Re: HAProxy returning 404
I'm seeing more a misconfigured web server whose virtualhost is sticked to the IP address and which can't route traffic which contains HAProxy's Virtual IP to the right virtual host ;) Baptiste On Mon, Dec 21, 2015 at 7:20 AM, Gaurav Sharmawrote: > Hi Baptiste / Willy , > > Same backend server is working with nginx reverse proxy. > > Below is output of haproxy -vv > > HA-Proxy version 1.5.11 2015/01/31 > Copyright 2000-2015 Willy Tarreau > > Build options : > TARGET = linux2628 > CPU = generic > CC = gcc > CFLAGS = -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat > -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 > OPTIONS = USE_ZLIB=1 USE_OPENSSL=1 USE_PCRE=1 > > Default settings : > maxconn = 2000, bufsize = 16384, maxrewrite = 8192, maxpollevents = 200 > > Encrypted password support via crypt(3): yes > Built with zlib version : 1.2.3.4 > Compression algorithms supported : identity, deflate, gzip > Built with OpenSSL version : OpenSSL 1.0.1 14 Mar 2012 > Running on OpenSSL version : OpenSSL 1.0.1 14 Mar 2012 > OpenSSL library supports TLS extensions : yes > OpenSSL library supports SNI : yes > OpenSSL library supports prefer-server-ciphers : yes > Built with PCRE version : 8.12 2011-01-15 > PCRE library supports JIT : no (USE_PCRE_JIT not set) > Built with transparent proxy support using: IP_TRANSPARENT IPV6_TRANSPARENT > IP_FREEBIND > > Available polling systems : > epoll : pref=300, test result OK >poll : pref=200, test result OK > select : pref=150, test result OK > Total: 3 (3 usable), will use epoll. > > > > > > On Mon, Dec 21, 2015 at 3:48 AM, Willy Tarreau wrote: >> >> Hi Baptiste, >> >> On Sat, Dec 19, 2015 at 11:18:36PM +0100, Baptiste wrote: >> > HAProxy can't return a 404. Your web server may be improperly >> > configured. >> >> I'm seeing one possibility (which logs would obviously show), which is >> that he's using an older version of haproxy which defaults to tunnel >> mode, and that once the first request is sent to one of the servers, >> all subsequent ones are send there as well regardless of the content >> switching rules. >> >> Gaurav, please send the output of "haproxy -vv". If your version is >> older than 1.5 you'll have to add "option http-server-close" or even >> "option forceclose" in your configuration. The best solution is of >> course to upgrade it to get one which supports keep-alive. >> >> Willy >> > > > > -- > Regards, > Gaurav Sharma, > Devops Engineer, > Phone No. : 09582232217 > Ignite World
Re: HAProxy returning 404
Hi Baptiste / Willy , Same backend server is working with nginx reverse proxy. Below is output of haproxy -vv HA-Proxy version 1.5.11 2015/01/31 Copyright 2000-2015 Willy TarreauBuild options : TARGET = linux2628 CPU = generic CC = gcc CFLAGS = -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 OPTIONS = USE_ZLIB=1 USE_OPENSSL=1 USE_PCRE=1 Default settings : maxconn = 2000, bufsize = 16384, maxrewrite = 8192, maxpollevents = 200 Encrypted password support via crypt(3): yes Built with zlib version : 1.2.3.4 Compression algorithms supported : identity, deflate, gzip Built with OpenSSL version : OpenSSL 1.0.1 14 Mar 2012 Running on OpenSSL version : OpenSSL 1.0.1 14 Mar 2012 OpenSSL library supports TLS extensions : yes OpenSSL library supports SNI : yes OpenSSL library supports prefer-server-ciphers : yes Built with PCRE version : 8.12 2011-01-15 PCRE library supports JIT : no (USE_PCRE_JIT not set) Built with transparent proxy support using: IP_TRANSPARENT IPV6_TRANSPARENT IP_FREEBIND Available polling systems : epoll : pref=300, test result OK poll : pref=200, test result OK select : pref=150, test result OK Total: 3 (3 usable), will use epoll. On Mon, Dec 21, 2015 at 3:48 AM, Willy Tarreau wrote: > Hi Baptiste, > > On Sat, Dec 19, 2015 at 11:18:36PM +0100, Baptiste wrote: > > HAProxy can't return a 404. Your web server may be improperly configured. > > I'm seeing one possibility (which logs would obviously show), which is > that he's using an older version of haproxy which defaults to tunnel > mode, and that once the first request is sent to one of the servers, > all subsequent ones are send there as well regardless of the content > switching rules. > > Gaurav, please send the output of "haproxy -vv". If your version is > older than 1.5 you'll have to add "option http-server-close" or even > "option forceclose" in your configuration. The best solution is of > course to upgrade it to get one which supports keep-alive. > > Willy > > -- Regards, Gaurav Sharma, Devops Engineer, Phone No. : 09582232217 Ignite World
Re: HAProxy returning 404
Hi Baptiste, On Sat, Dec 19, 2015 at 11:18:36PM +0100, Baptiste wrote: > HAProxy can't return a 404. Your web server may be improperly configured. I'm seeing one possibility (which logs would obviously show), which is that he's using an older version of haproxy which defaults to tunnel mode, and that once the first request is sent to one of the servers, all subsequent ones are send there as well regardless of the content switching rules. Gaurav, please send the output of "haproxy -vv". If your version is older than 1.5 you'll have to add "option http-server-close" or even "option forceclose" in your configuration. The best solution is of course to upgrade it to get one which supports keep-alive. Willy