nginx: [emerg] BIO_new_file("/etc/ssl/certs/dhparam.pem") failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/etc/ssl/certs/dhparam.pem','r') error:2006D080:BIO routines:BIO_new_file:no such file) nginx: configuration file /etc/nginx/nginx.conf test failed
The error occurs when the file is missing dhparam.pem. To solve this problem You need to generate dhparam and save to file dhparam.pem.
Go to the directory /etc/ssl/certs/:
cd /etc/ssl/certs/
Generate a key file dhparam.pem:
openssl dhparam 2048 -out dhparam.pem
Restart nginx:
service nginx restart