6.2. コネクターの HTTP/2 を有効にする
server.xml 設定ファイルの設定を更新することで、コネクターの HTTP/2 を有効にすることができます。
手順
-
JWS_HOME/tomcat/conf/server.xml設定ファイルを開きます。 server.xmlファイルで、HTTP/2 アップグレードプロトコルをコネクターに追加します。以下に例を示します。
<Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol" maxThreads="150" SSLEnabled="true"> <UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol" /> <SSLHostConfig> <Certificate certificateKeystoreFile="/KeyStore.jks" certificateKeystorePassword="changeit" type="RSA" /> </SSLHostConfig> </Connector>server.xmlファイルには、アップグレードプロトコルが HTTP/2 に設定された APR プロトコルのコネクター定義の例が含まれています。以下に例を示します。
<Connector port="8443" protocol="org.apache.coyote.http11.Http11AprProtocol" maxThreads="150" SSLEnabled="true" > <UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol" /> <SSLHostConfig> <Certificate certificateKeyFile="conf/localhost-rsa-key.pem" certificateFile="conf/localhost-rsa-cert.pem" certificateChainFile="conf/localhost-rsa-chain.pem" type="RSA" /> </SSLHostConfig> </Connector>設定の更新を適用するには、root ユーザーとして Red Hat JBoss Web Server を再起動します。
systemdを使用して Red Hat Enterprise Linux で JBoss Web Server を再起動するには、次のコマンドを入力します。# systemctl restart jws5-tomcat.servicestartup.shを使用して Red Hat Enterprise Linux で JBoss Web Server を再起動するには、次のコマンドを入力します。# JWS_HOME/sbin/shudown.sh # JWS_HOME/sbin/startup.shMicrosoft Windows で JBoss Web Server を再起動するには、次のコマンドを入力します。
# net restart tomcat9
Red Hat Enterprise Linux 6 はサポートされなくなり、その後ドキュメントから削除されました。