A complaint came in this morning: the internal site secure.lab.test will not open. It worked yesterday, and nobody changed the nginx configuration. Check that the service is alive, and request the page with curl the way a browser does — over HTTPS.
Request the site's page
Check whether nginx is running, and request the home page https://secure.lab.test/.
First, predict
What will curl print?
Now start the exercise, run the command and compare your prediction with the output.
nginx is running, yet there is no page. Who broke off the connection?
-
The connection was made: curl received the certificate and checked its validity. Without a connection it says
Couldn't connect to server. -
A refusal from nginx would come as an HTTP response with a code like 403, and curl would print it. Here HTTP never started: curl itself prints
SSL certificate problem.
The client checks the certificate — curl received it, saw it had expired and closed the connection.