0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

SSLサーバー証明書の申請~設定方法

Posted at

環境

CentOS
Apache

秘密鍵とCSRの生成

作業フォルダに移動

cd /etc/pki/tls/certs/hoge

秘密鍵を作成します。

(パスフレーズ)
```shell

### CSRを作成します。

openssl req -new -key (秘密鍵ファイル名) -out (CSRファイル名)
(パスフレーズ)


### ディスティングイッシュネームを登録します。
```shell
Country Name (2 letter code) [AU]:
State or Province Name (full name) []:
Locality Name (eg, city) []:
Organization Name (eg, company) []:
Organizational Unit Name (eg, section) []:
Common Name (eg, YOUR name) []:
Email Address []:
A challenge password []:
An optional company name []:

SSL証明書の申請を行う

省略…

SSLサーバー証明書の設定

証明書をサーバへ配置します。

touch (SSLサーバー証明書ファイル名)

-----BEGIN CERTIFICATE-----
<サーバー証明書>
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
<中間CA証明書>
-----END CERTIFICATE-----

WebサーバはApacheのため.confファイルに以下を記載します。

SSLEngine on
SSLCertificateFile (SSLサーバー証明書配置パス)
SSLCertificateKeyFile (パスフレーズなしの秘密鍵ファイル配置パス)

Apacheの再起動

service httpd stop
service httpd start
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?