# HTTP frontend with HTTPS backend

**URL:** <https://discourse.haproxy.org/t/http-frontend-with-https-backend/2056>\
**Category:** Help!\
**Created:** [January 31, 2018, 10:01am UTC](https://discourse.haproxy.org/t/http-frontend-with-https-backend/2056 "2018-01-31T10:01:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![chown](https://avatars.discourse-cdn.com/v4/letter/c/a9a28c/32.png) [@chown](https://discourse.haproxy.org/u/chown)\
**Post date:** [January 31, 2018, 10:01am UTC](https://discourse.haproxy.org/t/http-frontend-with-https-backend/2056/1 "2018-01-31T10:01:21Z")

</div>

I’m trying to simply get requests to my local ip address on port 80 to be directed to httpbin[dot]org. I’ve tried numerous configurations and all I’m getting from haproxy (version 1.5.19) are 503’s. Can someone tell me if this is possible? All I’m coming up with on my searches are how to force http to https using a redirect which is not what I want to do as I don’t want to put an SSL certificate on the frontend. I want haproxy to forward my http request and encrypt the request to the backend server. I’ve verified I can curl httpbin[dot]org from the same machine with no issue so it’s not a firewall problem and I can see haproxy attempting to make a connection on port 443 to that web server, just not sure what I’m missing.

haproxy.cfg:

global  
log /dev/log local2  
user haproxy  
group haproxy  
ssl-server-verify none  
spread-checks 3

defaults  
maxconn 32  
log global  
mode http  
option httplog  
option dontlognull  
retries 2  
option redispatch  
timeout connect 5000  
timeout client 10000  
timeout server 10000

frontend test-in  
bind \*:80  
default\_backend test-out

backend test-out  
http-request set-header Host [httpbin.org](http://httpbin.org)  
server test [httpbin.org:443](http://httpbin.org:443) ssl verify none no-sslv3

---

<div class="post-metadata">

**Author:** ![lukastribus](https://avatars.discourse-cdn.com/v4/letter/l/7ea924/32.png) [@lukastribus](https://discourse.haproxy.org/u/lukastribus)\
**Post date:** [January 31, 2018, 10:26am UTC](https://discourse.haproxy.org/t/http-frontend-with-https-backend/2056/2 "2018-01-31T10:26:28Z")

</div>

Could be your backend server requires SNI.

Add `sni str(httpbin.org)` to your server configuration.
