1
0

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 3 years have passed since last update.

HTTPS接続を実装してみた(Tomcat)

Posted at

はじめに

こんにちは、山田です。
現在関わらせていただいている案件で、TomcatでHTTPS接続を実施したので記載していきます。

TOmcatのインストール

以下のTomcatのサイトより、ダウンロードリンクのアドレスをコピーします。
今回は、tar.zipを使用します。
https://tomcat.apache.org/
image.png

対象のサーバにログインします。
image.png

先ほどコピーしたダウンロードリンクを使用し、Tomcatをダウンロードします。

wget https://ftp.postgresql.org/pub/source/v13.4/postgresql-13.4.tar.gz

tarコマンドを用いて、ファイルを展開します。

tar -xvzf postgresql-13.4.tar.gz

https接続の有効化

/tmcat9/conf/server.xmlに以下の記述を追加します。

      <Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
               scheme="https"
               secure="true"
               clientAuth="false"
               sslProtocol="TLS"
               sslEnabledProtocols="TLSv1.2,TLSv1.1,TLSv1"
               keystoreFile="使用する証明書のパス" keystorePass="使用する証明書のパスワード" />

/tmcat9/conf/startup.shを実行して、Tomcatを起動させます。

image.png

動作確認

https://IPアドレス:8443で接続します。
以下のTomcatの画面が表示されれば完了です。

image.png

1
0
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
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?