宝塔51特惠活动,企业版1099元/年,送SSL证书,最高立减2万元!查看活动
当前位置:论坛首页 > Windows面板 > 求助

【待反馈】win iis10 强制https打不开

发表在 Windows面板2021-6-29 09:29 [复制链接] 8 6247

win  iis10配置ssl以后,强制https打不开,然后https://www.bt.cn/bbs/thread-51777-1-1.html 按照这个操作,一直都是500
使用道具 举报 只看该作者 回复
发表于 2021-6-29 10:21:45 | 显示全部楼层
什么项目?ASP还是PHP?重复检查设置是否存在问题,可以将设置贴出来看看帮你分析一下
使用道具 举报 回复 支持 反对
发表于 2021-6-29 10:23:28 | 显示全部楼层
堡塔运维赤井秀一 发表于 2021-6-29 10:21
什么项目?ASP还是PHP?重复检查设置是否存在问题,可以将设置贴出来看看帮你分析一下 ...

asp   

  1. <?xml version="1.0" ?>
  2. <configuration>
  3.         <location allowOverride="false" inheritInChildApplications="false" path=".">
  4.                 <system.webServer>
  5.                         <rewrite>
  6.                                 <rules configSource="web_config\rewrite.config"></rules>
  7.                         </rewrite>
  8.                         <defaultDocument configSource="web_config\default.config"></defaultDocument>
  9.                         <httpErrors configSource="web_config\httpErrors.config"></httpErrors>
  10.                         <handlers configSource="web_config\php.config"></handlers>
  11.                 </system.webServer>
  12.         </location>
  13. </configuration>
复制代码
使用道具 举报 回复 支持 反对
发表于 2021-6-29 10:28:44 | 显示全部楼层

看了一下,你这也没有设置强制HTTPS吖,将下面的规则放到system.webserver里面
  1. <rewrite>
  2.       <rules>
  3.         <rule name="HTTP to HTTPS redirect" stopProcessing="true">
  4.           <match url="(.*)" />
  5.           <conditions>
  6.             <add input="{HTTPS}" pattern="off" ignoreCase="true" />
  7.           </conditions>
  8.           <action type="Redirect" redirectType="Found" url="https://{HTTP_HOST}/{R:1}" />
  9.         </rule>
  10.       </rules>
  11.     </rewrite>
复制代码


使用道具 举报 回复 支持 反对
发表于 2021-6-29 10:38:12 | 显示全部楼层
堡塔运维赤井秀一 发表于 2021-6-29 10:28
看了一下,你这也没有设置强制HTTPS吖,将下面的规则放到system.webserver里面

放进去就打不开网页了
  1. <?xml version="1.0" ?>
  2. <configuration>
  3.         <location allowOverride="false" inheritInChildApplications="false" path=".">
  4.                 <system.webServer>
  5.                         <rewrite>
  6.       <rules>
  7.         <rule name="HTTP to HTTPS redirect" stopProcessing="true">
  8.           <match url="(.*)" ></match>
  9.           <conditions>
  10.             <add input="{HTTPS}" pattern="off" ignoreCase="true" ></add>
  11.           </conditions>
  12.           <action type="Redirect" redirectType="Found" url="https://{HTTP_HOST}/{R:1}" ></action>
  13.         </rule>
  14.       </rules>
  15.     </rewrite>
  16.                         <defaultDocument configSource="web_config\default.config"></defaultDocument>
  17.                         <httpErrors configSource="web_config\httpErrors.config"></httpErrors>
  18.                         <handlers configSource="web_config\php.config"></handlers>
  19.                 </system.webServer>
  20.         </location>
  21. </configuration>
复制代码
使用道具 举报 回复 支持 反对
发表于 2021-6-29 10:58:27 | 显示全部楼层
宝塔用户_zhbloh 发表于 2021-6-29 10:38
放进去就打不开网页了
  1. <?xml version="1.0" ?>
  2. <configuration>
  3.         <location allowOverride="false" inheritInChildApplications="false" path=".">
  4.                 <system.webServer>
  5.                                 <rewrite>
  6.                                         <rules>
  7.                                                 <rule name="HTTP to HTTPS redirect" stopProcessing="true">
  8.                                                         <match url="(.*)" />
  9.                                                         <conditions>
  10.                                                                 <add input="{HTTPS}" pattern="off" ignoreCase="true" />
  11.                                                         </conditions>
  12.                                                         <action type="Redirect" url="https://{HTTP_HOST}/{R:1}"
  13.                                                                 redirectType="Permanent" />
  14.                                                 </rule>
  15.                                         </rules>
  16.                                         <outboundRules>
  17.                                                 <rule name="Add Strict-Transport-Security when HTTPS" enabled="true">
  18.                                                         <match serverVariable="RESPONSE_Strict_Transport_Security"
  19.                                                                 pattern=".*" />
  20.                                                         <conditions>
  21.                                                                 <add input="{HTTPS}" pattern="on" ignoreCase="true" />
  22.                                                         </conditions>
  23.                                                         <action type="Rewrite" value="max-age=31536000" />
  24.                                                 </rule>
  25.                                         </outboundRules>
  26.                                         <rules configSource="web_config\rewrite.config"></rules>
  27.                                 </rewrite>
  28.                                 <defaultDocument configSource="web_config\default.config"></defaultDocument>
  29.                                 <httpErrors configSource="web_config\httpErrors.config"></httpErrors>
  30.                                 <handlers configSource="web_config\php.config"></handlers>
  31.                 </system.webServer>
  32.         </location>
  33. </configuration>
复制代码



试试
使用道具 举报 回复 支持 反对
发表于 2021-6-29 11:05:55 | 显示全部楼层

500 - 内部服务器错误。
您查找的资源存在问题,因而无法显示。
使用道具 举报 回复 支持 反对
发表于 2021-6-29 11:10:52 | 显示全部楼层

修改失败,配置文件格式不正确,请确保配置文件是有效的XML格式!
使用道具 举报 回复 支持 反对
发表于 2021-6-29 11:21:09 | 显示全部楼层
宝塔用户_zhbloh 发表于 2021-6-29 11:10
修改失败,配置文件格式不正确,请确保配置文件是有效的XML格式!

调整一下格式就可以了,直接复制肯定不能用的;方法就是按照上面贴的那样的,那是完整配置,设置正确是可以用的。

这需要一点基础,或者你到网上找其他方案吧。
QQ截图20210629112147.jpg
使用道具 举报 回复 支持 反对
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

普通问题处理

论坛响应时间:72小时

问题处理方式:排队(仅解答)

工作时间:白班:9:00 - 18:00

紧急运维服务

响应时间:3分钟

问题处理方式:宝塔专家1对1服务

工作时间:工作日:9:00 - 18:30

宝塔专业团队为您解决服务器疑难问题

点击联系技术免费分析

工作时间:09:00至18:30

快速回复 返回顶部 返回列表