$ cd /usr/local/httpd-2.4.12
$ sudo openssl genrsa -aes128 1024 > conf/server.key
$ sudo openssl req -new -key conf/server.key > conf/server.csr
Enter pass phrase for serverkey:
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,</li>
</ul></li>
</ul>
<h2>If you enter '.', the field will be left blank.</h2>
Country Name (2 letter code) [XX]:JP
State or Province Name (full name) []:【都道府県】
Locality Name (eg, city) [Default City]:【市町村】
Organization Name (eg, company) [Default Company Ltd]:【団体名】
Organizational Unit Name (eg, section) []:【組織名】
Common Name (eg, your name or your server's hostname) []:【ホスト名】
Email Address []:【メールアドレス】
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:
$ sudo openssl x509 -in conf/server.csr -days 3650 -req -signkey conf/server.key > conf/server.crt
$ sudo ./bin/apachectl restart
$ sudo mv conf/server.key conf/server.key.back
$ sudo openssl rsa -in conf/server.key.back > conf/server.key
$ sudo ./bin/apachectl restart