title: how to proxy from https to http with lighttpd
body: <p>I have this internal site (192.168.2.1) which is only accessible with <code>http</code></p>
  
  <p>On a different server I run a public web-server using lighttpd. I can make this internal site accessible to the outside work as follows</p>
  
  <pre><code>$HTTP["host"] == "internal.example.com" {
      ...
      proxy.server  = ( "" =&gt;
          ( "internal" =&gt;
              (
                  "host" =&gt; "192.168.2.1",
                  "port" =&gt; 8000
              )
          )
  }
  </code></pre>
  
  <p>This works, but I would like to use https for the outside world. So my question is, how can I proxy this going from <code>https</code> to <code>http</code> ?</p>
  
  <p>I've tried something like this:</p>
  
  <pre><code>$SERVER["socket"] == ":443" {
     $HTTP["host"] == "internal.example.com" {
          ...
          proxy.server  = ( "" =&gt;
              ( "internal" =&gt;
                  (
                      "host" =&gt; "http://192.168.2.1",
                      "port" =&gt; 8000
                  )
              )
      }
  }
  </code></pre>
  
  <p>But this doesn't seem to work. Any help would be appreciated</p>
  
  <p>UPDATE: I get the impression that https is not supported in combination with reverse proxies. Maybe <a href="https://www.digitalocean.com/community/tutorials/an-introduction-to-haproxy-and-load-balancing-concepts" rel="nofollow noreferrer">HAProxy</a> is the solution</p>