<h2 style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); outline: none; box-sizing: border-box; margin: 8px 0px 16px; padding: 0px; border: 0px; vertical-align: baseline; color: rgb(79, 79, 79); font-size: 24px; line-height: 32px; font-family: -apple-system, "SF UI Text", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif, SimHei, SimSun; text-wrap: wrap; background-color: rgb(255, 255, 255);">前言</h2><p style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); outline: none; box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; padding: 0px; border: 0px; vertical-align: baseline; font-size: 16px; color: var(--md-editor-text-color-active); overflow: auto hidden; font-family: -apple-system, "SF UI Text", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif, SimHei, SimSun; text-wrap: wrap; background-color: rgb(255, 255, 255); line-height: 1.429em !important;">后端在为服务配置端口时,我们可以配置80端口。因为<span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); outline: none; box-sizing: border-box; font-weight: bolder; margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;">浏览网页服务默认的端口号都是80</span>,因此只需输入网址即可,不用输入“:80”了。Nginx的默认端口也是80。</p><p style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); outline: none; box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; padding: 0px; border: 0px; vertical-align: baseline; font-size: 16px; color: var(--md-editor-text-color-active); overflow: auto hidden; font-family: -apple-system, "SF UI Text", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif, SimHei, SimSun; text-wrap: wrap; background-color: rgb(255, 255, 255); line-height: 1.429em !important;">不过,有时候,80端口会被占用,有可能是被ntoskrnl.exe应用程序占用,有可能是被电脑的SQL Server占用,也有可能是被IIS服务占用。通过网上搜集以及自身遇到的问题,总结了三个解决方法。</p><p style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); outline: none; box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; padding: 0px; border: 0px; vertical-align: baseline; font-size: 16px; color: var(--md-editor-text-color-active); overflow: auto hidden; font-family: -apple-system, "SF UI Text", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif, SimHei, SimSun; text-wrap: wrap; background-color: rgb(255, 255, 255); line-height: 1.429em !important;">第一步,通过查找,可以找到,80端口被System这个服务占用。</p><p style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); outline: none; box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; padding: 0px; border: 0px; vertical-align: baseline; font-size: 16px; color: var(--md-editor-text-color-active); overflow: auto hidden; font-family: -apple-system, "SF UI Text", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif, SimHei, SimSun; text-wrap: wrap; background-color: rgb(255, 255, 255); line-height: 1.429em !important;">在cmd命令窗口输入<code class="hljs language-1c" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); outline: none; box-sizing: border-box; font-family: -apple-system, "SF UI Text", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif, SimHei, SimSun; font-size: 1em; margin: 0px; padding: 2px 6px; border: 0px; vertical-align: baseline; color: rgb(171, 178, 191); background: rgb(40, 44, 52); border-radius: 4px; display: inline-block;">netstat -ano <span class="hljs-string" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); outline: none; box-sizing: border-box; margin: 0px; padding: 0px; border: 0px; vertical-align: baseline; color: rgb(152, 195, 121); line-height: normal;">|findstr 80</span></code>,找到80端口的PID=4,再到任务管理器中查看。</p><p style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); outline: none; box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; padding: 0px; border: 0px; vertical-align: baseline; font-size: 16px; color: var(--md-editor-text-color-active); overflow: auto hidden; font-family: -apple-system, "SF UI Text", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif, SimHei, SimSun; text-wrap: wrap; background-color: rgb(255, 255, 255); line-height: 1.429em !important;"><img src="https://img-blog.csdnimg.cn/4d6a59fbc4094d0993d9749fc005a45c.png#pic_center" alt="在这里插入图片描述" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); outline: none; box-sizing: border-box; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; max-width: 100%; height: auto;"/></p><p style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); outline: none; box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; padding: 0px; border: 0px; vertical-align: baseline; font-size: 16px; color: var(--md-editor-text-color-active); overflow: auto hidden; font-family: -apple-system, "SF UI Text", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif, SimHei, SimSun; text-wrap: wrap; background-color: rgb(255, 255, 255); line-height: 1.429em !important;">该服务无法结束。</p><h2 style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); outline: none; box-sizing: border-box; margin: 8px 0px 16px; padding: 0px; border: 0px; vertical-align: baseline; color: rgb(79, 79, 79); font-size: 24px; line-height: 32px; font-family: -apple-system, "SF UI Text", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif, SimHei, SimSun; text-wrap: wrap; background-color: rgb(255, 255, 255);">一、ntoskrnl.exe 占用 80 端口</h2><p style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); outline: none; box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; padding: 0px; border: 0px; vertical-align: baseline; font-size: 16px; color: var(--md-editor-text-color-active); overflow: auto hidden; font-family: -apple-system, "SF UI Text", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif, SimHei, SimSun; text-wrap: wrap; background-color: rgb(255, 255, 255); line-height: 1.429em !important;">通过右键,属性,看到该服务是调用了ntoskrnl.exe。</p><p style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); outline: none; box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; padding: 0px; border: 0px; vertical-align: baseline; font-size: 16px; color: var(--md-editor-text-color-active); overflow: auto hidden; font-family: -apple-system, "SF UI Text", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif, SimHei, SimSun; text-wrap: wrap; background-color: rgb(255, 255, 255); line-height: 1.429em !important;"><img src="https://img-blog.csdnimg.cn/66164c4891d745b4a54d3449989177e2.png?x-oss-process=image,type_d3F5LXplbmhlaQ,shadow_50,text_Q1NETiBAQ3rojIPnibnopb8=,size_14,color_FFFFFF,t_70,g_se,x_16#pic_center" alt="在这里插入图片描述" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); outline: none; box-sizing: border-box; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; max-width: 100%; height: auto;"/></p><blockquote style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); outline: none; box-sizing: border-box; margin: 0px 0px 24px; padding: 16px 16px 0px; border-width: 0px 0px 0px 8px; border-top-style: initial; border-right-style: initial; border-bottom-style: initial; border-left-style: solid; border-top-color: initial; border-right-color: initial; border-bottom-color: initial; border-left-color: rgb(221, 223, 228); border-image: initial; vertical-align: baseline; quotes: none; background: rgb(238, 240, 244); overflow: auto; overflow-wrap: normal; word-break: normal; color: rgb(85, 87, 112); font-family: -apple-system, "SF UI Text", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif, SimHei, SimSun; font-size: 16px; text-wrap: wrap;"><p style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); outline: none; box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; padding: 0px; border: 0px; vertical-align: baseline; color: rgb(79, 79, 79); overflow: auto hidden; line-height: 26px;"><code class="hljs language-vim" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); outline: none; box-sizing: border-box; font-family: -apple-system, "SF UI Text", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif, SimHei, SimSun; font-size: 1em; margin: 0px; padding: 2px 6px; border: 0px; vertical-align: baseline; color: rgb(171, 178, 191); background: rgb(40, 44, 52); border-radius: 4px; display: inline-block;">ntoskrnl.<span class="hljs-keyword" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); outline: none; box-sizing: border-box; margin: 0px; padding: 0px; border: 0px; vertical-align: baseline; color: rgb(198, 120, 221); line-height: normal;">exe</span></code> 是 Windows 操作系统的一个重要内核程序文件,里面<a href="https://auth.huaweicloud.com/authui/saml/login?xAccountType=csdndev_IDP&isFirstLogin=false&service=https%3A%2F%2Factivity.huaweicloud.com%2Ffree_test%2Findex.html%3Futm_source%3Dhwc-csdn%26utm_medium%3Dshare-op%26utm_campaign%3D%26utm_content%3D%26utm_term%3D%26utm_adplace%3DAdPlace070851" target="_blank" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); outline: none; box-sizing: border-box; background: transparent; color: rgb(78, 161, 219); cursor: pointer; transition: color 0.2s ease 0s; margin: 0px; padding: 0px; border: 0px; vertical-align: baseline; text-decoration-line: none; backface-visibility: hidden;">存储</a>了大量的二进制内核代码,用于调度系统。在系统经过预启动和启动阶段后进入内核调用阶段时由 Ntldr 调用 ntoskrnl.exe, 在 Windows XP 系统中 ntoskrnl.exe <a href="https://auth.huaweicloud.com/authui/saml/login?xAccountType=csdndev_IDP&isFirstLogin=false&service=https%3A%2F%2Factivity.huaweicloud.com%2Ffree_test%2Findex.html%3Futm_source%3Dhwc-csdn%26utm_medium%3Dshare-op%26utm_campaign%3D%26utm_content%3D%26utm_term%3D%26utm_adplace%3DAdPlace070851" target="_blank" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); outline: none; box-sizing: border-box; background: transparent; color: rgb(78, 161, 219); cursor: pointer; transition: color 0.2s ease 0s; margin: 0px; padding: 0px; border: 0px; vertical-align: baseline; text-decoration-line: none; backface-visibility: hidden;">存储</a>了启动 logo 画面。 调用 ntoskrnl.exe 文件时将由 <code class="hljs language-vim" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); outline: none; box-sizing: border-box; font-family: -apple-system, "SF UI Text", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif, SimHei, SimSun; font-size: 1em; margin: 0px; padding: 2px 6px; border: 0px; vertical-align: baseline; color: rgb(171, 178, 191); background: rgb(40, 44, 52); border-radius: 4px; display: inline-block;">ntdetect.<span class="hljs-keyword" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); outline: none; box-sizing: border-box; margin: 0px; padding: 0px; border: 0px; vertical-align: baseline; color: rgb(198, 120, 221); line-height: normal;">com</span></code> 收集的硬件信息传递给它,同时被调用的还有 hal.dll 文件。在正常情况下,在任务管理器是以"System"的名字出现的。</p></blockquote><p style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); outline: none; box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; padding: 0px; border: 0px; vertical-align: baseline; font-size: 16px; color: var(--md-editor-text-color-active); overflow: auto hidden; font-family: -apple-system, "SF UI Text", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif, SimHei, SimSun; text-wrap: wrap; background-color: rgb(255, 255, 255); line-height: 1.429em !important;">上述是百度百科对ntoskrnl.exe的解释,因此,我们不能随意就结束掉这个任务。</p><p style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); outline: none; box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; padding: 0px; border: 0px; vertical-align: baseline; font-size: 16px; color: var(--md-editor-text-color-active); overflow: auto hidden; font-family: -apple-system, "SF UI Text", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif, SimHei, SimSun; text-wrap: wrap; background-color: rgb(255, 255, 255); line-height: 1.429em !important;"><span style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); outline: none; box-sizing: border-box; font-weight: bolder; margin: 0px; padding: 0px; border: 0px; vertical-align: baseline;">解决方法:</span></p><p style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); outline: none; box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; padding: 0px; border: 0px; vertical-align: baseline; font-size: 16px; color: var(--md-editor-text-color-active); overflow: auto hidden; font-family: -apple-system, "SF UI Text", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif, SimHei, SimSun; text-wrap: wrap; background-color: rgb(255, 255, 255); line-height: 1.429em !important;">1、搜索服务打开服务界面:</p><p style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); outline: none; box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; padding: 0px; border: 0px; vertical-align: baseline; font-size: 16px; color: var(--md-editor-text-color-active); overflow: auto hidden; font-family: -apple-system, "SF UI Text", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif, SimHei, SimSun; text-wrap: wrap; background-color: rgb(255, 255, 255); line-height: 1.429em !important;"><img src="https://img-blog.csdnimg.cn/a18c3679463045a28a521f1ecb52c729.png#pic_center" alt="在这里插入图片描述" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); outline: none; box-sizing: border-box; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; max-width: 100%; height: auto;"/></p><p style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); outline: none; box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; padding: 0px; border: 0px; vertical-align: baseline; font-size: 16px; color: var(--md-editor-text-color-active); overflow: auto hidden; font-family: -apple-system, "SF UI Text", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif, SimHei, SimSun; text-wrap: wrap; background-color: rgb(255, 255, 255); line-height: 1.429em !important;">2、找到<code class="hljs language-nginx" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); outline: none; box-sizing: border-box; font-family: -apple-system, "SF UI Text", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif, SimHei, SimSun; font-size: 1em; margin: 0px; padding: 2px 6px; border: 0px; vertical-align: baseline; color: rgb(171, 178, 191); background: rgb(40, 44, 52); border-radius: 4px; display: inline-block;"><span class="hljs-attribute" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); outline: none; box-sizing: border-box; margin: 0px; padding: 0px; border: 0px; vertical-align: baseline; color: rgb(152, 195, 121); line-height: normal;">World</span> Wide Web 发布服务</code>这个服务,右键属性,将它的启动类型改为<code class="hljs language-undefined" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); outline: none; box-sizing: border-box; font-family: -apple-system, "SF UI Text", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif, SimHei, SimSun; font-size: 1em; margin: 0px; padding: 2px 6px; border: 0px; vertical-align: baseline; color: rgb(171, 178, 191); background: rgb(40, 44, 52); border-radius: 4px; display: inline-block;">手动</code>,然后<code class="hljs language-undefined" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); outline: none; box-sizing: border-box; font-family: -apple-system, "SF UI Text", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif, SimHei, SimSun; font-size: 1em; margin: 0px; padding: 2px 6px; border: 0px; vertical-align: baseline; color: rgb(171, 178, 191); background: rgb(40, 44, 52); border-radius: 4px; display: inline-block;">停止</code>掉该服务。</p><p style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); outline: none; box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; padding: 0px; border: 0px; vertical-align: baseline; font-size: 16px; color: var(--md-editor-text-color-active); overflow: auto hidden; font-family: -apple-system, "SF UI Text", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif, SimHei, SimSun; text-wrap: wrap; background-color: rgb(255, 255, 255); line-height: 1.429em !important;"><img src="https://img-blog.csdnimg.cn/e2fa45759e7b4fc7a9fe5875840973be.png#pic_center" alt="在这里插入图片描述" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); outline: none; box-sizing: border-box; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; max-width: 100%; height: auto;"/></p><h2 style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); outline: none; box-sizing: border-box; margin: 8px 0px 16px; padding: 0px; border: 0px; vertical-align: baseline; color: rgb(79, 79, 79); font-size: 24px; line-height: 32px; font-family: -apple-system, "SF UI Text", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif, SimHei, SimSun; text-wrap: wrap; background-color: rgb(255, 255, 255);"><a href="https://huaweicloud.csdn.net/63563a96d3efff3090b5b616.html?spm=1001.2101.3001.6650.7&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Eactivity-7-122594326-blog-54378593.235%5Ev38%5Epc_relevant_anti_t3&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Eactivity-7-122594326-blog-54378593.235%5Ev38%5Epc_relevant_anti_t3&utm_relevant_index=14" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); outline: none; box-sizing: border-box; background: transparent; color: rgb(78, 161, 219); cursor: pointer; transition: color 0.2s ease 0s; margin: 0px; padding: 0px; border: 0px; vertical-align: baseline; text-decoration-line: none; backface-visibility: hidden;"></a>二、关闭SQL Server服务</h2><p style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); outline: none; box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; padding: 0px; border: 0px; vertical-align: baseline; font-size: 16px; color: var(--md-editor-text-color-active); overflow: auto hidden; font-family: -apple-system, "SF UI Text", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif, SimHei, SimSun; text-wrap: wrap; background-color: rgb(255, 255, 255); line-height: 1.429em !important;">如果上一种方法无法解决,我们可以看看本方法:</p><p style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); outline: none; box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; padding: 0px; border: 0px; vertical-align: baseline; font-size: 16px; color: var(--md-editor-text-color-active); overflow: auto hidden; font-family: -apple-system, "SF UI Text", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif, SimHei, SimSun; text-wrap: wrap; background-color: rgb(255, 255, 255); line-height: 1.429em !important;">有可能你电脑里有<code class="hljs language-pgsql" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); outline: none; box-sizing: border-box; font-family: -apple-system, "SF UI Text", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif, SimHei, SimSun; font-size: 1em; margin: 0px; padding: 2px 6px; border: 0px; vertical-align: baseline; color: rgb(171, 178, 191); background: rgb(40, 44, 52); border-radius: 4px; display: inline-block;"><span class="hljs-keyword" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); outline: none; box-sizing: border-box; margin: 0px; padding: 0px; border: 0px; vertical-align: baseline; color: rgb(198, 120, 221); line-height: normal;">SQL</span> <span class="hljs-keyword" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); outline: none; box-sizing: border-box; margin: 0px; padding: 0px; border: 0px; vertical-align: baseline; color: rgb(198, 120, 221); line-height: normal;">Server</span></code>这个软件,它会占用你的80端口。</p><p style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); outline: none; box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; padding: 0px; border: 0px; vertical-align: baseline; font-size: 16px; color: var(--md-editor-text-color-active); overflow: auto hidden; font-family: -apple-system, "SF UI Text", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif, SimHei, SimSun; text-wrap: wrap; background-color: rgb(255, 255, 255); line-height: 1.429em !important;">解决方法:进入服务界面后,找到<code class="hljs language-pgsql" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); outline: none; box-sizing: border-box; font-family: -apple-system, "SF UI Text", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif, SimHei, SimSun; font-size: 1em; margin: 0px; padding: 2px 6px; border: 0px; vertical-align: baseline; color: rgb(171, 178, 191); background: rgb(40, 44, 52); border-radius: 4px; display: inline-block;"><span class="hljs-keyword" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); outline: none; box-sizing: border-box; margin: 0px; padding: 0px; border: 0px; vertical-align: baseline; color: rgb(198, 120, 221); line-height: normal;">SQL</span> <span class="hljs-keyword" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); outline: none; box-sizing: border-box; margin: 0px; padding: 0px; border: 0px; vertical-align: baseline; color: rgb(198, 120, 221); line-height: normal;">Server</span> Reporting Service(MSSQLSERVER)</code>这个服务,停止即可。</p><h2 style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); outline: none; box-sizing: border-box; margin: 8px 0px 16px; padding: 0px; border: 0px; vertical-align: baseline; color: rgb(79, 79, 79); font-size: 24px; line-height: 32px; font-family: -apple-system, "SF UI Text", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif, SimHei, SimSun; text-wrap: wrap; background-color: rgb(255, 255, 255);"><a href="https://huaweicloud.csdn.net/63563a96d3efff3090b5b616.html?spm=1001.2101.3001.6650.7&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Eactivity-7-122594326-blog-54378593.235%5Ev38%5Epc_relevant_anti_t3&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Eactivity-7-122594326-blog-54378593.235%5Ev38%5Epc_relevant_anti_t3&utm_relevant_index=14" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); outline: none; box-sizing: border-box; background: transparent; color: rgb(78, 161, 219); cursor: pointer; transition: color 0.2s ease 0s; margin: 0px; padding: 0px; border: 0px; vertical-align: baseline; text-decoration-line: none; backface-visibility: hidden;"></a>三、修改注册表</h2><p style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); outline: none; box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; padding: 0px; border: 0px; vertical-align: baseline; font-size: 16px; color: var(--md-editor-text-color-active); overflow: auto hidden; font-family: -apple-system, "SF UI Text", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif, SimHei, SimSun; text-wrap: wrap; background-color: rgb(255, 255, 255); line-height: 1.429em !important;">win+R,输入regedit,打开注册表。</p><p style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); outline: none; box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; padding: 0px; border: 0px; vertical-align: baseline; font-size: 16px; color: var(--md-editor-text-color-active); overflow: auto hidden; font-family: -apple-system, "SF UI Text", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif, SimHei, SimSun; text-wrap: wrap; background-color: rgb(255, 255, 255); line-height: 1.429em !important;"><img src="https://img-blog.csdnimg.cn/f88e1f3804e74abf9c6cfb73f96c843b.png?x-oss-process=image,type_d3F5LXplbmhlaQ,shadow_50,text_Q1NETiBAQ3rojIPnibnopb8=,size_14,color_FFFFFF,t_70,g_se,x_16#pic_center" alt="在这里插入图片描述" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); outline: none; box-sizing: border-box; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; max-width: 100%; height: auto;"/></p><p style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); outline: none; box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; padding: 0px; border: 0px; vertical-align: baseline; font-size: 16px; color: var(--md-editor-text-color-active); overflow: auto hidden; font-family: -apple-system, "SF UI Text", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif, SimHei, SimSun; text-wrap: wrap; background-color: rgb(255, 255, 255); line-height: 1.429em !important;">通过路径<code class="hljs language-moonscript" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); outline: none; box-sizing: border-box; font-family: -apple-system, "SF UI Text", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif, SimHei, SimSun; font-size: 1em; margin: 0px; padding: 2px 6px; border: 0px; vertical-align: baseline; color: rgb(171, 178, 191); background: rgb(40, 44, 52); border-radius: 4px; display: inline-block;">计算机\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HTTP</code>找到<code class="hljs language-crmsh" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); outline: none; box-sizing: border-box; font-family: -apple-system, "SF UI Text", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif, SimHei, SimSun; font-size: 1em; margin: 0px; padding: 2px 6px; border: 0px; vertical-align: baseline; color: rgb(171, 178, 191); background: rgb(40, 44, 52); border-radius: 4px; display: inline-block;"><span class="hljs-literal" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); outline: none; box-sizing: border-box; margin: 0px; padding: 0px; border: 0px; vertical-align: baseline; color: rgb(86, 182, 194); line-height: normal;">Start</span></code>,将它的值修改为0,然后电脑重启即可。<br/><img src="https://img-blog.csdnimg.cn/258d93c79e4f4cc8800becfe59de1572.png?x-oss-process=image,type_d3F5LXplbmhlaQ,shadow_50,text_Q1NETiBAQ3rojIPnibnopb8=,size_20,color_FFFFFF,t_70,g_se,x_16#pic_center" alt="在这里插入图片描述" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); outline: none; box-sizing: border-box; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; max-width: 100%; height: auto;"/></p><p style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0); outline: none; box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; padding: 0px; border: 0px; vertical-align: baseline; font-size: 16px; color: var(--md-editor-text-color-active); overflow: auto hidden; font-family: -apple-system, "SF UI Text", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif, SimHei, SimSun; text-wrap: wrap; background-color: rgb(255, 255, 255); line-height: 1.429em !important;">来源:https://huaweicloud.csdn.net/63563a96d3efff3090b5b616.html</p><p><br/></p>
最近遇到个客户,硬要学别人使用域名加8080端口访问,使用宝塔搭建的环境在新增网站的时候是无法新增使用8080端口的,会提示“端口范围不合法”,没辙只能通过分析宝塔代码发现了如下验证端口函数#检查端口是否合法def checkPort(port): if not re.match("^\d+$",port): return False ports = ['21',