1、nginx设置https协议
起初地址使用的是服务器的IP地址,使用https协议去访问会出现css、js加载不到,因为使用IP地址访问css、js等使用的http协议,默认我设置的是只有域名才会跳转,IP地址是不会自动跳转的,所以服务器在访问首页的使用找不到css、js等样式,所以会出现以下图形:
当我检查的时候,错误就出现了。
Mixed Content: The page at '<URL>' was loaded over HTTPS, but requested an insecure image '<URL>'. This request has been blocked; the content must be served over HTTPS.
Mixed Content: The page at 'https://www.biaoyun.online/' was loaded over HTTPS, but requested an insecure image 'http://39.96.**/wp-content/uploads/2019/03/favicon-e1555336685574