All the instroctions you found on https://help.ubuntu.com/community/OpenSSL, here are just the short commands:
export OPENSSL_CONF=~/myCA/caconfig.cnf openssl req -x509 -newkey rsa:2048 -out cacert.pem -outform PEM -days 1825 export OPENSSL_CONF=~/myCA/vista.hu.conf openssl req -newkey rsa:1024 -keyout tempkey.pem -keyform PEM -out tempreq.pem -outform PEM openssl rsa < tempkey.pem > server_key.pem export OPENSSL_CONF=~/myCA/caconfig.cnf openssl ca -in tempreq.pem -out server_crt.pem rm -f tempkey.pem && rm -f tempreq.pem
Or here is a another solution:
mkdir /etc/nginx/ssl cd /etc/nginx/ssl openssl genrsa -out server_privkey.pem 2048 openssl req -new -x509 -key server_privkey.pem -out server_cacert.pem -days 1095 chmod 0600 server_privkey.pem