[admin@backup admin]$ su -
Password:
[root@backup root]# openssl req -new -x509 -keyout /usr/local/directadmin/conf/cakey.pem.tmp \
> -out /usr/local/directadmin/conf/cacert.pem
Generating a 1024 bit RSA private key
........................................................++++++
..........................++++++
writing new private key to '/usr/local/directadmin/conf/cakey.pem.tmp'
Enter PEM pass phrase:
Verifying - Enter PEM pass phrase:
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [GB]:<Removed>
State or Province Name (full name) [Berkshire]:<Removed>
Locality Name (eg, city) [Newbury]:<Removed>
Organization Name (eg, company) [My Company Ltd]:<Removed>
'Organizational Unit Name (eg, section) []:
Common Name (eg, your name or your server's hostname) []:<Removed>
Email Address []:<Removed>
[root@backup root]# openssl rsa -in /usr/local/directadmin/conf/cakey.pem.tmp \
> -out /usr/local/directadmin/conf/cakey.pem
Enter pass phrase for /usr/local/directadmin/conf/cakey.pem.tmp:
writing RSA key
[root@backup root]# rm /usr/local/directadmin/conf/cakey.pem.tmp
rm: remove regular file `/usr/local/directadmin/conf/cakey.pem.tmp'? y
[root@backup root]# chown diradmin:diradmin /usr/local/directadmin/conf/cakey.pem
[root@backup root]# chmod 400 /usr/local/directadmin/conf/cakey.pem
[root@backup root]# service directadmin restart
Stopping DirectAdmin: [ OK ]
Starting DirectAdmin: [ OK ]
[root@backup root]# service apf stop
Stopping APF:[ OK ]