缺省情况下,httpEndpoint 元素使用服务器缺省 SSL 配置 defaultSSLConfig。可将 httpEndpoint
配置为使用缺省 SSL 配置以外的 SSL 配置。
关于此任务
可通过多种方式将 httpEndpoint 配置为使用 SSL 配置。以下示例显示通过不同方式将 httpEndpoint
配置为使用缺省 SSL 配置以外的 SSL 配置。
过程
- 直接在 httpEndpoint 上设置 SSL 选项。 以下示例显示如何在 httpEndpoint 上设置 SSL 选项,并假定您已定义名为 wasListenerSSLConfig
的 SSL 配置,此配置未包括在此示例中:
<httpEndpoint id="defaultHttpEndpoint"
host="${listener.host}"
httpPort="${http.port}"
httpsPort="${https.port}">
<sslOptions sslRef="wasListenerSSLConfig" />
</httpEndpoint>
- 在 httpEndpoint 中引用 sslOption 元素。 以下示例显示如何引用 sslOption 元素,并假定您已定义名为 wasListenerSSLConfig
的 SSL 配置,此配置未包括在此示例中:
<sslOptions id="mySSLOptions" sslRef="wasListenerSSLConfig" />
<httpEndpoint id="defaultHttpEndpoint"
host="${listener.host}"
httpPort="${http.port}"
httpsPort="${https.port}"
sslOptionsRef="mySSLOptions"
/>
- 将缺省 sslOptions 元素更改为指向缺省 SSL 配置以外的 SSL 配置。 此选项未变更 httpEndpoint。以下示例显示如何更改缺省 sslOptions 元素,并假定您已定义名为 wasListenerSSLConfig
的 SSL 配置,此配置未包括在此示例中:
<sslOptions id="defaultSSLOptions" sslRef="wasListenerSSLConfig" />