Important -- This is information gathered from the internet and may be incorrect, dangerous, or just outdated. The configuration options chosen here are just an example.
See https://mozilla.github.io/server-side-tls/ssl-config-generator/ See https://shaaaaaaaaaaaaa.com/
- 01 - Generate key, csr, extension (optional), crt, pem
- 02 - Update protocols for web server
- 03 - Test certificates
It is good practice to serve the full certificate chain, this also avoids the insecure certificate message on android devices. See http://stackoverflow.com/a/13864846.
There is a trade off between allowing theoretically (but impractically) insecure protocols and supporting all browsers, this concerns attacks on RC4 and BEAST. See https://community.qualys.com/blogs/securitylabs/2013/03/19/rc4-in-tls-is-broken-now-what.
I've lost the information about generating DH keys, sorry - will add this if I find it, but DH may not be well supported or recommended. See http://security.stackexchange.com/questions/44251/openssl-generate-different-type-of-self-signed-certificate, https://gist.github.com/plentz/6737338.
Look into HSTS (although this may break a self-signed certificate). See https://scotthelme.co.uk/setting-up-hsts-in-nginx/.
State of SSL. See https://www.trustworthyinternet.org/ssl-pulse/.
Commands. See http://www.sslshopper.com/article-most-common-openssl-commands.html.