Instantly share code, notes, and snippets.

Embed
What would you like to do?
#バージョン確認
/usr/sbin/apachectl -v
Server version: Apache/2.2.3
#rootになる
su -
#購入先からメールなどで提示された秘密鍵にわかりやすい名前をつけて保存
vi /etc/httpd/conf/ssl.key/domain_name.key
#中間証明書も同様に保存
vi /etc/httpd/conf/ssl.crt/domain_name.cer
#証明書も同様に保存
vi /etc/httpd/conf/ssl.crt/domain_name.crt
#もともと存在していた ssl.confを念のためバックアップ
cp /etc/httpd/conf.d/ssl.conf /etc/httpd/conf.d/ssl.conf.bak
#confを編集
vi /etc/httpd/conf.d/ssl.conf
#追記する
<VirtualHost 192.168.xxx.xxx:443>
DocumentRoot "/usr/local/apache/htdocs"
ServerName www.ssl.ph
SSLEngine on
SSLCertificateKeyFile /etc/httpd/conf/ssl.key/domain_name.key
SSLCertificateChainFile /etc/httpd/conf/ssl.crt/domain_name.cer
SSLCertificateFile /etc/httpd/conf/ssl.crt/domain_name.crt
</VirtualHost>
#サーバ再起動
/etc/rc.d/init.d/httpd stop
/etc/rc.d/init.d/httpd start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment