dh.pem is a file containing a very big prime number (1066~2066 bit), generated randomly to be used with SSL certificate.

The following command can be used to generate a random dh file.

Dùng câu lệnh sau để tạo file random dhparams.pem

openssl dhparam -out dh.pem 2066

2066 is an arbitrary number specifying the number's size.