Overview
This article describes how to use IIS to build HTTPS websites in ECS instances running Windows.
Detail
The following steps describe how to use IIS to build HTTPS-based websites on ECS instances running Windows.
Step 1: Create a certificate
- Use Windows Server 2008 R2 CA Service to create certificates and Server Manager in add roles.
- Select Active Directory Certificate Services.
- When you add services, you must select three services: certificate authority, certificate authority Web registration, and online responder.
- Because it is not a domain control environment, select independent.
- Select the root CA for the first CA to be installed.
- Select new private key.
- The default values are fine. You can also select custom settings.
- The name of the CA here. We recommend that you use the default value.
- The time to set the certificate. The default value is 5 years. You can set the time as needed.
- Select the database location for the certificate and log location.
Step 2: Create an IIS service
- After the CA certificate is installed, the installation program automatically starts the IIS installation.
- In this case, you need to select ASP.NET and . NET extensibility.
- Note that after you install a certificate, you cannot change the computer name or domain name.
- Finally, ensure that the certificate service and Web server are installed successfully.
Step 3: create a self-signed certificate
- Select the server certificate in IIS Manager.
- Select the created certificate, and then select create Self signed certificate.
- Set a friendly name.
Step 4: Build an HTTPS website
- Add a new website.
- Set up the website's home directory, set the type to https, SSL Certificates Service select pre-the name of the setting, this paper takes the aliyunca as an example
- Set a test page for index.html in the system directory.
- Open the default document for the system.
- Move the index.html default document to the top.
- When you test the access over HTTPS on an external network, you confirm that the service can be accessed. Because the certificate is not issued by a public CA, a security prompt is displayed. Click continue browsing this website. Generally, if you have purchased a CA certificate and used a paid certificate, you will not be prompted for security risks.
- Verify that you can access the website properly.
Application scope
- Elastic Compute Service