Skip to content
SSL guides & resources

Install an SSL certificate on NGINX and verify the chain

Prepare an NGINX certificate change, check the full chain and matching key, validate configuration and verify each public hostname after reload.

This guide is for administrators who already manage an NGINX website. Paths, service names and privilege requirements vary by operating system and hosting arrangement. A control panel may regenerate configuration, so use its supported mechanism instead of editing generated files directly.

Start with the TLS endpoint. NGINX may serve visitors directly, sit behind a CDN, or proxy to another web server. Document which layer needs the certificate and whether several nodes must be updated.

A practical checklist

01

Prepare the change and rollback

Record the NGINX version, active configuration, hostnames and current certificate expiry. Back up the relevant configuration securely. Keep the existing working certificate available for rollback when it is still valid and its key is not compromised.
02

Check the certificate package

Confirm the requested names and that the key matches the issued certificate. For NGINX, the certificate file can include the leaf followed by the required intermediate certificates. Use the issuer’s chain, not a random bundle from an old installation.
03

Update the intended server block

Use the supported SSL listener and point ssl_certificate and ssl_certificate_key to protected files. Retain the application’s routing, proxy and authentication settings. Do not replace the entire virtual host with a generic example.
04

Validate before applying

Run the platform’s configuration test, commonly nginx -t, with the required permissions. Resolve missing files, unreadable keys and syntax errors before a controlled reload. Follow your service manager’s normal reload procedure and inspect its result.
05

Check every intended endpoint

Verify hostname matching, expiry and the presented chain from outside the server. Test root and www separately if both are used. For a cluster, confirm each node or load-balancer target received the change; one successful request can miss an outdated node.
06

Capture the handover

Record the deployed certificate reference, checks completed, configuration location and next replacement owner. Tie alerts to the installed certificate expiry, not only the supplier subscription end date.

Common problems and decisions

A chain works in one browser but fails elsewhere

One client may already possess an intermediate certificate that another lacks. Inspect what the server sends and use the correct chain; do not assume one successful browser proves compatibility.

The reload fails

Read the actual configuration error before retrying. File permissions, key mismatch and an incorrect file path need different fixes. Retain the running configuration until the replacement passes validation.

The public certificate is unchanged

Check SNI/hostname routing, another server block, CDN termination and other nodes. Diagnose the responding endpoint before replacing files again.

Prepare for the next conversation

For managed support, provide the public domain list, operating system, NGINX version, control panel and proxy/CDN arrangement. Agree the change window in Bangladesh time and who can approve rollback. Share administrative access through an approved secure process, not in an article comment or ordinary email attachment.

Common questions

Can I paste an Apache certificate configuration into NGINX?

No. The certificate files may be reusable when appropriate, but the configuration directives and chain handling must match NGINX.

Should I restart NGINX without testing?

No. Test the candidate configuration first and follow the platform’s controlled reload procedure. Confirm that the command succeeded and traffic still works.

Is the root certificate always part of the served bundle?

Normally clients use their own trust store. Follow the issuer and platform chain instructions rather than appending every certificate file you find.

Does a multi-year subscription avoid server replacements?

No. Individual certificates expire during the service term. Plan repeated validation, issuance and deployment or a suitable automation process.