可以同时打开80端口和443端口。
打开的话,80端口最好做一下重定向,如果你是IIS的话,
IIS管理中SSL设置的“需要SSL”需要勾选,这样当访问不是http的页面时就会先跳转到403错误页面,然后再跳转到https页面
在C:\inetpub\custerr\zh-CN 下,
对403报错的页面的内容进行替换,(注意最好备份一下这个文件)
将403里面的内容全部替换为以下:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="HTTP to HTTPS redirect" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="off" ignoreCase="true" />
</conditions>
<action type="Redirect" redirectType="Found" url="https://{HTTP_HOST}/{R:1}" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
Today's comments have reached the limit. If you want to comment, please wait until tomorrow (UTC-Time).
There is 19h57m52s left until you can comment.