BAD REQ 400 when trying to enable HAProxy ssl?

3

http works but can't connect via secure connection.

The haproxy log file error:

{} <BADREQ> 400 mainssl/<NOSRV> <ip> 187 -1

output of socket show errors:

frontend mainssl (#3): invalid request
  backend <NONE> (#-1), server <NONE> (#-1), event #4
  src <ip>, session #7, session flags 0x00000080
  HTTP msg state 26, msg flags 0x00000000, tx flags 0x00000000
  HTTP chunk len 0 bytes, HTTP body len 0 bytes
  buffer flags 0x00908002, out 0 bytes, total 212 bytes
  pending 212 bytes, wrapping at 16384, error at position 0:

haproxy config:

frontend mainssl *:443 ssl crt /etc/haproxy/certs/<domain>.pem
    reqadd X-Forwarded-Proto:\ https
    option forwardfor
    capture request header Host len 32
    log-format %hr\ %r\ %ST\ %b/%s\ %ci:%cp\ %B\ %Tr

    acl letsencrypt-acl path_beg /.well-known/acme-challenge/
    use_backend letsencrypt if letsencrypt-acl

    default_backend test

backend test
    balance     roundrobin
    server  node1 127.0.0.1:8888 check

backend letsencrypt
   server letsencrypt_renewal 127.0.0.1:54321

I've seen similar questions but haven't been able to resolve the issue. How can i resolve or further trouble-shoot this?

ssl
haproxy
asked on Server Fault Oct 28, 2018 by Don P

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0