Configure an HTTPS virtual server to accept HTTP traffic 编辑

A user might attempt to access a secure website by sending an HTTP request. You can drop such requests or redirect the request to the secure website. In earlier releases, to redirect the request to the secure website, you were required to do the following:

  • Add HTTP and HTTPS virtual servers with the same IP address but different ports.
  • Add a responder action that redirects all traffic to the HTTPS virtual server.
  • Add a responder policy specifying the preceding action, and bind the policy to the HTTP virtual server.

From release 11.1, you can configure an HTTPS virtual server to also process all HTTP traffic. That is, if HTTP traffic is received on the HTTPS virtual server, the appliance internally performs one of the following actions depending on the option configured:

  • Prepends an https:// to the incoming URL.
  • Redirects the traffic to another HTTPS URL.

Two new parameters, httpsRedirectUrl and redirectFromPort are added to the add lb vserver command.

  • redirectFromPort: All HTTP traffic received on this port is prefixed with https:// in the URL and redirected. Ensure that you also specify the redirect URL. If you do not specify the redirect URL, the traffic is redirected to the virtual server IP address.
  • httpsRedirectUrl: All HTTP traffic received on the port specified in the -redirectFromPort parameter is redirected to this URL. For example, all HTTPS traffic received on http://www.example.com is redirected to https://www.sample.com.

Configure HTTP to HTTPS redirect by using the CLI

At the command prompt, type:

add lb vserver <name> <serviceType> -redirectFromPort <port | *>  -httpsRedirectUrl <URL>
<!--NeedCopy-->

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:78 次

字数:2488

最后编辑:8年前

编辑次数:0 次

更多

友情链接

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文