{"id":48128,"date":"2024-10-07T19:04:17","date_gmt":"2024-10-07T11:04:17","guid":{"rendered":"https:\/\/server.hk\/cnblog\/48128\/"},"modified":"2024-10-07T19:04:18","modified_gmt":"2024-10-07T11:04:18","slug":"iis-%e5%85%a5%e9%96%80%ef%bc%9a%e7%82%ba%e9%81%8a%e6%88%b2%e6%a7%8b%e5%bb%ba%e8%87%aa%e5%8b%95%e5%8c%96%e6%9c%8d%e5%8b%99%e9%85%8d%e7%bd%ae-iis","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/48128\/","title":{"rendered":"IIS \u5165\u9580\uff1a\u70ba\u904a\u6232\u69cb\u5efa\u81ea\u52d5\u5316\u670d\u52d9\u914d\u7f6e IIS"},"content":{"rendered":"<h1 id=\"iis-%e5%85%a5%e9%96%80%ef%bc%9a%e7%82%ba%e9%81%8a%e6%88%b2%e6%a7%8b%e5%bb%ba%e8%87%aa%e5%8b%95%e5%8c%96%e6%9c%8d%e5%8b%99%e9%85%8d%e7%bd%ae-iis-VhpSOkpMEC\">IIS \u5165\u9580\uff1a\u70ba\u904a\u6232\u69cb\u5efa\u81ea\u52d5\u5316\u670d\u52d9\u914d\u7f6e IIS<\/h1>\n<p>\u5728\u7576\u4eca\u7684\u6578\u4f4d\u6642\u4ee3\uff0c\u7db2\u7d61\u904a\u6232\u7684\u9700\u6c42\u4e0d\u65b7\u4e0a\u5347\uff0c\u9019\u4f7f\u5f97\u4f3a\u670d\u5668\u7684\u914d\u7f6e\u548c\u7ba1\u7406\u8b8a\u5f97\u5c24\u70ba\u91cd\u8981\u3002IIS\uff08Internet Information Services\uff09\u4f5c\u70ba\u5fae\u8edf\u7684\u4e00\u6b3e\u5f37\u5927\u7db2\u9801\u4f3a\u670d\u5668\uff0c\u80fd\u5920\u70ba\u904a\u6232\u63d0\u4f9b\u7a69\u5b9a\u7684\u652f\u6301\u3002\u672c\u6587\u5c07\u4ecb\u7d39\u5982\u4f55\u70ba\u904a\u6232\u69cb\u5efa\u81ea\u52d5\u5316\u670d\u52d9\u914d\u7f6e IIS\uff0c\u5e6b\u52a9\u958b\u767c\u8005\u548c\u7cfb\u7d71\u7ba1\u7406\u54e1\u66f4\u6709\u6548\u5730\u7ba1\u7406\u4f3a\u670d\u5668\u3002<\/p>\n<h2 id=\"iis-%e7%b0%a1%e4%bb%8b-VhpSOkpMEC\">IIS \u7c21\u4ecb<\/h2>\n<p>IIS \u662f\u4e00\u6b3e\u7531\u5fae\u8edf\u958b\u767c\u7684\u7db2\u9801\u4f3a\u670d\u5668\uff0c\u4e3b\u8981\u7528\u65bc\u627f\u8f09\u548c\u7ba1\u7406\u7db2\u7ad9\u53ca\u61c9\u7528\u7a0b\u5f0f\u3002\u5b83\u652f\u6301\u591a\u7a2e\u5354\u8b70\uff0c\u5305\u62ec HTTP\u3001HTTPS\u3001FTP \u7b49\uff0c\u4e26\u4e14\u80fd\u5920\u8207 ASP.NET\u3001PHP \u7b49\u6280\u8853\u7121\u7e2b\u96c6\u6210\u3002\u5c0d\u65bc\u904a\u6232\u958b\u767c\u8005\u4f86\u8aaa\uff0cIIS \u63d0\u4f9b\u4e86\u9748\u6d3b\u7684\u914d\u7f6e\u9078\u9805\u548c\u5f37\u5927\u7684\u6027\u80fd\uff0c\u9069\u5408\u7528\u65bc\u904a\u6232\u4f3a\u670d\u5668\u7684\u642d\u5efa\u3002<\/p>\n<h2 id=\"%e7%82%ba%e9%81%8a%e6%88%b2%e6%a7%8b%e5%bb%ba%e8%87%aa%e5%8b%95%e5%8c%96%e6%9c%8d%e5%8b%99%e7%9a%84%e6%ad%a5%e9%a9%9f-VhpSOkpMEC\">\u70ba\u904a\u6232\u69cb\u5efa\u81ea\u52d5\u5316\u670d\u52d9\u7684\u6b65\u9a5f<\/h2>\n<h3 id=\"1-%e5%ae%89%e8%a3%9d-iis-VhpSOkpMEC\">1. \u5b89\u88dd IIS<\/h3>\n<p>\u9996\u5148\uff0c\u60a8\u9700\u8981\u5728 Windows Server \u4e0a\u5b89\u88dd IIS\u3002\u53ef\u4ee5\u901a\u904e\u4ee5\u4e0b\u6b65\u9a5f\u9032\u884c\u5b89\u88dd\uff1a<\/p>\n<ul>\n<li>\u6253\u958b\u300c\u63a7\u5236\u9762\u677f\u300d\u3002<\/li>\n<li>\u9078\u64c7\u300c\u7a0b\u5e8f\u300d&gt;\u300c\u555f\u7528\u6216\u95dc\u9589 Windows \u529f\u80fd\u300d\u3002<\/li>\n<li>\u5728\u5f48\u51fa\u7684\u7a97\u53e3\u4e2d\uff0c\u52fe\u9078\u300cInternet Information Services\u300d\uff0c\u7136\u5f8c\u9ede\u64ca\u300c\u78ba\u5b9a\u300d\u3002<\/li>\n<\/ul>\n<h3 id=\"2-%e9%85%8d%e7%bd%ae%e7%b6%b2%e7%ab%99-VhpSOkpMEC\">2. \u914d\u7f6e\u7db2\u7ad9<\/h3>\n<p>\u5b89\u88dd\u5b8c\u6210\u5f8c\uff0c\u60a8\u53ef\u4ee5\u958b\u59cb\u914d\u7f6e\u7db2\u7ad9\u3002\u4ee5\u4e0b\u662f\u57fa\u672c\u7684\u914d\u7f6e\u6b65\u9a5f\uff1a<\/p>\n<ul>\n<li>\u6253\u958b IIS \u7ba1\u7406\u5668\u3002<\/li>\n<li>\u53f3\u9375\u9ede\u64ca\u300c\u7db2\u7ad9\u300d\uff0c\u9078\u64c7\u300c\u65b0\u589e\u7db2\u7ad9\u300d\u3002<\/li>\n<li>\u586b\u5beb\u7db2\u7ad9\u540d\u7a31\u3001\u7269\u7406\u8def\u5f91\u548c\u7aef\u53e3\u865f\u3002<\/li>\n<li>\u9ede\u64ca\u300c\u78ba\u5b9a\u300d\u4ee5\u5275\u5efa\u7db2\u7ad9\u3002<\/li>\n<\/ul>\n<h3 id=\"3-%e8%87%aa%e5%8b%95%e5%8c%96%e9%85%8d%e7%bd%ae-VhpSOkpMEC\">3. \u81ea\u52d5\u5316\u914d\u7f6e<\/h3>\n<p>\u70ba\u4e86\u5be6\u73fe\u81ea\u52d5\u5316\u914d\u7f6e\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528 PowerShell \u8173\u672c\u4f86\u7ba1\u7406 IIS\u3002\u4ee5\u4e0b\u662f\u4e00\u500b\u7c21\u55ae\u7684\u793a\u4f8b\uff0c\u5c55\u793a\u5982\u4f55\u4f7f\u7528 PowerShell \u5275\u5efa\u4e00\u500b\u65b0\u7684\u7db2\u7ad9\uff1a<\/p>\n<pre><code>\nImport-Module WebAdministration\n\n$siteName = \"MyGameSite\"\n$sitePath = \"C:inetpubwwwrootMyGameSite\"\n$port = 8080\n\nNew-Item -Path \"IIS:Sites$siteName\" -Bindings @{protocol=\"http\";bindingInformation=\"*:8080:\"} -PhysicalPath $sitePath\n<\/code><\/pre>\n<p>\u9019\u6bb5\u4ee3\u78bc\u5c07\u5275\u5efa\u4e00\u500b\u540d\u70ba &#8220;MyGameSite&#8221; \u7684\u65b0\u7db2\u7ad9\uff0c\u4e26\u5c07\u5176\u7d81\u5b9a\u5230 8080 \u7aef\u53e3\u3002<\/p>\n<h3 id=\"4-%e8%a8%ad%e7%bd%ae%e6%87%89%e7%94%a8%e7%a8%8b%e5%bc%8f%e6%b1%a0-VhpSOkpMEC\">4. \u8a2d\u7f6e\u61c9\u7528\u7a0b\u5f0f\u6c60<\/h3>\n<p>\u61c9\u7528\u7a0b\u5f0f\u6c60\u662f IIS \u4e2d\u7684\u4e00\u500b\u91cd\u8981\u6982\u5ff5\uff0c\u5b83\u80fd\u5920\u9694\u96e2\u4e0d\u540c\u7db2\u7ad9\u7684\u904b\u884c\u74b0\u5883\u3002\u70ba\u4e86\u63d0\u9ad8\u904a\u6232\u7684\u6027\u80fd\uff0c\u60a8\u53ef\u4ee5\u70ba\u904a\u6232\u7db2\u7ad9\u5275\u5efa\u4e00\u500b\u5c08\u7528\u7684\u61c9\u7528\u7a0b\u5f0f\u6c60\uff1a<\/p>\n<pre><code>\nNew-WebAppPool -Name \"MyGameAppPool\"\nSet-ItemProperty \"IIS:AppPoolsMyGameAppPool\" -Name \"managedRuntimeVersion\" -Value \"v4.0\"\n<\/code><\/pre>\n<h3 id=\"5-%e7%9b%a3%e6%8e%a7%e5%92%8c%e7%b6%ad%e8%ad%b7-VhpSOkpMEC\">5. \u76e3\u63a7\u548c\u7dad\u8b77<\/h3>\n<p>\u4e00\u65e6\u7db2\u7ad9\u548c\u61c9\u7528\u7a0b\u5f0f\u6c60\u914d\u7f6e\u5b8c\u6210\uff0c\u60a8\u9700\u8981\u5b9a\u671f\u76e3\u63a7\u4f3a\u670d\u5668\u7684\u6027\u80fd\u3002IIS \u63d0\u4f9b\u4e86\u591a\u7a2e\u76e3\u63a7\u5de5\u5177\uff0c\u4f8b\u5982\u6027\u80fd\u8a08\u6578\u5668\u548c\u65e5\u8a8c\u8a18\u9304\u529f\u80fd\uff0c\u5e6b\u52a9\u60a8\u53ca\u6642\u767c\u73fe\u554f\u984c\u4e26\u9032\u884c\u7dad\u8b77\u3002<\/p>\n<h2 id=\"%e7%b8%bd%e7%b5%90-VhpSOkpMEC\">\u7e3d\u7d50<\/h2>\n<p>\u901a\u904e\u4ee5\u4e0a\u6b65\u9a5f\uff0c\u60a8\u53ef\u4ee5\u70ba\u904a\u6232\u69cb\u5efa\u4e00\u500b\u7a69\u5b9a\u4e14\u9ad8\u6548\u7684\u81ea\u52d5\u5316\u670d\u52d9\u914d\u7f6e IIS\u3002\u9019\u4e0d\u50c5\u80fd\u63d0\u9ad8\u904a\u6232\u7684\u6027\u80fd\uff0c\u9084\u80fd\u7c21\u5316\u7ba1\u7406\u6d41\u7a0b\u3002\u82e5\u60a8\u9700\u8981\u9032\u4e00\u6b65\u7684\u652f\u6301\u6216\u5c0b\u627e\u5408\u9069\u7684\u4f3a\u670d\u5668\u89e3\u6c7a\u65b9\u6848\uff0c\u8acb\u8003\u616e\u6211\u5011\u7684 <a href=\"https:\/\/server.hk\">\u9999\u6e2fVPS<\/a> \u670d\u52d9\uff0c\u70ba\u60a8\u7684\u904a\u6232\u63d0\u4f9b\u6700\u4f73\u7684\u904b\u884c\u74b0\u5883\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5b78\u7fd2\u5982\u4f55\u4f7f\u7528IIS\u70ba\u904a\u6232\u69cb\u5efa\u81ea\u52d5\u5316\u670d\u52d9\u914d\u7f6e\uff0c\u7c21\u5316\u90e8\u7f72\u6d41\u7a0b\uff0c\u63d0\u5347\u6548\u80fd\u8207\u7ba1\u7406\u6548\u7387\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4924],"tags":[],"class_list":["post-48128","post","type-post","status-publish","format-standard","hentry","category-setup-tutorials"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/48128","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=48128"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/48128\/revisions"}],"predecessor-version":[{"id":48129,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/48128\/revisions\/48129"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=48128"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=48128"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=48128"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}