Nginx强制使用https访问(http跳转到https)
index.html
<html> <meta http-equiv="refresh" content="0;url=https://www.starRTC.com/"> </html>
server { listen 80; server_name www.starRTC.com; location / { #index.html放在虚拟主机监听的根目录下 root /www; } #将404的页面重定向到https的首页 error_page 404 https://www.starRTC.com/; }
时间宝贵,只能复制+粘贴,若图片无法显示或排版混乱,请访问https://elesos.github.io查找原文