RealPath:
WebPath:
2017/01/13 00:48 (JST) 更新
Apache >>

HTTPS設定

Contents

mod_sslインストール

bash
# yum -y install mod_ssl

秘密鍵作成

bash
# cd /etc/pki/tls/certs
# make server.key
Enter pass phrase: xxxxxx
# openssl rsa -in server.key -out server.key
Enter pass phrase for server.key: xxxxxx

証明書作成

bash
# cd /etc/pki/tls/certs
# make server.crt
Country Name (2 letter code) [GB]:JP
State or Province Name (full name) [Berkshire]:Tokyo-to
Locality Name (eg, city) [Newbury]:Sinjuku-ku
Organization Name (eg, company) [My Company Ltd]:HogeCompany
Organizational Unit Name (eg, section) []:Online
Common Name (eg, your name or your server's hostname) []:kobasv2
Email Address []:kobake@hogehoge.jp

ファイル移動

bash
# mv /etc/pki/tls/certs/server.key /etc/pki/tls/private/.

ssl.conf 編集または新規作成

/etc/httpd/conf.d/ssl.conf
SSLCertificateFile /etc/pki/tls/certs/server.crt
SSLCertificateKeyFile /etc/pki/tls/private/server.key

再起動

bash
# service httpd restart

参考