Web Server Rescue
Read-onlySmoke Check an HTTP Status
You need a quick status-code check after a deployment.
Command
curl -fsS -o /dev/null -w '%{http_code} %{time_total}s\n' https://example.com/health
Before you run this
System impact: Read-only. Low when scoped to the shown target.
When not to use it: Do not use it for endpoints where a GET request has side effects.
Expected output
A status code and total request time, such as 200 0.183s.
System impact
Read-only. Nothing changes locally. The command sends one HTTP GET request.
Recovery / rollback: no state is changed.
When to use it
Use after deployments, restarts, or DNS changes.
When not to use it
Do not use it for endpoints where a GET request has side effects.
next steps
Related commands
Your Site Is Not Down. DNS Might Be Lying.
The browser said the site was gone. The server was answering fine.
curl --resolve example.com:443:203.0.113.10 https://example.com/
Check the Certificate Served for SNI
The IP was right. The SNI name selected the wrong certificate.
openssl s_client -connect example.com:443 -servername www.example.com </dev/null 2>/dev/null | openssl x509 -noout -subject -ext subjectAltName
Show TLS Certificate Dates
The outage was not the web server. The edge certificate had expired.
openssl s_client -connect example.com:443 -servername example.com </dev/null 2>/dev/null | openssl x509 -noout -dates
Show TLS Certificate Names
The cert was valid, but not for this hostname.
openssl s_client -connect example.com:443 -servername example.com </dev/null 2>/dev/null | openssl x509 -noout -subject -ext subjectAltName
Show TLS Protocol and Cipher
The certificate was fine. The TLS negotiation told the rest of the story.
openssl s_client -connect example.com:443 -servername example.com </dev/null 2>/dev/null | awk '/Protocol|Cipher|Verify return code/ {print}'
Study mapping
Use this as independent command practice: read the notes, predict the output, then compare it with the example before using a real shell.
Independent study support only. No affiliation, endorsement, exam dumps, or real exam questions.