# cd /etc/pki/tls/certs
# sed -i 's/365/3650/g' Makefile
# make server.crt
umask 77 ; \
/usr/bin/openssl genrsa -aes128 2048 > server.key
Generating RSA private key, 2048 bit long modulus
...................+++
.............................................................+++
e is 65537 (0x10001)
Enter pass phrase: # <= パスワード設定
Verifying - Enter pass phrase: # <= パスワード確認入力
umask 77 ; \
/usr/bin/openssl req -utf8 -new -key server.key -x509 -days 3650 -out server.crt -set_serial 0
Enter pass phrase for server.key: # <= パスワード入力
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) [XX]:JP # <= 国名
State or Province Name (full name) []:Shimane # <= 都道府県名
Locality Name (eg, city) [Default City]:Matsue # <= 市区町村名
Organization Name (eg, company) [Default Company Ltd]:mk-mode.com # <= 会社名・サイト名
Organizational Unit Name (eg, section) []: # <= 部署名
Common Name (eg, your name or your server's hostname) []:www.mk-mode.com # <= ホスト名・管理者名
Email Address []:webmaster@mk-mode.com # <= 管理者メールアドレス
2. パスワード削除
サーバ用秘密鍵からパスワードを削除する。
123
# openssl rsa -in server.key -out server.key
Enter pass phrase for server.key: # <= パスワード入力
writing RSA key
# /etc/rc.d/init.d/nginx restart
nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful
nginx を停止中: [ OK ]
nginx を起動中: [ OK ]