官术网_书友最值得收藏!

Setting up SSL for Windows

Service workers are designed to run only across HTTPS, so in order for us to test our code, we need our web pages to be delivered across HTTPS. In this recipe, we will cover getting your site setup with SSL support for Windows.

Getting ready

This recipe assumes you run Windows 7 or higher with Internet Information Service (IIS) enabled.

How to do it...

Follow these instructions to enable SSL:

  1. First, open IIS; you can do this by running the following command inside the command line:
    Inetmgr
    
  2. Select the server node in the tree view and double-click the Server Certificates feature in the list view, as shown:
  3. Click on the Create Self-Signed Certificate... link in the Actions pane.
  4. Enter a meaningful name for the new certificate and click OK.

    This will generate a self-signed certificate, which is marked for Server Authentication use, meaning it uses a server-side certificate for authenticating the identity of the server and also for HTTP SSL encryption.

    In order to create an SSL binding, we have to select a site in the tree view and then, in the Actions pane, click Bindings.... This will bring up the bindings editor that manages bindings for your website, which include create, edit, and delete. Now, to add your new SSL binding to the site, click Add....

  5. Port 80 is the default setting for a new binding for HTTP. We can select https in the Type drop-down list. Select the self-signed certificate we created in the previous section from the SSL Certificate drop-down list, and then click OK.
  6. Now we have a new SSL binding on our site and all that remains is to make sure that it works.
  7. Click Continue to this website to proceed.
主站蜘蛛池模板: 三门峡市| 梁山县| 临湘市| 修水县| 揭东县| 合山市| 吐鲁番市| 正镶白旗| 津市市| 顺昌县| 驻马店市| 烟台市| 汤阴县| 茌平县| 兰西县| 巧家县| 名山县| 淮阳县| 庄浪县| 荣成市| 福海县| 犍为县| 桓台县| 小金县| 柏乡县| 屏南县| 屯留县| 江达县| 宁晋县| 通榆县| 麦盖提县| 静海县| 会昌县| 石棉县| 石河子市| 庆阳市| 德钦县| 北辰区| 家居| 建瓯市| 新绛县|