Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to debug why HTTPS not working? #131

Open
keyoti opened this issue Apr 6, 2018 · 1 comment
Open

How to debug why HTTPS not working? #131

keyoti opened this issue Apr 6, 2018 · 1 comment

Comments

@keyoti
Copy link

keyoti commented Apr 6, 2018

Here's my config


{
  "ports": {
    "8000": {
        "router": {
            "*": "127.0.0.1:80"
        }
    },
    "4443": {
        "router": {
            "*": "127.0.0.1:80"
        },
        "ssl": {
            
            "key": "c:\\path\\localhost.key",
            "cert": "c:\\path\\localhost.crt",
            "ca": ["c:\\path\\ca.key","c:\\path\\ca.crt"]
        },
        "SNI":{
            "localhost" : {
                "key": "c:\\path\\localhost.key",
                "cert": "c:\\path\\localhost.crt",
                "ca": ["c:\\path\\ca.key","c:\\path\\ca.crt"]
            }
        }
    }
  },
  "middleware": ["log -> e:\\access.log" ], 
  "modules": {
    "appLog": "e:\\app.log"
  }

}

the HTTP proxy works fine, but the HTTPS proxy doesn't do anything, the output in the cmd line is


[1] Listening on port: port 4443
[1] Listening on port: port 8000
[2] Listening on port: port 4443
[1] Start successful
[2] Listening on port: port 8000
[2] Start successful
All workers started in 1893ms

When I hit https://localhost:4443/ the browser shows

This site can’t be reached
localhost unexpectedly closed the connection.
Try:

Checking the connection
Checking the proxy and the firewall
Running Windows Network Diagnostics
ERR_CONNECTION_CLOSED

I have put some breakpoints in DispatchTable etc and I can see it processing the request, but I can't figure out how to debug this. I have no idea if my config is bad, or it's my certificates etc.

@Rush
Copy link
Member

Rush commented Aug 17, 2018

hi @keyoti, could you use openssl command line tools to debug? It might be the certificate being wrong.

$ openssl s_client -showcerts -connect localhost:4443

I believe you can download the openssl.exe binary here http://gnuwin32.sourceforge.net/packages/openssl.htm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants