Hi Ricky,
Works for me with your configuration, mostly.
Adding a bind to the frontend and using haproxy 1.8.3 (it doesn't allow
the implicit bind on the frontend line itself..).
Also added the fastcgi config and a empty mimetype file..
[2.4.3-RELEASE][[email protected]]/root: haproxy -f
/root/XuRicky/haproxy.cfg -d
Available polling systems :
kqueue : pref=300, test result OK
poll : pref=200, test result OK
select : pref=150, test result FAILED
Total: 3 (2 usable), will use kqueue.
Available filters :
[TRACE] trace
[COMP] compression
[SPOE] spoe
Using kqueue() as the polling mechanism.
00000000:main.accept(0005)=0009 from [192.168.0.40:56777] ALPN=<none>
00000001:main.accept(0005)=000a from [192.168.0.40:56778] ALPN=<none>
00000002:main.accept(0005)=000b from [192.168.0.40:56779] ALPN=<none>
00000000:main.clireq[0009:ffffffff]: GET /a.pdf HTTP/1.1
00000000:main.clihdr[0009:ffffffff]: Host: 192.168.0.133
00000000:main.clihdr[0009:ffffffff]: Connection: keep-alive
00000000:main.clihdr[0009:ffffffff]: Upgrade-Insecure-Requests: 1
00000000:main.clihdr[0009:ffffffff]: User-Agent: Mozilla/5.0 (Windows NT
10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like
G ecko)
Chrome/65.0.3325.181 Safari/537.36
00000000:main.clihdr[0009:ffffffff]: Accept:
text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*
;q=0.8
00000000:main.clihdr[0009:ffffffff]: Accept-Encoding: gzip, deflate
00000000:main.clihdr[0009:ffffffff]: Accept-Language:
nl-NL,nl;q=0.9,en-US;q=0.8,en;q=0.7
00000000:app.srvrep[0009:000c]: HTTP/1.1 200 OK
00000000:app.srvhdr[0009:000c]: Server: nginx/1.12.2
00000000:app.srvhdr[0009:000c]: Date: Fri, 30 Mar 2018 12:52:26 GMT
00000000:app.srvhdr[0009:000c]: Content-Type: application/octet-stream
00000000:app.srvhdr[0009:000c]: Content-Length: 1625682
00000000:app.srvhdr[0009:000c]: Last-Modified: Thu, 29 Mar 2018 23:20:07 GMT
00000000:app.srvhdr[0009:000c]: Connection: close
00000000:app.srvhdr[0009:000c]: ETag: "5abd74a7-18ce52"
00000000:app.srvhdr[0009:000c]: Accept-Ranges: bytes
00000000:app.srvcls[0009:adfd]
00000001:main.clicls[000a:ffffffff]
00000001:main.closed[000a:ffffffff]
00000002:main.clicls[000b:ffffffff]
00000002:main.closed[000b:ffffffff]
00000003:main.clicls[0009:ffffffff]
00000003:main.closed[0009:ffffffff]
Regards,
PiBa-NL (Pieter)
Op 30-3-2018 om 4:47 schreef Xu Ricky:
Hi:
File.zip (nginx haproxy php)
·I can't solve it ,please help me!thank you!
#error
502 Bad Gateway The server returned an invalid or incomplete response.
https://static.oschina.net/uploads/space/2018/0326/214155_DKqA_1441082.png