title: ngrok https/tls tunnel not working?
body: <p>I have a private web site like <code>internal.mycompany.com</code> which is only accessible within company's private network. I am trying to make this web site publicly accessible using ngrok. (I purchased a business plan). No matter what I tried I was not able to open the web site using https. http works fine but it is not ideal because web site normally redirects http requests to https. Then I tried similar thing using google.</p>
  
  <p>Below is what my .ngrok2/ngrok.yml file looks like:</p>
  
  <pre><code>http-google-com:
      addr: www.google.com:80
      host_header: "rewrite"
      subdomain: "http-google-com"
      proto: http
  https-google-com:
      addr: www.google.com:443
      host_header: "rewrite"
      subdomain: "https-google-com"
      proto: http
  tls-google-com:
      addr: www.google.com:443
      host_header: "rewrite"
      subdomain: "tls-google-com"
      proto: tls
  </code></pre>
  
  <p>Then I run <code>ngrok start --all</code> and these are the results for each case when I browse the urls with my browser. All results are same for my internal web site.</p>
  
  <p><strong>http-google-com:</strong> When I browse <code>http://http-google-com.ngrok.io/</code> (or https://) browser opens <code>https://www.google.com</code>. Seems like it some how redirects.</p>
  
  <p><strong>https-google-com:</strong> When I browse <code>http://https-google-com.ngrok.io/</code> (or https://) I get "502 Bad Gateway" error</p>
  
  <p><strong>tls-google-com:</strong> When I browse <code>https://tls-google-com.ngrok.io/</code> browser says that the ssl certificate is for "google.com" domains not for "ngrok.io". After adding security exception, browser displays google's classic 404 page which says "404. That’s an error. The requested URL / was not found on this server. That’s all we know."</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I tried <code>proto:tcp</code> but it did not work also.</p>
  
  <pre><code>tcp-google-com:
      addr: www.google.com:443
      host_header: "rewrite"
      subdomain: "tcp-google-com"
      proto: tcp
  </code></pre>