Ive been generating self-signed certificates by using the following command:-
sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/apache2/ssl/apache.key -out /etc/apache2/ssl/apache.crt
And then answer a series of questions:-
Country Name (2 letter code) [AU]:
State or Province Name (full name) [Some-State]:
Locality Name (eg, city) []:
Organization Name (eg, company) [Internet Widgits Pty Ltd]:
Organizational Unit Name (eg, section) []:
Common Name (e.g. server FQDN or YOUR name) []:
Email Address []:
Which works great, however I want to avoid having to type in the answers. So my question is:-
Is it possible to enter these questions in the command line, or pass a file in with the answers?
What Im trying to do is build my own hosting admin page, and allow users to generate their own self certified SSL certificates on my ubuntu server, then add the certificates to the vHost configurations of apache.