宝塔设置默认站点防止SSL泄露源站

防止ssl泄露也就是搞个错的ssl搞成默认站点让一些机构无法扫描

首先我们以宝塔为例

点击网站-创建网站-域名随便填,然后保存,点击ssl,上传下面的ssl证书,把pem和key复制粘贴就行,然后开启强制HTTPS

图片[1]-宝塔设置默认站点防止SSL泄露源站-阿宅学院

PEM文件

-----BEGIN CERTIFICATE-----
MIIFDjCCA/agAwIBAgIBDDANBgkqhkiG9w0BAQUFADBpMQswCQYDVQQGEwJISzEP
MA0GA1UECAwG6aaZ5rivMQ8wDQYDVQQHDAbpppnmuK8xFDASBgNVBAoMC0JFQyBS
T09UIENBMRQwEgYDVQQLDAtCRUMgUk9PVCBDQTEMMAoGA1UEAwwDQkVDMB4XDTIy
MTAxNzE1Mzc1MVoXDTMyMTAxNDE1Mzc1MVowZTELMAkGA1UEBhMCSEsxDzANBgNV
BAgMBumakOiXjzEPMA0GA1UEBwwG6ZqQ6JePMQ8wDQYDVQQKDAbpmpDol48xDzAN
BgNVBAsMBumakOiXjzESMBAGA1UEAwwJbG9jYWxob3N0MIIBIjANBgkqhkiG9w0B
AQEFAAOCAQ8AMIIBCgKCAQEAsTvfI2XWvPFAeOfBFcwyH2y3IBDIf74JBWA/Bi7u
dN6XvjyU2Y7D9xtI7zJv0wtCtfrf3iDoRO7ZiLxsqqgLYCn7R6nWTndidPFaVRRo
6lSuT96+Qmi7qwAKhfQcdbDbhG5QJV9u+gXlEwxWPlKC3B1voEHXQ6aDjCsI8Zgw
x7rGPDzBWiO6pjgLxqTvGKcsGV4h7+gPIhfJCrxTqwW2HJIHWTnk3Tc4LO3g5BK8
53LA5PBfP8umI3AVkWP4xwq2u1rg6bSzitzzAvdSHcc5ZREiOC01e/zeclE9V59P
TVAckAsXys5wZXtcNqmIzAiXxKyjhbYhaxwz9RnBxpIO6wIDAQABo4IBwzCCAb8w
CQYDVR0TBAIwADARBglghkgBhvhCAQEEBAMCBkAwCwYDVR0PBAQDAgXgMCAGCWCG
SAGG+EIBDQQTFh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Cc1isiTIMYNorcLossz3Z0LC/opQM2q56Y
1l3O/r0mIjp0gtD3t/fVyThvrwKBgQDDigFsm25PiwSZgLAnzasIeCfxx7IPVeVb
untLUooU03nfcu2njlm1Jhk+hNTdFb/rrXc5+Gw8VM0TYBMPW4EPWrhBaE0/QWer
6AxEmAn60VzxpVlZ+LpsOJQyTu3mlOutetGk+g2PzE66J+986FZijK7gnPoNPgaY
MlntnkHHhQKBgD5OVgtVLmFQHj4vmlxjH1Pyx1MlYiauRGNrkdXY9Rf3F1sdRbNq
Ubo7k5UiB2pzl6tLUrIp7AzzBrS8qrknsG3KU4N0ZXpx1PWCYj182vbCDMfZAQI8
SCzXmsQfsT3aiaiotMgRLXQtCyXdA6NKvLnekW/x9PxgPDiof7Y6aBslAoGBAJDa
WiW/mt84B8dDKrvBwxK6GDUnDwQHSKpEIfPxiDLXWnAqbl1yuYfVWlwTALFq3ErV
rP33xw6Gb4kL4fK9gYUDWn2xq4/RfuA9PWFPFA2HLQghymg5NrjWzQnbqKbo6RIR
at6BEqzU1/lVfjcU0nGc8Cuafi5zJWV332CEnQwVAoGAdazAXmd0oO6p1PTPCZyK
SlQa1g6b0cNhuAKK+h59IqodipK8XPynL9BrJAkZo3/k+nyh+8AnXcCjJRoKvwxu
wRkoF3CVRzRtK4Wn1E/btruqv7hZYLZNFg43c1UTHDYCAORjDV8FsLv1SYLDXTIX
dhRK72kJI/ag1EkEDJLMavU=
-----END PRIVATE KEY-----

弄好之后点击默认站点,选择刚刚添加的域名

图片[2]-宝塔设置默认站点防止SSL泄露源站-阿宅学院
图片[3]-宝塔设置默认站点防止SSL泄露源站-阿宅学院
展示

简单粗暴,非常优秀。

一般我们都会在宝塔里面配置ssl配合cdn使用,那我们就默认已经有一个ssl站点了,只需要把我们的任意一个ssl站点设置为默认站点即可


    © 版权声明
    THE END
    支持博主,更新加速
    点赞2赞赏 分享
    勋章统计

    评论一下 抢沙发

    请登录后发表评论

      请登录后查看评论内容