[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["わかりにくい","hardToUnderstand","thumb-down"],["情報またはサンプルコードが不正確","incorrectInformationOrSampleCode","thumb-down"],["必要な情報 / サンプルがない","missingTheInformationSamplesINeed","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-08-19 UTC。"],[[["\u003cp\u003eThis tutorial guides you through deploying a basic IIS web server on a Compute Engine virtual machine (VM) instance, similar to a standard Windows server.\u003c/p\u003e\n"],["\u003cp\u003eYou'll need to set up a new Windows VM instance, and ensure HTTP traffic is allowed before installing IIS and related services using PowerShell commands.\u003c/p\u003e\n"],["\u003cp\u003eAfter installing IIS, the default web page is overwritten with a "Hello World!" page using a command line entry.\u003c/p\u003e\n"],["\u003cp\u003eThe newly set up server is then tested by accessing the VM's external IP address in a browser to verify that the "Hello World!" page is properly displayed.\u003c/p\u003e\n"],["\u003cp\u003eTroubleshooting tips are included to address "Connection Refused" errors, highlighting the importance of proper firewall configurations, and confirming that traffic is being sent over \u003ccode\u003ehttp\u003c/code\u003e rather than \u003ccode\u003ehttps\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Running a basic IIS web server\n\n*** ** * ** ***\n\nYou can control a virtual machine (VM) instance on Compute Engine like any\nstandard Windows server. This tutorial shows you how to deploy a simple IIS web\nserver so you can learn the basics of running a web server on a VM.\n\nBefore you begin\n----------------\n\nYou'll need a new Windows instance with HTTP traffic allowed.\n\n- Follow the [Quickstart](/compute/docs/create-windows-server-vm-instance) instructions to create a new Windows instance and connect to it with RDP. \n\nInstall IIS\n-----------\n\n1. On the Windows taskbar, in the search field, type `PowerShell` and then\n press `Enter`. If there is no search field on the taskbar, click the search\n icon, type `PowerShell`, and then press `Enter`. If neither the search field\n nor the search icon appear on the taskbar, see [Hide and unhide your search\n box in Windows](https://support.microsoft.com/en-us/help/4028221/windows-10-locating-the-search-box-in-windows-10).\n\n2. In the search results, under **Apps** , right-click **Windows PowerShell** ,\n and choose **Run as administrator**.\n\n3. Install IIS services with the following commands:\n\n ```\n import-module servermanager\n ``` \n\n ```\n add-windowsfeature web-server -includeallsubfeature\n ```\n4. Overwrite the IIS web server default web page with the following command:\n\n ```\n echo '\u003c!doctype html\u003e\u003chtml\u003e\u003cbody\u003e\u003ch1\u003eHello World!\u003c/h1\u003e\u003c/body\u003e\u003c/html\u003e' \u003e C:\\inetpub\\wwwroot\\index.html\n ```\n\nTest your server\n----------------\n\nTest that your instance is serving traffic on its external IP:\n\n1. In the Google Cloud console, go to the **VM instances** page.\n\n [Go to VM instances](https://console.cloud.google.com/compute/instances)\n2. View the `Hello World!` page by copying the IP address from the **External\n IP** column and pasting it into a new browser tab. If you do not see the `Hello\n World!` page, follow the [Troubleshooting steps](/compute/docs/tutorials/basic-webserver-iis#troubleshooting).\n\nClean up\n--------\n\nWhen you're done experimenting, follow the clean up instructions in the\n[Quickstart](/compute/docs/create-windows-server-vm-instance#clean-up) to avoid incurring\ncharges for this instance.\n\nTroubleshooting\n---------------\n\n**Receiving a `Connection Refused` error**\n\nIf you are seeing a `Connection Refused` error, it is possible that:\n\n- Your VM instance is not publicly accessible because your firewall rules or\n tags are misconfigured in one of the following ways:\n\n - The VM instance does not have the proper tag that allows Compute Engine to apply the appropriate firewall rules to your instance.\n - Your project does not have a firewall rule that allows traffic to the external IP address for your instance.\n- You are trying to access the VM using an `https` address. Check that your\n URL is `http://[EXTERNAL_IP]` rather than `https://[EXTERNAL_IP]`.\n\nTo ensure that your VM instance has the correct tags:\n\n1. In the Google Cloud console, go to the **VM instances** page.\n\n [Go to VM instances](https://console.cloud.google.com/compute/instances)\n2. Click the name of the instance that you are trying to connect to.\n3. Click **Edit** at the top of the page.\n4. Scroll down to **Firewalls** , and make sure the **Allow HTTP traffic** box is checked. If it is not checked, check it.\n5. Save your changes. This ensures that the correct tags are added to the VM instance.\n\nTo ensure that the correct firewall rule exists:\n\n1. In the Google Cloud console, go to the **Firewall rules** page.\n\n [Go to Firewall rules](https://console.cloud.google.com/networking/firewalls)\n2. Look for a firewall rule that allows all IP ranges through tcp:80. Usually, this rule is named the `default-allow-http` rule.\n3. If a rule does not exist, create one.\n 1. Click **Create firewall rule**.\n 2. Enter a name for the rule, such as `default-allow-http`.\n 3. Under **Source IP ranges** , enter `0.0.0.0/0` to allow traffic from all sources.\n 4. Under **Protocols and ports** , check **Specified protocols and ports** and enter `tcp:80`.\n 5. Create your firewall rule.\n\nTest your server again by going to the external IP address of the instance: \n\n http://[EXTERNAL_IP]"]]