[英]IIS 503 “Service Unavailable” over HTTPS, HTTP works fine
I have a web site running in IIS 7.5.我有一个在 IIS 7.5 中运行的网站。 When I access the site over HTTP, everything works fine.当我通过 HTTP 访问该站点时,一切正常。 When I run the site over HTTPS, I immediately get an HTTP 503 error "Service Unavailable".当我通过 HTTPS 运行站点时,我立即收到 HTTP 503 错误“服务不可用”。 The SSL certificate used on the site self-generated/self-signed.站点上使用的 SSL 证书是自生成/自签名的。
Here are the solutions that I've seen for similar problems that do not apply to this scenario:以下是我针对不适用于此场景的类似问题所见的解决方案:
The commenter Chad Cothern on this blog had the answer and linked to this Microsoft Blog by BretB. 此博客上的评论者 Chad Cothern 给出了答案,并链接到 BretB 的此 Microsoft 博客。 The problem in this case is that everything on port 443 has been reserved and "prevents W3SVC from obtaining the rights to listen on port 80 when it tries to start the site. Furthermore, applications that run in IIS do not need explicit reservations to run, only non-IIS applications have to reserve a URL namespace if they want to use HTTP to listen for requests."这种情况下的问题是端口 443 上的所有内容都已保留,并且“阻止 W3SVC 在尝试启动站点时获得侦听端口 80 的权限。此外,在 IIS 中运行的应用程序不需要显式保留即可运行,如果非 IIS 应用程序想要使用 HTTP 来侦听请求,则它们必须保留 URL 命名空间。”
Here are the steps to determine if this is the problem and how to resolve:以下是确定这是否是问题以及如何解决的步骤:
netsh http show urlacl url=https://+:443/
运行: netsh http show urlacl url=https://+:443/
netsh http delete urlacl https://+:443/
运行: netsh http delete urlacl https://+:443/
Note, that you can also check port 80, or any other port using this method.请注意,您还可以使用此方法检查端口 80 或任何其他端口。 For instance if port 80 is reserved and 443 is not, then the site over HTTPS would work, while HTTP would not.例如,如果端口 80 被保留而 443 未被保留,那么通过 HTTPS 的站点可以工作,而 HTTP 则不能。
I had a similar issue getting "503 “Service Unavailable”" over HTTPS, HTTP when I checked the console in Firefox.当我在 Firefox 中检查控制台时,我遇到了类似的问题,通过 HTTPS、HTTP 获取“503“服务不可用””。 Everything looked fine on the IIS side: SSL certificate, ports, site running, etc. I checked the modem port and realized it required port 443 forwarding enabled. IIS 端的一切看起来都很好:SSL 证书、端口、站点运行等。我检查了调制解调器端口并意识到它需要启用端口 443 转发。 Only port 80 was forwarding.只有端口 80 正在转发。 But because I was using a modem branded CenturyLink, the router's Remote GUI Management was using the port.但是因为我使用的是品牌为 CenturyLink 的调制解调器,路由器的远程 GUI 管理正在使用该端口。
Lesson learned, if you are using a router branded by CenturyLink or other company that does the same, maybe the same applies.经验教训,如果您使用由 CenturyLink 或其他具有相同功能的公司品牌的路由器,则可能同样适用。 Per the answer here in this link, do:每答案在这里在这个环节,做到:
Common error: "The defined port or port range is in use by another port forwarding or application rule."常见错误:“定义的端口或端口范围正被另一个端口转发或应用程序规则使用。”
If Port 443 is already taken by the router's Remote GUI Management.如果端口 443 已被路由器的远程 GUI 管理占用。 To free up that port:要释放该端口:
Conclusion:结论:
This solved my issue of "503 “Service Unavailable”" over HTTPS.这解决了我在 HTTPS 上的“503“服务不可用”问题。 Port 443 requires to be enabled.需要启用端口 443。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.