An SSL certificate is a digital file that proves your server’s identity and enables encrypted HTTPS connections. Although the industry still says SSL, modern servers use TLS. When a visitor connects to https://example.com, the server presents the certificate and the public key; the browser validates the chain, and both sides negotiate a temporary session key. Without this certificate, data can be intercepted. In this article we explain the handshake, certificate validation levels, and practical installation steps for Nginx and Apache on AlmaLinux 9 with Let’s Encrypt renewals. If you want the conceptual background first, see our SSL explained guide.
How an SSL Certificate Works
When a browser opens an HTTPS URL, the TLS handshake starts before any HTTP data is exchanged. The client sends supported TLS versions and cipher suites. The server responds with its certificate chain and public key. The browser checks three things: the certificate is signed by a CA it trusts, the domain on the certificate matches the URL, and the certificate is within its validity period and not revoked. If those checks pass, the client and server agree on a symmetric session key, usually using ephemeral Diffie-Hellman or elliptic-curve key exchange. All subsequent traffic is encrypted with that key.
On production systems, allow only TLS 1.2 and TLS 1.3. Older protocols such as SSLv3, TLS 1.0 and TLS 1.1 are deprecated and should be disabled. The certificate chain must be sent completely; if the intermediate certificate is missing, some browsers and API clients fail the handshake.
Certificate Types and Validation Levels
Certificate authorities offer different validation levels:
- Domain Validation (DV): proves control over the domain only. It is often issued in minutes and suits blogs and small projects.
- Organization Validation (OV): the CA also verifies the organization behind the request. Organization details appear in the certificate.
- Extended Validation (EV): requires the most extensive checks. Browser UI for EV has been simplified, but it is still used in finance and e-commerce.
By coverage, you can choose:
- Single-domain: covers example.com or www.example.com.
- Wildcard: covers *.example.com and all direct subdomains.
- Multi-domain/SAN: covers several domains in one certificate.
A self-signed certificate is fine for internal testing but will trigger browser warnings on public sites. Production websites need a certificate from a publicly trusted CA.
Installing SSL on Nginx and Apache (AlmaLinux 9)
The examples below use AlmaLinux 9 or Rocky Linux 9 with dnf. Paths may differ on Debian/Ubuntu.
First create a private key and a certificate signing request:
openssl req -new -newkey rsa:2048 -nodes -keyout site.key -out site.csr
Enter the correct Common Name or SAN for your domain when prompted. Send the CSR to your CA and receive the signed certificate plus the chain file.
Nginx server block example:
server {
listen 443 ssl;
http2 on;
server_name example.com;
ssl_certificate /etc/ssl/certs/site.crt;
ssl_certificate_key /etc/ssl/private/site.key;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 1d;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers HIGH:!aNULL:!MD5;
root /usr/share/nginx/html;
}
server {
listen 80;
server_name example.com;
return 301 https://$host$request_uri;
}
Apache virtual host example:
<VirtualHost *:443>
ServerName example.com
DocumentRoot /var/www/html
SSLEngine on
SSLCertificateFile /etc/pki/tls/certs/site.crt
SSLCertificateKeyFile /etc/pki/tls/private/site.key
SSLCertificateChainFile /etc/pki/tls/certs/chain.crt
SSLProtocol all -SSLv3 -TLSv1 -TLSv1.1
SSLCipherSuite HIGH:!aNULL:!MD5
</VirtualHost>
After editing, run syntax checks:
nginx -t
apachectl configtest
Then restart the service.
Free Certificates with Let’s Encrypt and Certbot
For most public sites, Let’s Encrypt is the fastest way to obtain a trusted DV certificate. On AlmaLinux 9 with Nginx, install Certbot and request a certificate:
dnf install nginx certbot python3-certbot-nginx
certbot --nginx -d example.com -d www.example.com
Certbot edits the Nginx config, obtains the certificate, and offers an HTTP-to-HTTPS redirect. Certificates are valid for 90 days; the Certbot systemd timer or cron job should renew them automatically. Test renewal with:
certbot renew --dry-run
For a deeper walkthrough, see Certbot: free Let’s Encrypt SSL certificate management and Certbot SSL setup and automatic renewal.
Managing SSL on a VDS
If you host the site on your own virtual server (VDS), you have root access, so certificate files and renewal tasks are completely under your control. You can deploy the same certificate to Nginx, Apache, mail services, and control panels by pointing each service to the certificate path. Unlike shared hosting, where SSL is often handled through a panel, a VDS lets you script renewal hooks, run multiple TLS-enabled services, and inspect the full chain with openssl. For advice on infrastructure sizing before you deploy, see how much RAM does a server need.
Certificate Verification and Common Problems
After installation, check the served certificate with:
echo | openssl s_client -connect example.com:443 -servername example.com 2>/dev/null | openssl x509 -noout -dates -subject
Common production issues we see:
- Expired certificate: browsers show errors such as NET::ERR_CERT_DATE_INVALID. Monitor renewal timers and set alerts.
- Missing intermediate chain: if the chain file is not loaded, some clients cannot build a trusted path. Include the CA bundle in the correct order.
- Mixed content: an HTTPS page loading images, CSS, or JavaScript over http:// triggers warnings. Use relative URLs or force HTTPS for all assets.
- Weak protocols or ciphers: leaving TLS 1.0 or SSLv3 enabled causes security scanner failures. Restrict protocols and ciphers as shown above.
If the handshake succeeds locally but external clients still fail, verify the public IP, firewall rules for port 443, and DNS records.