Replace an Expired SSL Certificate

Find an expired certificate on a running nginx, generate a new one, and install it.

A intermediate Linux challenge worth 10 points. Solve it hands-on in a real Linux environment in your browser - no local setup, no fake shells.

The Challenge

Users are getting SSL errors on the staging HTTPS endpoint (port 443). The nginx server is running with an expired self-signed certificate.

Your tasks:

openssl req -x509 -newkey rsa:2048 -keyout /etc/nginx/ssl/nginx.key -out /etc/nginx/ssl/nginx.crt -days 365 -nodes -subj "/CN=localhost"

openssl x509 -noout -enddate -in /etc/nginx/ssl/nginx.crt > /tmp/cert_expiry.txt