SSL cert -> empty response

Hello guys!

I just cannot seem to figure out why this is not working. I’m getting an empty response error (ERR_EMPTY_RESPONSE) on all requests.

The certificate is a wildcard (*.example.com) cert (letsencrypt) and is verified.

I am running one machine with:
Nextcloud on ports 81 (http) and 444 (https)
Node + express webserver on 5000 (http) and 5001 (https)
Strapi running on port 5003 (http, but needs to be ssl secured as well).

Have tried a lot of stuff, like changing mode from tcp to http, selecting different backends, regenerating the certificates. Any help would be much appreciated!

Config is as follows:

frontend https
        bind *:443 ssl crt /etc/ssl/example.com/example.com.pem
        mode tcp

        tcp-request inspect-delay 5s
        tcp-request content accept if { req_ssl_hello_type 1 }

        acl host_nextcloud req_ssl_sni -i files.example.com
        use_backend nextcloud-https if host_nextcloud

        acl host_webserver req_ssl_sni -i webserver.example.com
        use_backend webserver-https if host_webserver

        acl host_strapi req_ssl_sni -i strapi.example.com
        use_backend strapi-https if host_strapi
backend webserver-https
        mode tcp
        server webserver 127.0.0.1:5001 check

req_ssl_sni Returns a string containing the value of the Server Name TLS extension sent by a client in a TLS stream passing through the request buffer if the buffer contains data that parse as a complete SSL (v3 or superior) client hello message. Note that this only applies to raw contents found in the request buffer and not to contents deciphered via an SSL data layer, so this will not work with “bind” lines having the “ssl” option.

You can use ssl_fc_sni for this use-case, but I still think that is wrong. What you should do use http mode and access the host header instead.