This tutorial walks you through the procedure to configure Internet Information Services (IIS) for a Windows Server 2016 instance of the ecs.g6.large instance type. You can use this tutorial to familiarize yourself with operations in the ECS console.

Preparations

  1. Create an account and complete the account information.
  2. Optional:Alibaba Cloud provides a default virtual private cloud (VPC) for each region. If you do not want to use the default VPC, you can also create a VPC and a VSwitch within the target region.
    For more information about how to create a VPC, see Create an IPv4 VPC.
  3. Optional:Alibaba Cloud provides a default security group for each region. If you do not want to use the default security group, you can also create a security group within the target region where the instance is created.
    For more information about how to create a security group, see Create a security group.

Step 1. Create an ECS instance

  1. Go to the Custom Launch tab in the ECS console.
  2. In the first four configuration steps of the buy page, complete the instance launch configuration.
    The following configurations are used in this tutorial. Keep the default settings for parameters that are not described in this tutorial.
    Step Parameter Example Description
    Basic Configurations Billing Method Pay-As-You-Go The pay-as-you-go billing method allows more flexible operations. For more information, see Billing overview.
    Note If an ICP filing is required for your domain name, you must select Subscription.
    Region
    • Region: China (Hangzhou)
    • Zone: Random
    You cannot change the region or zone after the instance is created. Exercise caution when you configure this parameter.
    Instance Type
    • Instance family: General Purpose Type g6
    • Instance type: ecs.g6.large
    Instance types that are available are determined by the region you select and the inventory in the region.

    You can go to the ECS Instance Types Available for Each Region page to view the instance types available in each region.

    Image
    • Type: Public Image
    • Version: Windows Server 2016 Datacenter 64-bit
    After the instance is started, the operating system and application data of the image are copied to the system disk.
    Networking VPC [Default]vpc-bp1opxu1zkhn00g****** Resources that are prefixed with [Default] are automatically created in the ECS console.
    Public IP Address Select The system allocates a public IPv4 address if you select Assign Public IP Address.
    Bandwidth Billing Pay-By-Traffic In Pay-By-Traffic mode, bandwidth is billed based on the amount of actual network usage. For more information, see Billing methods of public bandwidth.
    Peak Bandwidth 2 Mbps None.
    Security Group
    • Security Group ID: [Default]sg-bp1bhjjsoiyx44******
    • Rule: Select ICMP, SSH 22, RDP 3389, HTTP 80, and HTTPS 443.
    Resources that are prefixed with [Default] are automatically created in the ECS console.
    System Configurations (Optional) Logon Credentials Password Record the password. It is the password for the administrator and is required when you connect to the ECS instance. For more information, see the Connect to the ECS instance section.
    Instance Name
    EcsQuickStart
    In this tutorial, EcsQuickStart is used as the instance name.
    Grouping (Optional) Tags ECS:Documentation If multiple instances are created, we recommend that you add tags to facilitate management.
  3. Click Next: Preview. On the page that appears, confirm the configurations in Configurations Selected, or click the Edit icon icon to modify the configurations.
    Quick start - Windows
  4. Optional:Click Save as Launch Template. In the Save as Launch Template dialog box that appears, set Template Name and Version Description.
    Quick start - Launch template
    Note Save the configurations selected for the current instance as a launch template. You can create an instance by using the template without the need to specify the configurations again.
  5. Read and select ECS Terms of Service. Then, click Create Instance.
  6. In the Created message that appears, click Console to view the creation progress on the Instances page.
    If the instance is in the Running state, the instance is created. Copy the public IP address of the instance to use when you connect to the ECS instance.Quick start - Linux - Created

Step 2. Add security group rules

If you did not select any rules in the default security group when you created the ECS instance, or the ECS instance was added to a new security group, you can follow these steps:

  1. Click the instance ID to go to the instance details page.
  2. In the left-side navigation pane, click Security Groups. Then, click the security group ID to go to the security group details page.
  3. On the Security Group Rules page, click the Inbound tab.
  4. Click Quick Rule Creation. Add a security group rule as described in the following table. For parameters that are not described in this tutorial, use the default values.
    Action Port Range Authorization Object
    Allow
    • SSH 22
    • RDP 3389
    • HTTP 80
    • HTTPS 443
    0.0.0.0/0
    Note
    • For the Common Port (TCP) section, select the port that must be enabled for the applications that run on the ECS instance. For example, select HTTP 80 when you perform the operations in the Step 4. Configure IIS section.
    • 0.0.0.0/0 indicates that devices in all CIDR blocks are allowed to access the specified port. If you know the IP address of the requester, we recommend that you set Authorization Object to a specific IP address range that contains the IP address of the requester.
    Quick start - Linux - Add security group rules
  5. Click OK.

Step 3. Connect to the ECS instance

  1. Return to the Instances page and find the EcsQuickStart instance.
  2. In the Actions column, click Connect.
  3. In the Enter VNC Password dialog box that appears, click Modify VNC Password.
  4. Modify the password. In the Enter VNC Password dialog box that appears, enter your new password, and click OK.
  5. In the upper-left corner of the VNC page, choose Send Remote Call > CTRL+ALT+DELETE.
    CTRL+ALT+DELETE
  6. Go to the logon page of the Windows instance and configure the logon credentials.

Step 4. Configure IIS

  1. Launch Command Prompt.
  2. Enter powershell to switch to PowerShell.
  3. Install IIS and the management tools.
    Install-WindowsFeature -name Web-Server -IncludeAllSubFeature -IncludeManagementTools
  4. After IIS is installed, open a web page in the current browser. Enter the public IP address of the instance in the address bar and press the Enter key.
    http://<Public IP address of the instance>
    Quick start - Windows - Test page

Step 5 (optional). Resolve domain names

Direct access to IIS by using the public IP address of the instance may degrade server security. If you have an existing domain name or want to register one, perform the following steps:

  1. Register a domain name.
    For more information, see Register a domain name.
  2. If the website to which the domain name points is hosted on an ECS instance in a mainland China region, you must apply for an ICP filing for the domain name.
    For more information, see ICP filing application overview.
  3. Resolve the domain name to point to the public IP address of the instance.
    Domain name resolution is a prerequisite for using domain names to access your website. For more information, see Add and manage records.
  4. Use the resolved domain name to access IIS. Example: https://ecs-quickstarts.info.

Step 6 (optional). Release the ECS instance

You can release the instance if you no longer need it. After the instance is released, billing stops and data cannot be recovered.

Note You can follow the instructions in this section to release only pay-as-you-go instances.
  1. Return to the Instances page and find the EcsQuickStart instance.
  2. In the Actions column, choose More > Instance Status > Release.
  3. In the Release dialog box that appears, click Release Now. Then, click Next.
  4. Verify the instance to be released and then click OK.

Step 7. View bills

  1. In the top navigation bar, choose Billing > User Center.
  2. In the left-side navigation pane, choose Spending Summary > Instance Spending Detail.
  3. Set Search By to Instance ID. Enter the ID of the EcsQuickStart instance. Press the Enter key to start the search.

What to do next