Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


For Nginx web server it is recommended to have server certificate and intermediate certificates bundled in file configured by "ssl_certificate" directive: is recommended setup verified by users

Example of setting of correct certificate path in nginx files:

Code Block
# Example of configuring recommended path to complete chain
grep 'ssl_certificate /' /etc/nginx/sites-available/*
sed -i 's#ssl_certificate /.*#ssl_certificate /data/ssl/chain.crt#' /etc/nginx/sites-available/*

grep 'ssl_certificate /' /etc/nginx/sites-available/*

This is recommended setup verified by users:

Code Block
# Preparing hook:
mkdir -p /data/ssl/hooks/
touch /data/ssl/hooks/
chmod +x /data/ssl/hooks/
echo "'#!/bin/sh
cat /data/ssl/server.crt > /data/ssl/chain.crt
cat /data/ssl/ca-bundle.crt >> /data/ssl/chain.crt
systemctl restart nginx
"' > /data/ssl/hooks/
cat /data/ssl/hooks/

 # Finally executing the hook to verify that it works