JZTXT
  • 首页
  • Ai
  • Java
  • Python
  • Android
  • Mysql
  • JavaScript
  • Html
  • CSS

nginx设置强制域名访问https

发布时间 2023-07-06 10:39:21作者: 童年的回忆

先配置ssl的server段,再追加:

server {
     listen 80;
     server_name www.xxx.com;
     rewrite ^(.*)$  https://$host$1 permanent;
}

 

    本栏目推荐文章
  • nginx 一个域名区分pc和手机!
  • https://mp.weixin.qq.com/s/dBVwoInshAv3wMxkx9Sfvw
  • 安装npm install报错npm ERR! code ETIMEDOUT npm ERR! errno ETIMEDOUT npm ERR! network request to https://registry.npmjs.org/webpack-subresource-integrity failed, reason
  • 函数计算域名调试web应用
  • nginx启用HTTP2特性
  • nginx代理header丢失的问题
  • Nginx——配置代理-服务的代理
  • "nginx.conf" E514 : write error (file system full?)
  • netCore 6.0中配置 HTTPS证书和请求的域名
  • YAML示例:nginx使用configmap配置并开启镜像
版权声明:本网站为非赢利性站点,本网站所有内容均来源于互联网相关站点自动搜索采集信息,相关链接已经注明来源。
联系我们